edu.stanford.smi.protegex.owl.model.impl
Class OWLNamespaceManager

java.lang.Object
  extended byedu.stanford.smi.protegex.owl.model.impl.AbstractNamespaceManager
      extended byedu.stanford.smi.protegex.owl.model.impl.OWLNamespaceManager
All Implemented Interfaces:
NamespaceManager, NamespaceMap

public class OWLNamespaceManager
extends AbstractNamespaceManager

A NamespaceManager that maintains the prefix information by means of the values of the corresponding slot in the default OWLOntology of the knowledge base.

Author:
Holger Knublauch

Field Summary
static String DEFAULT_DEFAULT_BASE
           
static String DEFAULT_DEFAULT_NAMESPACE
           
private  String defaultNamespace
           
private  Map namespace2Prefix
           
private  Map prefix2Namespace
           
private  edu.stanford.smi.protege.model.Slot prefixesSlot
           
private  Collection systemPrefixes
           
 
Fields inherited from class edu.stanford.smi.protegex.owl.model.impl.AbstractNamespaceManager
owlModel
 
Constructor Summary
OWLNamespaceManager()
           
 
Method Summary
private  void addPrefix(String prefix, String namespace)
           
private  void addPrefixes(edu.stanford.smi.protege.model.Instance ontology, boolean isDefaultOntology)
           
 String getDefaultNamespace()
           
 String getNamespaceForPrefix(String prefix)
           
 String getPrefix(String namespace)
           
 Collection getPrefixes()
           
 void init(OWLModel owlModel)
           
private  void installDefaultNamespaces()
           
 boolean isModifiable(String prefix)
           
static boolean isValidPrefix(String prefix)
           
 void removePrefix(String prefix)
           
private  void removePrefixHelper(String prefix)
           
private  void setDefaultNamespace(OWLOntology oi, String value)
           
 void setDefaultNamespace(String value)
           
 void setModifiable(String prefix, boolean value)
           
 void setPrefix(String namespace, String prefix)
           
 void update()
           
 
Methods inherited from class edu.stanford.smi.protegex.owl.model.impl.AbstractNamespaceManager
addNamespaceManagerListener, getListeners, removeNamespaceManagerListener, setDefaultNamespace, setPrefix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DEFAULT_BASE

public static final String DEFAULT_DEFAULT_BASE
See Also:
Constant Field Values

DEFAULT_DEFAULT_NAMESPACE

public static final String DEFAULT_DEFAULT_NAMESPACE
See Also:
Constant Field Values

defaultNamespace

private String defaultNamespace

prefixesSlot

private edu.stanford.smi.protege.model.Slot prefixesSlot

namespace2Prefix

private Map namespace2Prefix

prefix2Namespace

private Map prefix2Namespace

systemPrefixes

private Collection systemPrefixes
Constructor Detail

OWLNamespaceManager

public OWLNamespaceManager()
Method Detail

addPrefixes

private void addPrefixes(edu.stanford.smi.protege.model.Instance ontology,
                         boolean isDefaultOntology)

addPrefix

private void addPrefix(String prefix,
                       String namespace)

getDefaultNamespace

public String getDefaultNamespace()

getNamespaceForPrefix

public String getNamespaceForPrefix(String prefix)

getPrefix

public String getPrefix(String namespace)

getPrefixes

public Collection getPrefixes()

init

public void init(OWLModel owlModel)
Specified by:
init in interface NamespaceManager
Overrides:
init in class AbstractNamespaceManager

isModifiable

public boolean isModifiable(String prefix)

isValidPrefix

public static boolean isValidPrefix(String prefix)

removePrefix

public void removePrefix(String prefix)

removePrefixHelper

private void removePrefixHelper(String prefix)

setDefaultNamespace

public void setDefaultNamespace(String value)

setDefaultNamespace

private void setDefaultNamespace(OWLOntology oi,
                                 String value)

setModifiable

public void setModifiable(String prefix,
                          boolean value)

setPrefix

public void setPrefix(String namespace,
                      String prefix)

update

public void update()

installDefaultNamespaces

private void installDefaultNamespaces()