Package org.eclipse.wst.xml.xpath2.api.typesystem


org.eclipse.wst.xml.xpath2.api.typesystem
Class PrimitiveType



public class PrimitiveType
extends 


Method Summary

public org.eclipse.wst.xml.xpath2.api.Itemconstruct(java.lang.Object content)
     validate a given string against this simple type.
public java.lang.ClassgetInterfaceClass()
    
public java.lang.ClassgetNativeType()
    
public booleanisEqual(java.lang.Object value1 , java.lang.Object value2)
     Check whether two actual values are equal.
public booleanisIDType()
     Check whether this type is or is derived from ID. REVISIT: this method makes ID special, which is not a good design. but since ID is not a primitive, there doesn't seem to be a clean way of doing it except to define special method like this.
public booleanvalidate(java.lang.String content)
     validate a given string against this simple type.
public booleanvalidateNative(java.lang.Object content)
     validate a given string against this simple type.

Methods Detail

construct

public org.eclipse.wst.xml.xpath2.api.Item construct(java.lang.Object content)

validate a given string against this simple type.

Parameters

content - the string value that needs to be validated

Returns

org.eclipse.wst.xml.xpath2.api.Item - the actual value (QName, Boolean) of the string value


getInterfaceClass

public java.lang.Class getInterfaceClass()

Returns

java.lang.Class - the actual value (QName, Boolean) of the string value


getNativeType

public java.lang.Class getNativeType()

Returns

java.lang.Class - The expected native type (class or interface) to expect when calling getValue.


isEqual

public boolean isEqual(java.lang.Object value1 , java.lang.Object value2)

Check whether two actual values are equal.

Parameters

value1 - the first value

value2 - the second value

Returns

boolean - true if the two value are equal


isIDType

public boolean isIDType()

Check whether this type is or is derived from ID. REVISIT: this method makes ID special, which is not a good design. but since ID is not a primitive, there doesn't seem to be a clean way of doing it except to define special method like this.

Returns

boolean - whether this simple type is or is derived from ID.


validate

public boolean validate(java.lang.String content)

validate a given string against this simple type.

Parameters

content - the string value that needs to be validated

Returns

boolean - the actual value (QName, Boolean) of the string value


validateNative

public boolean validateNative(java.lang.Object content)

validate a given string against this simple type.

Parameters

content - the string value that needs to be validated

Returns

boolean - the actual value (QName, Boolean) of the string value