public class IDSpaceManager
extends java.lang.Object
Maps between id prefixes and IRI prefixes. By default an IRI prefix is the
value defined by OBOPrefix.getPrefix()
, but this can be overridden
using an idspace tag in the ontology header.
Note that the terminology used here, i.e. "id prefix" and "IRI prefix" is OBO terminology and is not related to the OWL notion of prefix name and prefix. "id prefix" is the substring before the colon in an OBO id. IRI prefix is the prefix of an IRI that is the result of translating an OBO id to an IRI.
Constructor and Description |
---|
IDSpaceManager() |
IDSpaceManager(IDSpaceManager idSpaceManager)
Creates an IDSpaceManager and copying the id prefix to IRI prefix mappings contained in some other IDSpaceManager.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultIRIPrefix()
Gets the default IRI prefix (which is returned by the
getIRIPrefix(String) for unregistered id prefixes. |
java.lang.String |
getIRIPrefix(java.lang.String idPrefix)
Gets an IRI prefix from an id prefix.
|
void |
setIRIPrefix(java.lang.String idPrefix,
java.lang.String iriPrefix)
Sets the IRI prefix for a given id prefix.
|
public IDSpaceManager()
public IDSpaceManager(IDSpaceManager idSpaceManager)
idSpaceManager
- The other IDSpaceManager from where id prefix to IRI prefix mappings will be copied. Not
null.java.lang.NullPointerException
- if idSpaceManager is null.public java.lang.String getDefaultIRIPrefix()
getIRIPrefix(String)
for unregistered id prefixes.OBOPrefix.OBO
.public java.lang.String getIRIPrefix(java.lang.String idPrefix)
idPrefix
- The id prefix. May be null.OBOPrefix.OBO
.public void setIRIPrefix(java.lang.String idPrefix, java.lang.String iriPrefix)
idPrefix
- The id prefix to set.iriPrefix
- The IRI prefix that the id prefix maps to.