net.ontopia.topicmaps.utils.rdf
Class RDFToTopicMapConverter

java.lang.Object
  extended by net.ontopia.topicmaps.utils.rdf.RDFToTopicMapConverter

public class RDFToTopicMapConverter
extends java.lang.Object

EXPERIMENTAL: Converts an RDF model to a topic map using a schema-specific mapping defined using RDF.


Field Summary
static java.lang.String RTM_ASSOCIATION
           
static java.lang.String RTM_BASENAME
           
static java.lang.String RTM_GENERATED_NAME
           
static java.lang.String RTM_IN_SCOPE
           
static java.lang.String RTM_INSTANCE_OF
           
static java.lang.String RTM_MAPSTO
           
static java.lang.String RTM_OBJECT_ROLE
           
static java.lang.String RTM_OBJECT_URI
           
static java.lang.String RTM_OCCURRENCE
           
static java.lang.String RTM_SOURCE_LOCATOR
           
static java.lang.String RTM_SUBJECT_IDENTIFIER
           
static java.lang.String RTM_SUBJECT_LOCATOR
           
static java.lang.String RTM_SUBJECT_ROLE
           
static java.lang.String RTM_SUBJECT_URI
           
static java.lang.String RTM_TYPE
           
 
Method Summary
static void convert(com.hp.hpl.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 void convert(java.lang.String infileurl, java.lang.String syntax, java.lang.String mappingurl, java.lang.String mappingsyntax, TopicMapIF topicmap, boolean lenient)
          EXPERIMENTAL: Converts an RDF model into the topic map using the given mapping.
static void generateNames(TopicMapIF topicmap)
          EXPERIMENTAL: Automatically generates names for nameless topics based on their subject identifiers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RTM_MAPSTO

public static final java.lang.String RTM_MAPSTO
See Also:
Constant Field Values

RTM_BASENAME

public static final java.lang.String RTM_BASENAME
See Also:
Constant Field Values

RTM_INSTANCE_OF

public static final java.lang.String RTM_INSTANCE_OF
See Also:
Constant Field Values

RTM_OCCURRENCE

public static final java.lang.String RTM_OCCURRENCE
See Also:
Constant Field Values

RTM_ASSOCIATION

public static final java.lang.String RTM_ASSOCIATION
See Also:
Constant Field Values

RTM_SUBJECT_ROLE

public static final java.lang.String RTM_SUBJECT_ROLE
See Also:
Constant Field Values

RTM_OBJECT_ROLE

public static final java.lang.String RTM_OBJECT_ROLE
See Also:
Constant Field Values

RTM_IN_SCOPE

public static final java.lang.String RTM_IN_SCOPE
See Also:
Constant Field Values

RTM_SUBJECT_URI

public static final java.lang.String RTM_SUBJECT_URI
See Also:
Constant Field Values

RTM_OBJECT_URI

public static final java.lang.String RTM_OBJECT_URI
See Also:
Constant Field Values

RTM_SOURCE_LOCATOR

public static final java.lang.String RTM_SOURCE_LOCATOR
See Also:
Constant Field Values

RTM_SUBJECT_IDENTIFIER

public static final java.lang.String RTM_SUBJECT_IDENTIFIER
See Also:
Constant Field Values

RTM_SUBJECT_LOCATOR

public static final java.lang.String RTM_SUBJECT_LOCATOR
See Also:
Constant Field Values

RTM_TYPE

public static final java.lang.String RTM_TYPE
See Also:
Constant Field Values

RTM_GENERATED_NAME

public static final java.lang.String RTM_GENERATED_NAME
See Also:
Constant Field Values
Method Detail

convert

public static void convert(java.lang.String infileurl,
                           java.lang.String syntax,
                           java.lang.String mappingurl,
                           java.lang.String mappingsyntax,
                           TopicMapIF topicmap,
                           boolean lenient)
                    throws com.hp.hpl.jena.shared.JenaException,
                           java.io.IOException
EXPERIMENTAL: Converts an RDF model into the topic map using the given mapping.

Parameters:
infileurl - the URL to read the input data from
syntax - 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:
com.hp.hpl.jena.shared.JenaException
java.io.IOException

convert

public static void convert(com.hp.hpl.jena.rdf.model.Model model,
                           TopicMapIF topicmap)
                    throws com.hp.hpl.jena.shared.JenaException,
                           java.io.IOException
EXPERIMENTAL: Converts an RDF model into the topic map using the mapping found within the RDF model.

Throws:
com.hp.hpl.jena.shared.JenaException
java.io.IOException

generateNames

public static void generateNames(TopicMapIF topicmap)
EXPERIMENTAL: Automatically generates names for nameless topics based on their subject identifiers.

Since:
2.0.4


Copyright © 2000-2012 Ontopia.