|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.semanticweb.kaon2.api.DefaultOntologyResolver
public class DefaultOntologyResolver
This is the default resolver that maintains a list of associations for ontology URIs. There is one global instance of this class, but clients can create their own private instances as well.
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
m_physicalURIs
The map of associations of ontology to physical URIs. |
static DefaultOntologyResolver |
s_defaultResolver
The glocal instance of this class that is the default resolver. |
| Constructor Summary | |
|---|---|
DefaultOntologyResolver()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getReplacement(java.lang.String ontologyURI)
Returns the physical URI for given ontology URI. |
void |
loadFromProperties(java.io.File file)
Loads specified properties from the file and adds all (key,value) pairs as replacements. |
void |
loadFromProperties(java.io.InputStream inputStream)
Loads properties from the stream and adds all (key,value) pairs as replacements. |
void |
loadFromProperties(java.net.URL url)
Loads specified properties from the URL and adds all (key,value) pairs as replacements. |
java.util.Iterator<java.lang.String> |
registeredOntologyURIs()
Returns the iterator over all ontology URIs. |
java.lang.String |
registerOntology(java.lang.String physicalURI)
Registers the ontology with a given physical URI. |
java.lang.String |
registerOntology(java.lang.String physicalURI,
java.net.Proxy proxy)
Registers the ontology with a given physical URI. |
void |
registerReplacement(java.lang.String ontologyURI,
java.lang.String physicalURI)
Registers a physical URI for the ontology URI. |
java.lang.String |
resolveOntologyAccess(java.lang.String ontologyURI,
java.util.Map<java.lang.String,java.lang.Object> parameters,
java.util.Map<java.lang.String,java.lang.Object> templateParameters)
Called to resolve ontology parameters. |
void |
unregisterReplacement(java.lang.String ontologyURI)
Removes a possible physical URI for given otnology URI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final DefaultOntologyResolver s_defaultResolver
protected final java.util.Map<java.lang.String,java.lang.String> m_physicalURIs
| Constructor Detail |
|---|
public DefaultOntologyResolver()
| Method Detail |
|---|
public java.lang.String resolveOntologyAccess(java.lang.String ontologyURI,
java.util.Map<java.lang.String,java.lang.Object> parameters,
java.util.Map<java.lang.String,java.lang.Object> templateParameters)
OntologyResolver
resolveOntologyAccess in interface OntologyResolverontologyURI - the ontology URIparameters - the parameters that will be used to access the ontologytemplateParameters - the template parameters (e.g. of a parent ontology)
public java.lang.String getReplacement(java.lang.String ontologyURI)
ontologyURI - the ontology URI
null if no URI has been registered)
public void registerReplacement(java.lang.String ontologyURI,
java.lang.String physicalURI)
ontologyURI - the ontology URIphysicalURI - the physical URI
public java.lang.String registerOntology(java.lang.String physicalURI)
throws KAON2Exception
physicalURI - the physical URI of the ontology
KAON2Exception - thrown if there is an error
public java.lang.String registerOntology(java.lang.String physicalURI,
java.net.Proxy proxy)
throws KAON2Exception
physicalURI - the physical URI of the ontologyproxy - the proxy
KAON2Exception - thrown if there is an errorpublic void unregisterReplacement(java.lang.String ontologyURI)
ontologyURI - the ontology URI for which registration is removedpublic java.util.Iterator<java.lang.String> registeredOntologyURIs()
public void loadFromProperties(java.io.InputStream inputStream)
throws java.io.IOException
inputStream - the stream containing the information
java.io.IOException - thrown if there is an error
public void loadFromProperties(java.net.URL url)
throws java.io.IOException
url - the URL of the properties file
java.io.IOException - thrown if there is an error
public void loadFromProperties(java.io.File file)
throws java.io.IOException
file - the properties file
java.io.IOException - thrown if there is an error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||