|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface implemented by an object which wishes to be the source of a TopicMap object.
Field Summary | |
static boolean |
DEFAULT_OPT_MAKE_CONSISTENT
|
static boolean |
DEFAULT_OPT_MERGE_REFS
|
static boolean |
DEFAULT_OPT_NAME_MERGE
|
static boolean |
DEFAULT_OPT_STATIC_MERGE
|
static java.lang.String |
OPT_MAKE_CONSISTENT
Provider option to automatically make the topic map XTM consistent after import from a TopicMapSource. |
static java.lang.String |
OPT_MERGE_REFS
Provider option to automatically attempt to retrieve and merge in topic maps referenced from mergeMap elements and by external topic references after parsing from a TopicMapSource. |
static java.lang.String |
OPT_NAME_MERGE
Provider option to create topic maps in which merges are performed based on scoped name. |
static java.lang.String |
OPT_STATIC_MERGE
Provider option to create topic maps in which merges are static. |
Method Summary | |
TopicMap |
addTopicMap(java.io.InputStream src,
Locator baseLocator,
TopicMap existingTopicMap)
Deprecated. use addTopicMap(TopicMapSource source, TopicMap existing) instead |
TopicMap |
addTopicMap(java.io.InputStream src,
Locator baseLocator,
TopicMap existingTopicMap,
Topic[] addedThemes)
Deprecated. use addTopicMap(TopicMapSource source, TopicMap existing, Topic[] addedThemes) instead |
TopicMap |
addTopicMap(java.io.InputStream src,
Locator baseLocator,
TopicMap existingTopicMap,
TopicMapBuilder builder)
Deprecated. use addTopicMap(TopicMapSource source, TopicMap existing) instead |
TopicMap |
addTopicMap(TopicMapSource source)
Imports a topic map into the data store managed by this TopicMapProvider from the specified TopicMapSource |
TopicMap |
addTopicMap(TopicMapSource source,
Topic[] addedThemes)
Imports a topic map into the data store managed by this TopicMapProvider from the specified TopicMapSource |
TopicMap |
addTopicMap(TopicMapSource source,
TopicMap existing)
Imports a topic map into the data store managed by this TopicMapProvider from the specified TopicMapSource |
TopicMap |
addTopicMap(TopicMapSource source,
TopicMap existing,
Topic[] addedThemes)
Imports a topic map into the data store managed by this TopicMapProvider from the specified TopicMapSource |
void |
close()
Closes the provider. |
TopicMap |
createTopicMap(Locator baseLocator)
Creates a new topic map for this provider. |
LocatorFactory |
getLocatorFactory()
Returns the object which may be used to create locator objects in the data store managed by this TopicMapProvider. |
ProviderTransaction |
getOpenTransaction()
Returns the current open transaction |
TopicMap |
getTopicMap(Locator baseLocator)
Returns the topic map provided by this object who's base address is specified by baseLocator . |
java.util.Collection |
getTopicMapBaseLocators()
Returns a collection containing the base Locator of each of the topic maps provided by this TopicMapProvider. |
TopicMapBuilder |
getTopicMapBuilder(java.lang.String notation)
Returns a TopicMapBuilder for building topic maps for the specified notation. |
void |
init(java.util.Properties props)
Sets the runtime properties defined for this TopicMapProvider. |
boolean |
isTransactional()
Indicates whether or not this provider supports transactions. |
boolean |
isTransactionOpen()
Indicates whether or not this provider has a transaction currently open |
void |
mergeTopicMap(TopicMap baseTopicMap,
Locator externalTopicMap,
Topic[] addedThemes)
Merges the topic map from the resource externalTopicMap
into the topic map baseTopicMap . |
ProviderTransaction |
openTransaction()
Opens a new transaction |
void |
removeTopicMap(TopicMap tm)
Removes the specified topic map from this Provider. |
boolean |
supportsTopicMapNotation(java.lang.String notation)
Returns true if notation names a topic map notation that
can be parsed by this provider. |
Field Detail |
public static final java.lang.String OPT_STATIC_MERGE
public static final boolean DEFAULT_OPT_STATIC_MERGE
public static final java.lang.String OPT_NAME_MERGE
public static final boolean DEFAULT_OPT_NAME_MERGE
public static final java.lang.String OPT_MERGE_REFS
public static final boolean DEFAULT_OPT_MERGE_REFS
public static final java.lang.String OPT_MAKE_CONSISTENT
public static final boolean DEFAULT_OPT_MAKE_CONSISTENT
Method Detail |
public void init(java.util.Properties props) throws TopicMapProviderException
props
- The parsed set of properties which may be applied to this object.
TopicMapProviderException
- If the initialisation fails for some reason.public TopicMap getTopicMap(Locator baseLocator) throws TopicMapProviderException
baseLocator
.
baseLocator
- The Locator defining the base address of the topic map
to be returned.
TopicMapProviderException
public TopicMap createTopicMap(Locator baseLocator) throws TopicMapProviderException
baseLocator
- The resource locator for the topic map itself.
TopicMapProviderException
public LocatorFactory getLocatorFactory()
public TopicMap addTopicMap(java.io.InputStream src, Locator baseLocator, TopicMap existingTopicMap) throws TopicMapProviderException
src
- The InputStream of the XTM data to be read.baseLocator
- The base address to assign to the generated topic map only if
the parsed topic map does not have an xml:base attribute on its
root element.existingTopicMap
- If this parameter is not null, then the TopicMap object
passed in must be a TopicMap which is provided by this
TopicMapProvider. The topic map parsed from src
will be merged with existingTopicMap
and no
new TopicMap object will be created.
existingTopicMap
is not null, then the return value
from the function will be the same object as is passed in
existingTopicMap
.
If existingTopicMap
is null, then a new TopicMap object will
be returned.
TopicMapProviderException
public TopicMap addTopicMap(java.io.InputStream src, Locator baseLocator, TopicMap existingTopicMap, TopicMapBuilder builder) throws TopicMapProviderException
src
- The InputStream of the topic map data to be read.baseLocator
- The base address to assign to the generated topic map
only if the parsed topic map does not specify its own base
address internally.existingTopicMap
- If this parameter is not null, then the TopicMap object
passed in must be a TopicMap which is provided by this
TopicMapProvider. The topic map parsed from src
will be merged with existingTopicMap
and no
new TopicMap object will be created.builder
- The builder to use in parsing the input stream.
existingTopicMap
is not null, then the return value
from the function will be the same object as is passed in
existingTopicMap
.
If existingTopicMap
is null, then a new TopicMap object will
be returned.
TopicMapProviderException
- if the parse of the input stream fails for some
reason.public TopicMap addTopicMap(java.io.InputStream src, Locator baseLocator, TopicMap existingTopicMap, Topic[] addedThemes) throws TopicMapProviderException
src
- The InputStream of the topic map data to be read.baseLocator
- The base address to assign to the generated topic map
only if the parsed topic map does not specify its own base
address internally.existingTopicMap
- If this parameter is not null, then the TopicMap object
passed in must be a TopicMap which is provided by this
TopicMapProvider. The topic map parsed from src
will be merged with existingTopicMap
and no
new TopicMap object will be created.addedThemes
- themes to be added to the scope of each ScopedObject created by
the import process.
existingTopicMap
is not null, then the return value
from the function will be the same object as is passed in
existingTopicMap
.
If existingTopicMap
is null, then a new TopicMap object will
be returned.
TopicMapProviderException
- if the parse of the input stream fails for some
reason.public TopicMap addTopicMap(TopicMapSource source, TopicMap existing) throws TopicMapProviderException
source
- a implementation of the TopicMapSource interface representing
a source for a TopicMapexisting
- If this parameter is not null, then the TopicMap object
passed in must be a TopicMap which is provided by this
TopicMapProvider. The topic map retrieved from source
will be merged with existing
TopicMap and no
new TopicMap object will be created.
TopicMapProviderException
- if initialisation or access to the
TopicMapSource failspublic TopicMap addTopicMap(TopicMapSource source, TopicMap existing, Topic[] addedThemes) throws TopicMapProviderException
source
- a implementation of the TopicMapSource interface representing
a source for a TopicMapexisting
- If this parameter is not null, then the TopicMap object
passed in must be a TopicMap which is provided by this
TopicMapProvider. The topic map retrieved from source
will be merged with existing
TopicMap and no
new TopicMap object will be created.addedThemes
- themes to be added to the scope of each ScopedObject created by
the import process.
TopicMapProviderException
- if initialisation or access to the
TopicMapSource failspublic TopicMap addTopicMap(TopicMapSource source) throws TopicMapProviderException
source
- a implementation of the TopicMapSource interface representing
a source for a TopicMap
TopicMapProviderException
- if initialisation or access to the
TopicMapSource failspublic TopicMap addTopicMap(TopicMapSource source, Topic[] addedThemes) throws TopicMapProviderException
source
- a implementation of the TopicMapSource interface representing
a source for a TopicMapaddedThemes
- themes to be added to the scope of each ScopedObject created by
the import process.
TopicMapProviderException
- if initialisation or access to the
TopicMapSource failspublic java.util.Collection getTopicMapBaseLocators()
Locator
objects.public void removeTopicMap(TopicMap tm) throws TopicMapProviderException
TopicMapProviderException
public void close() throws TopicMapProviderException
TopicMapProviderException
public void mergeTopicMap(TopicMap baseTopicMap, Locator externalTopicMap, Topic[] addedThemes) throws TopicMapProviderException
externalTopicMap
into the topic map baseTopicMap
.
externalTopicMap
will also be removed from this list of
external references and mergeMaps for baseTopicMap
if
it is in one of these lists.
TopicMapProviderException
- if baseTopicMap
is not
provided by this provider; or if the parse and merge operation
fails for some reason.public boolean isTransactional()
public ProviderTransaction openTransaction() throws ProviderTransactionException
ProviderTransactionException
public boolean isTransactionOpen()
public ProviderTransaction getOpenTransaction()
public TopicMapBuilder getTopicMapBuilder(java.lang.String notation)
notation
- the name of the notation that the returned TopicMapBuilder
must support. Values of 'xtm' and 'ltm' are supported by
this distribution of TM4J.
public boolean supportsTopicMapNotation(java.lang.String notation)
notation
names a topic map notation that
can be parsed by this provider.
notation
-
notation
names a topic map notation that
can be parsed by this provider, false otherwise.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |