/** * 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); } }
/** * 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); } }
/** * 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 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; }
/** * 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); } }
/** * 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; } }
/** * 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; } }
/** * 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; } }
/** * 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; } }
/** * Get the SimpleType object for a built-in simple type (atomic type or list type) * * @param namespace the namespace URI of the type * @param localName the local name of the type * @return the SimpleType, or null if not found */ /*@Nullable*/ public static SimpleType getBuiltInSimpleType(String namespace, String localName) { SchemaType t = BuiltInType.getSchemaType( StandardNames.getFingerprint(namespace, localName)); if (t instanceof SimpleType && ((SimpleType) t).isBuiltInType()) { return (SimpleType) t; } else { return null; } }
/** * Get the SimpleType object for a built-in simple type (atomic type or list type) * * @param namespace the namespace URI of the type * @param localName the local name of the type * @return the SimpleType, or null if not found */ /*@Nullable*/ public static SimpleType getBuiltInSimpleType(String namespace, String localName) { SchemaType t = BuiltInType.getSchemaType( StandardNames.getFingerprint(namespace, localName)); if (t instanceof SimpleType && ((SimpleType) t).isBuiltInType()) { return (SimpleType) t; } else { return null; } }
public void addStartElement(QName newName) { NodeName elemName = new FingerprintedQName(newName.getPrefix(), newName.getNamespaceURI(), newName.getLocalName()); SchemaType typeCode = BuiltInType.getSchemaType(StandardNames.XS_UNTYPED); NamespaceBinding inscopeNS[] = null; addStartElement(elemName, typeCode, inscopeNS); }
public void addStartElement(QName newName) { NodeName elemName = new FingerprintedQName(newName.getPrefix(), newName.getNamespaceURI(), newName.getLocalName()); SchemaType typeCode = BuiltInType.getSchemaType(StandardNames.XS_UNTYPED); NamespaceBinding inscopeNS[] = null; addStartElement(elemName, typeCode, inscopeNS); }
/** * 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); } if (getNamePool().getURI(fingerprint).equals(NamespaceConstant.JAVA_TYPE)) { try { Class namedClass = dynamicLoader.getClass(getNamePool().getLocalName(fingerprint), false, null); if (namedClass == null) { return null; } return new ExternalObjectType(namedClass, this); } catch (XPathException err) { return null; } } return null; }
public void addAttribute(QName attrName, String newValue) { NodeName elemName = new FingerprintedQName(attrName.getPrefix(),attrName.getNamespaceURI(),attrName.getLocalName()); SimpleType typeCode = (SimpleType) BuiltInType.getSchemaType(StandardNames.XS_UNTYPED_ATOMIC); try { receiver.attribute(elemName, typeCode, newValue, VoidLocation.instance(), 0); } catch (XPathException e) { throw new XProcException(e); } }
public void addAttribute(QName attrName, String newValue) { NodeName elemName = new FingerprintedQName(attrName.getPrefix(),attrName.getNamespaceURI(),attrName.getLocalName()); SimpleType typeCode = (SimpleType) BuiltInType.getSchemaType(StandardNames.XS_UNTYPED_ATOMIC); try { receiver.attribute(elemName, typeCode, newValue, VoidLocation.instance(), 0); } catch (XPathException e) { throw new XProcException(e); } }
compileError("Cannot validate a node as 'untyped'", "XTSE1520"); SchemaType t = BuiltInType.getSchemaType(StandardNames.getFingerprint(uri, lname)); if (t == null) { compileError("Unknown built-in type " + typeAtt, "XTSE1520");
int typefp = (int)key; BuiltInAtomicType type = (BuiltInAtomicType)BuiltInType.getSchemaType(typefp);
int typefp = (int)key; BuiltInAtomicType type = (BuiltInAtomicType)BuiltInType.getSchemaType(typefp);
compileError("Cannot validate a node as 'untyped'", "XTSE1520"); SchemaType t = BuiltInType.getSchemaType(StandardNames.getFingerprint(uri, lname)); if (t == null) { compileError("Unknown built-in type " + typeAtt, "XTSE1520");