org.makumba.providers.datadefinition.mdd
Class MDDProvider

java.lang.Object
  extended by org.makumba.providers.DataDefinitionProvider
      extended by org.makumba.providers.datadefinition.mdd.MDDProvider
All Implemented Interfaces:
SingletonHolder

public class MDDProvider
extends DataDefinitionProvider


Field Summary
static int infos
           
 
Method Summary
static URL findDataDefinition(String s, String ext)
          Finds a data definition, based on its name and extensions
 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
static DataDefinitionProvider getInstance()
           
static DataDefinition getMDD(String name)
          returns the record info with the given absolute name
(package private) static URL getResource(String s)
           
static DataDefinition getSimpleMDD(String path)
           
 DataDefinition getVirtualDataDefinition(String name)
           
 FieldDefinition makeFieldDefinition(String name, String definition)
          makes a field definition from the indicated string
 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
static void setWebappRoot(String w)
           
 
Methods inherited from class org.makumba.providers.DataDefinitionProvider
getDataDefinitionsInDefaultLocations, getDataDefinitionsInLocation, getFieldDefinition, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

infos

public static int infos
Method Detail

setWebappRoot

public static void setWebappRoot(String w)

getDataDefinition

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

Specified by:
getDataDefinition in class DataDefinitionProvider

getVirtualDataDefinition

public DataDefinition getVirtualDataDefinition(String name)
Specified by:
getVirtualDataDefinition in class DataDefinitionProvider

makeFieldDefinition

public FieldDefinition makeFieldDefinition(String name,
                                           String definition)
Description copied from class: DataDefinitionProvider
makes a field definition from the indicated string

Specified by:
makeFieldDefinition in class DataDefinitionProvider
Parameters:
name - the name of the field
definition - the definition string, e.g. "ptr general.Person ;pointer to a person"
Returns:
a field definition built on a definition string

makeFieldOfType

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

Specified by:
makeFieldOfType in class DataDefinitionProvider
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 class: DataDefinitionProvider
makes a field definition identical with the given one, except for the name

Specified by:
makeFieldOfType in class DataDefinitionProvider
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 class: DataDefinitionProvider
makes a field definition with the elementary type

Specified by:
makeFieldWithName in class DataDefinitionProvider
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 class: DataDefinitionProvider
makes a field definition identical with the given one, except for the name and the description

Specified by:
makeFieldWithName in class DataDefinitionProvider
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

getDataDefinitionsInDefaultLocations

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

Overrides:
getDataDefinitionsInDefaultLocations in class DataDefinitionProvider
Returns:
a vector with references to the data definitions in the default locations of the data definition provider

getMDD

public static DataDefinition getMDD(String name)
returns the record info with the given absolute name

Throws:
DataDefinitionNotFoundError - if the name is not a valid record info name
DataDefinitionParseError - if the syntax is wrong or a referred resource can't be found

getSimpleMDD

public static DataDefinition getSimpleMDD(String path)

findDataDefinition

public static URL findDataDefinition(String s,
                                     String ext)
Finds a data definition, based on its name and extensions


getResource

static URL getResource(String s)

getInstance

public static DataDefinitionProvider getInstance()