|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jaxfront.core.type.AbstractType
com.jaxfront.core.type.AbstractCompositeType
public abstract class AbstractCompositeType
This class represents an abstract Composite Type. A composite type is a JAXFront type which groups other JAXFront types. See ComplexGroup and SimpleGroup which both extends this class.
| Field Summary |
|---|
| Fields inherited from class com.jaxfront.core.type.AbstractType |
|---|
_needXUIMaintain, FIELD_ADD, FIELD_LIST_CLOSE_BRACKET, FIELD_LIST_IDENTIFIER, FIELD_LIST_OPEN_BRACKET, FIELD_SLASH, indentChars, MISSING_TYPES_CREATED, PI_TARGET_JAXFRONT_VAR, PROPERTY_USER_CHANGED_SERIALIZE, TAB_HOLDER |
| Fields inherited from interface com.jaxfront.core.type.Type |
|---|
ComplexGroup, ComplexGroupList, CompositeType, DummyType, EmptyType, GroupType, ListType, NONE, SimpleGroup, SimpleGroupList, SimpleType, SimpleTypeList, VirtualType |
| Constructor Summary | |
|---|---|
AbstractCompositeType(SchemaNode schemaElement,
java.util.List types)
AbstractCompositeType constructor. |
|
| Method Summary | |
|---|---|
void |
bind(Document DOM,
org.w3c.dom.Element instanceElement)
Binds an existing W3C element and its value(s) to the underlying W3C element. |
void |
bind(Document DOM,
org.w3c.dom.Element instanceElement,
boolean bindOnlyAvailable)
Binds the values on a W3C element to the underlying JAXFront type. |
void |
bind(java.lang.Object trigger,
Type type)
Binds an existing JAXFront type and its value(s) to myself. |
void |
completeMissingTypes(boolean includingList)
If only available types where created while binding (see flag: JAXFrontProperties.bindOnlyAvailable), this method will create all the missing type sub tree until another simple-/complexgroup list is reached according to its parentlist editing type. |
void |
completeRecursion()
Creates a recursion of a schema element and returns a type that holds the types created during the recursion. |
void |
createChoices()
Creates all possible choice axis if they do not exist. |
Type |
createChoiceType(java.lang.String name)
Lazy creation of a choice type. |
Type |
deepClone(Document dom,
boolean cloneChoices,
boolean includingData)
Creates a deep clone of this type and all its referenced types. |
Type |
deepClone(Document dom,
boolean cloneChoices,
boolean includingData,
boolean includeEditingType,
SchemaNode schemaNode,
org.w3c.dom.Element element)
Creates a deep clone of this type and all its referenced types. |
java.util.List |
getAllRepresentableTypes()
Gets a list of all types that are not represented as tree node. |
java.util.List |
getAllRepresentedTreeTypes()
Gets a list of all represented tree types. |
java.util.List |
getAttributes()
Returns all its attributes. |
Type |
getChild(java.lang.String name)
Gets a child (recursive) type with a given name |
Type |
getChild(java.lang.String name,
java.lang.String namespace)
Gets a child (recursive) type with a given name |
java.util.Set |
getChoiceNames()
In case of a choice, this will returns the choice names. |
Type |
getChoosenType()
Gets the current choosen type of choice type. |
java.util.List |
getComposites()
Gets a list that contains all composite types. |
SimpleType |
getContentType()
Gets a type that has simple content. |
Type |
getDirectChild(java.lang.String name)
Gets a child that belongs to a composite type. |
Type |
getDirectChild(java.lang.String name,
java.lang.String ns)
Gets a child that belongs to a composite type. |
java.util.List |
getDirectChildren()
Gets a list of all childs of a composite type. |
java.util.List |
getDirectChildren(java.lang.String name)
Gets a list of all childs with the same name. |
int |
getDirectChildrenSize()
Gets the count of all direct childrens. |
java.lang.String |
getDisplayValue()
Returns this type as a String representation. |
EmptyType |
getEmptyType()
Gets an empty type. |
Type |
getMixedContent()
Returns the mixed content leaf type or null if none. |
Type |
getParentEditingTypeForName(java.lang.String name)
Walks back up to the last list type holding the whole structure of this composite type. |
java.lang.String[] |
getRelevantChoiceNames()
Gets a list of all relevant choice names. |
java.util.List |
getRelevantChoiceTypes()
Gets a list of all relevant choice types. |
boolean |
hasAttributes()
Returns if any of the composite types has attributes. |
boolean |
hasDialogChildren()
Returns if any of the composite types is a dialog. |
boolean |
hasEmptyContent(boolean checkSerializeDefaults,
boolean checkDefaultValue)
Returns if any of the composite types has empty content. |
boolean |
hasOnlyOneVisibleChild()
|
boolean |
hasOnlySimpleTypes()
Returns true if all my children are simple types. |
boolean |
isComposite()
Returns true if this type consists of other types. |
void |
markAsDirtyXPath()
Checks if the passed type holds a recursive element. |
boolean |
needRecursiveRepresentation()
Returns if this type needs recursive representation. |
void |
release()
Release all allocated resources for this type. |
void |
removeAll()
Removes all childs (composite types) of this type. |
boolean |
removeChild(Type child)
Removes a child from this type. |
void |
removeChoices()
Removes the selected choosen type. |
void |
serialize(java.lang.StringBuffer sb,
int indent,
boolean writeName,
boolean recursive,
boolean serializeEmptyContent)
Serializes the current subTree to a StringBuffer |
void |
setChoosenKeyContextValue(java.lang.String xpathRelativeToChoosenKeyContext,
java.lang.String newValue)
|
void |
setChoosenKeyValue(java.lang.String xpathRelativeToChoosenKey,
java.lang.String newValue)
|
void |
setNeedRecursiveRepresentation(boolean needRecursiveRepresantation)
Sets if recursive presentation is needed for this type. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractCompositeType(SchemaNode schemaElement,
java.util.List types)
schemaElement - the element of the schema that represents this typetypes - the types that belongs to this composite type| Method Detail |
|---|
public void bind(Document DOM,
org.w3c.dom.Element instanceElement)
bind in interface Typebind in class AbstractTypeDOM - the current document (DOM)instanceElement - the instance element to bind
public void bind(Document DOM,
org.w3c.dom.Element instanceElement,
boolean bindOnlyAvailable)
Type
bind in interface Typebind in class AbstractTypeDOM - the current document to which this type belongsinstanceElement - the element to bindbindOnlyAvailable - indicates if the not available elements will be removed from type tree
public void bind(java.lang.Object trigger,
Type type)
bind in interface Typebind in class AbstractTypetype - the JAXFront type to bindtrigger - trigger object e.g. Clipboard,Button used to identify user triggered actionspublic void completeMissingTypes(boolean includingList)
public void completeRecursion()
throws java.lang.CloneNotSupportedException
CompositeType
completeRecursion in interface CompositeTypejava.lang.CloneNotSupportedExceptionpublic void createChoices()
createChoices in interface CompositeTypepublic Type createChoiceType(java.lang.String name)
createChoiceType in interface CompositeTypename - of the choice type.
public Type deepClone(Document dom,
boolean cloneChoices,
boolean includingData)
throws java.lang.CloneNotSupportedException
deepClone in interface TypedeepClone in class AbstractTypedom - the current document (DOM)includingData - indicates if all binded data should be copied as well (default is false)
java.lang.CloneNotSupportedException - if this type cannot be cloned
public Type deepClone(Document dom,
boolean cloneChoices,
boolean includingData,
boolean includeEditingType,
SchemaNode schemaNode,
org.w3c.dom.Element element)
throws java.lang.CloneNotSupportedException
deepClone in interface TypedeepClone in class AbstractTypedom - the current document (DOM)cloneChoices - indicates if choices gets deep clonedincludingData - indicates if data gets copiedelement - if not null, only existing elements gets cloned
java.lang.CloneNotSupportedException - if this type cannot be clonedpublic java.util.List getAllRepresentableTypes()
public java.util.List getAllRepresentedTreeTypes()
public java.util.List getAttributes()
getAttributes in interface CompositeTypepublic Type getChild(java.lang.String name)
Type
getChild in interface TypegetChild in class AbstractTypename - name of the child
Type.getChild(java.lang.String)
public Type getChild(java.lang.String name,
java.lang.String namespace)
Type
getChild in interface TypegetChild in class AbstractTypename - name of the child
Type.getChild(java.lang.String)public java.util.Set getChoiceNames()
getChoiceNames in interface CompositeTypepublic Type getChoosenType()
getChoosenType in interface TypegetChoosenType in class AbstractTypepublic java.util.List getComposites()
getComposites in interface CompositeTypepublic SimpleType getContentType()
getContentType in interface CompositeTypepublic Type getDirectChild(java.lang.String name)
getDirectChild in interface TypegetDirectChild in class AbstractTypename - name of the child to be returned
Type.getDirectChild(java.lang.String)
public Type getDirectChild(java.lang.String name,
java.lang.String ns)
getDirectChild in interface TypegetDirectChild in class AbstractTypename - name of the child to be returnedns - namespace. If it's null ns will be ignored.
Type.getDirectChild(java.lang.String,java.lang.String)public java.util.List getDirectChildren()
getDirectChildren in interface TypegetDirectChildren in class AbstractTypepublic java.util.List getDirectChildren(java.lang.String name)
getDirectChildren in interface TypegetDirectChildren in class AbstractTypethe - name of the child(s)
public int getDirectChildrenSize()
Type
getDirectChildrenSize in interface Typepublic java.lang.String getDisplayValue()
getDisplayValue in interface Typepublic EmptyType getEmptyType()
getEmptyType in interface CompositeTypepublic Type getMixedContent()
Type
getMixedContent in interface TypegetMixedContent in class AbstractTypepublic Type getParentEditingTypeForName(java.lang.String name)
CompositeType
getParentEditingTypeForName in interface CompositeTypepublic java.lang.String[] getRelevantChoiceNames()
getRelevantChoiceNames in interface CompositeTypepublic java.util.List getRelevantChoiceTypes()
getRelevantChoiceTypes in interface CompositeTypepublic boolean hasAttributes()
hasAttributes in interface CompositeTypepublic boolean hasDialogChildren()
public boolean hasEmptyContent(boolean checkSerializeDefaults,
boolean checkDefaultValue)
hasEmptyContent in interface CompositeTypehasEmptyContent in class AbstractTypepublic boolean hasOnlyOneVisibleChild()
public boolean hasOnlySimpleTypes()
hasOnlySimpleTypes in interface CompositeTypepublic boolean isComposite()
AbstractType
isComposite in interface TypeisComposite in class AbstractTypeType.isComposite()public void markAsDirtyXPath()
AbstractType
markAsDirtyXPath in interface TypemarkAsDirtyXPath in class AbstractTypepublic boolean needRecursiveRepresentation()
public void release()
Type
release in interface Typerelease in class AbstractTypeType.release()
public void removeAll()
throws ListModificationException
removeAll in interface TyperemoveAll in class AbstractTypeListModificationExceptionpublic boolean removeChild(Type child)
removeChild in interface TyperemoveChild in class AbstractTypechild - the child to remove from this type
public void removeChoices()
throws ListModificationException
removeChoices in interface CompositeTypeListModificationException
public void serialize(java.lang.StringBuffer sb,
int indent,
boolean writeName,
boolean recursive,
boolean serializeEmptyContent)
serialize in interface Typeserialize in class AbstractTypesb - a StringBuffer into which the subTree will be serializedindent - size of indentwriteName - true, if the name of the type should be serialized, false otherwiserecursive - true, if all containing types should be serialized
public void setChoosenKeyContextValue(java.lang.String xpathRelativeToChoosenKeyContext,
java.lang.String newValue)
com.jaxfront.core.type.AbstractType#setChoosenKeyContextValue(java.lang.String, java.lang.String)
public void setChoosenKeyValue(java.lang.String xpathRelativeToChoosenKey,
java.lang.String newValue)
com.jaxfront.core.type.AbstractType#setChoosenKeyValue(java.lang.String, java.lang.String)public void setNeedRecursiveRepresentation(boolean needRecursiveRepresantation)
needRecursiveRepresentation - true, if recursive presentation is needed, false otherwise
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||