org.semanticweb.skos
Interface SKOSContentManager

All Known Implementing Classes:
SKOSManager

public interface SKOSContentManager

Author: Simon Jupp
Date: Apr 25, 2008
The University of Manchester
Bio-Health Informatics Group


Method Summary
 java.util.List<SKOSChange> applyChange(SKOSChange change)
          Applies a single AddAssertion object (change) to some or all the vocabularies that are managed by this Manager
 java.util.List<SKOSChange> applyChanges(java.util.List<SKOSChange> change)
          A conveniance method which applies a list of AddAssertion objects (changes) to some or all the vocabularies that are managed by this Manager
 SKOSDataset createSKOSDataset(java.net.URI uri)
          Creates a new (empty) SKOS vocabulary that has the specified ontology URI.
 SKOSDataFactory getSKOSDataFactory()
          Return a SKOSDataFactory for this Manager.
 SKOSDataset loadDataset(SKOSInputSource inputSource)
          A convenience method that load an ontology from an input source.
 SKOSDataset loadDataset(java.net.URI uri)
          Loads the ontology specified by the uri parameter.
 SKOSDataset loadDatasetFromPhysicalURI(java.net.URI uri)
          A convenience method that loads an ontology from a physical URI.
 void save(SKOSDataset vocab)
           
 void save(SKOSDataset dataset, SKOSFormat format, java.net.URI uri)
          Saves the specified ontology, using the specified URI to determine where/how the ontology should be saved.
 void save(SKOSDataset vocab, java.net.URI uri)
          Saves the specified ontology, using the specified URI to determine where/how the ontology should be saved.
 

Method Detail

applyChanges

java.util.List<SKOSChange> applyChanges(java.util.List<SKOSChange> change)
                                        throws SKOSChangeException
A conveniance method which applies a list of AddAssertion objects (changes) to some or all the vocabularies that are managed by this Manager

Parameters:
change - The changes to be applied
Returns:
OWLEntity, the List of changes that were actually applied
Throws:
org.semanticweb.owl.model.OWLOntologyChangeException - If one or more of the changes could not be applied.
SKOSChangeException

applyChange

java.util.List<SKOSChange> applyChange(SKOSChange change)
                                       throws SKOSChangeException
Applies a single AddAssertion object (change) to some or all the vocabularies that are managed by this Manager

Parameters:
change - The changes to be applied
Returns:
OWLEntity, the List of changes that were actually applied
Throws:
org.semanticweb.owl.model.OWLOntologyChangeException - If one or more of the changes could not be applied.
SKOSChangeException

createSKOSDataset

SKOSDataset createSKOSDataset(java.net.URI uri)
                              throws SKOSCreationException
Creates a new (empty) SKOS vocabulary that has the specified ontology URI. The SKOS API uses an OWLOntology to contain single or multiple Concept Schemes. This URI is the base URI for that Ontology.

Parameters:
uri - The URI of the ontology to be created. The ontology URI will be mapped to a physical URI in order to determine the type of ontology factory that will be used to create the ontology. If this mapping is null then a default (in memory) implementation of the ontology will most likely be created.
Returns:
The newly created SKOSDataset
Throws:
org.semanticweb.owl.model.OWLOntologyCreationException - If the ontology could not be created.
SKOSCreationException

loadDataset

SKOSDataset loadDataset(java.net.URI uri)
                        throws SKOSCreationException
Loads the ontology specified by the uri parameter. Note that this is NOT the physical URI that points to a concrete representation (e.g. an RDF/XML OWL file) of an ontology. The mapping to a physical URI will be determined by using one of the loaded OWLOntologyURIMappers. Again, it is important to realise that the ontology being loaded is the container for your SKOSVocabularies

Parameters:
uri - The ontology URI (sometimes called logical URI of the ontology to be loaded)
Returns:
The SKOSDataset represented in the Ontology that was loaded. If an ontology with the specified URI is already loaded then that ontology will be returned.
Throws:
org.semanticweb.owl.model.OWLOntologyCreationException - If there was a problem in creating and loading the ontology.
SKOSCreationException

loadDataset

SKOSDataset loadDataset(SKOSInputSource inputSource)
                        throws SKOSCreationException
A convenience method that load an ontology from an input source. If the ontology contains imports then the appropriate mappers should be set up before calling this method.

Parameters:
inputSource -
Returns:
SKOSDataset
Throws:
org.semanticweb.owl.model.OWLOntologyCreationException
SKOSCreationException

loadDatasetFromPhysicalURI

SKOSDataset loadDatasetFromPhysicalURI(java.net.URI uri)
                                       throws SKOSCreationException
A convenience method that loads an ontology from a physical URI. If the ontology contains imports, then the appropriate mappers should be set up before calling this method.

Parameters:
uri - The physical URI which points to a concrete representation of an ontology. (e.g a physical URI could be file:/home/simon/myvocab.rdf)
Returns:
The SKOSDataset conatined in the loaded ontology
Throws:
org.semanticweb.owl.model.OWLOntologyCreationException - If the ontology could not be created and loaded.
SKOSCreationException

getSKOSDataFactory

SKOSDataFactory getSKOSDataFactory()
Return a SKOSDataFactory for this Manager. The SKOSDataFactory is used to construct SKOS object (for example a SKOSConcept)

Returns:
SKOSDataFactory

save

void save(SKOSDataset vocab)
          throws SKOSStorageException
Throws:
SKOSStorageException

save

void save(SKOSDataset vocab,
          java.net.URI uri)
          throws SKOSStorageException
Saves the specified ontology, using the specified URI to determine where/how the ontology should be saved.

Parameters:
vocab - The vocabulary to be saved.
uri - The physical URI which will be used to determine how and where the ontology will be saved.
Throws:
org.semanticweb.owl.model.OWLOntologyStorageException - If the ontology cannot be saved.
SKOSStorageException

save

void save(SKOSDataset dataset,
          SKOSFormat format,
          java.net.URI uri)
          throws SKOSStorageException
Saves the specified ontology, using the specified URI to determine where/how the ontology should be saved.

Parameters:
dataset - The vocabulary to be saved.
uri - The physical URI which will be used to determine how and where the ontology will be saved.
Throws:
org.semanticweb.owl.model.OWLOntologyStorageException - If the ontology cannot be saved.
SKOSStorageException