org.semanticweb.kaon2.api
Enum OntologyFileFormat

java.lang.Object
  extended by java.lang.Enum<OntologyFileFormat>
      extended by org.semanticweb.kaon2.api.OntologyFileFormat
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<OntologyFileFormat>

public enum OntologyFileFormat
extends java.lang.Enum<OntologyFileFormat>

Enumerates all supported ontology formats for ontology files.


Enum Constant Summary
OWL_RDF
           
OWL_XML
           
 
Method Summary
static OntologyFileFormat getOntologyFormat(java.io.File file)
          Attempts to decode the appropriate format of an ontology source.
static OntologyFileFormat getOntologyFormat(java.io.InputStream inputStream)
          Attempts to decode the appropriate format of an ontology source.
static OntologyFileFormat getOntologyFormat(java.io.Reader reader)
          Attempts to decode the appropriate format of an ontology source.
static OntologyFileFormat getOntologyFormat(java.lang.String physicalURI, java.net.Proxy proxy)
          Attempts to decode the appropriate format of an ontology source.
static java.lang.String getOntologyURI(java.io.File file)
          Returns the ontology URI from a given OWLX ontology.
static java.lang.String getOntologyURI(java.io.InputStream inputStream, java.lang.String physicalURI)
          Returns the ontology URI from a given OWLX ontology.
static java.lang.String getOntologyURI(java.io.Reader reader, java.lang.String physicalURI)
          Returns the ontology URI from a given ontology.
static java.lang.String getOntologyURI(java.lang.String physicalURI, java.net.Proxy proxy)
          Returns the ontology URI from a given ontology.
static OntologyFileFormat valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static OntologyFileFormat[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

OWL_XML

public static final OntologyFileFormat OWL_XML

OWL_RDF

public static final OntologyFileFormat OWL_RDF
Method Detail

values

public static final OntologyFileFormat[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(OntologyFileFormat c : OntologyFileFormat.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static OntologyFileFormat valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getOntologyFormat

public static OntologyFileFormat getOntologyFormat(java.io.Reader reader)
                                            throws KAON2Exception
Attempts to decode the appropriate format of an ontology source.

Parameters:
reader - the source containing the ontology text
Returns:
the ontology format
Throws:
KAON2Exception - thrown if the ontology text cannot be read or if the format is not supported

getOntologyFormat

public static OntologyFileFormat getOntologyFormat(java.io.InputStream inputStream)
                                            throws KAON2Exception
Attempts to decode the appropriate format of an ontology source.

Parameters:
inputStream - the source containing the ontology text
Returns:
the ontology format
Throws:
KAON2Exception - thrown if the ontology text cannot be read or if the format is not supported

getOntologyFormat

public static OntologyFileFormat getOntologyFormat(java.io.File file)
                                            throws KAON2Exception
Attempts to decode the appropriate format of an ontology source.

Parameters:
file - the source containing the ontology text
Returns:
the ontology format
Throws:
KAON2Exception - thrown if the ontology text cannot be read or if the format is not supported

getOntologyFormat

public static OntologyFileFormat getOntologyFormat(java.lang.String physicalURI,
                                                   java.net.Proxy proxy)
                                            throws KAON2Exception
Attempts to decode the appropriate format of an ontology source.

Parameters:
physicalURI - the source containing the ontology text
proxy - the proxy to use
Returns:
the ontology format
Throws:
KAON2Exception - thrown if the ontology text cannot be read or if the format is not supported

getOntologyURI

public static java.lang.String getOntologyURI(java.io.Reader reader,
                                              java.lang.String physicalURI)
                                       throws KAON2Exception
Returns the ontology URI from a given ontology.

Parameters:
reader - the source with the ontology text
physicalURI - the physical URI of the ontology text
Returns:
the ontology URI
Throws:
KAON2Exception - thrown if there is an error

getOntologyURI

public static java.lang.String getOntologyURI(java.io.InputStream inputStream,
                                              java.lang.String physicalURI)
                                       throws KAON2Exception
Returns the ontology URI from a given OWLX ontology.

Parameters:
inputStream - the source with the ontology text
physicalURI - the physical URI of the ontology text
Returns:
the ontology URI
Throws:
KAON2Exception - thrown if there is an error

getOntologyURI

public static java.lang.String getOntologyURI(java.io.File file)
                                       throws KAON2Exception
Returns the ontology URI from a given OWLX ontology.

Parameters:
file - the source with the ontology text
Returns:
the ontology URI
Throws:
KAON2Exception - thrown if there is an error

getOntologyURI

public static java.lang.String getOntologyURI(java.lang.String physicalURI,
                                              java.net.Proxy proxy)
                                       throws KAON2Exception
Returns the ontology URI from a given ontology.

Parameters:
physicalURI - the source with the ontology text
proxy - the proxy to use
Returns:
the ontology URI
Throws:
KAON2Exception - thrown if there is an error