|
||||||||||
| 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.AbstractListType
public abstract class AbstractListType
This class represents an abstract list type. A list type is a JAXFront type that holds a list of other types.
| 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, PROPERTY_USER_CHANGED_SERIALIZE, TAB_HOLDER |
| Fields inherited from interface com.jaxfront.core.type.ListType |
|---|
VALIDATE_ADD, VALIDATE_DELETE, VALIDATE_NOCHANGE |
| Fields inherited from interface com.jaxfront.core.type.Type |
|---|
ComplexGroup, ComplexGroupList, CompositeType, DummyType, EmptyType, GroupType, ListType, NONE, SimpleGroup, SimpleGroupList, SimpleType, SimpleTypeList, VirtualType |
| Constructor Summary | |
|---|---|
AbstractListType(SchemaNode schemaElement,
Type editingType)
AbstractListType constructor. |
|
| Method Summary | |
|---|---|
void |
add(int index,
java.lang.Object element)
|
boolean |
add(java.lang.Object o)
|
Type |
add(java.lang.Object source,
Type type,
int index,
boolean check)
Adds a new type to the list with the possibility to place it somewhere in the list. |
Type |
add(Type type)
Adds a new type to the list. |
boolean |
addAll(java.util.Collection c)
|
boolean |
addAll(int index,
java.util.Collection c)
|
Type |
addNewChild()
Adds a new child to the list. |
Type |
addNewChild(int index)
Adds a new child to the list. |
Type |
addNewChild(java.lang.Object source,
Type templateType,
int targetIndex)
Copies the given templateType and adds it to the list at the given index position. |
Type |
addNewChild(Type templateType)
Adds a new child to the list. |
Type |
addNewChild(Type templateType,
int targetIndex)
Copies the given templateType and adds it to the list at the given index position. |
Type |
addNewChild(Type templateType,
Type beforeType)
Adds a new child to the list and puts it before the passing type. |
void |
addNoTargetXUIDefinition(Type xuiType)
Adds an information to a XUI type if a list doesn't contain any types for which a XUI definition would exist. |
void |
autoCreateEntries()
Create the initial number of required min occur list items. |
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(Document DOM,
org.w3c.dom.Element instanceElement,
boolean bindOnlyAvailable,
boolean removeChilds)
|
void |
bind(java.lang.Object trigger,
Type type)
Binds an existing JAXFront type and its value(s) to myself. |
void |
checkCardinality(int changes)
Checks if removing or adding a new list entry violates the cardinality. |
void |
checkXUIDefinition(Type originalType,
Type newType)
|
void |
clear()
|
boolean |
contains(java.lang.Object o)
|
boolean |
containsAll(java.util.Collection c)
|
void |
copyAndPasteChild(java.lang.Integer typeToCopyIndex,
java.lang.Integer targetIndex)
|
void |
copyAndPasteChild(Type typeToCopy)
|
void |
copyAndPasteChild(Type typeToCopy,
java.lang.Integer targetIndex)
|
Type |
copyChild(java.lang.Integer typeToCopyindex)
Copies the child with the given index and returns it. |
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.lang.Object |
delete(java.lang.Object source,
int index,
boolean isTemporary,
boolean check)
Deletes a type according its index from the list saying if this is just temporary and if the cardinality should be checked. |
java.lang.Object |
delete(Type type)
Deletes a type from the list. |
java.lang.Object |
delete(Type type,
boolean isTemporary)
Deletes a type from the list saying if this is just temporary. |
java.lang.Object |
delete(Type type,
boolean isTemporary,
boolean check)
Deletes a type from the list saying if this is just temporary and if the cardinality should be checked. |
java.lang.Object |
get(int index)
|
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 |
getDirectChild(java.lang.String name)
Gets a direct child (next axis) 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 |
getDisplayValue()
Returns this type as a String representation. |
Type |
getEditingType()
Gets the current editable type of the list. |
java.util.List |
getList()
Gets the list of types. |
int |
getMaxOccurs()
Returns the maximum number of allowed list entries. |
int |
getMinOccurs()
Returns the minimum number of allowed list entries. |
java.util.List |
getNoTargetXUIDefinitions()
Gets a list of all noTargetXUIDefinitions. |
int[] |
getSortIndexes()
Returns the sort indexes or null. |
boolean |
hasAbstractContent()
|
boolean |
hasEmptyContent(boolean checkSerializeDefaults,
boolean checkDefaultValue)
|
int |
indexOf(java.lang.Object o)
|
boolean |
isChoice()
Returns true if this type is acting as a choice. |
boolean |
isList()
Returns true if this type represents a list. |
boolean |
isListItemRemoveable(Type listEntry)
|
java.util.Iterator |
iterator()
|
int |
lastIndexOf(java.lang.Object o)
|
java.util.ListIterator |
listIterator()
|
java.util.ListIterator |
listIterator(int index)
|
void |
maintainEditingTypeParent(Type editingType,
Type parent)
|
void |
maintainXUIDefinitions(Type type)
Traverses down the editing type and maintains all the xui definitions set on the editing type axis to the passed type. |
void |
markAsDirtyXPath()
Checks if the passed type holds a recursive element. |
void |
move(int from,
int to)
Moves the type from position "from" to position "to", shifting the other elements |
void |
release()
Release all allocated resources for this type. |
java.lang.Object |
remove(int index)
|
boolean |
remove(java.lang.Object o)
|
void |
removeAll()
Removes all childs of the list. |
void |
removeAll(boolean isTemporary,
boolean check)
Removes all childs of the list. |
boolean |
removeAll(java.util.Collection c)
|
java.lang.Object |
removeChild(int index)
Removes the child with the given index from the list. |
boolean |
removeChild(Type child)
Removes a child from the JAXFront DOM. |
java.lang.Object |
removeLastChild(boolean isTemporary)
Removes a child from the JAXFront DOM. |
void |
removeNoTargetXUIDefinition(Type xuiType)
Removes an information of a XUI type if a list doesn't contain any types for which a XUI definition would exist. |
boolean |
retainAll(java.util.Collection c)
|
void |
serialize(java.lang.StringBuffer sb,
int indent,
boolean writeName,
boolean recursive)
Serializes the current subTree to a StringBuffer |
java.lang.Object |
set(int index,
java.lang.Object element)
|
void |
setChoosenKeyContextValue(java.lang.String xpathRelativeToChoosenKeyContext,
java.lang.String newValue)
|
void |
setChoosenKeyValue(java.lang.String xpathRelativeToChoosenKey,
java.lang.String newValue)
|
void |
setEditingType(Type editingType)
Resets the editing type. |
void |
setList(java.util.List list)
Sets the list entries. |
void |
setSortIndexes(int[] sortIndexes)
Set the sort indexes. |
int |
size()
|
java.util.List |
sort(int direction)
|
java.util.List |
subList(int fromIndex,
int toIndex)
|
void |
swap(int from,
int to)
Swaps the position of two given types in the list |
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
|
boolean |
violateCardinality(int changes)
Checks if removing or adding a new list entry violates the cardinality. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
equals, hashCode, isEmpty |
| Constructor Detail |
|---|
public AbstractListType(SchemaNode schemaElement,
Type editingType)
schemaElement - the element of the schema that represents this typeeditingType - the current type to edit| Method Detail |
|---|
public Type add(Type type)
add in interface ListTypetype - a new type to add
public java.util.List sort(int direction)
public Type add(java.lang.Object source,
Type type,
int index,
boolean check)
type - a new type to addbeforeType - the type after which the new type should be placed in the listcheck - saying if the cardinality/keyref should be checked
public Type addNewChild()
addNewChild in interface ListTypepublic Type addNewChild(int index)
addNewChild in interface ListTypepublic Type addNewChild(Type templateType)
addNewChild in interface ListTypetemplateType - the child to be cloned or null if none
public Type addNewChild(Type templateType,
Type beforeType)
templateType - the child to be cloned or null if nonebeforeType - the followed type of the new added type
public boolean hasAbstractContent()
public Type addNewChild(java.lang.Object source,
Type templateType,
int targetIndex)
templateType - the child to be cloned or null if nonetargetIndex - the index where to copy should be placed in the list
public Type addNewChild(Type templateType,
int targetIndex)
addNewChild in interface ListTypetemplateType - the child to be cloned or null if nonetargetIndex - the index where to copy should be placed in the list
public void addNoTargetXUIDefinition(Type xuiType)
addNoTargetXUIDefinition in interface ListTypexuiType - the type for which a XUI definition exists but no subtypes
were created
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 actions
public void bind(Document DOM,
org.w3c.dom.Element instanceElement)
bind in interface Typebind in class AbstractTypeDOM - the current document to which this type belongsinstanceElement - the 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(Document DOM,
org.w3c.dom.Element instanceElement,
boolean bindOnlyAvailable,
boolean removeChilds)
bind in interface ListType
public void checkCardinality(int changes)
throws ValidationException
checkCardinality in interface ListTypechanges - number of new list entries
ValidationExceptionpublic boolean violateCardinality(int changes)
violateCardinality in interface ListTypechanges - number of new list entries
public Type deepClone(Document dom,
boolean cloneChoices,
boolean includingData)
throws java.lang.CloneNotSupportedException
deepClone in interface TypedeepClone in class AbstractTypedom - the current dom to which this type belongsincludingData - indicates if all binded data should be copied as well (default
is false)
java.lang.CloneNotSupportedException - if this type cannot be cloned
public java.lang.Object delete(Type type)
throws ListModificationException
delete in interface ListTypetype - the type to delete
ListModificationException
public java.lang.Object delete(Type type,
boolean isTemporary)
throws ListModificationException
type - the type to deleteisTemporary - saying if this deletion is just temporary
ListModificationException
public java.lang.Object delete(Type type,
boolean isTemporary,
boolean check)
throws ListModificationException
type - the type to deleteisTemporary - saying if this deletion is just temporarycheck - indicates if cardinality/keyRef violation should be checked
ListModificationException
public java.lang.Object delete(java.lang.Object source,
int index,
boolean isTemporary,
boolean check)
throws ListModificationException
index - index of the type to deleteisTemporary - saying if this deletion is just temporarycheck - indicates if cardinality/keyRef violation should be checked
ListModificationExceptionpublic Type getDirectChild(java.lang.String name)
Type
getDirectChild in interface TypegetDirectChild in class AbstractTypename - name of the child
Type.getDirectChild(java.lang.String)
public Type getDirectChild(java.lang.String name,
java.lang.String namespace)
Type
getDirectChild in interface TypegetDirectChild in class AbstractTypename - name of the childnamespace - namespace of the child
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 AbstractTypename - the name of the child(s)
public Type getEditingType()
getEditingType in interface ListTypepublic java.util.List getList()
getList in interface ListTypepublic int getMaxOccurs()
getMaxOccurs in interface ListTypepublic int getMinOccurs()
getMinOccurs in interface ListTypepublic java.util.List getNoTargetXUIDefinitions()
public void checkXUIDefinition(Type originalType,
Type newType)
public boolean isList()
isList in interface TypeisList in class AbstractTypepublic void maintainXUIDefinitions(Type type)
ListType
maintainXUIDefinitions in interface ListType
public void move(int from,
int to)
move in interface ListTypefrom - the source positionto - the destination positionpublic void release()
Type
release in interface Typerelease in class AbstractTypeType.release()public void removeAll()
removeAll in interface TyperemoveAll in class AbstractType
public void removeAll(boolean isTemporary,
boolean check)
removeAll in interface ListTypeisTemporary - indicates if this deletion is temporarycheck - indicates if cardinality/keyRef violation should be checked
public boolean removeChild(Type child)
throws ListModificationException
removeChild in interface TyperemoveChild in class AbstractTypechild - a child type of this type
ListModificationException
KeyRefException
public java.lang.Object removeChild(int index)
throws ListModificationException
removeChild in interface ListTypeindex - the index of the child that should be removed from the list
ListModificationException
public java.lang.Object removeLastChild(boolean isTemporary)
throws ListModificationException
removeLastChild in interface ListTypechild - a child type of this type
ListModificationExceptionpublic void removeNoTargetXUIDefinition(Type xuiType)
removeNoTargetXUIDefinition in interface ListTypexuiType - the type for which a XUI definition exists but no subtypes
were created
public void serialize(java.lang.StringBuffer sb,
int indent,
boolean writeName,
boolean recursive)
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 swap(int from,
int to)
swap in interface ListTypefrom - the source positionto - the destination positionpublic java.lang.String getDisplayValue()
getDisplayValue in interface Typepublic 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 void setChoosenKeyValue(java.lang.String xpathRelativeToChoosenKey,
java.lang.String newValue)
com.jaxfront.core.type.AbstractType#setChoosenKeyValue(java.lang.String,
java.lang.String)
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 setList(java.util.List list)
ListType
setList in interface ListTypelist - list entriesListType.setList(java.util.List)public int[] getSortIndexes()
ListType
getSortIndexes in interface ListTypepublic void setSortIndexes(int[] sortIndexes)
ListType
setSortIndexes in interface ListTypesortIndexes - new sort index arraypublic boolean isChoice()
AbstractType
isChoice in interface TypeisChoice in class AbstractTypepublic void markAsDirtyXPath()
AbstractType
markAsDirtyXPath in interface TypemarkAsDirtyXPath in class AbstractType
public boolean hasEmptyContent(boolean checkSerializeDefaults,
boolean checkDefaultValue)
hasEmptyContent in class AbstractTypepublic Type copyChild(java.lang.Integer typeToCopyindex)
copyChild in interface ListTypetypeToCopyIndex - the index of the child that should be copied
public void copyAndPasteChild(Type typeToCopy,
java.lang.Integer targetIndex)
copyAndPasteChild in interface ListType
public void copyAndPasteChild(java.lang.Integer typeToCopyIndex,
java.lang.Integer targetIndex)
copyAndPasteChild in interface ListTypepublic void copyAndPasteChild(Type typeToCopy)
copyAndPasteChild in interface ListType
public void maintainEditingTypeParent(Type editingType,
Type parent)
public Type deepClone(Document dom,
boolean cloneChoices,
boolean includingData,
boolean includeEditingType,
SchemaNode schemaNode,
org.w3c.dom.Element element)
throws java.lang.CloneNotSupportedException
Type
deepClone in interface TypedeepClone in class AbstractTypedom - the current dom to which this type belongsincludingData - indicates if all binded data should be copied as well (default is false)
java.lang.CloneNotSupportedExceptionpublic void setEditingType(Type editingType)
ListType
setEditingType in interface ListTypeeditingType - template type for a listpublic void autoCreateEntries()
ListType
autoCreateEntries in interface ListTypepublic int size()
size in interface java.util.Collectionsize in interface java.util.Listpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Listpublic java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.Listpublic java.lang.Object get(int index)
get in interface java.util.Listpublic java.lang.Object remove(int index)
remove in interface java.util.List
public void add(int index,
java.lang.Object element)
add in interface java.util.Listpublic int indexOf(java.lang.Object o)
indexOf in interface java.util.List
public boolean isListItemRemoveable(Type listEntry)
throws ListModificationException
isListItemRemoveable in interface ListTypeListModificationExceptionpublic int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.Listpublic boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.Listpublic boolean contains(java.lang.Object o)
contains in interface java.util.Collectioncontains in interface java.util.Listpublic boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.List
public boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.Listpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.CollectionaddAll in interface java.util.Listpublic boolean containsAll(java.util.Collection c)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.Listpublic boolean removeAll(java.util.Collection c)
removeAll in interface java.util.CollectionremoveAll in interface java.util.Listpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.CollectionretainAll in interface java.util.Listpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.List
public java.util.List subList(int fromIndex,
int toIndex)
subList in interface java.util.Listpublic java.util.ListIterator listIterator()
listIterator in interface java.util.Listpublic java.util.ListIterator listIterator(int index)
listIterator in interface java.util.List
public java.lang.Object set(int index,
java.lang.Object element)
set in interface java.util.Listpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.CollectiontoArray in interface java.util.List
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||