|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.xsom.SCD
public abstract class SCD
Schema Component Designator (SCD).
SCD for schema is what XPath is for XML. SCD allows you to select a schema component(s) from a schema component(s).
See XML Schema: Component Designators. This implementation is based on 03/29/2005 working draft.
Constructor Summary | |
---|---|
SCD()
|
Method Summary | |
---|---|
static SCD |
create(java.lang.String path,
javax.xml.namespace.NamespaceContext nsContext)
Parses the string representation of SCD. |
java.util.Collection<XSComponent> |
select(java.util.Collection<? extends XSComponent> contextNodes)
Evaluates the SCD against the given set of context nodes and returns the matched nodes. |
abstract java.util.Iterator<XSComponent> |
select(java.util.Iterator<? extends XSComponent> contextNodes)
Evaluates the SCD against the given set of context nodes and returns the matched nodes. |
java.util.Collection<XSComponent> |
select(XSComponent contextNode)
Evaluates the SCD against the given context node and returns the matched nodes. |
java.util.Collection<XSComponent> |
select(XSSchemaSet contextNode)
Evaluates the SCD against the whole schema and returns the matched nodes. |
XSComponent |
selectSingle(XSComponent contextNode)
Evaluates the SCD against the given context node and returns the matched node. |
XSComponent |
selectSingle(XSSchemaSet contextNode)
Evaluates the SCD against the whole schema set and returns the matched node. |
abstract java.lang.String |
toString()
Returns the textual SCD representation as given to create(String, NamespaceContext) . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SCD()
Method Detail |
---|
public static SCD create(java.lang.String path, javax.xml.namespace.NamespaceContext nsContext) throws java.text.ParseException
This method involves parsing the path expression and preparing the in-memory structure, so this is useful when you plan to use the same SCD against different context node multiple times.
If you want to evaluate SCD just once, use XSComponent.select(java.lang.String, javax.xml.namespace.NamespaceContext)
methods.
path
- the string representation of SCD, such as "/foo/bar".nsContext
- Its NamespaceContext.getNamespaceURI(String)
is used
to resolve prefixes in the SCD to the namespace URI.
java.text.ParseException
public final java.util.Collection<XSComponent> select(XSComponent contextNode)
public final java.util.Collection<XSComponent> select(XSSchemaSet contextNode)
This method is here because XSSchemaSet
doesn't implement XSComponent
.
public final XSComponent selectSingle(XSComponent contextNode)
public final XSComponent selectSingle(XSSchemaSet contextNode)
public abstract java.util.Iterator<XSComponent> select(java.util.Iterator<? extends XSComponent> contextNodes)
contextNodes
- XSComponent
s that represent the context node against
which SCD
is evaluated.
public final java.util.Collection<XSComponent> select(java.util.Collection<? extends XSComponent> contextNodes)
contextNodes
- XSComponent
s that represent the context node against
which SCD
is evaluated.
public abstract java.lang.String toString()
create(String, NamespaceContext)
.
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |