com.jaxfront.core.type
Class VirtualType

java.lang.Object
  extended by com.jaxfront.core.type.VirtualType
All Implemented Interfaces:
Type

public class VirtualType
extends java.lang.Object
implements Type

This class represents a VirtualType which is a JAXFront type. VirtualTypes exist only within JAXFront, they cannot be defined in an XML Schema and cannot be bound to an XML instance. Virtual Types are used in placing a formula field within a table layout.

Version:
1.60

Field Summary
 
Fields inherited from interface com.jaxfront.core.type.Type
ComplexGroup, ComplexGroupList, CompositeType, DummyType, EmptyType, GroupType, ListType, NONE, SimpleGroup, SimpleGroupList, SimpleType, SimpleTypeList, VirtualType
 
Constructor Summary
VirtualType(Type sourceType)
          Creates a VirtualType based on a holder type.
 
Method Summary
 void addNotFiredInitializationRule(Rule initializationRule)
           
 void addTreeNode(boolean shouldBeSerialized)
          Adds this type to the tree.
 void bind(Document dOM, org.w3c.dom.Element element)
          Binds an existing W3C element and its value(s) to the underlying W3C element.
 void bind(Document DOM, org.w3c.dom.Element element, boolean bindOnlyAvailable)
          Binds the values on a W3C element to the underlying JAXFront type.
 void bind(java.lang.Object trigger, Type type)
          Binds the values of an JAXFront type to myself.
 void bind(Type type)
          Binds the values of an JAXFront type to myself.
 Type deepClone(Document dom, boolean cloneChoices, boolean includeData)
          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.
 Type deepClone(Document dom, boolean cloneChoices, boolean includingData, SchemaNode schemaNode, org.w3c.dom.Element element)
           
 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
 Type getChoosenType()
          Gets the choosen type if this type is a choice element.
 java.lang.Object getClientProperty(java.lang.String key)
          Gets a client property for this type.
 java.util.List getDerivedTypes()
          Gets a list of all derived types if this type is an abstract type.
 Type getDirectChild(java.lang.String name)
          Gets a child type with a given name
 Type getDirectChild(java.lang.String name, java.lang.String namespace)
          Gets a direct child (next axis) type with a given name
 java.util.List getDirectChildren()
          Gets a list of all child types.
 java.util.List getDirectChildren(java.lang.String name)
          Gets a list of child types with a given name.
 java.lang.String getDirectChildValue(java.lang.String name)
          Gets the value of a child type with a given name.
 java.lang.String getDisplayValue()
          Returns this type as a String representation for JTables.
 Document getDOM()
          Gets the current JAXFront document (DOM).
 java.lang.String getFullCaption()
          Returns the nls translated (if any) xpath of a type up to its upper most represented tree node parent.
 java.lang.String getFullCaption(int labelLength)
          Returns the nls translated (if any) xpath of a type up to its upper most represented tree node parent.
 short[] getId()
          Gets a unique ID within the current JAXFront document (DOM) expressing axis position.
 int getLevel()
          Gets the tree hierarchy level.
 Type getMixedContent()
          Returns the mixed content leaf type or null if none.
 java.lang.String getName()
          Returns the name witout namespace previx.
 java.lang.String getNamespace()
          Gets the namespace name of the underlying W3C DOM.
 Type getNextSibling()
          Returns the next sibling type of the current type.
 java.util.LinkedHashMap getNotFiredInitializationRules()
           
 Type getParent()
          Returns the JAXFront type parent.
 Type getParent(java.lang.String parentName)
          Gets the parent type with the given name.
 ListType getParentList()
          Gets the parent list type of the current type.
 java.lang.String getPrefixedXPathLocation()
          Gets the prefixed xpath location of the current type.
 Type getPreviousSibling()
          Returns the previous sibling type of the current type.
 java.beans.PropertyChangeSupport getPropertyChangeSupport()
          Gets the PropertyChangeSupport helper instance for this type.
 java.lang.String getQName()
          Gets the tag name including namespace prefix.
 Type getRepresentedTableLayoutParent()
          Returns the type (one of my parents) which defines a tableLayout which represents this type or null.
 Type getRepresentedTabParent(boolean checkCurrentType)
          Gets the holding tree parent that is represented as tab.
 Type getRepresentedTreeNodeHolder()
          Gets the holding tree parent type in the navigation tree, where the view holder is self.
 Type getRepresentedTreeNodeParent()
          Gets the holding tree parent type in the navigation tree.
 javax.swing.ImageIcon getRepresentedTreeNodeParentIcon()
          Returns the uppermost icon that can be found of the tree node parents of the current type.
 java.lang.String getRepresentedTreeNodeParentIconName()
          Returns the name of the uppermost icon that can be found of the tree node parents of the current type.
 SchemaNode getSchemaElement()
          Gets the meta information schema element.
 SchemaType getSchemaType()
           
 java.lang.String getSerializationName()
           
 java.lang.String getShortCaption()
          Returns the nls translated (if any) xpath of a type up to its upper most represented tree node parent.
 Type getSourceType()
          Gets the type that releases this VirtualType.
 StyleDefinition getStyle()
           
 Type getTemplate()
           
 java.lang.String getTreeHierarchyContext()
          Returns the treeEntry hierarchy of the current type as coma separated String (context).
 short getTypeClassification()
          Returns the type classification.
 java.lang.Object getUserObject()
          Gets any user object set to this type.
 java.lang.String getValue()
          Gets the value of this type.
 java.lang.String getVisualName()
          Returns the visual name of this type.
 java.lang.String getW3CXPathLocation(boolean prefixed)
          Gets the W3C xpath location of the current type.This method returns the xpath without internal created unnamed elements!
 java.lang.String getXPathLocation()
          Gets the xpath location of the current type.
 XUIDefinition getXUIDefinition()
          Gets the current XUI definition.
 XUIDefinition getXUIDefinition(boolean lazyInitialization)
          Gets the current XUI definition saying if a xui definition should be initialized lazy if it does not exist.
 boolean hasChoosenType()
           
 boolean hasNotFiredInitializationRules()
           
 boolean hasRecursionBeenBuilt()
          Returns true if type is a recursion holder and recursive start element has been created yet.
 boolean hasRepresentableTreeChildren()
          Returns true if this type has any child types represented in the navigation tree.
 boolean hasUIDefinition()
          Returns true if the uiDefinition is alredy set.
 boolean hasUnChoosenChoiceParent()
          Returns true if this type has an unchoosen choice parent, false otherwise
 boolean hasUndefinedChildren()
          Returns true it this type holds a direct optional child.
 boolean hasValidationError()
          Returns true if an validation error exists for this type.
 boolean isAbstract()
          Returns true if this type is defined abstract in the schema element.
 boolean isAnonymous()
          Returns true if this type has no tag element (unnamed holder).
 boolean isAttribute()
          Returns true if this type is defined as an attribute in the XML schema.
 boolean isChoice()
          Returns true if this type is acting as a choice.
 boolean isComposite()
          Returns true if this type consists of other types.
 boolean isDerived()
          Returns true if this type is implementing an abstract type.
 boolean isDerivedFrom(Type type)
          Returns true if this type is a child of a given type.
 boolean isDerivedFromEditingType()
          Returns true if this type is derived from an editing type.
 boolean isEditingType()
          Returns true if my parent is a list and this type is a template for further addings.
 boolean isEmpty()
          Returns true if this type is not represented in the target JAXFront DOM.
 boolean isGlobal()
          Return true it this type is global.
 boolean isIncluded()
          Returns true if this type was included from an included xui file.
 boolean isKey()
          Returns true if this type is a key selector.
 boolean isKeyContext()
          Returns true if this type is a key context used in KeyKeyRefManager.
 boolean isKeyField()
           
 boolean isKeyRef()
          Returns true if this type is a key ref selector.
 boolean isKeyRefField()
           
 boolean isList()
          Returns true if this type represents a list.
 boolean isLocked()
          Returns true if this type is locked via document.lock().
 boolean isRecursive()
          Returns true if this type is starting a new recursion.
 boolean isRecursiveHolder()
           
 boolean isReleased()
           
 boolean isRenderable()
          Returns true if the type is included into the rendering process.
 boolean isRepresentedAsHeader()
          Returns true if this type has a header.
 boolean isRepresentedAsTab()
          Returns true if this type is represented as tab.
 boolean isRepresentedAsTreeNode()
          Returns true if this type is represented in the navigation tree.
 boolean isRequired()
          Returns true if this type is defined mandatory in the xml schema.
 boolean isRoot()
          Returns true if this type is the root of the JAXFront DOM.
 boolean isSerializable()
          Returns true if this type should be serialized in the resulting W3C DOM.
 boolean isSerializable(boolean checkValue)
          Returns true if this type should be serialized in the resulting W3C DOM.
 boolean isSimple()
          Returns true if this is a leaf in the tree.
 boolean isUserInstanciated()
           
 boolean isVirtual()
          Returns true if this type is implementing an virtual type.
 void markAsDirtyXPath()
          Marks an xpath as dirty.
 void putClientProperty(java.lang.String key, java.lang.Object object)
           
 void release()
          Release all allocated resources for this type.
 boolean remove()
          Removes this type from the JAXFront DOM.
 void removeAll()
          Removes all types from this type.
 boolean removeChild(Type child)
          Removes a child from the JAXFront DOM.
 void removeClientProperty(java.lang.String key)
           
 void removeMessage()
          Removes all validation error messages for this type.
 void removeTreeNode(boolean shouldBeSerialized)
          Removes this type from the tree.
 java.lang.StringBuffer serialize()
          Serializes the current subTree to a StringBuffer
 void serialize(java.lang.StringBuffer sb, int indent, boolean writeName, boolean recursive)
          Serializes the current subTree to a StringBuffer
 void serializeXOM(java.lang.StringBuffer sb, int indent, boolean writeName, boolean recursive)
           
 void setApplicationRequired(boolean required)
          Sets if an user input is required for this type or not (overwrites xml schema cardinality).
 void setBackground(java.awt.Color color)
           
 void setChoosenType(Type choosenType)
          Sets the choosen type if this type is a choice.
 void setChoosenType(Type choosenType, boolean temporary)
          Sets the choosen type if this type is a choice.
 void setCodeSetValues(java.lang.String url, java.lang.String codeSetName, java.lang.String[] values)
          Sets the codeSet values for the current type.
 void setCodeSetValues(java.lang.String url, java.lang.String codeSetName, java.lang.String[] values, java.lang.String defaultSelection)
          Sets the codeSet values for the current type.
 void setDirectChildValue(java.lang.String childName, java.lang.String value)
          Sets the value of a child type of this type.
 void setDOM(Document dOM)
          Sets a current JAXFront document (DOM).
 void setEditable(boolean editable)
          Sets the component editable or not editable.
 void setEnabled(boolean enabled)
          Sets the component enabled (active) or disabled (inactive).
 void setForeground(java.awt.Color color)
           
 void setFormulaExpression(FormulaExpression formula)
           
 void setId(short[] id)
          Sets a unique ID within the current JAXFront documennt (DOM) expressing axis position.
 void setIsKeyContext(boolean isContext)
          Set true if this type is a key context!
 void setLabelColor(java.awt.Color color)
           
 void setLabelText(java.lang.String text)
           
 void setName(java.lang.String name)
           
 void setParent(Type parent)
          Gets the parent type of the current type.
 void setRenderable(boolean renderable)
          Defines if the type should be included into the rendering process.
 void setSchemaElement(SchemaNode element)
          Sets the meta information schema element.
 void setSerializable(boolean isDefined)
          Sets if this type should be serialized in the resulting W3C DOM.
 void setSerializable(boolean isDefined, boolean checkForEmptyContent)
          Sets if this type should be serialized in the resulting W3C DOM which depends on the content of the type.
 void setTemplate(Type template)
           
 void setTempVisible(boolean visible, boolean isTemp)
           
 void setTreeIcon(java.lang.String gifName)
          Set the tree icon for this type.
 void setUIDefinition(XUIDefinition uiDefinition)
          Sets a XUI definition to this type.
 void setUserInstanciated(boolean userTriggered)
           
 void setUserObject(java.lang.Object object)
          Sets any user object to this type.
 void setValue(java.lang.String newValue)
          Sets a new value for this type.
 void setVisible(boolean visible)
          Sets the visualizer of this type visible or invisible at runtime.
 void setVisibleAndSerializable(boolean visible, boolean isSerializable)
          Sets the component visible or invisible and defines if the data will be serialized or not.
 void showLabel(boolean visible)
          Sets the label visible or invisible.
 void showMessage(java.lang.String message, java.lang.String classification, boolean showDialog, boolean needsUserAcceptance)
          Dislplays a message for this type with the passed information.
 boolean unChoosenBranch()
           
 void validate()
          Validates this type.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VirtualType

public VirtualType(Type sourceType)
Creates a VirtualType based on a holder type.

Parameters:
sourceType - a type that releases a VirtualType
Method Detail

getRepresentedTreeNodeHolder

public Type getRepresentedTreeNodeHolder()
Description copied from interface: Type
Gets the holding tree parent type in the navigation tree, where the view holder is self.

Specified by:
getRepresentedTreeNodeHolder in interface Type
Returns:
the holding tree parent type in the navigation tree

bind

public void bind(java.lang.Object trigger,
                 Type type)
Binds the values of an JAXFront type to myself.

Specified by:
bind in interface Type
Parameters:
DOM - the current document to which this type belongs
trigger - trigger object e.g. Clipboard,Button used to identify user triggered actions
type - the type to bind to

bind

public void bind(Type type)
Binds the values of an JAXFront type to myself.

Specified by:
bind in interface Type
Parameters:
DOM - the current document to which this type belongs
type - the type to bind to

bind

public void bind(Document dOM,
                 org.w3c.dom.Element element)
Binds an existing W3C element and its value(s) to the underlying W3C element.

Specified by:
bind in interface Type
Parameters:
DOM - the current document to which this type belongs
element - the element to bind

deepClone

public Type deepClone(Document dom,
                      boolean cloneChoices,
                      boolean includeData)
               throws java.lang.CloneNotSupportedException
Creates a deep clone of this type and all its referenced types.

Specified by:
deepClone in interface Type
Parameters:
dom - the current dom to which this type belongs
includeData - indicates if all binded data should be copied as well (default is false)
Returns:
null
Throws:
java.lang.CloneNotSupportedException

deepClone

public Type deepClone(Document dom,
                      boolean cloneChoices,
                      boolean includingData,
                      SchemaNode schemaNode,
                      org.w3c.dom.Element element)
               throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException

getDirectChild

public Type getDirectChild(java.lang.String name)
Gets a child type with a given name

Specified by:
getDirectChild in interface Type
Parameters:
name - name of the child
Returns:
null

getDirectChildren

public java.util.List getDirectChildren()
Gets a list of all child types.

Specified by:
getDirectChildren in interface Type
Returns:
null

isVirtual

public boolean isVirtual()
Description copied from interface: Type
Returns true if this type is implementing an virtual type.

Specified by:
isVirtual in interface Type
Returns:
true if this type is implementing an virtual type

getDirectChildren

public java.util.List getDirectChildren(java.lang.String name)
Gets a list of child types with a given name.

Specified by:
getDirectChildren in interface Type
Parameters:
name - the name of the child(s)
Returns:
null

getDirectChildValue

public java.lang.String getDirectChildValue(java.lang.String name)
Gets the value of a child type with a given name.

Specified by:
getDirectChildValue in interface Type
Parameters:
name - the name of the child
Returns:
null

getChoosenType

public Type getChoosenType()
Gets the choosen type if this type is a choice element.

Specified by:
getChoosenType in interface Type
Returns:
null

getClientProperty

public java.lang.Object getClientProperty(java.lang.String key)
Description copied from interface: Type
Gets a client property for this type.

Specified by:
getClientProperty in interface Type

getRepresentedTableLayoutParent

public Type getRepresentedTableLayoutParent()
Description copied from interface: Type
Returns the type (one of my parents) which defines a tableLayout which represents this type or null.

Specified by:
getRepresentedTableLayoutParent in interface Type

getDerivedTypes

public java.util.List getDerivedTypes()
Gets a list of all derived types if this type is an abstract type.

Specified by:
getDerivedTypes in interface Type
Returns:
null

getDOM

public Document getDOM()
Gets the current JAXFront document (DOM).

Specified by:
getDOM in interface Type
Returns:
the current JAXFront document (DOM)

getId

public short[] getId()
Gets a unique ID within the current JAXFront document (DOM) expressing axis position.

Specified by:
getId in interface Type
Returns:
null

getLevel

public int getLevel()
Gets the tree hierarchy level.

Returns:
0

getName

public java.lang.String getName()
Description copied from interface: Type
Returns the name witout namespace previx.

Specified by:
getName in interface Type
See Also:
Type.getName()

setName

public void setName(java.lang.String name)
Parameters:
name -

getNamespace

public java.lang.String getNamespace()
Gets the namespace name of the underlying W3C DOM.

Specified by:
getNamespace in interface Type
Returns:
null

getParent

public Type getParent()
Returns the JAXFront type parent.

Specified by:
getParent in interface Type
Returns:
the parent type of the current type

getParent

public Type getParent(java.lang.String parentName)
Gets the parent type with the given name.

Specified by:
getParent in interface Type
Parameters:
parentName - the name of the parent type
Returns:
null

getParentList

public ListType getParentList()
Gets the parent list type of the current type.

Specified by:
getParentList in interface Type
Returns:
null

getPropertyChangeSupport

public java.beans.PropertyChangeSupport getPropertyChangeSupport()
Gets the PropertyChangeSupport helper instance for this type.

Specified by:
getPropertyChangeSupport in interface Type
Returns:
the PropertyChangeSupport helper instance for this type

getRepresentedTabParent

public Type getRepresentedTabParent(boolean checkCurrentType)
Gets the holding tree parent that is represented as tab.

Specified by:
getRepresentedTabParent in interface Type
Returns:
null

getRepresentedTreeNodeParent

public Type getRepresentedTreeNodeParent()
Gets the holding tree parent type in the navigation tree.

Specified by:
getRepresentedTreeNodeParent in interface Type
Returns:
null

getSchemaElement

public SchemaNode getSchemaElement()
Gets the meta information schema element.

Specified by:
getSchemaElement in interface Type
Returns:
null

getSourceType

public Type getSourceType()
Gets the type that releases this VirtualType.

Returns:
the type that releases this VirtualType

getXUIDefinition

public XUIDefinition getXUIDefinition()
Gets the current XUI definition.

Specified by:
getXUIDefinition in interface Type
Returns:
the current XUI definition

getXUIDefinition

public XUIDefinition getXUIDefinition(boolean lazyInitialization)
Description copied from interface: Type
Gets the current XUI definition saying if a xui definition should be initialized lazy if it does not exist.

Specified by:
getXUIDefinition in interface Type
Returns:
the current XUI definition

getUserObject

public java.lang.Object getUserObject()
Gets any user object set to this type.

Specified by:
getUserObject in interface Type
Returns:
null

getValue

public java.lang.String getValue()
Gets the value of this type.

Returns:
the value of this type

getXPathLocation

public java.lang.String getXPathLocation()
Gets the xpath location of the current type.

Specified by:
getXPathLocation in interface Type
Returns:
null

hasRepresentableTreeChildren

public boolean hasRepresentableTreeChildren()
Returns true if this type has any child types represented in the navigation tree.

Specified by:
hasRepresentableTreeChildren in interface Type
Returns:
false

isAbstract

public boolean isAbstract()
Returns true if this type is defined abstract in the schema element.

Specified by:
isAbstract in interface Type
Returns:
false

isAnonymous

public boolean isAnonymous()
Returns true if this type has no tag element (unnamed holder).

Specified by:
isAnonymous in interface Type
Returns:
false

isAttribute

public boolean isAttribute()
Returns true if this type is defined as an attribute in the XML schema.

Specified by:
isAttribute in interface Type
Returns:
false

isChoice

public boolean isChoice()
Returns true if this type is acting as a choice.

Specified by:
isChoice in interface Type
Returns:
false

isComposite

public boolean isComposite()
Returns true if this type consists of other types.

Specified by:
isComposite in interface Type
Returns:
false

isSerializable

public boolean isSerializable()
Description copied from interface: Type
Returns true if this type should be serialized in the resulting W3C DOM.

Specified by:
isSerializable in interface Type
Returns:
true if this type should be serialized in the resulting W3C DOM, false otherwise
See Also:
Type.isSerializable()

isSerializable

public boolean isSerializable(boolean checkValue)
Description copied from interface: Type
Returns true if this type should be serialized in the resulting W3C DOM.

Specified by:
isSerializable in interface Type
Parameters:
checkValue - true if the serialize process should check if the type's value is null
Returns:
true if this type should be serialized in the resulting W3C DOM, false otherwise
See Also:
Type.isSerializable(boolean)

isDerived

public boolean isDerived()
Returns true if this type is implementing an abstract type.

Specified by:
isDerived in interface Type
Returns:
false

isDerivedFrom

public boolean isDerivedFrom(Type type)
Returns true if this type is a child of a given type.

Specified by:
isDerivedFrom in interface Type
Parameters:
type - parent type
Returns:
false

isEditingType

public boolean isEditingType()
Returns true if my parent is a list and this type is a template for further addings.

Specified by:
isEditingType in interface Type
Returns:
false

isEmpty

public boolean isEmpty()
Returns true if this type is not represented in the target JAXFront DOM.

Specified by:
isEmpty in interface Type
Returns:
false

isList

public boolean isList()
Returns true if this type represents a list.

Specified by:
isList in interface Type
Returns:
false

isRepresentedAsHeader

public boolean isRepresentedAsHeader()
Returns true if this type has a header.

Specified by:
isRepresentedAsHeader in interface Type
Returns:
true if this type has a header, false otherwise

isRepresentedAsTab

public boolean isRepresentedAsTab()
Returns true if this type is represented as tab.

Specified by:
isRepresentedAsTab in interface Type
Returns:
false

isRepresentedAsTreeNode

public boolean isRepresentedAsTreeNode()
Returns true if this type is represented in the navigation tree.

Specified by:
isRepresentedAsTreeNode in interface Type
Returns:
false

isRequired

public boolean isRequired()
Returns true if this type is defined mandatory in the xml schema.

Specified by:
isRequired in interface Type
Returns:
false

isRoot

public boolean isRoot()
Returns true if this type is the root of the JAXFront DOM.

Specified by:
isRoot in interface Type
Returns:
false

isSimple

public boolean isSimple()
Returns true if this is a leaf in the tree.

Specified by:
isSimple in interface Type
Returns:
false

putClientProperty

public void putClientProperty(java.lang.String key,
                              java.lang.Object object)
Specified by:
putClientProperty in interface Type
See Also:
Type.putClientProperty(java.lang.String, java.lang.Object)

release

public void release()
Description copied from interface: Type
Release all allocated resources for this type.

Specified by:
release in interface Type
See Also:
Type.release()

remove

public boolean remove()
Removes this type from the JAXFront DOM.

Specified by:
remove in interface Type

removeAll

public void removeAll()
Removes all types from this type.

Specified by:
removeAll in interface Type

removeChild

public boolean removeChild(Type child)
Removes a child from the JAXFront DOM.

Specified by:
removeChild in interface Type
Parameters:
child - a child type of this type

serialize

public java.lang.StringBuffer serialize()
Serializes the current subTree to a StringBuffer

Specified by:
serialize in interface Type
Parameters:
sb - a StringBuffer into which the subTree will be serialized
indent - size of indent
writeName - true, if the name of the type should be serialized, false otherwise

serialize

public void serialize(java.lang.StringBuffer sb,
                      int indent,
                      boolean writeName,
                      boolean recursive)
Serializes the current subTree to a StringBuffer

Specified by:
serialize in interface Type
Parameters:
sb - a StringBuffer into which the subTree will be serialized
indent - size of indent
writeName - true, if the name of the type should be serialized, false otherwise
recursive - true, if all containing types should be serialized

serializeXOM

public void serializeXOM(java.lang.StringBuffer sb,
                         int indent,
                         boolean writeName,
                         boolean recursive)

setDirectChildValue

public void setDirectChildValue(java.lang.String childName,
                                java.lang.String value)
Sets the value of a child type of this type.

Specified by:
setDirectChildValue in interface Type
Parameters:
childName - the name of the child
value - the value to set

setChoosenType

public void setChoosenType(Type choosenType)
Sets the choosen type if this type is a choice.

Specified by:
setChoosenType in interface Type
Parameters:
choosenType - the type that is currently choosen

setChoosenType

public void setChoosenType(Type choosenType,
                           boolean temporary)
Sets the choosen type if this type is a choice.

Specified by:
setChoosenType in interface Type
Parameters:
choosenType - the type that is choosen
temporary - true, if the choosen type acts temporarily as choosen type, false otherwise

setDOM

public void setDOM(Document dOM)
Sets a current JAXFront document (DOM).

Specified by:
setDOM in interface Type
Parameters:
DOM - a JAXFront document (DOM)

setId

public void setId(short[] id)
Sets a unique ID within the current JAXFront documennt (DOM) expressing axis position.

Specified by:
setId in interface Type
Parameters:
id - a unique ID

setSerializable

public void setSerializable(boolean isDefined)
Sets if this type should be serialized in the resulting W3C DOM.

Specified by:
setSerializable in interface Type
Parameters:
isDefined - true if this type should be serialized in the resulting W3C DOM, false otherwise

setParent

public void setParent(Type parent)
Gets the parent type of the current type.

Specified by:
setParent in interface Type
Parameters:
parent - the parent type of the current type

setSchemaElement

public void setSchemaElement(SchemaNode element)
Sets the meta information schema element.

Specified by:
setSchemaElement in interface Type
Parameters:
element - the meta information schema element

setUIDefinition

public void setUIDefinition(XUIDefinition uiDefinition)
Sets a XUI definition to this type.

Specified by:
setUIDefinition in interface Type
Parameters:
uiDefinition - a XUI definition

setUserObject

public void setUserObject(java.lang.Object object)
Sets any user object to this type.

Specified by:
setUserObject in interface Type
Parameters:
object - any user object

setValue

public void setValue(java.lang.String newValue)
Sets a new value for this type.

Parameters:
newValue - a new value

getDisplayValue

public java.lang.String getDisplayValue()
Returns this type as a String representation for JTables.

Specified by:
getDisplayValue in interface Type
Returns:
this type as a String representation

validate

public void validate()
              throws ValidationException
Validates this type.

Throws:
ValidationException - if this type is mandatory

hasValidationError

public boolean hasValidationError()
Description copied from interface: Type
Returns true if an validation error exists for this type.

Specified by:
hasValidationError in interface Type
See Also:
Type.hasValidationError()

isKeyField

public boolean isKeyField()
See Also:
Type.isKey()

setSerializable

public void setSerializable(boolean isDefined,
                            boolean checkForEmptyContent)
Description copied from interface: Type
Sets if this type should be serialized in the resulting W3C DOM which depends on the content of the type. If the type has empty content it won't be serialized by default. If a type should be serialized even if it has empty content then set checkForEmptyContent to false which won't check the type for empty content during serializing.

Specified by:
setSerializable in interface Type
Parameters:
isDefined - true if this type should be serialized in the resulting W3C DOM, false otherwise
checkForEmptyContent - true if the content of this type should be checked for empty content
See Also:
com.jaxfront.core.type.Type#setIsDefined(boolean, boolean)

setApplicationRequired

public void setApplicationRequired(boolean required)
Sets if an user input is required for this type or not (overwrites xml schema cardinality).

Specified by:
setApplicationRequired in interface Type
Parameters:
required - true if an user input is required for this type

setCodeSetValues

public void setCodeSetValues(java.lang.String url,
                             java.lang.String codeSetName,
                             java.lang.String[] values)
Sets the codeSet values for the current type.

Parameters:
url - the url of the codeSet to be set
codeSetName - the name of the codeSet to be set
values - the values of the codeSet

setBackground

public void setBackground(java.awt.Color color)
Specified by:
setBackground in interface Type
See Also:
Component.setBackground(java.awt.Color)

setForeground

public void setForeground(java.awt.Color color)
Specified by:
setForeground in interface Type
See Also:
Component.setForeground(java.awt.Color)

setLabelColor

public void setLabelColor(java.awt.Color color)
Specified by:
setLabelColor in interface Type
See Also:
Visualizer.setLabelColor(java.awt.Color)

setVisible

public void setVisible(boolean visible)
Description copied from interface: Type
Sets the visualizer of this type visible or invisible at runtime. Note: If you want to exclude the type of the rendering process, use setRenderable(false)!

Specified by:
setVisible in interface Type
Parameters:
visible - true if the component should be visible
See Also:
Type.setVisible(boolean)

setRenderable

public void setRenderable(boolean renderable)
Description copied from interface: Type
Defines if the type should be included into the rendering process. Note: If the type is not rendered it can't be make visible by an uiAction defined in a rule!

Specified by:
setRenderable in interface Type
Parameters:
renderable - false if the type should not be rendered
See Also:
Type.setRenderable(boolean)

isRenderable

public boolean isRenderable()
Description copied from interface: Type
Returns true if the type is included into the rendering process. Note: If the type is not rendered it can't be make visible by an uiAction defined in a rule!

Specified by:
isRenderable in interface Type
See Also:
Type.isRenderable()

setVisibleAndSerializable

public void setVisibleAndSerializable(boolean visible,
                                      boolean isSerializable)
Sets the component visible or invisible and defines if the data will be serialized or not.

Specified by:
setVisibleAndSerializable in interface Type
Parameters:
visible - true if the component should be visible
isSerializable - true if the entered data should be serialized

showLabel

public void showLabel(boolean visible)
Sets the label visible or invisible.

Specified by:
showLabel in interface Type
Parameters:
visible - true if the label should be visible

getChild

public Type getChild(java.lang.String name)
Description copied from interface: Type
Gets a child (recursive) type with a given name

Specified by:
getChild in interface Type
Parameters:
name - name of the child
Returns:
a child with the given name
See Also:
Type.getChild(java.lang.String)

getChild

public Type getChild(java.lang.String name,
                     java.lang.String nameSpace)
Description copied from interface: Type
Gets a child (recursive) type with a given name

Specified by:
getChild in interface Type
Parameters:
name - name of the child
Returns:
a child with the given name
See Also:
Type.getChild(java.lang.String)

getDirectChild

public Type getDirectChild(java.lang.String name,
                           java.lang.String namespace)
Description copied from interface: Type
Gets a direct child (next axis) type with a given name

Specified by:
getDirectChild in interface Type
Parameters:
name - name of the child
namespace - namespace of the child
Returns:
a child with the given name
See Also:
Type.getDirectChild(java.lang.String,java.lang.String)

isRecursive

public boolean isRecursive()
Description copied from interface: Type
Returns true if this type is starting a new recursion.

Specified by:
isRecursive in interface Type
See Also:
Type.isRecursive()

isRecursiveHolder

public boolean isRecursiveHolder()
See Also:
com.jaxfront.core.type.Type#isRecursiveHolder()

isKey

public boolean isKey()
Description copied from interface: Type
Returns true if this type is a key selector.

Specified by:
isKey in interface Type
See Also:
Type.isKey()

isKeyRef

public boolean isKeyRef()
Description copied from interface: Type
Returns true if this type is a key ref selector.

Specified by:
isKeyRef in interface Type
See Also:
Type.isKeyRef()

isKeyRefField

public boolean isKeyRefField()
See Also:
com.jaxfront.core.type.Type#isKeyRefField()

setCodeSetValues

public void setCodeSetValues(java.lang.String url,
                             java.lang.String codeSetName,
                             java.lang.String[] values,
                             java.lang.String defaultSelection)
Description copied from interface: Type
Sets the codeSet values for the current type.

Specified by:
setCodeSetValues in interface Type
Parameters:
url - the url of the codeSet to be set
codeSetName - the name of the codeSet to be set
values - the values of the codeSet
defaultSelection - the default selected code
See Also:
Type.setCodeSetValues(java.lang.String, java.lang.String, java.lang.String[], java.lang.String)

getTreeHierarchyContext

public java.lang.String getTreeHierarchyContext()
Returns the treeEntry hierarchy of the current type as coma separated String (context).

Specified by:
getTreeHierarchyContext in interface Type
Returns:
the treeEntry hierarchy as String

getShortCaption

public java.lang.String getShortCaption()
Description copied from interface: Type
Returns the nls translated (if any) xpath of a type up to its upper most represented tree node parent. Only tree node parents are listed whereas all other parents as well as the root type are dismissed. Hierarchies are separated by " - ". Example: /purchaseOrder/shipToAdress/name -> purchaseOrder has a treeEntry, shipToAdress not. This would give following expression: purchaseOrder - name

Specified by:
getShortCaption in interface Type
Returns:
an nls translated (if any) xpath of a type up to its upper most represented tree node parent
See Also:
Type.getShortCaption()

getFullCaption

public java.lang.String getFullCaption()
Description copied from interface: Type
Returns the nls translated (if any) xpath of a type up to its upper most represented tree node parent. All parent types are checked (unlike getShortCaption()). The parent type that are represented as tree nodes will be listed with their nls treeEntry label. Each element caption will be cut by the global defined length and will get the string "...". The elements will be separated by the string " - ". For elements with cardinality n, the index within the list will be added at the end. If a schema key has been defined for an element, the key will be used as index for n, else the xpath-index will be applied. Example: /purchaseOrder/item[s]/item[1]/productDescription This would give following expression: purchaseOrder - item - item[1] - productDescription

Specified by:
getFullCaption in interface Type
Returns:
an nls translated (if any) xpath of a type up to its upper most represented tree node parent
See Also:
Type.getFullCaption()

getFullCaption

public java.lang.String getFullCaption(int labelLength)
Description copied from interface: Type
Returns the nls translated (if any) xpath of a type up to its upper most represented tree node parent. All parent types are checked (unlike getShortCaption()). The parent type that are represented as tree nodes will be listed with their nls treeEntry label. Each element caption will be cut by the global defined length and will get the string "...". The elements will be separated by the string " - ". For elements with cardinality n, the index within the list will be added at the end. If a schema key has been defined for an element, the key will be used as index for n, else the xpath-index will be applied. Example: /purchaseOrder/item[s]/item[1]/productDescription This would give following expression: purchaseOrder - item - item[1] - productDescription

Specified by:
getFullCaption in interface Type
Parameters:
labelLength - the length of each element description label that will be displayed
Returns:
an nls translated (if any) xpath of a type up to its upper most represented tree node parent
See Also:
Type.getFullCaption(int)

getRepresentedTreeNodeParentIcon

public javax.swing.ImageIcon getRepresentedTreeNodeParentIcon()
Description copied from interface: Type
Returns the uppermost icon that can be found of the tree node parents of the current type.

Specified by:
getRepresentedTreeNodeParentIcon in interface Type
Returns:
the icon of the uppermost tree node parent
See Also:
Type.getRepresentedTreeNodeParentIcon()

getRepresentedTreeNodeParentIconName

public java.lang.String getRepresentedTreeNodeParentIconName()
Description copied from interface: Type
Returns the name of the uppermost icon that can be found of the tree node parents of the current type.

Specified by:
getRepresentedTreeNodeParentIconName in interface Type
Returns:
the name of the icon of the uppermost tree node parent
See Also:
Type.getRepresentedTreeNodeParentIconName()

getNextSibling

public Type getNextSibling()
Description copied from interface: Type
Returns the next sibling type of the current type.

Specified by:
getNextSibling in interface Type
Returns:
the next sibling type
See Also:
Type.getNextSibling()

getPreviousSibling

public Type getPreviousSibling()
Description copied from interface: Type
Returns the previous sibling type of the current type.

Specified by:
getPreviousSibling in interface Type
Returns:
the previous sibling type
See Also:
Type.getPreviousSibling()

hasUIDefinition

public boolean hasUIDefinition()
Description copied from interface: Type
Returns true if the uiDefinition is alredy set.

Specified by:
hasUIDefinition in interface Type

isDerivedFromEditingType

public boolean isDerivedFromEditingType()
Description copied from interface: Type
Returns true if this type is derived from an editing type.

Specified by:
isDerivedFromEditingType in interface Type

setEditable

public void setEditable(boolean editable)
Description copied from interface: Type
Sets the component editable or not editable.

Specified by:
setEditable in interface Type
See Also:
Type.setEditable(boolean)

setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: Type
Sets the component enabled (active) or disabled (inactive).

Specified by:
setEnabled in interface Type
See Also:
Type.setEnabled(boolean)

hasUnChoosenChoiceParent

public boolean hasUnChoosenChoiceParent()
Description copied from interface: Type
Returns true if this type has an unchoosen choice parent, false otherwise

Specified by:
hasUnChoosenChoiceParent in interface Type
See Also:
Type.hasUnChoosenChoiceParent()

isIncluded

public boolean isIncluded()
Description copied from interface: Type
Returns true if this type was included from an included xui file.

Specified by:
isIncluded in interface Type

getMixedContent

public Type getMixedContent()
Description copied from interface: Type
Returns the mixed content leaf type or null if none.

Specified by:
getMixedContent in interface Type

getVisualName

public java.lang.String getVisualName()
Description copied from interface: Type
Returns the visual name of this type.

Specified by:
getVisualName in interface Type

markAsDirtyXPath

public void markAsDirtyXPath()
Description copied from interface: Type
Marks an xpath as dirty. It will be recalculated the next time.

Specified by:
markAsDirtyXPath in interface Type

addNotFiredInitializationRule

public void addNotFiredInitializationRule(Rule initializationRule)

getNotFiredInitializationRules

public java.util.LinkedHashMap getNotFiredInitializationRules()

hasNotFiredInitializationRules

public boolean hasNotFiredInitializationRules()

hasRecursionBeenBuilt

public boolean hasRecursionBeenBuilt()
Description copied from interface: Type
Returns true if type is a recursion holder and recursive start element has been created yet.

Specified by:
hasRecursionBeenBuilt in interface Type

isGlobal

public boolean isGlobal()
Description copied from interface: Type
Return true it this type is global.

Specified by:
isGlobal in interface Type

addTreeNode

public void addTreeNode(boolean shouldBeSerialized)
Description copied from interface: Type
Adds this type to the tree.

Specified by:
addTreeNode in interface Type
Parameters:
shouldBeSerialized - defines if this type should be serialized

hasUndefinedChildren

public boolean hasUndefinedChildren()
Description copied from interface: Type
Returns true it this type holds a direct optional child.

Specified by:
hasUndefinedChildren in interface Type

removeMessage

public void removeMessage()
Description copied from interface: Type
Removes all validation error messages for this type.

Specified by:
removeMessage in interface Type

removeTreeNode

public void removeTreeNode(boolean shouldBeSerialized)
Description copied from interface: Type
Removes this type from the tree.

Specified by:
removeTreeNode in interface Type
Parameters:
shouldBeSerialized - defines if the content of this type will be serialized

setTempVisible

public void setTempVisible(boolean visible,
                           boolean isTemp)

setTreeIcon

public void setTreeIcon(java.lang.String gifName)
Description copied from interface: Type
Set the tree icon for this type.

Specified by:
setTreeIcon in interface Type
Parameters:
gifName - name of the gif for the tree icon

showMessage

public void showMessage(java.lang.String message,
                        java.lang.String classification,
                        boolean showDialog,
                        boolean needsUserAcceptance)
Description copied from interface: Type
Dislplays a message for this type with the passed information.

Specified by:
showMessage in interface Type
Parameters:
message - message text
classification - category (info, warning,...)
showDialog - defines if message should be shown as dialog
needsUserAcceptance - defines if user needs to accept message or not

removeClientProperty

public void removeClientProperty(java.lang.String key)
Specified by:
removeClientProperty in interface Type

bind

public void bind(Document DOM,
                 org.w3c.dom.Element element,
                 boolean bindOnlyAvailable)
Description copied from interface: Type
Binds the values on a W3C element to the underlying JAXFront type. Removes not available types if no W3C element has been found and the flag "bindOnlyAvailable" is set to true.

Specified by:
bind in interface Type
Parameters:
DOM - the current document to which this type belongs
element - the element to bind
bindOnlyAvailable - indicates if the not available elements will be removed from type tree

getQName

public java.lang.String getQName()
Description copied from interface: Type
Gets the tag name including namespace prefix.

Specified by:
getQName in interface Type
Returns:
the tag name name including namespace prefix

setFormulaExpression

public void setFormulaExpression(FormulaExpression formula)

getTypeClassification

public short getTypeClassification()
Description copied from interface: Type
Returns the type classification.

Specified by:
getTypeClassification in interface Type

isUserInstanciated

public boolean isUserInstanciated()
Specified by:
isUserInstanciated in interface Type

setUserInstanciated

public void setUserInstanciated(boolean userTriggered)
Specified by:
setUserInstanciated in interface Type

setLabelText

public void setLabelText(java.lang.String text)
Specified by:
setLabelText in interface Type
See Also:
Visualizer.setLabelText(java.lang.String)

getTemplate

public Type getTemplate()
Specified by:
getTemplate in interface Type

setTemplate

public void setTemplate(Type template)
Specified by:
setTemplate in interface Type

unChoosenBranch

public boolean unChoosenBranch()
Specified by:
unChoosenBranch in interface Type

isReleased

public boolean isReleased()
Specified by:
isReleased in interface Type

isLocked

public boolean isLocked()
Description copied from interface: Type
Returns true if this type is locked via document.lock().

Specified by:
isLocked in interface Type
Returns:
true if this type is locked.

getSerializationName

public java.lang.String getSerializationName()
Specified by:
getSerializationName in interface Type

getPrefixedXPathLocation

public java.lang.String getPrefixedXPathLocation()
Description copied from interface: Type
Gets the prefixed xpath location of the current type.

Specified by:
getPrefixedXPathLocation in interface Type
Returns:
the prefixed xpath location of the current type

getSchemaType

public SchemaType getSchemaType()
Specified by:
getSchemaType in interface Type

getStyle

public StyleDefinition getStyle()
Specified by:
getStyle in interface Type

hasChoosenType

public boolean hasChoosenType()
Specified by:
hasChoosenType in interface Type

getW3CXPathLocation

public java.lang.String getW3CXPathLocation(boolean prefixed)
Description copied from interface: Type
Gets the W3C xpath location of the current type.This method returns the xpath without internal created unnamed elements!

Specified by:
getW3CXPathLocation in interface Type
Parameters:
prefixed - true if the xpath should be generated with namespace prefixes.
Returns:
the xpath location of the current type

isKeyContext

public boolean isKeyContext()
Description copied from interface: Type
Returns true if this type is a key context used in KeyKeyRefManager.

Specified by:
isKeyContext in interface Type

setIsKeyContext

public void setIsKeyContext(boolean isContext)
Description copied from interface: Type
Set true if this type is a key context!

Specified by:
setIsKeyContext in interface Type
Parameters:
isContext - true if this type is a key context

deepClone

public Type deepClone(Document dom,
                      boolean cloneChoices,
                      boolean includingData,
                      boolean includeEditingType,
                      SchemaNode schemaNode,
                      org.w3c.dom.Element element)
               throws java.lang.CloneNotSupportedException
Description copied from interface: Type
Creates a deep clone of this type and all its referenced types.

Specified by:
deepClone in interface Type
Parameters:
dom - the current dom to which this type belongs
includingData - indicates if all binded data should be copied as well (default is false)
Returns:
the cloned type
Throws:
java.lang.CloneNotSupportedException