/** * Returns the base type that this type inherits from. * If this type is a Simpletype that is a built in primitive type then null is returned. * * @return the base type. */ /*@NotNull*/ public SchemaType getBaseType() { return AnyType.getInstance(); }
/** * Get the base type * * @return AnyType */ public SchemaType getBaseType() { return AnyType.getInstance(); }
/** * 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. */ /*@NotNull*/ public SchemaType getKnownBaseType() throws IllegalStateException { return AnyType.getInstance(); }
/** * Get the base type * * @return AnyType */ public SchemaType getBaseType() { return AnyType.getInstance(); }
/** * Get the content type allowed by this NodeTest (that is, the type annotation of the matched nodes). * Return AnyType if there are no restrictions. The default implementation returns AnyType. */ public SchemaType getContentType() { return AnyType.getInstance(); }
/** * Get the content type allowed by this NodeTest (that is, the type annotation of the matched nodes). * Return AnyType if there are no restrictions. The default implementation returns AnyType. */ public SchemaType getContentType() { return AnyType.getInstance(); }
/** * 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 SchemaType getKnownBaseType() throws IllegalStateException { return AnyType.getInstance(); }
/** * 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 SchemaType getKnownBaseType() throws IllegalStateException { return AnyType.getInstance(); }
/** * Returns the base type that this type inherits from. * If this type is a Simpletype that is a built in primitive type then null is returned. * * @return the base type. */ public SchemaType getBaseType() { return AnyType.getInstance(); }
/** * Get the base type * @return AnyType */ public SchemaType getBaseType() { return AnyType.getInstance(); }
/** * 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. */ /*@NotNull*/ public SchemaType getKnownBaseType() throws IllegalStateException { return AnyType.getInstance(); }
/** * Returns the base type that this type inherits from. * If this type is a Simpletype that is a built in primitive type then null is returned. * * @return the base type. */ public SchemaType getBaseType() { return AnyType.getInstance(); }
/** * Get the base type * @return AnyType */ public SchemaType getBaseType() { return AnyType.getInstance(); }
/** * Returns the base type that this type inherits from. * If this type is a Simpletype that is a built in primitive type then null is returned. * * @return the base type. */ /*@NotNull*/ public SchemaType getBaseType() { return AnyType.getInstance(); }
/** * Get the content type allowed by this NodeTest (that is, the type of content allowed). * Return AnyType if there are no restrictions. */ public SchemaType getContentType() { switch (kind) { case Type.DOCUMENT: return AnyType.getInstance(); case Type.ELEMENT: return AnyType.getInstance(); case Type.ATTRIBUTE: return AnySimpleType.getInstance(); case Type.COMMENT: return BuiltInAtomicType.STRING; case Type.TEXT: return BuiltInAtomicType.UNTYPED_ATOMIC; case Type.PROCESSING_INSTRUCTION: return BuiltInAtomicType.STRING; case Type.NAMESPACE: return BuiltInAtomicType.STRING; default: throw new AssertionError("Unknown node kind"); } }
/** * Get the content type allowed by this NodeTest (that is, the type of content allowed). * Return AnyType if there are no restrictions. */ public SchemaType getContentType() { switch (kind) { case Type.DOCUMENT: return AnyType.getInstance(); case Type.ELEMENT: return AnyType.getInstance(); case Type.ATTRIBUTE: return AnySimpleType.getInstance(); case Type.COMMENT: return BuiltInAtomicType.STRING; case Type.TEXT: return BuiltInAtomicType.UNTYPED_ATOMIC; case Type.PROCESSING_INSTRUCTION: return BuiltInAtomicType.STRING; case Type.NAMESPACE: return BuiltInAtomicType.STRING; default: throw new AssertionError("Unknown node kind"); } }
/** * Get the content type allowed by this NodeTest (that is, the type of content allowed). * Return AnyType if there are no restrictions. */ public SchemaType getContentType() { switch (kind) { case Type.DOCUMENT: return AnyType.getInstance(); case Type.ELEMENT: return AnyType.getInstance(); case Type.ATTRIBUTE: return AnySimpleType.getInstance(); case Type.COMMENT: return BuiltInAtomicType.STRING; case Type.TEXT: return BuiltInAtomicType.UNTYPED_ATOMIC; case Type.PROCESSING_INSTRUCTION: return BuiltInAtomicType.STRING; case Type.NAMESPACE: return BuiltInAtomicType.STRING; default: throw new AssertionError("Unknown node kind"); } }
/** * Get the content type allowed by this NodeTest (that is, the type of content allowed). * Return AnyType if there are no restrictions. */ public SchemaType getContentType() { switch (kind) { case Type.DOCUMENT: return AnyType.getInstance(); case Type.ELEMENT: return AnyType.getInstance(); case Type.ATTRIBUTE: return AnySimpleType.getInstance(); case Type.COMMENT: return BuiltInAtomicType.STRING; case Type.TEXT: return BuiltInAtomicType.UNTYPED_ATOMIC; case Type.PROCESSING_INSTRUCTION: return BuiltInAtomicType.STRING; case Type.NAMESPACE: return BuiltInAtomicType.STRING; default: throw new AssertionError("Unknown node kind"); } }
private boolean matchesAnnotation(SchemaType annotation) { if (annotation == null) { return false; } if (schemaType == AnyType.getInstance()) { return true; } if (annotation.equals(schemaType)) { return true; } // see if the type annotation is a subtype of the required type int r = config.getTypeHierarchy().schemaTypeRelationship(annotation, schemaType); return r == TypeHierarchy.SAME_TYPE || r == TypeHierarchy.SUBSUMED_BY; }
private boolean matchesAnnotation(SchemaType annotation) { if (annotation == null) { return false; } if (schemaType == AnyType.getInstance()) { return true; } if (annotation.equals(schemaType)) { return true; } // see if the type annotation is a subtype of the required type int r = config.getTypeHierarchy().schemaTypeRelationship(annotation, schemaType); return r == TypeHierarchy.SAME_TYPE || r == TypeHierarchy.SUBSUMED_BY; }