public class DefaultTopicMapSource extends Object implements TopicMapSourceIF
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
hidden |
protected String |
id |
protected Collection<TopicMapReferenceIF> |
refs |
protected String |
title |
| Constructor and Description |
|---|
DefaultTopicMapSource() |
DefaultTopicMapSource(Collection<TopicMapReferenceIF> refs) |
DefaultTopicMapSource(TopicMapReferenceIF reference) |
| Modifier and Type | Method and Description |
|---|---|
void |
addReference(TopicMapReferenceIF reference)
INTERNAL: Adds the reference to the source and registers the source
as the source of the reference.
|
void |
close()
PUBLIC: Closes the source by releasing references it holds to e.g.
|
TopicMapReferenceIF |
createTopicMap(String name,
String baseAddress)
PUBLIC: Creates a new topic map in the underlying source
and returns a reference to the created topic map.
|
boolean |
getHidden() |
String |
getId()
PUBLIC: Gets the id of the source.
|
Collection<TopicMapReferenceIF> |
getReferences()
PUBLIC: Returns an unmodifiable collection of
TopicMapReferenceIFs found by the topic map source. |
String |
getTitle()
PUBLIC: Gets the title of the source.
|
void |
refresh()
PUBLIC: Refreshes the collection of references.
|
void |
removeReference(TopicMapReferenceIF reference)
INTERNAL: Removes the reference from the source and deregisters the
source from the reference.
|
void |
setHidden(boolean hidden) |
void |
setId(String id)
PUBLIC: Sets the id of the source.
|
void |
setTitle(String title)
PUBLIC: Sets the title of the source.
|
boolean |
supportsCreate()
PUBLIC: Returns true if the source supports creating new
topic maps with the createTopicMap.
|
boolean |
supportsDelete()
PUBLIC: Returns true if the source supports deleting topic map
with the TopicMapReferenceIF.delete() method.
|
protected String id
protected String title
protected boolean hidden
protected Collection<TopicMapReferenceIF> refs
public DefaultTopicMapSource()
public DefaultTopicMapSource(Collection<TopicMapReferenceIF> refs)
public DefaultTopicMapSource(TopicMapReferenceIF reference)
public String getId()
TopicMapSourceIFgetId in interface TopicMapSourceIFpublic void setId(String id)
TopicMapSourceIFUnsupportedOperationException if it does not support
setting the id.setId in interface TopicMapSourceIFpublic String getTitle()
TopicMapSourceIFgetTitle in interface TopicMapSourceIFpublic void setTitle(String title)
TopicMapSourceIFsetTitle in interface TopicMapSourceIFpublic Collection<TopicMapReferenceIF> getReferences()
TopicMapSourceIFTopicMapReferenceIFs found by the topic map source.getReferences in interface TopicMapSourceIFpublic void refresh()
TopicMapSourceIFrefresh in interface TopicMapSourceIFpublic void close()
TopicMapSourceIFclose in interface AutoCloseableclose in interface TopicMapSourceIFpublic void addReference(TopicMapReferenceIF reference)
public void removeReference(TopicMapReferenceIF reference)
public boolean supportsCreate()
TopicMapSourceIFsupportsCreate in interface TopicMapSourceIFpublic boolean supportsDelete()
TopicMapSourceIFsupportsDelete in interface TopicMapSourceIFpublic TopicMapReferenceIF createTopicMap(String name, String baseAddress)
TopicMapSourceIFcreateTopicMap in interface TopicMapSourceIFpublic boolean getHidden()
public void setHidden(boolean hidden)