/** * Returns the base type that this type inherits from. This method can be used to get the * base type of a type that is known to be valid. * If this type is a Simpletype that is a built in primitive type then null is returned. * * @return the base type. * @throws IllegalStateException if this type is not valid. */ public final SchemaType getBaseType() { if (baseFingerprint == -1) { return null; } else { return BuiltInType.getSchemaType(baseFingerprint); } }
/** * Get the top-level schema type definition with a given QName. * * @param name the name of the required schema type * @return the schema type , or null if there is none * with this name. * @since 9.7 */ /*@Nullable*/ public SchemaType getSchemaType(StructuredQName name) { if (name.hasURI(NamespaceConstant.SCHEMA)) { return BuiltInType.getSchemaTypeByLocalName(name.getLocalPart()); } return null; }
private static BuiltInListType makeListType(String namespace, String lname) { BuiltInListType t = new BuiltInListType(StandardNames.getFingerprint(namespace, lname)); BuiltInType.register(t.getFingerprint(), t); return t; }
private static BuiltInListType makeListType(String namespace, String lname) { BuiltInListType t = new BuiltInListType(StandardNames.getFingerprint(namespace, lname)); BuiltInType.register(t.getFingerprint(), t); return t; }
/** * Returns the base type that this type inherits from. This method can be used to get the * base type of a type that is known to be valid. * If this type is a Simpletype that is a built in primitive type then null is returned. * * @return the base type. * @throws IllegalStateException if this type is not valid. */ /*@Nullable*/ public final SchemaType getBaseType() { if (baseFingerprint == -1) { return null; } else { return BuiltInType.getSchemaType(baseFingerprint); } }
private static BuiltInListType makeListType(String namespace, String lname) { BuiltInListType t = new BuiltInListType(StandardNames.getFingerprint(namespace, lname)); BuiltInType.register(t.getFingerprint(), t); return t; }
/** * Get the top-level schema type definition with a given QName. * * @param name the name of the required schema type * @return the schema type , or null if there is none * with this name. * @since 9.7 */ /*@Nullable*/ public SchemaType getSchemaType(StructuredQName name) { if (name.hasURI(NamespaceConstant.SCHEMA)) { return BuiltInType.getSchemaTypeByLocalName(name.getLocalPart()); } return null; }
/** * Returns the base type that this type inherits from. This method can be used to get the * base type of a type that is known to be valid. * If this type is a Simpletype that is a built in primitive type then null is returned. * * @return the base type. * @throws IllegalStateException if this type is not valid. */ public final SchemaType getBaseType() { if (baseFingerprint == -1) { return null; } else { return BuiltInType.getSchemaType(baseFingerprint); } }
private static BuiltInListType makeListType(String namespace, String lname) { BuiltInListType t = new BuiltInListType(StandardNames.getFingerprint(namespace, lname)); BuiltInType.register(t.getFingerprint(), t); return t; }
SchemaType t = BuiltInType.getSchemaTypeByLocalName(lname); if (t == null) { compileError("Unknown built-in type " + typeAtt, "XTSE1520");
/** * Returns the base type that this type inherits from. This method can be used to get the * base type of a type that is known to be valid. * If this type is a Simpletype that is a built in primitive type then null is returned. * * @return the base type. * @throws IllegalStateException if this type is not valid. */ /*@Nullable*/ public final SchemaType getBaseType() { if (baseFingerprint == -1) { return null; } else { return BuiltInType.getSchemaType(baseFingerprint); } }
/** * Internal factory method to create a BuiltInAtomicType. There is one instance for each of the * built-in atomic types * * @param fingerprint The name of the type * @param baseType The base type from which this type is derived * @return the newly constructed built in atomic type */ private static BuiltInAtomicType makeAtomicType(int fingerprint, SimpleType baseType, boolean ordered) { BuiltInAtomicType t = new BuiltInAtomicType(fingerprint); t.setBaseTypeFingerprint(baseType.getFingerprint()); if (t.isPrimitiveType()) { t.primitiveFingerprint = fingerprint; } else { t.primitiveFingerprint = ((AtomicType)baseType).getPrimitiveType(); } t.ordered = ordered; BuiltInType.register(fingerprint, t); return t; } }
SchemaType t = BuiltInType.getSchemaTypeByLocalName(lname); if (t == null) { compileError("Unknown built-in type " + typeAtt, "XTSE1520");
/** * Get the top-level schema type definition with a given fingerprint. * <p> * This method is intended for internal use and for use by advanced * applications. (The SchemaType object returned cannot yet be considered * a stable API, and may be superseded when a JAXP API for schema information * is defined.) * @param fingerprint the fingerprint of the schema type * @return the schema type , or null if there is none * with this name. */ public SchemaType getSchemaType(int fingerprint) { if (fingerprint < 1023) { return BuiltInType.getSchemaType(fingerprint); } return null; }
/** * Internal factory method to create a BuiltInAtomicType. There is one instance for each of the * built-in atomic types * * @param fingerprint The name of the type * @param baseType The base type from which this type is derived * @param code Alphabetic code chosen to enable ordering of types according to the type hierarchy * @param ordered true if the type is ordered * @return the newly constructed built in atomic type */ /*@NotNull*/ private static BuiltInAtomicType makeAtomicType(int fingerprint, SimpleType baseType, String code, boolean ordered) { BuiltInAtomicType t = new BuiltInAtomicType(fingerprint); t.setBaseTypeFingerprint(baseType.getFingerprint()); if (t.isPrimitiveType()) { t.primitiveFingerprint = fingerprint; } else { t.primitiveFingerprint = ((AtomicType) baseType).getPrimitiveType(); } t.uType = UType.fromTypeCode(t.primitiveFingerprint); t.ordered = ordered; t.alphaCode = code; BuiltInType.register(fingerprint, t); return t; }
/** * Get the ItemType object for a built-in type * @param namespace the namespace URI of the type * @param localName the local name of the type * @return the ItemType, or null if not found */ public static ItemType getBuiltInItemType(String namespace, String localName) { SchemaType t = BuiltInType.getSchemaType( StandardNames.getFingerprint(namespace, localName)); if (t instanceof ItemType) { return (ItemType)t; } else { return null; } }
/** * Internal factory method to create a BuiltInAtomicType. There is one instance for each of the * built-in atomic types * * @param fingerprint The name of the type * @param baseType The base type from which this type is derived * @param ordered true if the type is ordered * @return the newly constructed built in atomic type */ /*@NotNull*/ private static BuiltInAtomicType makeAtomicType(int fingerprint, SimpleType baseType, boolean ordered) { BuiltInAtomicType t = new BuiltInAtomicType(fingerprint); t.setBaseTypeFingerprint(baseType.getFingerprint()); if (t.isPrimitiveType()) { t.primitiveFingerprint = fingerprint; } else { t.primitiveFingerprint = ((AtomicType) baseType).getPrimitiveType(); } t.uType = UType.fromTypeCode(t.primitiveFingerprint); t.ordered = ordered; BuiltInType.register(fingerprint, t); return t; }
/** * Get the ItemType object for a built-in type * @param namespace the namespace URI of the type * @param localName the local name of the type * @return the ItemType, or null if not found */ public static ItemType getBuiltInItemType(String namespace, String localName) { SchemaType t = BuiltInType.getSchemaType( StandardNames.getFingerprint(namespace, localName)); if (t instanceof ItemType) { return (ItemType)t; } else { return null; } }
/** * Internal factory method to create a BuiltInAtomicType. There is one instance for each of the * built-in atomic types * * @param fingerprint The name of the type * @param baseType The base type from which this type is derived * @return the newly constructed built in atomic type */ private static BuiltInAtomicType makeAtomicType(int fingerprint, SimpleType baseType) { BuiltInAtomicType t = new BuiltInAtomicType(fingerprint); t.setBaseTypeFingerprint(baseType.getFingerprint()); if (t.isPrimitiveType()) { t.primitiveFingerprint = fingerprint; } else { t.primitiveFingerprint = ((AtomicType)baseType).getPrimitiveType(); } if (baseType instanceof BuiltInAtomicType) { t.ordered = ((BuiltInAtomicType)baseType).ordered; } BuiltInType.register(t.getFingerprint(), t); return t; } }
/** * Get the ItemType object for a built-in atomic or list type * * @param namespace the namespace URI of the type * @param localName the local name of the type * @return the ItemType, or null if not found */ /*@Nullable*/ public static ItemType getBuiltInItemType(String namespace, String localName) { SchemaType t = BuiltInType.getSchemaType( StandardNames.getFingerprint(namespace, localName)); if (t instanceof ItemType) { return (ItemType) t; } else { return null; } }