|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - type of elements contained in the data setpublic interface IDataSet<T extends IElement>
Interface of a data set.
Data sets are containers for elements. All elements in a data set have to be valid (internally) as well as have valid relations with other element in the same data set.
IElement| Nested Class Summary | |
|---|---|
static class |
IDataSet.Properties
Enumeration of property name constants. |
| Field Summary | |
|---|---|
static Collection<Type> |
ACCEPTED_TYPES
Collection of element types accepted by this type of data set. |
static Type |
TYPE
Type of IDataSet. |
| Method Summary | ||
|---|---|---|
void |
addElement(T element)
Adds an element to this data set. |
|
void |
addElements(Collection<? extends T> elements)
Adds a collection of elements to this data set. |
|
void |
addElements(T... elements)
Adds multiple elements to this data set. |
|
void |
addMetaPropertyManager(Type elementType,
MetaPropertyManager metaPropertyManager)
Adds a meta-property manager of elements of given type. |
|
void |
addMetaPropertyManagersForAcceptedTypes()
Adds meta-property managers for all types accepted by the data set by default. |
|
Collection<Type> |
getAcceptedTypes()
Returns collection of types of elements this data set is able to accept. |
|
Collection<? extends T> |
getAssignableElements(Type type)
Returns elements from this data set of given type (or it's sub-type). |
|
Date |
getCreationDate()
Returns the data set creation date. |
|
DataSetDescriptor |
getDescriptor()
Returns the descriptor of this data set. |
|
T |
getElement(UUID id)
Returns element from this data set with given ID. |
|
int |
getElementCount()
Returns the number of elements in this data set. |
|
Collection<? extends T> |
getElements()
Returns all elements from this data set. |
|
Collection<? extends T> |
getElements(Type type)
Returns elements from this data set of the same type as given one. |
|
Collection<Type> |
getElementTypes()
Returns collection of types of IElements this data set contains. |
|
MetaPropertyManager |
getMetaPropertyManager(Type elementType)
Returns meta-property manager of elements of given type. |
|
Collection<MetaPropertyManager> |
getMetaPropertyManagers()
Returns meta-property managers for all types of elements. |
|
String |
getName()
Returns the name of the data set. |
|
Collection<Type> |
getRegisteredTypes()
Returns collection of types of IElements this data set is ready to accept, i.e. |
|
|
removeElement(E element)
Removes the given element from this data set. |
|
T |
removeElement(UUID id)
Removes IElement from this data set with given ID. |
|
|
removeElements(Collection<E> elements)
Removes multiple elements from this data set. |
|
|
removeElements(E... elements)
Removes multiple elements from this data set. |
|
void |
setCreationDate(Date creationDate)
Sets the data set creation date. |
|
void |
setElements(Collection<? extends T> elements)
Sets elements from this data set. |
|
void |
setName(String name)
Sets the name of the data set. |
|
| Methods inherited from interface pl.edu.agh.cast.data.model.Identifiable |
|---|
getId, getType |
| Methods inherited from interface pl.edu.agh.cast.data.model.property.IPropertyContainer |
|---|
addProperty, getCustomProperties, getMetaPropertyManager, getPermanentProperties, getProperties, getProperty, getTransientProperties, matches, removeProperty, setProperty |
| Methods inherited from interface java.util.Observer |
|---|
update |
| Methods inherited from interface pl.edu.agh.cast.common.IValidatable |
|---|
isValid |
| Methods inherited from interface pl.edu.agh.cast.common.IDisposable |
|---|
dispose |
| Field Detail |
|---|
static final Type TYPE
IDataSet.
static final Collection<Type> ACCEPTED_TYPES
| Method Detail |
|---|
DataSetDescriptor getDescriptor()
Collection<Type> getAcceptedTypes()
int getElementCount()
@PropertyGetter(name="ELEMENTS",
type=REFERENCE_LIST,
matchable=false,
required=false)
Collection<? extends T> getElements()
@PropertySetter(name="ELEMENTS") void setElements(Collection<? extends T> elements)
elements - elements from this data setCollection<? extends T> getAssignableElements(Type type)
type - type of elements to return
Collection<? extends T> getElements(Type type)
type - type of elements to return
T getElement(UUID id)
id - ID of element to find
null otherwiseCollection<Type> getElementTypes()
IElements this data set contains.
void addElement(T element)
element - element to add
IllegalArgumentException - if element is null
ModelException - if element is already in this data setvoid addElements(Collection<? extends T> elements)
elements - collection of elements to add
IllegalArgumentException - if element collection or any of the elements is null
ModelException - if any of elements is already in this data setvoid addElements(T... elements)
elements - elements to add
IllegalArgumentException - if any of the elements is null
ModelException - if any of elements is already in this data setT removeElement(UUID id)
IElement from this data set with given ID.
id - ID of element to remove
null otherwise
IllegalArgumentException - if element ID is null
ModelException - if element with given ID is not in this data set<E extends T> E removeElement(E element)
E - type of element to removeelement - element to remove
null otherwise
IllegalArgumentException - if element ID is null
ModelException - if element with given ID is not in this data set<E extends T> Collection<E> removeElements(Collection<E> elements)
E - type of elements to removeelements - list of elements to remove
IllegalArgumentException - if element list is null
ModelException - if any of the elements is not in this data set<E extends T> Collection<E> removeElements(E... elements)
E - type of elements to removeelements - array of elements to remove
IllegalArgumentException - if element list is null
ModelException - if any of the elements is not in this data set
void addMetaPropertyManager(Type elementType,
MetaPropertyManager metaPropertyManager)
elementType - type of elementsmetaPropertyManager - MetaPropertyManager of elements of given type
IllegalArgumentException - if any of the arguments is null
ModelException - if a different MetaPropertyManager is already registered for this typeMetaPropertyManager getMetaPropertyManager(Type elementType)
elementType - type of elements
MetaPropertyManager of elements of given type
IllegalArgumentException - if elementType is nullCollection<MetaPropertyManager> getMetaPropertyManagers()
MetaPropertyManagersvoid addMetaPropertyManagersForAcceptedTypes()
getAcceptedTypes()Collection<Type> getRegisteredTypes()
IElements this data set is ready to accept, i.e. contains
MetaPropertyManager's for those types.
@PropertyGetter(name="DS_NAME",
type=TEXT,
matchable=false)
String getName()
@PropertySetter(name="DS_NAME") void setName(String name)
name - the name of the data set
@PropertyGetter(name="DS_CREATION_DATE",
type=DATE,
matchable=false)
Date getCreationDate()
void setCreationDate(Date creationDate)
creationDate - the data set creation date
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||