org.semanticweb.owl.io
Class StringInputSource

java.lang.Object
  extended by org.semanticweb.owl.io.StringInputSource
All Implemented Interfaces:
OWLOntologyInputSource

public class StringInputSource
extends java.lang.Object
implements OWLOntologyInputSource

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 24-Apr-2007


Constructor Summary
StringInputSource(java.lang.String string)
           
StringInputSource(java.lang.String string, java.net.URI ontologyURI)
          Specified an input source with an ontology URI
 
Method Summary
 java.io.InputStream getInputStream()
          If an input stream can be obtained from this input source then this method creates it.
 java.net.URI getPhysicalURI()
          Gets the physical URI of the ontology.
 java.io.Reader getReader()
          Gets a reader which can be used to read an ontology from.
 boolean isInputStreamAvailable()
          Determines if an input stream is available which an ontology can be parsed from.
 boolean isReaderAvailable()
          Determines if a reader is available which an ontology can be parsed from.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringInputSource

public StringInputSource(java.lang.String string)

StringInputSource

public StringInputSource(java.lang.String string,
                         java.net.URI ontologyURI)
Specified an input source with an ontology URI

Parameters:
string -
ontologyURI -
Method Detail

isReaderAvailable

public boolean isReaderAvailable()
Description copied from interface: OWLOntologyInputSource
Determines if a reader is available which an ontology can be parsed from.

Specified by:
isReaderAvailable in interface OWLOntologyInputSource
Returns:
true if a reader can be ontained from this input source, or false if a reader cannot be obtained from this input source.

getReader

public java.io.Reader getReader()
Description copied from interface: OWLOntologyInputSource
Gets a reader which can be used to read an ontology from. This method may be called multiple times. Each invocation will return a new Reader. This method should not be called if the isReaderAvailable method returns false

Specified by:
getReader in interface OWLOntologyInputSource
Returns:
A new Reader which the ontology can be read from.

isInputStreamAvailable

public boolean isInputStreamAvailable()
Description copied from interface: OWLOntologyInputSource
Determines if an input stream is available which an ontology can be parsed from.

Specified by:
isInputStreamAvailable in interface OWLOntologyInputSource
Returns:
true if an input stream can be obtained, false if an input stream cannot be obtained from this input source.

getInputStream

public java.io.InputStream getInputStream()
Description copied from interface: OWLOntologyInputSource
If an input stream can be obtained from this input source then this method creates it. This method may be called multiple times. Each invocation will return a new input stream. This method should not be called if the isInputStreamAvailable method returns false.

Specified by:
getInputStream in interface OWLOntologyInputSource
Returns:
A new input stream which the ontology can be read from.

getPhysicalURI

public java.net.URI getPhysicalURI()
Description copied from interface: OWLOntologyInputSource
Gets the physical URI of the ontology.

Specified by:
getPhysicalURI in interface OWLOntologyInputSource
Returns:
A URI which represents the physical URI of an ontology - this will never be null.