com.eviware.soapui.impl.wadl.inference.support
Class TypeInferrer

java.lang.Object
  extended by com.eviware.soapui.impl.wadl.inference.support.TypeInferrer

public class TypeInferrer
extends java.lang.Object

XML Schema inferred from gathered XML data.

Author:
Dain Nilsson

Method Summary
static org.apache.xmlbeans.XmlAnySimpleType expandTypeForValue(java.lang.String value, org.apache.xmlbeans.XmlAnySimpleType baseType)
          Given a value and a type, a new type will be returned that validates values for both the given type, and the new value.
static org.apache.xmlbeans.XmlAnySimpleType getBlankType()
          Get the XmlAnySimpleType that describes a simple value that is empty.
static org.apache.xmlbeans.XmlAnySimpleType getType(java.lang.String typeName)
          Get the instance of the XmlAnySimpleType with the type xs:.
static org.apache.xmlbeans.XmlAnySimpleType inferSimpleType(java.lang.String value)
          Given a simple value, infers the type of the value.
static boolean validateSimpleType(java.lang.String value, org.apache.xmlbeans.XmlAnySimpleType type)
          Validates a string against an XmlAnySimpleType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getType

public static org.apache.xmlbeans.XmlAnySimpleType getType(java.lang.String typeName)
Get the instance of the XmlAnySimpleType with the type xs:.

Parameters:
typeName -
Returns:
Returns the XmlAnySimpleType, if available. Otherwise returns null.

getBlankType

public static org.apache.xmlbeans.XmlAnySimpleType getBlankType()
Get the XmlAnySimpleType that describes a simple value that is empty.

Returns:
Returns the xs:string XmlAnySimpleType.

expandTypeForValue

public static org.apache.xmlbeans.XmlAnySimpleType expandTypeForValue(java.lang.String value,
                                                                      org.apache.xmlbeans.XmlAnySimpleType baseType)
Given a value and a type, a new type will be returned that validates values for both the given type, and the new value.

Parameters:
value - The new value to expand the type for.
baseType - The type to be expanded.
Returns:
The new expanded type.

inferSimpleType

public static org.apache.xmlbeans.XmlAnySimpleType inferSimpleType(java.lang.String value)
Given a simple value, infers the type of the value.

Parameters:
value - The value to assign a type to.
Returns:
Returns the inferred type for the given value.

validateSimpleType

public static boolean validateSimpleType(java.lang.String value,
                                         org.apache.xmlbeans.XmlAnySimpleType type)
Validates a string against an XmlAnySimpleType.

Parameters:
value - The value to validate.
type - The XmlAnySimpleType to validate against.
Returns:
True if the value validates, false if not.


Copyright © 2005-2010 eviware.com. All Rights Reserved.