fr.tireme.schemadoc.SDSchema.XSD
Class XSDComplexTypeDefinitionWrapp

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.XSDComplexTypeDefinitionWrapp
All Implemented Interfaces:
SDComplexType, SDConcreteComponent, SDSchemaContent

public class XSDComplexTypeDefinitionWrapp
extends SDSchemaContentImpl
implements SDComplexType

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

Field Summary
 
Fields inherited from interface fr.tireme.schemadoc.SDSchema.SDComplexType
EXTENSION, EXTENSION_STRING, NO_DERIVATION, NO_DERIVATION_STRING, RESTRICTION, RESTRICTION_STRING
 
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
XSDComplexTypeDefinitionWrapp(org.eclipse.xsd.XSDComplexTypeDefinition xsdComplexTypeDefinition)
          Constructor for the XSDComplexTypeDefinitionWrapp object
 
Method Summary
 SDSchemaContent cloneBaseTypeDefinition()
          Clones the base type definition.
 java.util.List getAttributeContents()
          Gets this complexType attribute contents
 SDSchemaContent getBaseTypeDefinition(SDSchema schema)
          Gets the base type definition (SDComplexType or SDSimpleType)
 java.lang.String getCategory()
          Gets the category of this complex type.
 SDConcreteComponent getContent()
          Returns the Complex Type content
 int getDerivationType()
          Gets the derivation's type of this type
 java.lang.String getDerivationTypeAsString()
          Gets the derivation's type of this type
 java.util.List getDerivedAttributeContents(SDSchema schema)
          Gets the attributes of the derived complex type
 SDAnnotation getSchemaAnnotation()
          Returns the annotation on this complexType
 int getType()
          Provides type to generinc class
 boolean hasAttributes()
          Indicates if this complexType has attributes
 boolean hasContent()
          Returns true if this complexType has some content
 boolean hasDerivedTypeAttributes(SDSchema schema)
          Returns true if the base type has some attributes
 boolean isAnyType()
           
 boolean isDerived()
          Gets whether the type is explicitly derived or not
 boolean isDerivedTypeContentModelAny(SDSchema schema)
          Returns true if the base type content model is any
 boolean isDerivedTypeContentModelEmpty(SDSchema schema)
          Returns true if the base type content model is empty
 boolean isEmpty()
          Is this complex type empty?
 boolean isMixed()
          Indicates if the type is mixed.
 
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

XSDComplexTypeDefinitionWrapp

public XSDComplexTypeDefinitionWrapp(org.eclipse.xsd.XSDComplexTypeDefinition xsdComplexTypeDefinition)
Constructor for the XSDComplexTypeDefinitionWrapp object

Parameters:
xsdComplexTypeDefinition - the eclipse xsd complexType object to wrap
Method Detail

isAnyType

public boolean isAnyType()
Specified by:
isAnyType in interface SDComplexType

isMixed

public boolean isMixed()
Indicates if the type is mixed.

Specified by:
isMixed in interface SDComplexType
Returns:
true if the type is mixed

getCategory

public java.lang.String getCategory()
Gets the category of this complex type.

Specified by:
getCategory in interface SDComplexType
Returns:
String - Either element_only, empty, mixed or simple

isEmpty

public boolean isEmpty()
Is this complex type empty?

Specified by:
isEmpty in interface SDComplexType
Returns:
boolean - true if empty, false otherwise

getContent

public SDConcreteComponent getContent()
Returns the Complex Type content

Specified by:
getContent in interface SDComplexType
Returns:
SDConcreteComponent - an which is SDSimpleType,SDParticle , or null

getBaseTypeDefinition

public SDSchemaContent getBaseTypeDefinition(SDSchema schema)
Gets the base type definition (SDComplexType or SDSimpleType)

Specified by:
getBaseTypeDefinition in interface SDComplexType
Parameters:
schema - - root schema
Returns:
SDSchemaContent - base type

cloneBaseTypeDefinition

public SDSchemaContent cloneBaseTypeDefinition()
Clones the base type definition. Useful for restrictions.

Specified by:
cloneBaseTypeDefinition in interface SDComplexType
Returns:
SDSchemaContent - cloned base type

hasDerivedTypeAttributes

public boolean hasDerivedTypeAttributes(SDSchema schema)
Returns true if the base type has some attributes

Specified by:
hasDerivedTypeAttributes in interface SDComplexType
Parameters:
schema - - root schema
Returns:
boolean - true or false

isDerivedTypeContentModelEmpty

public boolean isDerivedTypeContentModelEmpty(SDSchema schema)
Returns true if the base type content model is empty

Specified by:
isDerivedTypeContentModelEmpty in interface SDComplexType
Parameters:
schema - - root schema
Returns:
boolean -

isDerivedTypeContentModelAny

public boolean isDerivedTypeContentModelAny(SDSchema schema)
Returns true if the base type content model is any

Specified by:
isDerivedTypeContentModelAny in interface SDComplexType
Parameters:
schema - - root schema
Returns:
boolean -

getDerivedAttributeContents

public java.util.List getDerivedAttributeContents(SDSchema schema)
Gets the attributes of the derived complex type

Specified by:
getDerivedAttributeContents in interface SDComplexType
Parameters:
schema - - root schema
Returns:
List - attributes or null if none

hasContent

public boolean hasContent()
Returns true if this complexType has some content

Specified by:
hasContent in interface SDComplexType
Returns:
boolean -

hasAttributes

public boolean hasAttributes()
Indicates if this complexType has attributes

Specified by:
hasAttributes in interface SDComplexType
Returns:
boolean - true if this complexType has attributes

getAttributeContents

public java.util.List getAttributeContents()
Gets this complexType attribute contents

Specified by:
getAttributeContents in interface SDComplexType
Returns:
List - a list of XSDAttributeUseWrapp and XSDAttributeGroupDefinitionWrapp contained in this complexType

getSchemaAnnotation

public SDAnnotation getSchemaAnnotation()
Returns the annotation on this complexType

Specified by:
getSchemaAnnotation in interface SDComplexType
Returns:
SDAnnotation - The annotation on this complexType, or null if there is no annotation.

isDerived

public boolean isDerived()
Gets whether the type is explicitly derived or not

Specified by:
isDerived in interface SDComplexType
Returns:
boolean - true if derived

getDerivationType

public int getDerivationType()
Gets the derivation's type of this type

Specified by:
getDerivationType in interface SDComplexType
Returns:
int - Either SDComplexType.EXTENSION, SDComplexType.RESTRICTION or SDComplexType.NO_DERIVATION

getDerivationTypeAsString

public java.lang.String getDerivationTypeAsString()
Gets the derivation's type of this type

Specified by:
getDerivationTypeAsString in interface SDComplexType
Returns:
String - Either SDComplexType.EXTENSION_STRING, SDComplexType.RESTRICTION_STRING, or SDComplexType.NO_DERIVATION_STRING

getType

public int getType()
Provides type to generinc class

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