org.apache.commons.betwixt.schema
Class GlobalElement

java.lang.Object
  extended byorg.apache.commons.betwixt.schema.GlobalElement
All Implemented Interfaces:
Element
Direct Known Subclasses:
ElementReference

public class GlobalElement
extends java.lang.Object
implements Element

Models a global definition of an element.

Version:
$Revision: 190509 $
Author:
Jakarta Commons Team

Field Summary
private  GlobalComplexType complexType
           
private  java.lang.String name
           
static java.lang.String STRING_SIMPLE_TYPE
           
private  java.lang.String type
           
 
Constructor Summary
GlobalElement()
           
GlobalElement(java.lang.String name, GlobalComplexType complexType)
           
GlobalElement(java.lang.String name, java.lang.String type)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 GlobalComplexType getComplexType()
          Gets the anonymous type definition for this element, if one exists.
 java.lang.String getName()
          Gets the element name
 java.lang.String getType()
          Gets the element type
 int hashCode()
           
private  boolean isEqual(java.lang.String one, java.lang.String two)
          Null safe equals method
 void setComplexType(GlobalComplexType type)
          Sets the anonymous type definition for this element
 void setName(java.lang.String string)
          Sets the element name
 void setType(java.lang.String string)
          Sets the element type
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

STRING_SIMPLE_TYPE

public static final java.lang.String STRING_SIMPLE_TYPE
See Also:
Constant Field Values

name

private java.lang.String name

type

private java.lang.String type

complexType

private GlobalComplexType complexType
Constructor Detail

GlobalElement

public GlobalElement()

GlobalElement

public GlobalElement(java.lang.String name,
                     java.lang.String type)

GlobalElement

public GlobalElement(java.lang.String name,
                     GlobalComplexType complexType)
Method Detail

getName

public java.lang.String getName()
Gets the element name

Specified by:
getName in interface Element
Returns:
element name, not null

setName

public void setName(java.lang.String string)
Sets the element name

Parameters:
string - not null

getType

public java.lang.String getType()
Gets the element type

Returns:
the type of the element

setType

public void setType(java.lang.String string)
Sets the element type

Parameters:
string -

getComplexType

public GlobalComplexType getComplexType()
Gets the anonymous type definition for this element, if one exists.

Returns:
ComplexType, null if there is no associated anonymous type definition

setComplexType

public void setComplexType(GlobalComplexType type)
Sets the anonymous type definition for this element

Parameters:
type - ComplexType to be set as the anonymous type definition, null if the type is to be referenced

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()

isEqual

private boolean isEqual(java.lang.String one,
                        java.lang.String two)
Null safe equals method

Parameters:
one -
two -
Returns:

toString

public java.lang.String toString()