Overview | Package | Class | Tree | Deprecated | Index | Help
| Protégé-OWL 3.4 rc1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.smi.protegex.owl.storage
Class ProtegeSaver

    java.lang.Object
      edu.stanford.smi.protegex.owl.storage.KnowledgeBaseCopier
          edu.stanford.smi.protegex.owl.storage.ProtegeSaver

    public class ProtegeSaver

extends KnowledgeBaseCopier

This class can be used to convert a legacy Protege ontology (in e.g. CLIPS format) into an OWLModel that can be saved into a file. The basic idea is to copy the contents of the existing ontology into an OWLModel that is automatically mapped into a set of OWL objects (like done in the JenaOWLModel). Thus, the specific logic that generates the corresponding OWL objects can be reused and no additiona implementation of a Protege-to-OWL mapping is required. During that conversation all normal classes (:STANDARD-CLASS) are made named OWL classes (:OWL-NAMED-CLASS) and thus "shifted up" one level in the metamodel.

This class is supported by the RestrictionUpdater class, which generates Restrictions from facet overrides while the new OWLModel is populated.

Author:
  Holger Knublauch

Field Summary
`static Logger` | `log`

Fields inherited from class edu.stanford.smi.protegex.owl.storage.KnowledgeBaseCopier
`doneSlots`

Constructor Summary
`ProtegeSaver(edu.stanford.smi.protege.model.KnowledgeBase source, OWLModel target)`
`ProtegeSaver(edu.stanford.smi.protege.model.KnowledgeBase source, OWLModel target, boolean useNativeWriter)`

Method Summary
`protected void` | `addExtraDirectTypes(edu.stanford.smi.protege.model.Instance oldInstance, edu.stanford.smi.protege.model.Instance newInstance)`
`protected Collection` | `cloneValues(Collection oldValues)`
`protected edu.stanford.smi.protege.model.Cls` | `createCls(String clsName, edu.stanford.smi.protege.model.Cls metaCls)`
`protected edu.stanford.smi.protege.model.Instance` | `createInstance(String name, edu.stanford.smi.protege.model.Cls newType)`
`protected edu.stanford.smi.protege.model.Slot` | `createSlot(String slotName, edu.stanford.smi.protege.model.ValueType valueType)`
`protected edu.stanford.smi.protege.model.Cls` | `getNewCls(edu.stanford.smi.protege.model.Cls oldCls)`
`protected edu.stanford.smi.protege.model.Slot` | `getNewSlot(edu.stanford.smi.protege.model.Slot oldSlot)`
`protected void` | `setDirectType(edu.stanford.smi.protege.model.Instance oldFrame, edu.stanford.smi.protege.model.Instance newFrame)`
`protected void` | `setInitialOwnSlotValues(edu.stanford.smi.protege.model.Instance instance)` Can be overloaded to force the assignment of selected own slot values immediately after the instance has been created.
`protected void` | `setValueType(edu.stanford.smi.protege.model.Slot oldSlot, edu.stanford.smi.protege.model.Slot newSlot)`

Methods inherited from class edu.stanford.smi.protegex.owl.storage.KnowledgeBaseCopier
`createClses, createFacetOverrides, getNewInstance, run, setOwnSlotValues`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    public static transient Logger log

Constructor Detail

### ProtegeSaver

    public ProtegeSaver(edu.stanford.smi.protege.model.KnowledgeBase source,
                        OWLModel target)

### ProtegeSaver

    public ProtegeSaver(edu.stanford.smi.protege.model.KnowledgeBase source,
                        OWLModel target,
                        boolean useNativeWriter)

Method Detail

### addExtraDirectTypes

    protected void addExtraDirectTypes(edu.stanford.smi.protege.model.Instance oldInstance,
                                       edu.stanford.smi.protege.model.Instance newInstance)

  Overrides:
    `addExtraDirectTypes` in class `KnowledgeBaseCopier`

### cloneValues

    protected Collection cloneValues(Collection oldValues)

  Overrides:
    `cloneValues` in class `KnowledgeBaseCopier`

### createCls

    protected edu.stanford.smi.protege.model.Cls createCls(String clsName,
                                                           edu.stanford.smi.protege.model.Cls metaCls)

  Overrides:
    `createCls` in class `KnowledgeBaseCopier`

### createInstance

    protected edu.stanford.smi.protege.model.Instance createInstance(String name,
                                                                     edu.stanford.smi.protege.model.Cls newType)

  Overrides:
    `createInstance` in class `KnowledgeBaseCopier`

### createSlot

    protected edu.stanford.smi.protege.model.Slot createSlot(String slotName,
                                                             edu.stanford.smi.protege.model.ValueType valueType)

  Overrides:
    `createSlot` in class `KnowledgeBaseCopier`

### getNewCls

    protected edu.stanford.smi.protege.model.Cls getNewCls(edu.stanford.smi.protege.model.Cls oldCls)

  Overrides:
    `getNewCls` in class `KnowledgeBaseCopier`

### getNewSlot

    protected edu.stanford.smi.protege.model.Slot getNewSlot(edu.stanford.smi.protege.model.Slot oldSlot)

  Overrides:
    `getNewSlot` in class `KnowledgeBaseCopier`

### setDirectType

    protected void setDirectType(edu.stanford.smi.protege.model.Instance oldFrame,
                                 edu.stanford.smi.protege.model.Instance newFrame)

  Overrides:
    `setDirectType` in class `KnowledgeBaseCopier`

### setInitialOwnSlotValues

    protected void setInitialOwnSlotValues(edu.stanford.smi.protege.model.Instance instance)

  Description copied from class: `KnowledgeBaseCopier`
  Can be overloaded to force the assignment of selected own slot values immediately after the instance has been created. The default implementation is empty.

  Overrides:
    `setInitialOwnSlotValues` in class `KnowledgeBaseCopier`
  Parameters:
    `instance` - the instance to initialize the own slot values

### setValueType

    protected void setValueType(edu.stanford.smi.protege.model.Slot oldSlot,
                                edu.stanford.smi.protege.model.Slot newSlot)

  Overrides:
    `setValueType` in class `KnowledgeBaseCopier`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protégé-OWL 3.4 rc1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug report or feature request
Copyright (c) 1998-2009 Stanford University.