org.makumba.providers.datadefinition.makumba
Class MakumbaDataDefinitionFactory

java.lang.Object
  extended by org.makumba.providers.datadefinition.makumba.MakumbaDataDefinitionFactory
All Implemented Interfaces:
DataDefinitionProviderInterface

public class MakumbaDataDefinitionFactory
extends Object
implements DataDefinitionProviderInterface

This class is the Makumba implementation of a data definition provider, based on MDD files.
TODO refactor together with RecordInfo to build objects (and not use static methods)

Version:
$Id: MakumbaDataDefinitionFactory.java 3433 2008-12-21 17:04:30Z rosso_nero $
Author:
Manuel Gay

Constructor Summary
MakumbaDataDefinitionFactory()
           
 
Method Summary
 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
 DataDefinition getVirtualDataDefinition(String name)
          Gets a virtual data definition
 FieldDefinition makeFieldDefinition(String name, String definition)
          makes a field definition from the indicated string FIXME this is particular to mdds
 FieldDefinition makeFieldOfType(String name, String type)
          makes a field definition with the elementary type
 FieldDefinition makeFieldOfType(String name, String type, String description)
          makes a field definition identical with the given one, except for the name
 FieldDefinition makeFieldWithName(String name, FieldDefinition type)
          makes a field definition with the elementary type
 FieldDefinition makeFieldWithName(String name, FieldDefinition type, String description)
          makes a field definition identical with the given one, except for the name and the description
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MakumbaDataDefinitionFactory

public MakumbaDataDefinitionFactory()
Method Detail

getDataDefinition

public DataDefinition getDataDefinition(String typeName)
Description copied from interface: DataDefinitionProviderInterface
Gets the data definition defined by the given type.

Specified by:
getDataDefinition in interface DataDefinitionProviderInterface

getVirtualDataDefinition

public DataDefinition getVirtualDataDefinition(String name)
Description copied from interface: DataDefinitionProviderInterface
Gets a virtual data definition

Specified by:
getVirtualDataDefinition in interface DataDefinitionProviderInterface
Parameters:
name - the name of the virtual data definition
Returns:
a virtual data definition, representing e.g. a query result

makeFieldDefinition

public FieldDefinition makeFieldDefinition(String name,
                                           String definition)
Description copied from interface: DataDefinitionProviderInterface
makes a field definition from the indicated string FIXME this is particular to mdds

Specified by:
makeFieldDefinition in interface DataDefinitionProviderInterface
Parameters:
name - the name of the field
definition - the definition string
Returns:
a field definition built on a definition string

makeFieldOfType

public FieldDefinition makeFieldOfType(String name,
                                       String type)
Description copied from interface: DataDefinitionProviderInterface
makes a field definition with the elementary type

Specified by:
makeFieldOfType in interface DataDefinitionProviderInterface
Parameters:
name - the name of the field
type - the type of the field
Returns:
a field definition generated by the name and the type of the field

makeFieldOfType

public FieldDefinition makeFieldOfType(String name,
                                       String type,
                                       String description)
Description copied from interface: DataDefinitionProviderInterface
makes a field definition identical with the given one, except for the name

Specified by:
makeFieldOfType in interface DataDefinitionProviderInterface
Parameters:
name - the name of the field
type - the FieldDefinition used as model
Returns:
a copy of the initial field definition with a different name

makeFieldWithName

public FieldDefinition makeFieldWithName(String name,
                                         FieldDefinition type)
Description copied from interface: DataDefinitionProviderInterface
makes a field definition with the elementary type

Specified by:
makeFieldWithName in interface DataDefinitionProviderInterface
Parameters:
name - the name of the field
type - the elementary type of the field
Returns:
a field definition generated by the name, type and description of the field

makeFieldWithName

public FieldDefinition makeFieldWithName(String name,
                                         FieldDefinition type,
                                         String description)
Description copied from interface: DataDefinitionProviderInterface
makes a field definition identical with the given one, except for the name and the description

Specified by:
makeFieldWithName in interface DataDefinitionProviderInterface
Parameters:
name - the name of the field
type - the FieldDefinition used as model
description - the description of the field
Returns:
a copy of the initial field definition with a different name and description

getDataDefinitionsInLocation

public Vector<String> getDataDefinitionsInLocation(String location)
Description copied from interface: DataDefinitionProviderInterface
gives a list of data definitions in a given location

Specified by:
getDataDefinitionsInLocation in interface DataDefinitionProviderInterface
Parameters:
location - the location where the data definitions should be
Returns:
a vector with references to the data definitions in the location

getDataDefinitionsInDefaultLocations

public Vector<String> getDataDefinitionsInDefaultLocations()
Description copied from interface: DataDefinitionProviderInterface
gives a list of data definitions in the default locations of the data definition provider

Specified by:
getDataDefinitionsInDefaultLocations in interface DataDefinitionProviderInterface
Returns:
a vector with references to the data definitions in the default locations of the data definition provider

getDataDefinitionsInDefaultLocations

public Vector<String> getDataDefinitionsInDefaultLocations(String... ignoreList)
Description copied from interface: DataDefinitionProviderInterface
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

Specified by:
getDataDefinitionsInDefaultLocations in interface DataDefinitionProviderInterface
Parameters:
ignoreList - a list of prefixes for MDDs to be ignored
Returns:
a vector with references to the data definitions in the default locations of the data definition provider