org.semanticweb.owl.io.owl_rdf
Class OWLRDFParser

java.lang.Object
  |
  +--org.semanticweb.owl.io.owl_rdf.OWLRDFParser
All Implemented Interfaces:
Options, OWLRDFErrorConstants, Parser

public class OWLRDFParser
extends Object
implements Parser, OWLRDFErrorConstants

Parser for the normative XML/RDF Syntax. based on the vocabulary established 03.02.03 by the W3C WebOnt WG.

Since:
05.02.2003

Field Summary
 
Fields inherited from interface org.semanticweb.owl.io.owl_rdf.OWLRDFErrorConstants
ANONYMOUS_CLASS_CREATION, CYCLICAL_BNODES, ILLEGAL_SUBPROPERTY, INVALID_URL, INVERSE_FUNCTIONAL_DATA_PROPERTY, IO_ERROR, MALFORMED_ALLDIFFERENT, MALFORMED_DESCRIPTION, MALFORMED_IMPORT, MALFORMED_LIST, MALFORMED_RESTRICTION, MULTIPLE_DEFINITIONS, OTHER, RDF_CLASS, RDF_PROPERTY, STRUCTURE_SHARING, UNSPECIFIED_FUNCTIONAL_PROPERTY, UNTYPED_CLASS, UNTYPED_DATATYPE, UNTYPED_INDIVIDUAL, UNTYPED_ONTOLOGY, UNTYPED_PROPERTY, UNTYPED_PROPERTY_DATA, UNTYPED_PROPERTY_OBJECT, UNTYPED_URI, UNUSED_TRIPLES, URL_IO_ERROR, XML_PROBLEM
 
Constructor Summary
OWLRDFParser()
           
 
Method Summary
 OWLConnection getConnection()
          Get the connection used to create new ontologies.
 Map getOptions()
          Get options for the object.
 boolean isAnonymousNodeURI(String uri)
           
static void main(String[] args)
           
protected  void parseOntology(OWLOntology ontology, Reader reader, URI uri)
          Locally accessible parse method used during import parsing
protected  void parseOntology(OWLOntology ontology, URI uri)
          Locally accessible parse method used during import parsing
 OWLOntology parseOntology(Reader reader, URI physicalURI)
          Parse from the given reader and return a new ontology object based on the connection that the parser knows about.
 OWLOntology parseOntology(URI uri)
          Parse from the given URI and return a new ontology object based on the connection that the parser knows about.
 void setConnection(OWLConnection conn)
          Set the connection used to create new ontologies.
protected  void setConsumer(OWLConsumer consumer)
           
 void setOptions(Map options)
          Set options for the object.
 void setOWLRDFErrorHandler(OWLRDFErrorHandler handler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OWLRDFParser

public OWLRDFParser()
             throws OWLException
Method Detail

setConnection

public void setConnection(OWLConnection conn)
Set the connection used to create new ontologies. If no connection is supplied, the parser will choose an implementation as specified by the system property org.semanticweb.owl.util.OWLConnection. If this is unset and no connection is supplied, an error will be raised.

Specified by:
setConnection in interface Parser

getConnection

public OWLConnection getConnection()
Description copied from interface: Parser
Get the connection used to create new ontologies.

Specified by:
getConnection in interface Parser

setOWLRDFErrorHandler

public void setOWLRDFErrorHandler(OWLRDFErrorHandler handler)

setConsumer

protected void setConsumer(OWLConsumer consumer)

isAnonymousNodeURI

public boolean isAnonymousNodeURI(String uri)

parseOntology

public OWLOntology parseOntology(Reader reader,
                                 URI physicalURI)
                          throws ParserException
Description copied from interface: Parser
Parse from the given reader and return a new ontology object based on the connection that the parser knows about. We also require that a physical URI is provided for the resulting ontology.

Specified by:
parseOntology in interface Parser
ParserException

parseOntology

public OWLOntology parseOntology(URI uri)
                          throws ParserException
Description copied from interface: Parser
Parse from the given URI and return a new ontology object based on the connection that the parser knows about.

Specified by:
parseOntology in interface Parser
ParserException

parseOntology

protected void parseOntology(OWLOntology ontology,
                             Reader reader,
                             URI uri)
                      throws ParserException
Locally accessible parse method used during import parsing

ParserException

parseOntology

protected void parseOntology(OWLOntology ontology,
                             URI uri)
                      throws ParserException
Locally accessible parse method used during import parsing

ParserException

setOptions

public void setOptions(Map options)
Description copied from interface: Options
Set options for the object.

Specified by:
setOptions in interface Options
Parameters:
options - a Map value. Should contain a map from Strings to Objects.
See Also:
Options.setOptions(Map)

getOptions

public Map getOptions()
Description copied from interface: Options
Get options for the object.

Specified by:
getOptions in interface Options
Returns:
a Map value. Contains a map from Strings to Objects.
See Also:
Options.getOptions()

main

public static void main(String[] args)


WonderWeb