|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.semanticweb.owlapi.util.DefaultPrefixManager
public class DefaultPrefixManager
Author: Matthew Horridge
The University Of Manchester
Information Management Group
Date:
10-Sep-2008
Constructor Summary | |
---|---|
DefaultPrefixManager()
Creates a namespace manager that does not have a default namespace. |
|
DefaultPrefixManager(PrefixManager pm)
|
|
DefaultPrefixManager(java.lang.String defaultPrefix)
Creates a namespace manager that has the specified default namespace. |
Method Summary | |
---|---|
void |
clear()
|
boolean |
containsPrefixMapping(java.lang.String prefix)
Determines if this manager knows about a given prefix name and it contains a (non-null) mapping for the prefix. |
void |
dispose()
Disposes of the short form proivider. |
java.lang.String |
getDefaultPrefix()
Gets the default prefix. |
IRI |
getIRI(java.lang.String curie)
Gets the URI for a given prefix IRI. |
java.lang.String |
getPrefix(java.lang.String prefixName)
Gets the prefix that is bound to a particular prefix name. |
java.lang.String |
getPrefixIRI(IRI iri)
Gets the prefix IRI given a IRI (URI). |
java.util.Map<java.lang.String,java.lang.String> |
getPrefixName2PrefixMap()
Gets a map that maps prefix names to prefixes. |
java.util.Set<java.lang.String> |
getPrefixNames()
Gets the prefix names that have a mapping in this prefix manager |
java.lang.String |
getShortForm(IRI iri)
|
java.lang.String |
getShortForm(OWLEntity entity)
Gets the short form for the specified entity. |
void |
setDefaultPrefix(java.lang.String defaultPrefix)
Sets the default namespace. |
void |
setPrefix(java.lang.String prefixName,
java.lang.String prefix)
Adds a prefix name to prefix mapping |
void |
unregisterNamespace(java.lang.String namespace)
Removes a previously registerd prefix namespace mapping |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultPrefixManager()
public DefaultPrefixManager(PrefixManager pm)
public DefaultPrefixManager(java.lang.String defaultPrefix)
defaultPrefix
- The namespace to be used as the default namespace.Method Detail |
---|
public void clear()
public java.util.Set<java.lang.String> getPrefixNames()
getPrefixNames
in interface PrefixManager
public void setDefaultPrefix(java.lang.String defaultPrefix)
defaultPrefix
- The namespace to be used as the default namespace. Note that
the value may be null
in order to clear the default namespace.public java.lang.String getPrefixIRI(IRI iri)
PrefixManager
getPrefixIRI
in interface PrefixManager
iri
- The IRI whose prefix it to be retrieved
null
if a prefix IRI cannot be generated.public java.lang.String getDefaultPrefix()
PrefixManager
getDefaultPrefix
in interface PrefixManager
null
if there is no default prefix.public boolean containsPrefixMapping(java.lang.String prefix)
PrefixManager
containsPrefixMapping
in interface PrefixManager
prefix
- The prefix name to be tested for.
true
if the manager knows about this prefix and there is a non-null mapping for this
prefix.public IRI getIRI(java.lang.String curie)
PrefixManager
getIRI
in interface PrefixManager
curie
- The Prefix IRI
public java.util.Map<java.lang.String,java.lang.String> getPrefixName2PrefixMap()
PrefixManager
getPrefixName2PrefixMap
in interface PrefixManager
public java.lang.String getPrefix(java.lang.String prefixName)
PrefixManager
getDefaultPrefix()
method.
getPrefix
in interface PrefixManager
prefixName
- The prefix name. A string that represents a prefix name of the prefix to be retrieved.
Note that specifying ":" is the same as asking for the default prefix (see the
getDefaultPrefix() method).
null
if there is no prefix name bound to this prefix, or the prefix name doesn't
exist.public void setPrefix(java.lang.String prefixName, java.lang.String prefix)
prefixName
- name The prefix name (must not be null)prefix
- The prefix
java.lang.NullPointerException
- if the prefix name or prefix is null
.
java.lang.IllegalArgumentException
- if the prefix name does not end with a colon.public void unregisterNamespace(java.lang.String namespace)
namespace
- The namespace to be removed.public java.lang.String getShortForm(IRI iri)
getShortForm
in interface IRIShortFormProvider
public java.lang.String getShortForm(OWLEntity entity)
ShortFormProvider
getShortForm
in interface ShortFormProvider
entity
- The entity.
public void dispose()
ShortFormProvider
dispose
in interface ShortFormProvider
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |