public abstract class AbstractPathTopicMapSource extends Object implements TopicMapSourceIF, FileFilter
| Modifier and Type | Field and Description |
|---|---|
protected LocatorIF |
base_address |
protected boolean |
duplicate_suppression |
protected boolean |
hidden |
protected String |
id |
protected String |
path |
protected Map<String,TopicMapReferenceIF> |
refmap |
protected String |
suffix |
protected String |
title |
| Constructor and Description |
|---|
AbstractPathTopicMapSource() |
AbstractPathTopicMapSource(String path,
FileFilter filter) |
AbstractPathTopicMapSource(String path,
FileFilter filter,
LocatorIF base_address) |
AbstractPathTopicMapSource(String path,
String suffix) |
AbstractPathTopicMapSource(String path,
String suffix,
LocatorIF base_address) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(File file)
INTERNAL: A file filter method implementation.
|
void |
close()
PUBLIC: Closes the source by releasing references it holds to e.g.
|
protected TopicMapReferenceIF |
createReference(URL url,
String id,
String title) |
protected abstract TopicMapReferenceIF |
createReference(URL url,
String id,
String title,
LocatorIF base_address) |
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.
|
LocatorIF |
getBase()
INTERNAL: Gets the base locator of the topic maps retrieved from
the source.
|
String |
getBaseAddress()
INTERNAL: Gets the base address of the topic maps retrieved from
the source.
|
boolean |
getDuplicateSuppression()
INTERNAL: Gets the duplicate suppression flag.
|
FileFilter |
getFileFilter()
INTERNAL: Returns the FileFilter used to in the specified
path.
|
boolean |
getHidden() |
String |
getId()
PUBLIC: Gets the id of the source.
|
String |
getPath()
INTERNAL: Gets the path in which the source locates its references.
|
Collection<TopicMapReferenceIF> |
getReferences()
PUBLIC: Returns an unmodifiable collection of
TopicMapReferenceIFs found by the topic map source. |
String |
getSuffix()
INTERNAL: Gets the file suffix that should be used for filtering.
|
String |
getTitle()
PUBLIC: Gets the title of the source.
|
void |
refresh()
PUBLIC: Refreshes the collection of references.
|
protected Map |
refreshFromClasspath() |
protected Map<String,TopicMapReferenceIF> |
refreshFromFilesystem() |
void |
setBase(LocatorIF base_address)
INTERNAL: Sets the base locator of the topic maps retrieved from
the source.
|
void |
setBaseAddress(String base_address)
INTERNAL: Sets the base address of the topic maps retrieved from
the source.
|
void |
setDuplicateSuppression(boolean duplicate_suppression)
INTERNAL: Sets the duplicate suppression flag.
|
void |
setFileFilter(FileFilter filter)
INTERNAL: Sets a FileFilter used to filter the files in the
specified path.
|
void |
setHidden(boolean hidden) |
void |
setId(String id)
PUBLIC: Sets the id of the source.
|
void |
setPath(String path)
INTERNAL: Sets the path in which the source locates its references.
|
void |
setSuffix(String suffix)
INTERNAL: Sets the file suffix that should be used for filtering.
|
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 String path
protected String suffix
protected LocatorIF base_address
protected boolean duplicate_suppression
protected boolean hidden
protected Map<String,TopicMapReferenceIF> refmap
public AbstractPathTopicMapSource()
public AbstractPathTopicMapSource(String path, FileFilter filter)
public AbstractPathTopicMapSource(String path, String suffix, LocatorIF base_address)
public AbstractPathTopicMapSource(String path, FileFilter filter, LocatorIF base_address)
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 String getPath()
public void setPath(String path)
public String getSuffix()
public void setSuffix(String suffix)
public LocatorIF getBase()
public void setBase(LocatorIF base_address)
public String getBaseAddress()
public void setBaseAddress(String base_address)
public boolean getDuplicateSuppression()
public void setDuplicateSuppression(boolean duplicate_suppression)
public Collection<TopicMapReferenceIF> getReferences()
TopicMapSourceIFTopicMapReferenceIFs found by the topic map source.getReferences in interface TopicMapSourceIFpublic boolean supportsCreate()
TopicMapSourceIFsupportsCreate in interface TopicMapSourceIFpublic boolean supportsDelete()
TopicMapSourceIFsupportsDelete in interface TopicMapSourceIFpublic TopicMapReferenceIF createTopicMap(String name, String baseAddress)
TopicMapSourceIFcreateTopicMap in interface TopicMapSourceIFpublic void refresh()
TopicMapSourceIFrefresh in interface TopicMapSourceIFpublic void close()
TopicMapSourceIFclose in interface AutoCloseableclose in interface TopicMapSourceIFprotected Map<String,TopicMapReferenceIF> refreshFromFilesystem()
protected Map refreshFromClasspath()
protected TopicMapReferenceIF createReference(URL url, String id, String title)
protected abstract TopicMapReferenceIF createReference(URL url, String id, String title, LocatorIF base_address)
public FileFilter getFileFilter()
public void setFileFilter(FileFilter filter)
filter - a java.io.FileFilter object for filtering the filespublic boolean accept(File file)
accept in interface FileFilterpublic boolean getHidden()
public void setHidden(boolean hidden)