|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xquark.bridge.Mapping
public class Mapping
An object implementing this class represents a processed mapping file. Objects of this class are thread-safe and can be reused multiple times.
This class uses a cache for loaded mapping files, so that the loading overhead is reduced. The cache mechanism can be overriden to reload a modified file.
Constructor Summary | |
---|---|
Mapping(javax.sql.DataSource dataSource,
org.xml.sax.InputSource source,
boolean reload,
java.lang.ClassLoader classLoader,
org.xquark.schema.SchemaManager schemaManager,
java.util.HashMap mappingMetadata)
Constructor. |
|
Mapping(javax.sql.DataSource dataSource,
org.xml.sax.InputSource source,
boolean reload,
java.lang.ClassLoader classLoader,
org.xquark.schema.SchemaManager schemaManager,
java.util.HashMap mappingMetadata,
javax.xml.transform.stream.StreamSource xslSource)
Constructor. |
Method Summary | |
---|---|
void |
close()
Frees all resources associated to the object |
javax.sql.DataSource |
getDataSource()
Returns the JDBC data source used by this mapping. |
Mapper |
getMapper()
Creates a new Mapper object for storing a set of XML documents in the database using the default "insert" mode |
Mapper |
getMapper(java.lang.String mode)
Creates a new Mapper object for storing a set of XML documents in the database |
java.util.List |
getMappingModes()
Returns available mapping modes, as a list of strings |
java.lang.String |
getNamespace()
Returns the namespace of the mapping. |
java.lang.String |
getSystemId()
Returns the system id (the URL) of the mapping file, if known. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Mapping(javax.sql.DataSource dataSource, org.xml.sax.InputSource source, boolean reload, java.lang.ClassLoader classLoader, org.xquark.schema.SchemaManager schemaManager, java.util.HashMap mappingMetadata, javax.xml.transform.stream.StreamSource xslSource) throws XMLDBCException
dataSource
- a JDBC data sourcesource
- the SAX InputSource encapsulating the mapping filereload
- true means that the mapping file should be reloaded, even if it is present in the cacheclassLoader
- ClassLoader used for loading user generatorsschemaManager
- SchemaManager for schemasmappingMetadata
- if not null, a HashMap holding previously loaded mapping metadataxslSource
- if not null, the source containing the xsl style sheet
XMLDBCException
- if an error occured while loading the mapping file. The underlying exception provides the root cause for the exceptionpublic Mapping(javax.sql.DataSource dataSource, org.xml.sax.InputSource source, boolean reload, java.lang.ClassLoader classLoader, org.xquark.schema.SchemaManager schemaManager, java.util.HashMap mappingMetadata) throws XMLDBCException
dataSource
- a JDBC data sourcesource
- the SAX InputSource encapsulating the mapping filereload
- true means that the mapping file should be reloaded, even if it is present in the cacheclassLoader
- ClassLoader used for loading user generatorsschemaManager
- SchemaManager for schemasmappingMetadata
- if not null, a HashMap holding previously loaded mapping metadata
XMLDBCException
- if an error occured while loading the mapping file. The underlying exception provides the root cause for the exceptionMethod Detail |
---|
public void close() throws XMLDBCException
XMLDBCException
- if a database connection error occured.public Mapper getMapper() throws XMLDBCException
XMLDBCException
- if a database connection error occured.Mapper
public Mapper getMapper(java.lang.String mode) throws XMLDBCException
mode
- the mapping mode used for storing the documents
XMLDBCException
- if a database connection error occured.Mapper
public java.lang.String getSystemId()
public java.lang.String getNamespace()
public java.util.List getMappingModes()
public javax.sql.DataSource getDataSource()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |