fr.tireme.schemadoc.SDSchema.XSD
Class XSDAttributeDeclarationWrapp

java.lang.Object
  extended by fr.tireme.schemadoc.SDSchema.XSD.SDConcreteComponentImpl
      extended by fr.tireme.schemadoc.SDSchema.XSD.SDSchemaContentImpl
          extended by fr.tireme.schemadoc.SDSchema.XSD.XSDAttributeDeclarationWrapp
All Implemented Interfaces:
SDAttribute, SDConcreteComponent, SDConstraint, SDSchemaContent

public class XSDAttributeDeclarationWrapp
extends SDSchemaContentImpl
implements SDAttribute

Author:
Mike Niemaz (niemaz@xrce.xerox.com)

Field Summary
 
Fields inherited from interface fr.tireme.schemadoc.SDSchema.SDSchemaContent
TYPE_ATTRIBUTE, TYPE_ATTRIBUTE_LABEL, TYPE_ATTRIBUTEGROUP, TYPE_ATTRIBUTEGROUP_LABEL, TYPE_COMPLEXTYPE, TYPE_COMPLEXTYPE_LABEL, TYPE_ELEMENT, TYPE_ELEMENT_LABEL, TYPE_GROUP, TYPE_GROUP_LABEL, TYPE_NOTATION, TYPE_NOTATION_LABEL, TYPE_SIMPLETYPE, TYPE_SIMPLETYPE_LABEL
 
Constructor Summary
XSDAttributeDeclarationWrapp(org.eclipse.xsd.XSDAttributeDeclaration xsdAttributeDeclaration)
          Constructor for the XSDAttributeDeclarationWrapp object
 
Method Summary
 java.lang.String getDefaultValue()
          Gets the value of the default constraint, if any
 java.lang.String getFixedValue()
          Gets the value of the fixed constraint, if any
 SDAttribute getResolvedAttributeDeclaration(SDSchema schema)
          Gets the referenced attribute
 SDAnnotation getSchemaAnnotation()
          Returns the annotation on this attribute
 int getType()
          Provides type to generinc class
 SDSimpleType getTypeDefinition(SDSchema schema)
          Gets the simpleType of this attribute
 boolean isAttributeDeclarationReference()
          Indicates if this attribute is a reference
 boolean isDefaultConstraint()
          Returns true if a default constraint have been set to this attribute, false otherwise
 boolean isFixedConstraint()
          Returns true if a fixed constraint have been set to this attribute, false otherwise
 boolean isSetConstraint()
          Returns whether the value of the 'Constraint' attribute is set.
 boolean isTypeAnonymous()
          Returns true if the attribute is based on a pre-defined type
 
Methods inherited from class fr.tireme.schemadoc.SDSchema.XSD.SDSchemaContentImpl
getName, getQName, getSchema, getTargetNamespace, isGlobal
 
Methods inherited from class fr.tireme.schemadoc.SDSchema.XSD.SDConcreteComponentImpl
cloneObject, getContainerDomElement, getDomElement, getID, getLocalRootID, getWrappedObject, isAny, isAnyAttribute, isContainerNull, setID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.tireme.schemadoc.SDSchema.SDSchemaContent
getName, getQName, getSchema, getTargetNamespace, isGlobal
 
Methods inherited from interface fr.tireme.schemadoc.SDSchema.SDConcreteComponent
cloneObject, getContainerDomElement, getDomElement, getID, getLocalRootID, getWrappedObject, isAny, isAnyAttribute, isContainerNull, setID
 

Constructor Detail

XSDAttributeDeclarationWrapp

public XSDAttributeDeclarationWrapp(org.eclipse.xsd.XSDAttributeDeclaration xsdAttributeDeclaration)
Constructor for the XSDAttributeDeclarationWrapp object

Parameters:
xsdAttributeDeclaration - - the wrapped attribute from eclipse XSD
Method Detail

getTypeDefinition

public SDSimpleType getTypeDefinition(SDSchema schema)
Gets the simpleType of this attribute

Specified by:
getTypeDefinition in interface SDAttribute
Parameters:
schema - - root schema
Returns:
SDSimpleType - the simpleType of this attribute

getResolvedAttributeDeclaration

public SDAttribute getResolvedAttributeDeclaration(SDSchema schema)
Gets the referenced attribute

Specified by:
getResolvedAttributeDeclaration in interface SDAttribute
Parameters:
schema - - root schema
Returns:
SDAttribute - the referenced attribute

isAttributeDeclarationReference

public boolean isAttributeDeclarationReference()
Indicates if this attribute is a reference

Specified by:
isAttributeDeclarationReference in interface SDAttribute
Returns:
boolean - true if this attribute is a reference

isTypeAnonymous

public boolean isTypeAnonymous()
Returns true if the attribute is based on a pre-defined type

Specified by:
isTypeAnonymous in interface SDAttribute
Returns:
boolean - true or false

getSchemaAnnotation

public SDAnnotation getSchemaAnnotation()
Returns the annotation on this attribute

Specified by:
getSchemaAnnotation in interface SDAttribute
Returns:
SDAnnotation - The annotation on this attribute, or null

isSetConstraint

public boolean isSetConstraint()
Returns whether the value of the 'Constraint' attribute is set.

Specified by:
isSetConstraint in interface SDAttribute
Returns:
boolean

isDefaultConstraint

public boolean isDefaultConstraint()
Returns true if a default constraint have been set to this attribute, false otherwise

Specified by:
isDefaultConstraint in interface SDConstraint
Returns:
boolean -

isFixedConstraint

public boolean isFixedConstraint()
Returns true if a fixed constraint have been set to this attribute, false otherwise

Specified by:
isFixedConstraint in interface SDConstraint
Returns:
boolean -

getFixedValue

public java.lang.String getFixedValue()
Gets the value of the fixed constraint, if any

Specified by:
getFixedValue in interface SDConstraint
Returns:
String - fixed value or null

getDefaultValue

public java.lang.String getDefaultValue()
Gets the value of the default constraint, if any

Specified by:
getDefaultValue in interface SDConstraint
Returns:
String - default value or null

getType

public int getType()
Provides type to generinc class

Specified by:
getType in interface SDSchemaContent
See Also:
SDSchemaContent.getType()