|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pnp.xfeature.documenttree.SchemaParser
public class SchemaParser
This class represents an XML schema. The schema is loaded through the constructor. The method getElements returns elements which can be added.
| Constructor Summary | |
|---|---|
SchemaParser(java.lang.String filename)
Loads an XML schema into memory. |
|
| Method Summary | |
|---|---|
java.util.List |
getAttributes(java.lang.String element,
java.lang.String parentElement)
Returns a List of Strings containing the attributes for an element. |
boolean |
getAttributesThroughTree(org.apache.xerces.xs.XSParticle particle,
java.lang.String name,
java.util.Vector attributes)
Traverses the tree recursively to find the element with the desired name. |
java.util.List |
getElements(java.lang.String parentElement,
java.util.List children)
Returns a Vector of Strings containing the elements that can be added to the XML tree. |
void |
getParticles(org.apache.xerces.xs.XSParticle particle,
Node parent)
Traverses the tree recursively and creates a tree of Nodes in order to handle the tree easier. |
java.lang.String |
getTargetNamespace()
Not implemented yet |
boolean |
handleError(org.apache.xerces.dom3.DOMError error)
Standard error handler. |
void |
loadModel(java.lang.String filename)
Loads an XML schema into memory. |
java.util.Vector |
loop(int n,
int nmax,
int[] counter,
java.util.Vector[] temp,
java.util.Vector result)
Used to nest loops. |
java.util.Vector |
traverseTree(Node node)
Used to traverse the tree for a calculation. |
boolean |
validate(java.lang.String parentElement,
java.util.List children)
Checks a subtree with a parent element and its children. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SchemaParser(java.lang.String filename)
filename - absolute path of XML schema.| Method Detail |
|---|
public void loadModel(java.lang.String filename)
filename - absolute path of the XML schema.public java.lang.String getTargetNamespace()
public java.util.List getElements(java.lang.String parentElement,
java.util.List children)
parentElement - element a child is added tochildren - List of Strings containing the children elements which are already there
public boolean validate(java.lang.String parentElement,
java.util.List children)
parentElement - parent Element of the subtreechildren - List of Strings containing the children elements which are already there
public void getParticles(org.apache.xerces.xs.XSParticle particle,
Node parent)
particle - parent particleparent - parent nodepublic java.util.Vector traverseTree(Node node)
node - parent nodevalue - can be 1, if branch is selected, otherwise 0
public java.util.Vector loop(int n,
int nmax,
int[] counter,
java.util.Vector[] temp,
java.util.Vector result)
n - current nesting depthnmax - nesting depthcounter - array of int, which contains the loop counter for every looptemp - Vector containing all combinations from every child noderesult - Vector, where the newly created table will be written in
public java.util.List getAttributes(java.lang.String element,
java.lang.String parentElement)
element - name of elementparentElement - name of parent element
public boolean getAttributesThroughTree(org.apache.xerces.xs.XSParticle particle,
java.lang.String name,
java.util.Vector attributes)
particle - parent particlename - name of the elementattributes - Vector of Attributes to be added
public boolean handleError(org.apache.xerces.dom3.DOMError error)
handleError in interface org.apache.xerces.dom3.DOMErrorHandler
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||