Protégé-OWL 3.4

edu.stanford.smi.protegex.owl.repository
Interface Repository

All Known Implementing Classes:
AbstractLocalRepository, AbstractStreamBasedRepositoryImpl, DatabaseRepository, DublinCoreDLVersionRedirectRepository, ForcedURLRetrievalRepository, FTPRepository, HTTPRepository, LocalFileRepository, LocalFolderRepository, ProtegeOWLPluginFolderRepository, RelativeFileRepository, RelativeFolderRepository

public interface Repository

User: matthewhorridge
The University Of Manchester
Medical Informatics Group
Date: Sep 12, 2005

matthew.horridge@cs.man.ac.uk
www.cs.man.ac.uk/~horridgm


Method Summary
 boolean contains(URI ontologyName)
          Determines if the repository contains the specified ontology.
 Collection<URI> getOntologies()
          Gets the name of the ontologies that this repository contains.
 String getOntologyLocationDescription(URI ontologyName)
          Gets a description of where the specified ontology is located.
 OutputStream getOutputStream(URI ontologyName)
          Gets an output stream which can be used to write changes to the specified ontology.
 String getRepositoryDescription()
          Gets a description of the type of the repository.
 String getRepositoryDescriptor()
          Gets the descriptor for this repository.
 boolean hasOutputStream(URI ontologyName)
          Determines if the ontology is writable through an output stream.
 boolean isSystem()
          Determines if the ontology repository is a system repository.
 boolean isWritable(URI ontologyName)
          Determines if the specified ontology is writable.
 TripleStore loadImportedAssertions(OWLModel owlModel, URI ontologyName)
           
 void refresh()
          Causes the repository to contain the latest information.
 

Method Detail

contains

boolean contains(URI ontologyName)
Determines if the repository contains the specified ontology.

Parameters:
ontologyName - The name of the ontology.

refresh

void refresh()
Causes the repository to contain the latest information.


getOntologies

Collection<URI> getOntologies()
Gets the name of the ontologies that this repository contains.

Returns:
A Collection containing URIs.

isSystem

boolean isSystem()
Determines if the ontology repository is a system repository.


getRepositoryDescription

String getRepositoryDescription()
Gets a description of the type of the repository. For example, "Local folder".


getOntologyLocationDescription

String getOntologyLocationDescription(URI ontologyName)
Gets a description of where the specified ontology is located.

Parameters:
ontologyName - The name of the ontology.
Returns:
A String description of the location of the ontology, for example, "file:/Users/Blah/Blah/Blah". This return value will be an empty String if the repository does not contain the specified ontology.

getRepositoryDescriptor

String getRepositoryDescriptor()
Gets the descriptor for this repository. This is used to serialise the repository in a list of the available repositories.


loadImportedAssertions

TripleStore loadImportedAssertions(OWLModel owlModel,
                                   URI ontologyName)
                                   throws edu.stanford.smi.protege.exception.OntologyLoadException
Parameters:
owlModel - the model to add the import to
ontologyName - the ontology name to use to look up the imported ontology.
Throws:
edu.stanford.smi.protege.exception.OntologyLoadException

isWritable

boolean isWritable(URI ontologyName)
Determines if the specified ontology is writable.

Parameters:
ontologyName -
Returns:
true if the ontology is writable, or false if the ontology is not writable.

hasOutputStream

boolean hasOutputStream(URI ontologyName)
Determines if the ontology is writable through an output stream. Can only be true if the ontology is writable.


getOutputStream

OutputStream getOutputStream(URI ontologyName)
                             throws IOException
Gets an output stream which can be used to write changes to the specified ontology.

Parameters:
ontologyName - The ontology to be written
Returns:
an OutputStream that can be used to write changes to the ontology, or null if the ontology is not writable.
Throws:
IOException

Protégé-OWL 3.4

Submit a bug report or feature request
Copyright (c) 1998-2009 Stanford University.