Package net.ontopia.topicmaps.utils.rdf
Class RDFToTopicMapConverter
java.lang.Object
net.ontopia.topicmaps.utils.rdf.RDFToTopicMapConverter
EXPERIMENTAL: Converts an RDF model to a topic map using a
schema-specific mapping defined using RDF.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconvert(InputStream input, String syntax, String mappingurl, String mappingsyntax, TopicMapIF topicmap, boolean lenient) EXPERIMENTAL: Converts an RDF model into the topic map using the given mapping.static voidconvert(URL infileurl, String syntax, String mappingurl, String mappingsyntax, TopicMapIF topicmap, boolean lenient) EXPERIMENTAL: Converts an RDF model into the topic map using the given mapping.static voidconvert(org.apache.jena.rdf.model.Model model, TopicMapIF topicmap) EXPERIMENTAL: Converts an RDF model into the topic map using the mapping found within the RDF model.static voidgenerateNames(TopicMapIF topicmap) EXPERIMENTAL: Automatically generates names for nameless topics based on their subject identifiers.
-
Field Details
-
RTM_PREFIX
- See Also:
-
RTM_MAPSTO
- See Also:
-
RTM_BASENAME
- See Also:
-
RTM_INSTANCE_OF
- See Also:
-
RTM_OCCURRENCE
- See Also:
-
RTM_ASSOCIATION
- See Also:
-
RTM_SUBJECT_ROLE
- See Also:
-
RTM_OBJECT_ROLE
- See Also:
-
RTM_IN_SCOPE
- See Also:
-
RTM_SUBJECT_URI
- See Also:
-
RTM_OBJECT_URI
- See Also:
-
RTM_SOURCE_LOCATOR
- See Also:
-
RTM_SUBJECT_IDENTIFIER
- See Also:
-
RTM_SUBJECT_LOCATOR
- See Also:
-
RTM_TYPE
- See Also:
-
RTM_GENERATED_NAME
- See Also:
-
-
Method Details
-
convert
public static void convert(URL infileurl, String syntax, String mappingurl, String mappingsyntax, TopicMapIF topicmap, boolean lenient) throws org.apache.jena.shared.JenaException, IOException EXPERIMENTAL: Converts an RDF model into the topic map using the given mapping.- Parameters:
infileurl- the URL to read the input data fromsyntax- the syntax of the input data. Values are "RDF/XML", "N3", and "N-TRIPLE". Defaults to "RDF/XML" if null.mappingurl- the URL to read the mapping from. If null the mapping is taken from the input data.mappingsyntax- the syntax of the mapping. Values are "RDF/XML", "N3", and "N-TRIPLE". Defaults to "RDF/XML" if null.topicmap- The topic map to add the converted data to.lenient- When false, errors are thrown if the RDF data cannot be correctly mapped (for example, a statement type is mapped to a topic name, but has a URI value).- Throws:
org.apache.jena.shared.JenaExceptionIOException
-
convert
public static void convert(InputStream input, String syntax, String mappingurl, String mappingsyntax, TopicMapIF topicmap, boolean lenient) throws org.apache.jena.shared.JenaException, IOException EXPERIMENTAL: Converts an RDF model into the topic map using the given mapping.- Parameters:
input- the InputStream to read the input data fromsyntax- the syntax of the input data. Values are "RDF/XML", "N3", and "N-TRIPLE". Defaults to "RDF/XML" if null.mappingurl- the URL to read the mapping from. If null the mapping is taken from the input data.mappingsyntax- the syntax of the mapping. Values are "RDF/XML", "N3", and "N-TRIPLE". Defaults to "RDF/XML" if null.topicmap- The topic map to add the converted data to.lenient- When false, errors are thrown if the RDF data cannot be correctly mapped (for example, a statement type is mapped to a topic name, but has a URI value).- Throws:
org.apache.jena.shared.JenaExceptionIOException
-
convert
public static void convert(org.apache.jena.rdf.model.Model model, TopicMapIF topicmap) throws org.apache.jena.shared.JenaException, IOException EXPERIMENTAL: Converts an RDF model into the topic map using the mapping found within the RDF model.- Throws:
org.apache.jena.shared.JenaExceptionIOException
-
generateNames
EXPERIMENTAL: Automatically generates names for nameless topics based on their subject identifiers.- Since:
- 2.0.4
-