Package org.dlese.dpc.xml.schema
Class StructureWalker
java.lang.Object
org.dlese.dpc.xml.schema.StructureWalker
Creates an empty "XPath-equivant" instance document Document based on a
venetian-blind-type XML Schema. Provides an intermediate structure for
building a
SchemaNodeMap that is accessible
via XPath keys, and that will hold important information about the Document
elements (see SchemaNode. For example, the
SchemaNodeMap (that is enabled by an StructureWalker) can provide type
definition and validation information, defaults, etc that are accessible via
XPath keys- Author:
- ostwald
-
Field Summary
FieldsModifier and TypeFieldDescriptionorg.dom4j.DocumentThe instance document created by Structure WalkerMapping from xpath to schemaNode instance -
Constructor Summary
ConstructorsConstructorDescriptionStructureWalker(org.dom4j.Element schemaRootElement, SchemaHelper schemaHelper) Constructor for the StructureWalker object -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the namespaceEnabled attribute of the StructureWalker objectgetPath(org.dom4j.Attribute a) Gets the path attribute of the StructureWalker objectgetPath(org.dom4j.Element e) Gets the path attribute of the StructureWalker objectgetPath(org.dom4j.Node n) get the XPath to this element relative to the given context currently, this method will print an XPath that is of the form /itemRecord/educational/....static voidsetDebug(boolean bool) Sets the debug attribute of the StructureWalker class
-
Field Details
-
schemaNodeMap
Mapping from xpath to schemaNode instance -
instanceDocument
public org.dom4j.Document instanceDocumentThe instance document created by Structure Walker
-
-
Constructor Details
-
StructureWalker
public StructureWalker(org.dom4j.Element schemaRootElement, SchemaHelper schemaHelper) throws SchemaHelperException Constructor for the StructureWalker object- Parameters:
schemaRootElement- Description of the ParameterschemaHelper- Description of the Parameter- Throws:
SchemaHelperException- NOT YET DOCUMENTED
-
-
Method Details
-
getNamespaceEnabled
public boolean getNamespaceEnabled()Gets the namespaceEnabled attribute of the StructureWalker object- Returns:
- The namespaceEnabled value
-
getPath
get the XPath to this element relative to the given context currently, this method will print an XPath that is of the form /itemRecord/educational/.... this form can be altered using different context and prefix- Parameters:
n- Description of the Parameter- Returns:
- The path value
-
getPath
Gets the path attribute of the StructureWalker object- Parameters:
a- Description of the Parameter- Returns:
- The path value
-
getPath
Gets the path attribute of the StructureWalker object- Parameters:
e- Description of the Parameter- Returns:
- The path value
-
setDebug
public static void setDebug(boolean bool) Sets the debug attribute of the StructureWalker class- Parameters:
bool- The new debug value
-