org.inria.ns.reflex.processor.asl.types.xs
Class QNameType

java.lang.Object
  extended by org.inria.ns.reflex.processor.asl.types.xs.QNameType
All Implemented Interfaces:
NamedType, Type

public class QNameType
extends Object
implements Type

The implementation of the #xs:QName type.

*** Not yet implemented. ***

Author:
Philippe Poulard

Field Summary
static QNameType QNAME_TYPE
          A singleton of this type.
static QName TYPE_NAME
          The qualified name of this type.
 
Constructor Summary
QNameType()
           
 
Method Summary
 TypedData cast(Object o, XPathContext context)
          Cast an object to a StringData.
 Comparator getComparator()
          Return a comparator that compares QNames.
 Schema getOwnerSchema()
          Return the schema that owns this type definition.
 QName getParentType()
          Return #xs:anySimpleType.
 QName getTypeName()
          Return the name of this type.
 TypedData parse(String string, XPathContext context)
          Create a wrapper for a QName.
 TypedData parse(TextCandidate text, XPathContext context)
          Create a wrapper for a QName.
 TypedData parse(TypedData data, XPathContext context)
          Create a QName data from a remainder of a typed data.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_NAME

public static final QName TYPE_NAME
The qualified name of this type.


QNAME_TYPE

public static final QNameType QNAME_TYPE
A singleton of this type.

Constructor Detail

QNameType

public QNameType()
Method Detail

getComparator

public Comparator getComparator()
Return a comparator that compares QNames.

Specified by:
getComparator in interface Type
Returns:
A non-null comparator that may comparate datas of this type.
See Also:
Type.getComparator()

parse

public TypedData parse(TextCandidate text,
                       XPathContext context)
                throws TypeFormatException
Create a wrapper for a QName.

Specified by:
parse in interface Type
Parameters:
text - The input QName.
context - Not used.
Returns:
The QName data that wraps the input string.
Throws:
TypeFormatException - Never thrown.

parse

public TypedData parse(TypedData data,
                       XPathContext context)
                throws TypeFormatException
Create a QName data from a remainder of a typed data.

Parameters:
data - The input QName.
context - Not used.
Returns:
The QName data that wraps the input string.
Throws:
TypeFormatException - Never thrown.

parse

public TypedData parse(String string,
                       XPathContext context)
                throws TypeFormatException
Create a wrapper for a QName.

Parameters:
string - The input QName.
context - Used for resolving prefix mappings.
Returns:
The QName data that wraps the input string.
Throws:
TypeFormatException - Never thrown.

cast

public TypedData cast(Object o,
                      XPathContext context)
               throws TypeFormatException
Cast an object to a StringData.

Specified by:
cast in interface Type
Parameters:
o - The object to cast.
context - Not used.
Returns:
The string data that wraps the input string.
Throws:
TypeFormatException - Never thrown.

getTypeName

public QName getTypeName()
Return the name of this type.

Specified by:
getTypeName in interface NamedType
Returns:
xs:string.

getParentType

public QName getParentType()
Return #xs:anySimpleType.

Specified by:
getParentType in interface Type
Returns:
xs:anySimpleType.
See Also:
AnySimpleType

getOwnerSchema

public Schema getOwnerSchema()
Return the schema that owns this type definition.

Specified by:
getOwnerSchema in interface Type
Returns:
The schema that owns this type definition.
See Also:
Type.getOwnerSchema()