net.sf.saxon.pattern
public class ContentTypeTest extends NodeTest
Constructor Summary | |
---|---|
ContentTypeTest(int nodeKind, SchemaType schemaType, Configuration config)
Create a ContentTypeTest |
Method Summary | |
---|---|
boolean | equals(Object other)
Indicates whether some other object is "equal to" this one. |
AtomicType | getAtomizedItemType()
Get the item type of the atomic values that will be produced when an item
of this type is atomized (assuming that atomization succeeds) |
SchemaType | getContentType()
Get the content type allowed by this NodeTest (that is, the type annotation of the matched nodes).
|
double | getDefaultPriority()
Determine the default priority of this node test when used on its own as a Pattern |
int | getNodeKindMask()
Get a mask indicating which kinds of nodes this NodeTest can match. |
int | getPrimitiveType()
Determine the types of nodes to which this pattern applies. |
SchemaType | getSchemaType() |
ItemType | getSuperType(TypeHierarchy th) |
int | hashCode()
Returns a hash code value for the object. |
boolean | isNillable()
The test is nillable if a question mark was specified as the occurrence indicator |
boolean | matches(int nodeKind, int fingerprint, int annotation)
Test whether this node test is satisfied by a given node |
boolean | matches(TinyTree tree, int nodeNr)
Test whether this node test is satisfied by a given node on a TinyTree. |
boolean | matches(NodeInfo node)
Test whether this node test is satisfied by a given node. |
boolean | matchesDTDTypes()
Test whether DTD-derived content types should be matched (the default is false) |
void | setMatchDTDTypes(boolean matched)
Indicate whether DTD-derived content types should be matched (the default is false) |
void | setNillable(boolean nillable)
Indicate whether nilled elements should be matched (the default is false) |
String | toString() |
Parameters: nodeKind the kind of nodes to be matched: always elements or attributes schemaType the required type annotation, as a simple or complex schema type config the Configuration, supplied because this KindTest needs access to schema information
Returns: the type of node matched by this pattern. e.g. Type.ELEMENT or Type.TEXT
Returns: true if the test is nillable
Parameters: nodeKind The type of node to be matched fingerprint identifies the expanded name of the node to be matched annotation The actual content type of the node
Parameters: tree the TinyTree containing the node nodeNr the number of the node within the TinyTree
Returns: true if the node matches the NodeTest, otherwise false
Parameters: node the node to be matched
Returns: true if DTD-derived types should be matched. If false, DTD-derived types are treated as untypedAtomic
Parameters: matched true if DTD-derived types should be matched. If false, DTD-derived types are treated as untypedAtomic
Parameters: nillable true if nilled elements should be matched