edu.stanford.smi.protegex.owl.storage
Class OWL2OWLCopier
java.lang.Object
edu.stanford.smi.protegex.owl.storage.KnowledgeBaseCopier
edu.stanford.smi.protegex.owl.storage.OWL2OWLCopier
- public class OWL2OWLCopier
- extends KnowledgeBaseCopier
A KnowledgeBaseCopier that can be used to generate a Jena OntModel from an
existing OWLModel (especially from a database).
Basically, the OntModel is populated by the JenaUpdater while the frames are
copied from the source to the target OWLModel.
- Author:
- Holger Knublauch
Method Summary |
protected void |
createClses()
|
protected void |
createFacetOverrides(edu.stanford.smi.protege.model.Cls oldCls)
|
protected edu.stanford.smi.protege.model.Instance |
getNewInstance(edu.stanford.smi.protege.model.Instance oldInstance)
|
protected void |
setInitialOwnSlotValues(edu.stanford.smi.protege.model.Instance oldInstance)
Makes sure that Restrictions are immediately initialized by their facet
overrides, so that the corresponding OntClass can be generated. |
protected void |
setOwnSlotValues(edu.stanford.smi.protege.model.Frame newFrame,
edu.stanford.smi.protege.model.Instance oldInstance,
edu.stanford.smi.protege.model.Slot oldSlot)
Overloaded to capture special handling of namespace prefixes: Currently they
need to be changed through the NamespaceManager - setOwnSlotValues is not enough. |
Methods inherited from class edu.stanford.smi.protegex.owl.storage.KnowledgeBaseCopier |
addExtraDirectTypes, cloneValues, createCls, createInstance, createSlot, getNewCls, getNewSlot, log, run, setDirectType, setValueType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
source
private OWLModel source
target
private OWLModel target
OWL2OWLCopier
public OWL2OWLCopier(OWLModel source,
OWLModel target)
createClses
protected void createClses()
- Overrides:
createClses
in class KnowledgeBaseCopier
createFacetOverrides
protected void createFacetOverrides(edu.stanford.smi.protege.model.Cls oldCls)
- Overrides:
createFacetOverrides
in class KnowledgeBaseCopier
getNewInstance
protected edu.stanford.smi.protege.model.Instance getNewInstance(edu.stanford.smi.protege.model.Instance oldInstance)
- Overrides:
getNewInstance
in class KnowledgeBaseCopier
setInitialOwnSlotValues
protected void setInitialOwnSlotValues(edu.stanford.smi.protege.model.Instance oldInstance)
- Makes sure that Restrictions are immediately initialized by their facet
overrides, so that the corresponding OntClass can be generated.
- Overrides:
setInitialOwnSlotValues
in class KnowledgeBaseCopier
- Parameters:
oldInstance
-
setOwnSlotValues
protected void setOwnSlotValues(edu.stanford.smi.protege.model.Frame newFrame,
edu.stanford.smi.protege.model.Instance oldInstance,
edu.stanford.smi.protege.model.Slot oldSlot)
- Overloaded to capture special handling of namespace prefixes: Currently they
need to be changed through the NamespaceManager - setOwnSlotValues is not enough.
- Overrides:
setOwnSlotValues
in class KnowledgeBaseCopier
- Parameters:
newFrame
- oldInstance
- oldSlot
-