org.semanticweb.owlapi.model
Class IRI

java.lang.Object
  extended by org.semanticweb.owlapi.model.IRI
All Implemented Interfaces:
java.lang.Comparable<OWLObject>, OWLAnnotationObject, OWLAnnotationSubject, OWLAnnotationValue, OWLObject, SWRLPredicate

public abstract class IRI
extends java.lang.Object
implements OWLAnnotationSubject, OWLAnnotationValue, SWRLPredicate

Author: Matthew Horridge
The University of Manchester
Information Management Group
Date: 14-Jan-2009 Represents International Resource Identifiers


Constructor Summary
IRI()
           
 
Method Summary
static IRI create(java.io.File file)
           
static IRI create(java.lang.String str)
          Creates an IRI from the specified String.
static IRI create(java.net.URI uri)
           
static IRI create(java.net.URL url)
           
static IRI generateDocumentIRI()
          Gets an auto-generated ontology document IRI.
abstract  java.lang.String getFragment()
          Gets the fragment of the IRI.
abstract  java.lang.String getScheme()
           
abstract  java.lang.String getStart()
           
abstract  boolean isAbsolute()
          Determines if this IRI is absolute
abstract  boolean isNothing()
          Determines if this IRI is equal to the IRI that owl:Nothing is named with
abstract  boolean isPlainLiteral()
          Determines if this IRI is equal to the IRI that is named rdf:PlainLiteral
abstract  boolean isReservedVocabulary()
          Determines if this IRI is in the reserved vocabulary.
abstract  boolean isThing()
          Determines if this IRI is equal to the IRI that owl:Thing is named with
abstract  IRI resolve(java.lang.String s)
           
abstract  java.lang.String toQuotedString()
          Obtained this IRI surrounded by angled brackets
abstract  java.net.URI toURI()
          Obtains this IRI as a URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.semanticweb.owlapi.model.OWLAnnotationSubject
accept, accept
 
Methods inherited from interface org.semanticweb.owlapi.model.OWLObject
accept, accept, getClassesInSignature, getDataPropertiesInSignature, getDatatypesInSignature, getIndividualsInSignature, getNestedClassExpressions, getObjectPropertiesInSignature, getSignature, isBottomEntity, isTopEntity
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.semanticweb.owlapi.model.OWLAnnotationValue
accept, accept
 
Methods inherited from interface org.semanticweb.owlapi.model.OWLObject
accept, accept, getClassesInSignature, getDataPropertiesInSignature, getDatatypesInSignature, getIndividualsInSignature, getNestedClassExpressions, getObjectPropertiesInSignature, getSignature, isBottomEntity, isTopEntity
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

IRI

public IRI()
Method Detail

toURI

public abstract java.net.URI toURI()
Obtains this IRI as a URI. Note that Java URIs handle unicode characters, so there is no loss during this translation.

Returns:
The URI

isAbsolute

public abstract boolean isAbsolute()
Determines if this IRI is absolute

Returns:
true if this IRI is absolute or false if this IRI is not absolute

getScheme

public abstract java.lang.String getScheme()

getStart

public abstract java.lang.String getStart()

resolve

public abstract IRI resolve(java.lang.String s)

isReservedVocabulary

public abstract boolean isReservedVocabulary()
Determines if this IRI is in the reserved vocabulary. An IRI is in the reserved vocabulary if it starts with <http://www.w3.org/1999/02/22-rdf-syntax-ns#> or <http://www.w3.org/2000/01/rdf-schema#> or <http://www.w3.org/2001/XMLSchema#> or <http://www.w3.org/2002/07/owl#>

Returns:
true if the IRI is in the reserved vocabulary, otherwise false.

isThing

public abstract boolean isThing()
Determines if this IRI is equal to the IRI that owl:Thing is named with

Returns:
true if this IRI is equal to <http://www.w3.org/2002/07/owl#Thing> and otherwise false

isNothing

public abstract boolean isNothing()
Determines if this IRI is equal to the IRI that owl:Nothing is named with

Returns:
true if this IRI is equal to <http://www.w3.org/2002/07/owl#Nothing> and otherwise false

isPlainLiteral

public abstract boolean isPlainLiteral()
Determines if this IRI is equal to the IRI that is named rdf:PlainLiteral

Returns:
true if this IRI is equal to <http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral>, otherwise false

getFragment

public abstract java.lang.String getFragment()
Gets the fragment of the IRI.

Returns:
The IRI fragment, or null if the IRI does not have a fragment

toQuotedString

public abstract java.lang.String toQuotedString()
Obtained this IRI surrounded by angled brackets

Returns:
This IRI surrounded by < and >

create

public static IRI create(java.lang.String str)
Creates an IRI from the specified String.

Parameters:
str - The String that specifies the IRI
Returns:
The IRI that has the specified string representation.

create

public static IRI create(java.io.File file)

create

public static IRI create(java.net.URI uri)

create

public static IRI create(java.net.URL url)
                  throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException

generateDocumentIRI

public static IRI generateDocumentIRI()
Gets an auto-generated ontology document IRI.

Returns:
An auto-generated ontology document IRI. The IRI has the form owlapi:ontologyTIMESTAMP