org.idoox.xml.schema
Class Member

java.lang.Object
  extended byorg.idoox.xml.schema.SchemaConstruct
      extended byorg.idoox.xml.schema.RepeatableSchemaConstruct
          extended byorg.idoox.xml.schema.Member
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class Member
extends RepeatableSchemaConstruct
implements java.io.Serializable, java.lang.Cloneable

This class represents the member of a structure or argument.

Since:
4.0
See Also:
Serialized Form
Component:
Core

Nested Class Summary
 
Nested classes inherited from class org.idoox.xml.schema.SchemaConstruct
SchemaConstruct.ConstructType
 
Field Summary
 
Fields inherited from class org.idoox.xml.schema.RepeatableSchemaConstruct
maxOccurs, minOccurs, UNBOUNDED
 
Fields inherited from class org.idoox.xml.schema.SchemaConstruct
appInfo, name, reference
 
Constructor Summary
Member()
          Constructors
Member(QName name)
          creates an empty member
Member(QName name, Member referredTo)
          Creates reference member.
Member(QName name, Type memberType)
          Creates a new Member instance.
Member(QName name, Type memberType, boolean nillable)
          Creates a new Member instance.
Member(QName name, Type memberType, int minOccurs, int maxOccurs, boolean nullable)
          Creates a new Member instance.
 
Method Summary
 java.lang.Object clone()
          Shallow-clones the schema construct.
 boolean containsInFirst(java.lang.String localName)
           
 void copyFrom(SchemaConstruct anotherConstruct)
          Copies all the information of another member into this member.
 boolean equals(java.lang.Object other)
           
 Member getReferredMember()
          Returns a referred member.
 java.util.Map getSubstitutionElements()
          Returns the map of subtitutable elements of the member.
 Member getSubstitutionGroup()
          Returns a substitution group of the member.
 Type getType()
          Returns the type of the member.
 int hashCode()
           
 boolean isNillable()
          Returns true if the member is nullable.
 boolean isNullable()
          Deprecated. Use isNillable() instead.
 boolean isReference()
          Returns true if the member is a reference.
 boolean isSubstitutable()
          Returns true if the member is substitutable.
 void setName(QName name)
          Sets the name of the type.
 void setNillable(boolean nullable)
          Sets nillable.
 void setNullable(boolean nullable)
          Deprecated. use setNillable instead
 void setReferredMember(Member referredTo)
          Sets a referred member
 void setSubstitutionGroup(Member substitutionGroup)
          Sets a substitution group of the member.
 void setType(Type memberType)
          Sets the type of the member.
 java.lang.String toIndentedString(int level, java.util.Set alreadyProcessed)
          Returns pretty printed form of the member.
 java.lang.String toString()
          Returns human readable representation of the member.
 
Methods inherited from class org.idoox.xml.schema.RepeatableSchemaConstruct
getMaxOccurs, getMinOccurs, setMaxOccurs, setMinOccurs
 
Methods inherited from class org.idoox.xml.schema.SchemaConstruct
getAppInfo, getAppInfos, getConstructType, getFacets, getJavaName, getName, getParent, getPrefixNamespaceMapping, getReferencedConstruct, parseQName, setAppInfo, setAppInfos, setConstructType, setFacets, setJavaName, setParent, setPrefixNamespaceMapping, setReferencedConstruct, toIndentedString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Member

public Member()
Constructors


Member

public Member(QName name)
creates an empty member

Parameters:
name - name of the member

Member

public Member(QName name,
              Type memberType)
Creates a new Member instance.

Parameters:
name - the name of the member
memberType - the type of the member

Member

public Member(QName name,
              Type memberType,
              boolean nillable)
Creates a new Member instance.

Parameters:
name - the name of the member
memberType - the type of the member
nillable - nillability of the element

Member

public Member(QName name,
              Type memberType,
              int minOccurs,
              int maxOccurs,
              boolean nullable)
Creates a new Member instance.

Parameters:
name - the name of the member
memberType - the memberType of the member
minOccurs - the minimal occurence of the member
maxOccurs - the maximal occurence of the member
nullable - true if might be nullable

Member

public Member(QName name,
              Member referredTo)
Creates reference member.

Parameters:
name - name of the member
referredTo - the referred member
Method Detail

getType

public Type getType()
Returns the type of the member.

Returns:
the type of the member

setType

public void setType(Type memberType)
Sets the type of the member.

Parameters:
memberType - the type of the member

getReferredMember

public Member getReferredMember()
Returns a referred member.

Returns:
the referred member

setReferredMember

public void setReferredMember(Member referredTo)
Sets a referred member

Parameters:
referredTo - the referred member

isReference

public boolean isReference()
Returns true if the member is a reference.

Returns:
true if the member is a reference

isNullable

public boolean isNullable()
Deprecated. Use isNillable() instead.

Returns true if the member is nullable.

Returns:
true if the member is nullable

setNullable

public void setNullable(boolean nullable)
Deprecated. use setNillable instead

Sets nullable.

Parameters:
nullable - true if the member is nullable

isNillable

public boolean isNillable()
Returns true if the member is nullable.

Returns:
true if the member is nullable

setNillable

public void setNillable(boolean nullable)
Sets nillable.

Parameters:
nullable - true if the member is nullable

getSubstitutionGroup

public Member getSubstitutionGroup()
Returns a substitution group of the member.

Returns:

setSubstitutionGroup

public void setSubstitutionGroup(Member substitutionGroup)
Sets a substitution group of the member.

Parameters:
substitutionGroup -

getSubstitutionElements

public java.util.Map getSubstitutionElements()
Returns the map of subtitutable elements of the member.

Returns:

isSubstitutable

public boolean isSubstitutable()
Returns true if the member is substitutable.

Returns:

toString

public java.lang.String toString()
Returns human readable representation of the member.

Returns:
string containing the human readable representation of the member

toIndentedString

public java.lang.String toIndentedString(int level,
                                         java.util.Set alreadyProcessed)
Returns pretty printed form of the member.

Overrides:
toIndentedString in class SchemaConstruct
Parameters:
level - the current indentation level
alreadyProcessed - set of already printed types (for cycle detection)
Returns:
the pp. text representation

equals

public boolean equals(java.lang.Object other)

hashCode

public int hashCode()

setName

public void setName(QName name)
Description copied from class: SchemaConstruct
Sets the name of the type.

Overrides:
setName in class SchemaConstruct
Parameters:
name - the new name

clone

public java.lang.Object clone()
Description copied from class: SchemaConstruct
Shallow-clones the schema construct.

Overrides:
clone in class SchemaConstruct
Returns:
the shallow-clone of the schema construct

copyFrom

public void copyFrom(SchemaConstruct anotherConstruct)
Copies all the information of another member into this member.

Overrides:
copyFrom in class RepeatableSchemaConstruct
Parameters:
anotherConstruct - the another member

containsInFirst

public boolean containsInFirst(java.lang.String localName)
Overrides:
containsInFirst in class SchemaConstruct