|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.datatypes.DataTypeCollector
A DataTypeCollector is a collection of named DataTypes. So, you can add and request DataType
objects from this by a String. It also facilitates 'chaining' because you can add other
DataTypeCollectors to it. It will delegate searching of a datatype to them, if a certain key is
not available.
This object also knowns how to 'lock' its DataType's using it's 'signature'. I have no idea where
that is good for.
| Constructor Summary | |
DataTypeCollector(Object signature)
Constructor. |
|
| Method Summary | |
void |
addCollector(DataTypeCollector collector)
Adds a datatype collector on which this collector depends. |
BasicDataType |
addDataType(BasicDataType dataType)
Adds a datatype to this collector. |
boolean |
contains(DataType dataType)
Returns whether the dataType is part of the current collection. |
boolean |
contains(String name)
Returns whether the dataType with the given name is part of the current collection. |
void |
finish(DataType dataType)
Lock a dataType so it can be changed or latered. |
Iterator |
getAllSpecializations(String name)
Recursively calls getSpecializations(String) so that you can easily iterate also all indirectly specializaed versions of a certain DataType in this collector |
BasicDataType |
getDataType(String name)
Get a datatype defined for this collector. |
BasicDataType |
getDataType(String name,
boolean recursive)
Get a datatype defined for this collector, and possibly any collectors it depends on. |
DataTypeDefinition |
getDataTypeDefinition()
|
BasicDataType |
getDataTypeInstance(String name,
BasicDataType baseDataType)
Get a datatype instance through this collector. |
Map |
getDataTypes()
Set local datatypes of the collector |
Set |
getRoots()
Returns all DataTypes in this Collector which did not have an origina DataType (in this Collector). |
Collection |
getSpecializations(String name)
Returns a set of all DataTypes in this collector which are directly inherited from the one with given name |
void |
rewrite(DataType dataType)
Unlock a dataType so it can be changed or latered. |
void |
setDataTypes(Map dataTypes)
Set local datatypes of the collector |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DataTypeCollector(Object signature)
signature - the object used to finish a data type for this collector.| Method Detail |
public DataTypeDefinition getDataTypeDefinition()
public void addCollector(DataTypeCollector collector)
collector - the dataType collector to addpublic void setDataTypes(Map dataTypes)
dataTypes - a Map containing the datatypespublic Map getDataTypes()
public BasicDataType getDataType(String name)
name - the name of the datatype to retrieve
DataType with the given name, as defined for this collector, or null
if no datatype is defined.public BasicDataType addDataType(BasicDataType dataType)
dataType - the datatype to add
null
if it is not applicable.public Collection getSpecializations(String name)
public Iterator getAllSpecializations(String name)
getSpecializations(String) so that you can easily iterate also all indirectly specializaed versions of a certain DataType in this collector
public Set getRoots()
public BasicDataType getDataType(String name,
boolean recursive)
name - the name of the datatype to retrieverecursive - if true, the datatype is also searched in collectors it depends on.
DataType with the given name, as defined for this collector, or null
if no datatype is defined.
public BasicDataType getDataTypeInstance(String name,
BasicDataType baseDataType)
name - the name of the datatype to retrievebaseDataType - the datatype to base a new datatype on if it is not yet defined. Can be null.
DataType with the given name, as defined for this collector, or null
if no datatype is defined and no base datatype was passed.public boolean contains(String name)
public boolean contains(DataType dataType)
public void rewrite(DataType dataType)
public void finish(DataType dataType)
public String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||