|
Protégé-OWL 3.3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser
public class ProtegeOWLParser
An OWL parser that reads an OWL stream triple-by-triple and writes the corresponding Protege-OWL Triples into one or more TripleStores. The current implementation uses the Jena ARP parser for triple loading.
Nested Class Summary | |
---|---|
static interface |
ProtegeOWLParser.ARPInvokation
An interface needed as an abstraction of the various methods to invoke the Jena ARP (the various load methods with different parameters). |
Constructor Summary | |
---|---|
ProtegeOWLParser(OWLModel owlModel,
boolean incremental)
|
Method Summary | |
---|---|
static void |
addImport(JenaOWLModel owlModel,
URI ontologyName)
A convenience method that dynamically adds an import to a JenaOWLModel. |
static void |
addImport(JenaOWLModel owlModel,
URI ontologyName,
String prefixForDefaultNamespace)
A convenience method that dynamically adds an import to a JenaOWLModel. |
protected com.hp.hpl.jena.rdf.arp.ARP |
createARP()
|
protected ProtegeOWLParserLogger |
createLogger()
|
protected OWLModelPatcher |
createPatcher()
|
protected URI2NameConverter |
createURI2NameConverter(OWLModel owlModel,
boolean incremental)
|
static Collection |
getErrors()
|
static URI |
getErrorURI()
Gets the ontology name of the most recently parsed file. |
protected String |
getImplicitImport(String namespace)
|
static InputStream |
getInputStream(URL url)
|
protected ProtegeOWLParserLogger |
getLogger()
|
void |
loadTriples(TripleStore tripleStore,
String ontologyName,
ProtegeOWLParser.ARPInvokation invokation)
|
void |
run(InputStream is,
String xmlBase)
This method loads an ontology from the specified input stream using the specified base uri. |
void |
run(Reader reader,
String xmlBase)
This method loads an ontology using the specified Reader and using the specified base uri. |
protected void |
run(String uri,
ProtegeOWLParser.ARPInvokation invokation)
|
void |
run(URI uri)
This method loads an ontology pointed to by the specified URI. |
void |
setImporting(boolean importing)
|
void |
setLogger(ProtegeOWLParserLogger logger)
|
static void |
setUnresolvedImportHandler(UnresolvedImportHandler handler)
|
void |
setURI2NameConverter(URI2NameConverter converter)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProtegeOWLParser(OWLModel owlModel, boolean incremental)
Method Detail |
---|
public void setImporting(boolean importing)
public void run(URI uri) throws Exception
uri
- The URI
that points to the ontology.
Exception
public void run(InputStream is, String xmlBase) throws Exception
is
- xmlBase
- The XML base to use when loading the ontology. This is typically
the URI from where the ontology was loaded.
Exception
public void run(Reader reader, String xmlBase) throws Exception
InputStream
as a parameter rather than a Reader
.
reader
- The reader used to read the ontologyxmlBase
- The XML base to use when loading the ontology. This is typically
the URI from where the ontology was loaded.
Exception
protected void run(String uri, ProtegeOWLParser.ARPInvokation invokation) throws Exception
Exception
public void loadTriples(TripleStore tripleStore, String ontologyName, ProtegeOWLParser.ARPInvokation invokation) throws Exception
Exception
public static void setUnresolvedImportHandler(UnresolvedImportHandler handler)
protected com.hp.hpl.jena.rdf.arp.ARP createARP()
protected ProtegeOWLParserLogger createLogger()
protected OWLModelPatcher createPatcher()
protected URI2NameConverter createURI2NameConverter(OWLModel owlModel, boolean incremental)
public static URI getErrorURI()
protected String getImplicitImport(String namespace)
protected ProtegeOWLParserLogger getLogger()
public void setLogger(ProtegeOWLParserLogger logger)
public void setURI2NameConverter(URI2NameConverter converter)
public static Collection getErrors()
public static void addImport(JenaOWLModel owlModel, URI ontologyName) throws Exception
ImportHelper
, since
this takes care of "house keeping" tasks that this "raw" addImport method does not.
owlModel
- ontologyName
- The name of the imported ontology.
Exception
public static void addImport(JenaOWLModel owlModel, URI ontologyName, String prefixForDefaultNamespace) throws Exception
ImportHelper
, since
this takes care of "house keeping" tasks that this "raw" addImport method does not.
owlModel
- ontologyName
- prefixForDefaultNamespace
- an (optional) prefix that shall be used for the
the default namespace of the directly imported ontology
Exception
public static InputStream getInputStream(URL url) throws IOException
IOException
|
Protégé-OWL 3.3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |