org.wsmo.factory
Class Factory

java.lang.Object
  extended by org.wsmo.factory.Factory

public final class Factory
extends Object


Field Summary
static String DATA_FACTORY
           
static String LE_FACTORY
           
static String PROVIDER_CLASS
           
static String WSML_VALIDATOR
           
static String WSMO_FACTORY
           
static String WSMO_PARSER
           
static String WSMO_SERIALIZER
           
 
Method Summary
static DataFactory createDataFactory(Map<String,Object> properties)
          Creates a DataFactory based on the supplied preferences.
static DataStore createDatastore(Map properties)
          Creates a datastore based on the supplied preferences.
static LogicalExpressionFactory createLogicalExpressionFactory(Map<String,Object> properties)
          Creates a LogicalExpressionFactory based on the supplied preferences.
static Parser createParser(Map<String,Object> properties)
          Creates a parser based on the supplied preferences.
static Serializer createSerializer(Map<String,Object> properties)
          Creates a serialiser based on the supplied preferences.
static WsmlValidator createWsmlValidator(Map<String,Object> properties)
          Creates a WsmlValidator based on the supplied preferences.
static WsmoFactory createWsmoFactory(Map<String,Object> properties)
          Creates a WsmoFactory based on the supplied preferences.
static LocatorManager getLocatorManager()
          Returns a LocatorManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROVIDER_CLASS

public static final String PROVIDER_CLASS
See Also:
Constant Field Values

WSMO_PARSER

public static final String WSMO_PARSER
See Also:
Constant Field Values

WSMO_SERIALIZER

public static final String WSMO_SERIALIZER
See Also:
Constant Field Values

WSML_VALIDATOR

public static final String WSML_VALIDATOR
See Also:
Constant Field Values

LE_FACTORY

public static final String LE_FACTORY
See Also:
Constant Field Values

WSMO_FACTORY

public static final String WSMO_FACTORY
See Also:
Constant Field Values

DATA_FACTORY

public static final String DATA_FACTORY
See Also:
Constant Field Values
Method Detail

createDatastore

public static DataStore createDatastore(Map properties)
Creates a datastore based on the supplied preferences. At least one preference should be supplied - the provider class

Parameters:
properties - the preferences for the datastore. Such preferences should provide all the necessary information for the data store initialisation (e.g. provider class, connection URL,..., etc.)
Returns:
a reference to a datastore
See Also:
PROVIDER_CLASS

createWsmlValidator

public static WsmlValidator createWsmlValidator(Map<String,Object> properties)
Creates a WsmlValidator based on the supplied preferences. The properties map can contain the factories to be used as Strings or as instances. The WsmlValidator Constructor needs to check this and needs to create an instance of a given factory, if only the String is supplied. At least one preference should be supplied - the provider class. The validator can either only check a given TopEntity for validity, or it can also check all imported ontologies. By default, the validator does not check the imported ontologies. This feature can be enabled by adding a property to the properties map when creating the WsmlValidator. Another preference can be set, which references a map containing a mapping from logical URIs to physical locations: HashMap prefs = new HashMap(); prefs.put(WsmlValidator.VALIDATE_IMPORTS, new Boolean(true)); prefs.put(Locator.URI_MAPPING, mapping);

Parameters:
properties - the preferences for the validator.
Returns:
a wsmlValidator
See Also:
PROVIDER_CLASS

createParser

public static Parser createParser(Map<String,Object> properties)
Creates a parser based on the supplied preferences. The properties map can contain the factories to be used as Strings or as instances. The Parser Constructor needs to check this and needs to create an instance of a given factory, if only the String is supplied. At least one preference should be supplied - the provider class

Parameters:
properties - the preferences for the parser. Such preferences should provide all the necessary information for the parser initialisation (e.g. provider class, factory to be used, file type, grammar version, etc.)
Returns:
a Parser
See Also:
PROVIDER_CLASS, #PARSER_FACTORY

createSerializer

public static Serializer createSerializer(Map<String,Object> properties)
Creates a serialiser based on the supplied preferences. At least one preference should be supplied - the provider class

Parameters:
properties - the preferences for the parser. Such preferences should provide all the necessary information for the parser initialisation (e.g. provider class, factory to be used, file type, grammar version, etc.)
Returns:
a Parser
See Also:
PROVIDER_CLASS

createWsmoFactory

public static WsmoFactory createWsmoFactory(Map<String,Object> properties)
Creates a WsmoFactory based on the supplied preferences. At least one preference should be supplied - the provider class

Parameters:
properties - the preferences for the WSMO factory. Such preferences should provide all the necessary information for the factory initialisation (e.g. provider class, etc.)
Returns:
a WsmoFactory
See Also:
PROVIDER_CLASS

createDataFactory

public static DataFactory createDataFactory(Map<String,Object> properties)
Creates a DataFactory based on the supplied preferences. The properties map can contain the factories to be used as Strings or as instances. The DataFactory Constructor needs to check this and needs to create an instance of a given factory, if only the String is supplied. At least one preference should be supplied - the provider class

Parameters:
properties - the preferences for the Data factory. Such preferences should provide all the necessary information for the factory initialisation (e.g. provider class, etc.)
Returns:
a DataFactory
See Also:
PROVIDER_CLASS

createLogicalExpressionFactory

public static LogicalExpressionFactory createLogicalExpressionFactory(Map<String,Object> properties)
Creates a LogicalExpressionFactory based on the supplied preferences. The properties map can contain the factories to be used as Strings or as instances. The LogicalExpressionFactory Constructor needs to check this and needs to create an instance of a given factory, if only the String is supplied. At least one preference should be supplied - the provider class

Parameters:
properties - the preferences for the LogicalExpression factory. Such preferences should provide all the necessary information for the factory initialisation (e.g. provider class, etc.)
Returns:
a LogicalExpressionFactory
See Also:
PROVIDER_CLASS

getLocatorManager

public static LocatorManager getLocatorManager()
Returns a LocatorManager. This LocatorManager is used to create a Locator, which then can be added to / removed from the LocatorManager. The locator is used to lookup wsmo entities based on their IRI. The default locator does also accept a mapping from logical URIs to physical locations, that can be used to locate ontologies:

prefs.put(Locator.URI_MAPPING, mapping);
Locator locator = LocatorManager.createLocator(prefs);

Returns:
a LocatorManager
See Also:
Locator


Copyright © 2004-2008 Ontotext Lab.. All Rights Reserved.