org.merlotxml.util.xml.xerces
Class DTDGrammarSimpleTypeImpl

java.lang.Object
  extended byorg.merlotxml.util.xml.xerces.DTDGrammarSimpleTypeImpl
All Implemented Interfaces:
GrammarSimpleType

public class DTDGrammarSimpleTypeImpl
extends java.lang.Object
implements GrammarSimpleType


Constructor Summary
DTDGrammarSimpleTypeImpl(DTDGrammarComplexTypeImpl complexType, int attributeDeclIndex, org.apache.xerces.impl.dtd.XMLAttributeDecl attributeDecl)
           
 
Method Summary
 int getDefaultType()
          Gets the defaultType attribute of the GrammarSimpleType object
 java.lang.String getDefaultValue()
          Gets the defaultValue attribute of the GrammarSimpleType object
 java.lang.String[] getEnumeration()
          Gets the allowed values for this simple type.
 GrammarComplexType getGrammarComplexType()
          Gets the parent complex type.
 boolean getIsRequired()
          Gets whether this simple type must have a value.
 boolean getIsValid(FieldNode valueNode)
          Validates the proposed content.
 java.lang.String getName()
          Gets the name attribute of the GrammarSimpleType object
 java.lang.String getPrimitiveType()
          Gets the primitiveType attribute of the GrammarSimpleType object.
 int getType()
          Gets the type attribute of the GrammarSimpleType object
 java.lang.String getValidationMessage(FieldNode valueNode)
          Validates the proposed content, and returns an error message, if any.
 boolean isList()
           
 void setValue(FieldNode fieldNode, java.lang.String value)
          Called from MerlotDOMElement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTDGrammarSimpleTypeImpl

public DTDGrammarSimpleTypeImpl(DTDGrammarComplexTypeImpl complexType,
                                int attributeDeclIndex,
                                org.apache.xerces.impl.dtd.XMLAttributeDecl attributeDecl)
Method Detail

getDefaultType

public int getDefaultType()
Description copied from interface: GrammarSimpleType
Gets the defaultType attribute of the GrammarSimpleType object

Specified by:
getDefaultType in interface GrammarSimpleType
Returns:
The defaultType value

getDefaultValue

public java.lang.String getDefaultValue()
Description copied from interface: GrammarSimpleType
Gets the defaultValue attribute of the GrammarSimpleType object

Specified by:
getDefaultValue in interface GrammarSimpleType
Returns:
The defaultValue value

getEnumeration

public java.lang.String[] getEnumeration()
Description copied from interface: GrammarSimpleType
Gets the allowed values for this simple type.

Specified by:
getEnumeration in interface GrammarSimpleType
Returns:
The enumeration value

getIsRequired

public boolean getIsRequired()
Description copied from interface: GrammarSimpleType
Gets whether this simple type must have a value.

XML Schema:

Specified by:
getIsRequired in interface GrammarSimpleType

getIsValid

public boolean getIsValid(FieldNode valueNode)
Description copied from interface: GrammarSimpleType
Validates the proposed content.

Specified by:
getIsValid in interface GrammarSimpleType
Parameters:
valueNode - The Attr or Text that contains the value.
Returns:
The isValid value

getName

public java.lang.String getName()
Description copied from interface: GrammarSimpleType
Gets the name attribute of the GrammarSimpleType object

Specified by:
getName in interface GrammarSimpleType
Returns:
The name value

getGrammarComplexType

public GrammarComplexType getGrammarComplexType()
Description copied from interface: GrammarSimpleType
Gets the parent complex type.

Specified by:
getGrammarComplexType in interface GrammarSimpleType

getPrimitiveType

public java.lang.String getPrimitiveType()
Description copied from interface: GrammarSimpleType
Gets the primitiveType attribute of the GrammarSimpleType object. This is when a simple type has been derived from another.

Specified by:
getPrimitiveType in interface GrammarSimpleType
Returns:
The primitiveType value

isList

public boolean isList()

getType

public int getType()
Description copied from interface: GrammarSimpleType
Gets the type attribute of the GrammarSimpleType object

Specified by:
getType in interface GrammarSimpleType
Returns:
The type value

getValidationMessage

public java.lang.String getValidationMessage(FieldNode valueNode)
Description copied from interface: GrammarSimpleType
Validates the proposed content, and returns an error message, if any.

Specified by:
getValidationMessage in interface GrammarSimpleType
Returns:
The validationMessage value

setValue

public void setValue(FieldNode fieldNode,
                     java.lang.String value)
Called from MerlotDOMElement.

Specified by:
setValue in interface GrammarSimpleType