edu.wpi.cs.DSRG.xmldb.DTDWrapper
Class AttributeDeclaration
java.lang.Object
|
+--edu.wpi.cs.DSRG.xmldb.DTDWrapper.AttributeDeclaration
- public class AttributeDeclaration
- extends java.lang.Object
This class provide interface to get the information about
attribute declaration from the XML Schema DOM Tree.
Field Summary |
(package private) edu.wpi.cs.DSRG.xmldb.DTDWrapper.Element |
attribute_declaration
The DOM Tree node that is the root of subtree that can
store the information about the attribute declaration. |
Constructor Summary |
AttributeDeclaration(edu.wpi.cs.DSRG.xmldb.DTDWrapper.Element attribute)
Store the DOM Tree node, and create the Attribute Declaration object. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
attribute_declaration
edu.wpi.cs.DSRG.xmldb.DTDWrapper.Element attribute_declaration
- The DOM Tree node that is the root of subtree that can
store the information about the attribute declaration.
XQL: ./type[1]/attribute
It will be used as "." of XQL in the following methods.
AttributeDeclaration
public AttributeDeclaration(edu.wpi.cs.DSRG.xmldb.DTDWrapper.Element attribute)
- Store the DOM Tree node, and create the Attribute Declaration object.
getName
public java.lang.String getName()
- Get the Name of the Attribute Declared.
XQL: ./@name
getAttributeType
public java.lang.String getAttributeType()
- Get the Type of the Attribute Declared.
XQL: ./@type
or
XQL: ./datatype[1]/enumeration
process:
if (./@type == "string") return "CDATA"
else if (./@type != "") return ./@type
else if (./datatype[1] == null) return "CDATA"
else return combination of ./datatype[1]/enumeration/@value
getDefaultDeclaration
public java.lang.String getDefaultDeclaration()
- Get the Defaults of the Attribute Declared.
XQL: ./@default
or
XQL: ./@minOccurs
process:
if (./@default != "") return ./@default
else if (./@minOccurs == "1") return "#REQUIRED"
else return "#IMPLIED"
getParent
public ElementTypeDeclaration getParent()
- Get the parent ElementTypeDeclaration of this attribute