public class RDFTopicMapReader extends Object implements TopicMapReaderIF
Modifier and Type | Field and Description |
---|---|
protected LocatorIF |
baseAddress |
protected boolean |
duplicate_suppression |
protected boolean |
generate_names |
protected URL |
infileurl |
protected InputStream |
inputStream |
protected boolean |
lenient |
protected String |
mappingsyntax |
protected URL |
mappingurl |
static String |
PROPERTY_DUPLICATE_SUPPRESSION |
static String |
PROPERTY_GENERATE_NAMES |
static String |
PROPERTY_LENIENT |
static String |
PROPERTY_MAPPING_FILE |
static String |
PROPERTY_MAPPING_SYNTAX |
static String |
PROPERTY_MAPPING_URL |
protected String |
syntax |
Constructor and Description |
---|
RDFTopicMapReader(File infile)
PUBLIC: Creates a reader that will read RDF/XML from the given file.
|
RDFTopicMapReader(File infile,
String syntax)
PUBLIC: Creates a reader that will read RDF from the given file in
the indicated syntax.
|
RDFTopicMapReader(InputStream inputStream,
String syntax)
PUBLIC: Creates a reader that will read RDF from the given InputStream in
the indicated syntax.
|
RDFTopicMapReader(URL infileurl)
PUBLIC: Creates a reader that will read RDF/XML from the given URL.
|
RDFTopicMapReader(URL infileurl,
String syntax)
PUBLIC: Creates a reader that will read RDF from the given URL in
the indicated syntax.
|
Modifier and Type | Method and Description |
---|---|
void |
importInto(TopicMapIF topicmap)
PUBLIC: Imports an implicitly designated topic map into the given topic map.
|
TopicMapIF |
read()
PUBLIC: Reads the next topic map available from some implicit,
implementation dependent source.
|
Collection |
readAll()
PUBLIC: Reads all the topic map available from some implicit,
implementation dependent source.
|
void |
setAdditionalProperties(Map<String,Object> properties)
Sets additional RDFTopicMapReader properties.
|
void |
setBaseAddress(LocatorIF baseAddress)
PUBLIC: Sets the base address of the topic maps retrieved from
the source.
|
void |
setDuplicateSuppression(boolean duplicate_suppression)
PUBLIC: Tells the reader whether or not to perform duplicate
suppression at the end of the import.
|
void |
setGenerateNames(boolean generate_names)
PUBLIC: Controls whether or not to automatically generate names
for nameless topics from their subject indicators.
|
void |
setLenient(boolean lenient)
PUBLIC: Tells the reader whether or not to stop when errors are
found in the mapping.
|
void |
setMappingFile(File mappingfile)
PUBLIC: Sets the file from which the reader will read the
RDF-to-topic map mapping definition.
|
void |
setMappingFile(File mappingfile,
String syntax)
PUBLIC: Sets the file from which the reader will read the
RDF-to-topic map mapping definition.
|
void |
setMappingURL(URL url)
PUBLIC: Sets the URL from which the reader will read the
RDF-to-topic map mapping definition.
|
void |
setMappingURL(URL url,
String syntax)
PUBLIC: Sets the URL from which the reader will read the
RDF-to-topic map mapping definition.
|
public static final String PROPERTY_DUPLICATE_SUPPRESSION
public static final String PROPERTY_GENERATE_NAMES
public static final String PROPERTY_LENIENT
public static final String PROPERTY_MAPPING_FILE
public static final String PROPERTY_MAPPING_URL
public static final String PROPERTY_MAPPING_SYNTAX
protected URL infileurl
protected InputStream inputStream
protected String syntax
protected URL mappingurl
protected String mappingsyntax
protected boolean duplicate_suppression
protected boolean generate_names
protected boolean lenient
protected LocatorIF baseAddress
public RDFTopicMapReader(File infile) throws MalformedURLException
MalformedURLException
public RDFTopicMapReader(File infile, String syntax)
syntax
- The RDF syntax to use. Possible values are "RDF/XML", "N3",
"N-TRIPLE". If the value is null it defaults to "RDF/XML".public RDFTopicMapReader(URL infileurl)
public RDFTopicMapReader(URL infileurl, String syntax)
syntax
- The RDF syntax to use. Possible values are "RDF/XML", "N3",
"N-TRIPLE". If the value is null it defaults to "RDF/XML".public RDFTopicMapReader(InputStream inputStream, String syntax)
syntax
- The RDF syntax to use. Possible values are "RDF/XML", "N3",
"N-TRIPLE". If the value is null it defaults to "RDF/XML".public void setMappingFile(File mappingfile)
public void setMappingFile(File mappingfile, String syntax)
syntax
- The RDF syntax to use. Possible values are "RDF/XML", "N3",
"N-TRIPLE". If the value is null it defaults to "RDF/XML".public void setMappingURL(URL url)
public void setMappingURL(URL url, String syntax)
syntax
- The RDF syntax to use. Possible values are "RDF/XML", "N3",
"N-TRIPLE". If the value is null it defaults to "RDF/XML".public void setGenerateNames(boolean generate_names)
public void setDuplicateSuppression(boolean duplicate_suppression)
public void setLenient(boolean lenient)
public void setBaseAddress(LocatorIF baseAddress)
public TopicMapIF read() throws IOException
TopicMapReaderIF
null
is returned when there are no more
topic maps available. In a sense this is iterator-like
behaviour.read
in interface TopicMapReaderIF
IOException
- Thrown if reading the source fails.public Collection readAll() throws IOException
TopicMapReaderIF
readAll
in interface TopicMapReaderIF
IOException
- Thrown if reading the source fails.public void importInto(TopicMapIF topicmap) throws IOException
TopicMapReaderIF
importInto
in interface TopicMapReaderIF
topicmap
- The topic map into which the import will be done;
an object implementing TopicMapIF.IOException
public void setAdditionalProperties(Map<String,Object> properties)
setDuplicateSuppression(boolean)
setGenerateNames(boolean)
setLenient(boolean)
setMappingFile(java.io.File)
#setMappingURL(java.lang.String)
setMappingFile(java.io.File)
and #setMappingURL(java.lang.String)
setAdditionalProperties
in interface TopicMapReaderIF
properties
-