|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.edustructures.sifworks.tools.mapping.Rule
com.edustructures.sifworks.tools.mapping.XPathRule
public class XPathRule
A Rule class to evaluate XPath-like queries as defined by the
SIFDTD.lookupByXPath method
| Constructor Summary | |
|---|---|
XPathRule(java.lang.String definition)
Constructor |
|
| Method Summary | |
|---|---|
Rule |
copy(FieldMapping newParent)
Produces a duplicate of this Rule object |
org.apache.commons.jxpath.ri.model.NodePointer |
createPath(SIFXPathContext context,
SIFVersion version)
Builds out the path specified by this XPath rule and returns the final Element in the path |
SIFSimpleType |
evaluate(SIFXPathContext xpathContext,
SIFVersion version)
Evaluates this rule against a SIFDataObject and returns the text value of the element or attribute that satisfied the query. |
java.lang.String |
getPathExpression()
|
java.lang.String |
getValueExpression()
|
java.lang.String |
getXPath()
|
ElementDef |
lookupTargetDef(ElementDef parent)
Looks up the ElementDef that this XPathRule points to by XPath |
java.lang.String |
toString()
Render this Rule as an XML element |
void |
toXML(org.w3c.dom.Node parent)
Render this XPathRule as an XML DOM Node |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public XPathRule(java.lang.String definition)
definition - An XPath-like query (e.g. "@RefId",
"StudentAddress/Address[@Type='H','M']/Street/Line1") to evaluate
against the SIFDataObject passed to the evaluate method| Method Detail |
|---|
public Rule copy(FieldMapping newParent)
copy in class RulenewParent - The FieldMapping to copy this rule to
public void toXML(org.w3c.dom.Node parent)
toXML in class Ruleparent - The XML node to write topublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getXPath()
public java.lang.String getValueExpression()
public java.lang.String getPathExpression()
public SIFSimpleType evaluate(SIFXPathContext xpathContext,
SIFVersion version)
throws ADKSchemaException
Rule
evaluate in class RulexpathContext - The SIFXPathContext instance to use for object traversalversion - The SIF Version that is in effect
ADKSchemaException - If the xpath expression cannot be resolved
public org.apache.commons.jxpath.ri.model.NodePointer createPath(SIFXPathContext context,
SIFVersion version)
context - version -
public ElementDef lookupTargetDef(ElementDef parent)
parent - The parent object metadata object, representing the root of the path
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||