|
CDMA client API
3.1.0
CDMA core library
|
The Core factory is the entry point of the CDMA API. More...
Static Public Member Functions | |
| static IDataset | openDataset (URI uri) throws Exception |
| static IDataset | openDataset (URI uri, boolean useDictionary) throws Exception |
| static void | setActiveView (String experiment) |
| static String | getActiveView () |
| static String | getKeyDictionaryPath () |
| static String | getMappingDictionaryFolder (IFactory factory) |
| static void | setDictionariesFolder (String path) |
| static String | getDictionariesFolder () |
| static IIndex | createIndex (int[] shape) |
| static IArray | createArray (Class<?> clazz, int[] shape) |
| static IArray | createArray (Class<?> clazz, int[] shape, final Object storage) |
| static IArray | createArray (final Object javaArray) |
| static IArray | createStringArray (String string) |
| static IArray | createDoubleArray (double[] javaArray) |
| static IArray | createDoubleArray (double[] javaArray, final int[] shape) |
| static IArray | createArrayNoCopy (Object javaArray) |
| static IDataItem | createDataItem (IDataset dataset, IGroup parent, String shortName, IArray array) throws InvalidArrayTypeException |
| static IDataItem | createDataItem (IGroup parent, String shortName, IArray array) throws InvalidArrayTypeException |
| static IGroup | createGroup (IDataset dataset, IGroup parent, String shortName, boolean init) |
| static IGroup | createGroup (IGroup parent, String shortName, boolean updateParent) |
| static IGroup | createGroup (String shortName) throws IOException |
| static ILogicalGroup | createLogicalGroup (IDataset dataset, IKey key) |
| static IAttribute | createAttribute (String name, Object value) |
| static IDataset | createDatasetInstance (URI uri) throws Exception |
| static IDataset | createDatasetInstance (URI uri, boolean useDictionary) throws Exception |
| static IDataset | createEmptyDatasetInstance () throws IOException |
| static IKey | createKey (String keyName) |
| static IPath | createPath (String path) |
| static IDictionary | createDictionary () |
| static IFactoryManager | getManager () |
| static IFactory | getFactory () |
| static IFactory | getFactory (String name) |
| static IFactory | getFactory (URI uri) |
| static IFactory | detectPlugin (URI uri) |
The Core factory is the entry point of the CDMA API.
The Factory class in common data model is a tools to create CDMA objects.. It manages all plug-ins instances.
According to an URI, it will detect which plug-in is relevant to that data source. It can take an URI as a parameter to instantiate a plug-in in order to get an access of the targeted data source using CDMA objects.
Abbreviation: Common Data Model Access -- CDMA
| static IArray org.gumtree.data.Factory.createArray | ( | Class<?> | clazz, |
| int[] | shape | ||
| ) | [static] |
Create an empty IArray with a certain data type and certain shape.
| clazz | Class type |
| shape | java array of integer |
| static IArray org.gumtree.data.Factory.createArray | ( | Class<?> | clazz, |
| int[] | shape, | ||
| final Object | storage | ||
| ) | [static] |
Create an IArray with a given data type, shape and data storage.
| clazz | in Class type |
| shape | java array of integer |
| storage | a 1D java array in the type reference by clazz |
| static IArray org.gumtree.data.Factory.createArray | ( | final Object | javaArray | ) | [static] |
Create an IArray from a java array. A new 1D java array storage will be created. The new CDMA IArray will be in the same type and same shape as the java array. The storage of the new array will be a COPY of the supplied java array.
| javaArray | one to many dimensional java array |
| static IArray org.gumtree.data.Factory.createArrayNoCopy | ( | Object | javaArray | ) | [static] |
Create an IArray from a java array. A new 1D java array storage will be created. The new CDMA IArray will be in the same type and same shape as the java array. The storage of the new array will be the supplied java array.
| javaArray | java primary array |
| static IAttribute org.gumtree.data.Factory.createAttribute | ( | String | name, |
| Object | value | ||
| ) | [static] |
Create a CDMA Attribute with given name and value.
| name | in String type |
| value | in String type |
| static IDataItem org.gumtree.data.Factory.createDataItem | ( | IDataset | dataset, |
| IGroup | parent, | ||
| String | shortName, | ||
| IArray | array | ||
| ) | throws InvalidArrayTypeException [static] |
Create a CDMA IDataItem with a given parent Group, Dataset, name and GDM IArray data.
| dataset | CDMA Dataset |
| parent | CDMA Group |
| shortName | in String type |
| array | CDMA IArray |
| InvalidArrayTypeException | wrong type |
| static IDataItem org.gumtree.data.Factory.createDataItem | ( | IGroup | parent, |
| String | shortName, | ||
| IArray | array | ||
| ) | throws InvalidArrayTypeException [static] |
Create a IDataItem with a given CDMA parent Group, name and CDMA IArray data. If the parent Group is null, it will generate a temporary Group as the parent group.
| parent | CDMA Group |
| shortName | in String type |
| array | CDMA IArray |
| InvalidArrayTypeException |
| static IDataset org.gumtree.data.Factory.createDatasetInstance | ( | URI | uri | ) | throws Exception [static] |
Create a CDMA Dataset that can read the given URI.
| uri | URI object |
| Exception |
| static IDataset org.gumtree.data.Factory.createDatasetInstance | ( | URI | uri, |
| boolean | useDictionary | ||
| ) | throws Exception [static] |
Create a CDMA Dataset that can read the given URI and use optionally the Extended Dictionary mechanism.
| uri | URI object |
| useProducer | only |
| Exception |
| static IDictionary org.gumtree.data.Factory.createDictionary | ( | ) | [static] |
Create an empty CDMA IDictionary
| static IArray org.gumtree.data.Factory.createDoubleArray | ( | double[] | javaArray | ) | [static] |
Create a double type IArray with a given single dimensional java double storage. The rank of the generated IArray object will be 1.
| javaArray | java double array in one dimension |
| static IArray org.gumtree.data.Factory.createDoubleArray | ( | double[] | javaArray, |
| final int[] | shape | ||
| ) | [static] |
Create a double type IArray with a given java double storage and shape.
| javaArray | java double array in one dimension |
| shape | java integer array |
| static IDataset org.gumtree.data.Factory.createEmptyDatasetInstance | ( | ) | throws IOException [static] |
Create a CDMA Dataset in memory only. The dataset is not open yet. It is necessary to call dataset.open() to access the root of the dataset.
| IOException | I/O error |
| static IGroup org.gumtree.data.Factory.createGroup | ( | IDataset | dataset, |
| IGroup | parent, | ||
| String | shortName, | ||
| boolean | init | ||
| ) | [static] |
Create a CDMA Group with given Dataset, parent CDMA Group, name. A boolean initiate parameter tells the factory if the new group will be put in the list of children of the parent Group.
| dataset | CDMA Dataset |
| parent | CDMA Group |
| shortName | in String type |
| init | boolean type |
| static IGroup org.gumtree.data.Factory.createGroup | ( | IGroup | parent, |
| String | shortName, | ||
| boolean | updateParent | ||
| ) | [static] |
Create a CDMA Group with a given parent CDMA Group, name, and a boolean initiate parameter telling the factory if the new group will be put in the list of children of the parent. Group.
| parent | CDMA Group |
| shortName | in String type |
| updateParent | if the parent will be updated |
| static IGroup org.gumtree.data.Factory.createGroup | ( | String | shortName | ) | throws IOException [static] |
Create an empty CDMA Group with a given name. The factory will create an empty CDMA Dataset first, and create the new Group under the root group of the Dataset.
| shortName | in String type |
| IOException |
| static IIndex org.gumtree.data.Factory.createIndex | ( | int[] | shape | ) | [static] |
Create an index of IArray by given a shape of the IArray.
| shape | java array of integer |
| static IKey org.gumtree.data.Factory.createKey | ( | String | keyName | ) | [static] |
Create a key having the given name
| keyName | String |
| static ILogicalGroup org.gumtree.data.Factory.createLogicalGroup | ( | IDataset | dataset, |
| IKey | key | ||
| ) | [static] |
Create an empty CDMA Logical Group with a given key.
| parent | an ILogicalGroup |
| key | an IKey that this group will correspond |
| IOException |
| static IPath org.gumtree.data.Factory.createPath | ( | String | path | ) | [static] |
Create a path having the given value
| path | String |
| static IArray org.gumtree.data.Factory.createStringArray | ( | String | string | ) | [static] |
Create an IArray of String storage. The rank of the new IArray will be 2 because it treat the IArray as 2D char array.
| string | String value |
| static IFactory org.gumtree.data.Factory.detectPlugin | ( | URI | uri | ) | [static] |
Return a plug-in IFactory that is the most relevant for the given URI. Try to detect factories according the following: if a plug-in declares itself as the owner of the targeted data source returns its factory else returns the first plug-in that is compatible with given data format no plug-in is compatible returns null
| uri | of the data source |
| static String org.gumtree.data.Factory.getActiveView | ( | ) | [static] |
Returns the name of the current view (e.q experiment) that is active for the Extended Dictionary mechanism.
| static String org.gumtree.data.Factory.getDictionariesFolder | ( | ) | [static] |
Get the folder path where to search for key dictionary files (e.q: view or experiment). This folder should contains all dictionaries that the above application needs.
| static IFactory org.gumtree.data.Factory.getFactory | ( | ) | [static] |
Return the IFactory of the first available plug-in that was loaded
| static IFactory org.gumtree.data.Factory.getFactory | ( | String | name | ) | [static] |
Return the plug-in's factory having the given name
| name | of the requested factory |
| static IFactory org.gumtree.data.Factory.getFactory | ( | URI | uri | ) | [static] |
Return a plug-in IFactory that is the most relevant for the given URI. Try to detect factories according the following: if a plug-in declares itself as the owner of the targeted data source returns its factory else returns the first plug-in that is compatible with given data format no plug-in is compatible returns null
| uri | of the data source |
| static String org.gumtree.data.Factory.getKeyDictionaryPath | ( | ) | [static] |
According to the currently defined experiment, this method will return the path to reach the declarative dictionary. It means the file where is defined what should be found in a IDataset that fits the experiment. It's a descriptive file.
| static IFactoryManager org.gumtree.data.Factory.getManager | ( | ) | [static] |
Return the singleton instance of the plug-ins factory manager
| static String org.gumtree.data.Factory.getMappingDictionaryFolder | ( | IFactory | factory | ) | [static] |
According to the given factory this method will return the path to reach the folder containing mapping dictionaries. This file associate entry keys to paths that are plug-in dependent.
| factory | of the plug-in instance from which we want to load the dictionary |
| static IDataset org.gumtree.data.Factory.openDataset | ( | URI | uri | ) | throws Exception [static] |
Create a CDMA Dataset that can read the given URI.
| uri | URI object |
| Exception |
| static IDataset org.gumtree.data.Factory.openDataset | ( | URI | uri, |
| boolean | useDictionary | ||
| ) | throws Exception [static] |
Create a CDMA Dataset that can read the given URI and use optionally the Extended Dictionary mechanism.
| uri | URI object |
| useProducer | only |
| Exception |
| static void org.gumtree.data.Factory.setActiveView | ( | String | experiment | ) | [static] |
Set the name of the current view (e.q experiment) that will be active for the Extended Dictionary mechanism.
| experiment | name |
| static void org.gumtree.data.Factory.setDictionariesFolder | ( | String | path | ) | [static] |
Set the folder path where to search for key dictionary files. This folder should contains all dictionaries that the above application needs.
| path | targeting a folder |