|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.makumba.providers.DataDefinitionProvider
public abstract class DataDefinitionProvider
This class is a facade for creating different kinds of DataDefinitionProviders. Its constructor knows from a Configuration (or in the future maybe through other means) which implementation to use, and provides this implementation methods to its client, without revealing the implementation used.
Field Summary | |
---|---|
(package private) static Map<String,DataDefinitionProvider> |
providerInstances
|
Constructor Summary | |
---|---|
DataDefinitionProvider()
|
Method Summary | |
---|---|
abstract DataDefinition |
getDataDefinition(String typeName)
Gets the data definition defined by the given type. |
Vector<String> |
getDataDefinitionsInDefaultLocations()
gives a list of data definitions in the default locations of the data definition provider |
Vector<String> |
getDataDefinitionsInDefaultLocations(String... ignoreList)
gives a list of data definitions in the default locations of the data definition provider, ignoring those MDDs that start with any of the strings in the ignoreList |
Vector<String> |
getDataDefinitionsInLocation(String location)
gives a list of data definitions in a given location |
static FieldDefinition |
getFieldDefinition(DataDefinition dd,
String fieldName,
String lineWithDefinition)
This method finds a field definition with the given name within the given data definition. |
static DataDefinitionProvider |
getInstance()
Gives an instance of a DataDefinitionProvider . |
abstract DataDefinition |
getVirtualDataDefinition(String name)
|
abstract FieldDefinition |
makeFieldDefinition(String name,
String definition)
makes a field definition from the indicated string |
abstract FieldDefinition |
makeFieldOfType(String name,
String type)
makes a field definition with the elementary type |
abstract FieldDefinition |
makeFieldOfType(String name,
String type,
String description)
makes a field definition identical with the given one, except for the name |
abstract FieldDefinition |
makeFieldWithName(String name,
FieldDefinition type)
makes a field definition with the elementary type |
abstract FieldDefinition |
makeFieldWithName(String name,
FieldDefinition type,
String description)
makes a field definition identical with the given one, except for the name and the description |
void |
release()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final Map<String,DataDefinitionProvider> providerInstances
Constructor Detail |
---|
public DataDefinitionProvider()
Method Detail |
---|
public static DataDefinitionProvider getInstance()
DataDefinitionProvider
.
public void release()
release
in interface SingletonHolder
public abstract DataDefinition getDataDefinition(String typeName)
public abstract DataDefinition getVirtualDataDefinition(String name)
public abstract FieldDefinition makeFieldDefinition(String name, String definition)
name
- the name of the fielddefinition
- the definition string, e.g. "ptr general.Person ;pointer to a person"
public abstract FieldDefinition makeFieldOfType(String name, String type)
name
- the name of the fieldtype
- the type of the field
public abstract FieldDefinition makeFieldOfType(String name, String type, String description)
name
- the name of the fieldtype
- the FieldDefinition used as model
public abstract FieldDefinition makeFieldWithName(String name, FieldDefinition type)
name
- the name of the fieldtype
- the elementary type of the fielddescription
- the description of the field
public abstract FieldDefinition makeFieldWithName(String name, FieldDefinition type, String description)
name
- the name of the fieldtype
- the FieldDefinition used as modeldescription
- the description of the field
public Vector<String> getDataDefinitionsInLocation(String location)
location
- the location where the data definitions should be
public Vector<String> getDataDefinitionsInDefaultLocations()
public Vector<String> getDataDefinitionsInDefaultLocations(String... ignoreList)
ignoreList
- a list of prefixes for MDDs to be ignored
public static final FieldDefinition getFieldDefinition(DataDefinition dd, String fieldName, String lineWithDefinition) throws DataDefinitionParseError
DataDefinition.getFieldDefinition(String)
is that the field name can be of the form
field.subfield.otherSubfield, over an arbitrary number of levels.
DataDefinitionParseError
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |