| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is a factory class used to create the proper type of DataMapper
instance given the location of an instance document. (DataMapper
objects are used to support language-independent data binding.) When a
DataMapper
class is loaded it registers itself by passing a
DataMapperFactory.Creator
instance to the register()
function of DataMapperFactory
. This results in a binding between
the location of instance documents passed to the
createDataMapperByURL()
, createDataMapperByFile()
and
createDataMapper()
functions of this class and the realizations of
the objects these documents describe. The
dataMapperFactory.properties
properties file is used to insure that
all standard DataMapper
subclasses are loaded before they're needed
by application code. The processes of marshalling and unmarshalling object
instances may utilize optional schema data given to the factory when a data
mapper instance was created.
Note: This class has neither instance variables not instance methods. As such,
it should not be instanciated.
Inner Class Summary | |
public static class | DataMapperFactory.Creator This is a functoid class. |
Method Summary | |
static DataMapper | createDataMapper(String data_url, String schema_url) Creates a DataMapper subclass based on the type of instance
document referred to by the data_url parameter, or null
if none of the registered data mapper classes are capable of support the given instance document type. |
static DataMapper | createDataMapper(String data_url, String data, String schema_url) Creates a DataMapper subclass based on the type of instance
document referred to by the data_url parameter, the contents of which
are contained within the data parameter, or null
if none of the registered data mapper classes are capable of support the given instance document type. |
static DataMapper | createDataMapper(List properties) Creates a DataMapper subclass based on the properties passed |
static Iterator | createDataMappers(List properties) Creates DataMapper 's based on the properties passed |
static void | main(String[] args_array) Minimal test harness |
static void | register(DataMapperFactory.Creator creator) When a DataMapper class is loaded it registers itself by passing a
DataMapperFactory.Creator instance to this function. |
Method Detail |
public static DataMapper createDataMapper(String data_url, String schema_url)
DataMapper
subclass based on the type of instance
data_url
parameter, or null
String
that refers to the instance document a data mapper
String
that refers to an schema that the data
DataMapper
that supports the given instance document, or
null
if the document is not supported.public static DataMapper createDataMapper(String data_url, String data, String schema_url)
DataMapper
subclass based on the type of instance
data_url
parameter, the contents of which
data
parameter, or null
String
that refers to the instance document a data mapper
String
that refers to an schema that the data
DataMapper
that supports the given instance document, or
null
if the document is not supported.public static DataMapper createDataMapper(List properties)
DataMapper
subclass based on the properties passedDataMapper
that supports the given properties, or
null
if there is no DataMapper which matches.public static Iterator createDataMappers(List properties)
DataMapper
's based on the properties passedIterator
containing all DataMapper
's
public static void main(String[] args_array)
throws java.lang.Throwable
public static void register(DataMapperFactory.Creator creator)
DataMapper
class is loaded it registers itself by passing a
DataMapperFactory.Creator
instance to this function. This results
createDataMapperByURL()
, createDataMapperByFile()
and
createDataMapper()
functions and the realizations of the objects
DataMapperFactory.Creator
having a
createIfSupported()
function that takes a URL String
s
DataMapper
subclass will implement this function to return a
DataMapper
instance for those instance documents that it supports.Association Links |
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |