Protege-2000 1.7

edu.stanford.smi.protege.model
Class DefaultKnowledgeBase

java.lang.Object
  |
  +--edu.stanford.smi.protege.model.DefaultKnowledgeBase
All Implemented Interfaces:
Disposable, KnowledgeBase

public class DefaultKnowledgeBase
extends Object
implements KnowledgeBase

Default implementation of the KnowledgeBase interface. Handles event generation but delegates most frame operations to FrameHandler.

Author:
Ray Fergerson

Fields inherited from interface edu.stanford.smi.protege.model.KnowledgeBase
MAXIMUM_CARDINALITY_UNBOUNDED
 
Constructor Summary
DefaultKnowledgeBase(KnowledgeBaseFactory factory)
           
 
Method Summary
 void addClsListener(Cls cls, ClsListener listener)
           
 void addDirectSuperclass(Cls child, Cls parent)
           
 void addDirectSuperslot(Slot slot, Slot superslot)
           
 void addDirectTemplateSlot(Cls cls, Slot slot)
           
 void addFacetListener(Facet facet, FacetListener listener)
           
 void addFrameListener(Frame frame, FrameListener listener)
           
protected  void addInstance(Instance instance, String name, Cls type, boolean isNew)
           
 void addInstanceListener(Instance instance, InstanceListener listener)
           
 void addJavaLoadPackage(String packageName)
          This method requires some background information.
 void addKnowledgeBaseListener(KnowledgeBaseListener listener)
           
 void addOwnSlotValue(Frame frame, Slot slot, Object value)
           
 void addOwnSlotValue(Frame frame, Slot slot, Object value, int index)
           
 void addSlotListener(Slot slot, SlotListener listener)
           
 void addTemplateFacetValue(Cls cls, Slot slot, Facet facet, Object value)
           
 void addTemplateFacetValue(Cls cls, Slot slot, Facet facet, Object value, int index)
           
 void addTemplateSlotValue(Cls cls, Slot slot, Object value)
           
 FrameID allocateFrameID()
           
 boolean areValidOwnSlotValues(Frame frame, Slot slot, Collection values)
           
 boolean beginTransaction()
           
 void changeFrameName(Frame frame, String newName)
           
 boolean containsFrame(String name)
           
 Cls createCls(String name, Collection directSuperclasses)
           
 Cls createCls(String name, Collection parents, Cls metaCls)
           
 Cls createCls(String name, Collection parents, Cls metaCls, boolean isNew)
           
 Facet createFacet(String name)
           
 Facet createFacet(String name, Cls metaCls)
           
 Facet createFacet(String name, Cls metaCls, boolean isNew)
           
 Instance createInstance(String name, Cls cls)
           
 Instance createInstance(String name, Cls cls, boolean isNew)
           
 Instance createSimpleInstance(String name, Cls cls)
           
 Instance createSimpleInstance(String name, Cls cls, boolean isNew)
           
 Slot createSlot(String name)
           
 Slot createSlot(String name, Cls metaCls)
           
 Slot createSlot(String name, Cls metaCls, boolean isNew)
           
 Slot createSlot(String name, Cls metaCls, Collection superslots, boolean isNew)
           
 String createUniqueFrameName(String name)
           
 void deleteCls(Cls cls)
           
 void deleteFacet(Facet facet)
           
 void deleteFrame(Frame frame)
           
 void deleteInstance(Instance instance)
           
 void deleteSimpleInstance(SimpleInstance instance)
           
 void deleteSlot(Slot slot)
           
 void dispose()
           
 boolean endTransaction(boolean doCommit)
           
 void finalize()
           
 Collection getAllowedClses(Slot slot)
           
 Collection getAllowedParents(Slot slot)
           
 Collection getAllowedValues(Slot slot)
           
 boolean getAllowsMultipleValues(Slot slot)
           
 Facet getAssociatedFacet(Slot slot)
           
 Slot getAssociatedSlot(Facet facet)
           
 String getBrowserText(Instance instance)
           
 String getBuildString()
          Returns a string that contains something like "build 840" that refers to the build of Protege in use when this kb was last saved.
 Object getClientInformation(Object key)
          Allows a programmer to hang arbitrary information on a kb and retrieve it later.
 Cls getCls(String name)
           
 int getClsCount()
           
 Collection getClses()
           
 Collection getClsNameMatches(String s, int maxMatches)
          Not a regexp.
 Cls getDefaultClsMetaCls()
           
 Cls getDefaultFacetMetaCls()
           
 Cls getDefaultSlotMetaCls()
           
 Collection getDefaultValues(Frame frame)
           
 Facet getDefaultValuesFacet()
           
 Slot getDefaultValuesSlot()
           
 int getDirectInstanceCount(Cls type)
           
 Collection getDirectInstances(Cls type)
           
 Slot getDirectInstancesSlot()
           
 int getDirectSubclassCount(Cls parent)
           
 Collection getDirectSubclasses(Cls parent)
           
 Slot getDirectSubclassesSlot()
           
 int getDirectSubslotCount(Slot slot)
           
 Collection getDirectSubslots(Slot slot)
           
 int getDirectSuperclassCount(Cls cls)
           
 Collection getDirectSuperclasses(Cls cls)
           
 Slot getDirectSuperclassesSlot()
           
 int getDirectSuperslotCount(Slot slot)
           
 Collection getDirectSuperslots(Slot slot)
           
 Collection getDirectTemplateFacetValues(Cls cls, Slot slot, Facet facet)
           
 Collection getDirectTemplateSlots(Cls cls)
           
 Slot getDirectTemplateSlotsSlot()
           
 Collection getDirectTemplateSlotValues(Cls cls, Slot slot)
           
 Cls getDirectType(Instance instance)
           
 Slot getDirectTypeSlot()
           
 Collection getDocumentation(Frame frame)
           
 Facet getFacet(String name)
           
 int getFacetCount()
           
 Collection getFacets()
           
 Frame getFrame(FrameID id)
           
 Frame getFrame(String name)
           
 int getFrameCount()
           
 String getFrameCreationTimestamp(Frame frame)
           
 String getFrameCreator(Frame frame)
           
 String getFrameLastModificationTimestamp(Frame frame)
           
 String getFrameLastModifier(Frame frame)
           
 Collection getFrameNameMatches(String s, int maxMatches)
           
 String getFrameNamePrefix()
           
 Collection getFrames()
           
 Instance getInstance(String name)
           
 int getInstanceCount(Cls type)
           
 Collection getInstances()
           
 Collection getInstances(Cls type)
           
 String getInvalidOwnSlotValuesText(Frame frame, Slot slot, Collection values)
           
 String getInvalidOwnSlotValueText(Frame frame, Slot slot, Object value)
           
 Slot getInverseSlot(Slot slot)
           
 KnowledgeBaseFactory getKnowledgeBaseFactory()
           
 Collection getMatchingFrames(Slot slot, Facet facet, boolean isTemplate, String s, int nMatches)
           
 int getMaximumCardinality(Slot slot)
           
 Number getMaximumValue(Slot slot)
           
 int getMinimumCardinality(Slot slot)
           
 Number getMinimumValue(Slot slot)
           
 String getName()
           
 String getName(Frame frame)
           
 Slot getNameSlot()
           
 int getNextFrameNumber()
           
 boolean getOwnSlotAllowsMultipleValues(Frame frame, Slot slot)
           
 Collection getOwnSlotAndSubslotValues(Frame frame, Slot slot)
           
 Collection getOwnSlotDefaultValues(Frame frame, Slot slot)
           
 Collection getOwnSlotFacets(Frame frame, Slot slot)
           
 Collection getOwnSlotFacetValues(Frame frame, Slot slot, Facet facet)
           
 Collection getOwnSlots(Frame frame)
           
 Object getOwnSlotValue(Frame frame, Slot slot)
           
 int getOwnSlotValueCount(Frame frame, Slot slot)
           
 Collection getOwnSlotValues(Frame frame, Slot slot)
           
 ValueType getOwnSlotValueType(Frame frame, Slot slot)
           
 Project getProject()
           
 Collection getReachableSimpleInstances(Collection roots)
           
 Collection getReferences(Object o, int maxReferences)
           
 Cls getRootCls()
           
 Collection getRootClses()
          A convenience method that returns ":THING" wrapped in a collection.
 Cls getRootClsMetaCls()
           
 Cls getRootFacetMetaCls()
           
 Cls getRootSlotMetaCls()
           
 Collection getRootSlots()
           
 Slot getSlot(String name)
           
 int getSlotCount()
           
 Collection getSlots()
           
 String getSlotValueLastModificationTimestamp(Frame frame, Slot slot, boolean isTemplate)
           
 String getSlotValueLastModifier(Frame frame, Slot slot, boolean isTemplate)
           
 Storage getStorage()
           
 int getSubclassCount(Cls parent)
           
 Collection getSubclasses(Cls parent)
           
 Collection getSubslots(Slot slot)
           
 int getSuperclassCount(Cls child)
           
 Collection getSuperclasses(Cls child)
           
 Collection getSuperslots(Slot slot)
           
 Collection getTemplateFacets(Cls cls, Slot slot)
           
 Object getTemplateFacetValue(Cls cls, Slot slot, Facet facet)
           
 Collection getTemplateFacetValues(Cls cls, Slot slot, Facet facet)
           
 Collection getTemplateSlotAllowedClses(Cls cls, Slot slot)
           
 Collection getTemplateSlotAllowedParents(Cls cls, Slot slot)
           
 Collection getTemplateSlotAllowedValues(Cls cls, Slot slot)
           
 boolean getTemplateSlotAllowsMultipleValues(Cls cls, Slot slot)
           
 Collection getTemplateSlotClses(Slot slot)
           
 Collection getTemplateSlotDefaultValues(Cls cls, Slot slot)
           
 Collection getTemplateSlotDocumentation(Cls cls, Slot slot)
           
 int getTemplateSlotMaximumCardinality(Cls cls, Slot slot)
           
 Number getTemplateSlotMaximumValue(Cls cls, Slot slot)
           
 int getTemplateSlotMinimumCardinality(Cls cls, Slot slot)
           
 Number getTemplateSlotMinimumValue(Cls cls, Slot slot)
           
 Collection getTemplateSlots(Cls cls)
           
 Object getTemplateSlotValue(Cls cls, Slot slot)
           
 Collection getTemplateSlotValues(Cls cls, Slot slot)
           
 ValueType getTemplateSlotValueType(Cls cls, Slot slot)
           
 Collection getUnreachableSimpleInstances(Collection roots)
           
 String getUserName()
           
 Collection getValues(Slot slot)
           
 Facet getValuesFacet()
           
 Slot getValuesSlot()
           
 ValueType getValueType(Slot slot)
           
 String getVersionString()
           
 String getVersionString(String s)
           
 boolean hasChanged()
           
 boolean hasDirectlyOverriddenTemplateFacet(Cls cls, Slot slot, Facet facet)
           
 boolean hasDirectlyOverriddenTemplateSlot(Cls cls, Slot slot)
           
 boolean hasDirectSubclass(Cls parent, Cls child)
           
 boolean hasDirectSuperclass(Cls child, Cls parent)
           
 boolean hasDirectTemplateSlot(Cls cls, Slot slot)
           
 boolean hasDirectType(Instance instance, Cls type)
           
 boolean hasInheritedTemplateSlot(Cls cls, Slot slot)
           
 boolean hasOverriddenTemplateFacet(Cls cls, Slot slot, Facet facet)
           
 boolean hasOverriddenTemplateSlot(Cls cls, Slot slot)
           
 boolean hasOwnSlot(Frame frame, Slot slot)
           
 boolean hasSlotValueAtSomeFrame(Slot slot)
           
 boolean hasSubclass(Cls parent, Cls child)
           
 boolean hasSuperclass(Cls child, Cls superclass)
           
 boolean hasTemplateFacet(Cls cls, Slot slot, Facet facet)
           
 boolean hasTemplateSlot(Cls cls, Slot slot)
           
 boolean hasType(Instance instance, Cls type)
           
 boolean isAbstract(Cls cls)
           
 boolean isAutoUpdatingFacetValues()
           
 boolean isClsMetaCls(Cls cls)
           
 boolean isDefaultClsMetaCls(Cls cls)
           
 boolean isDefaultFacetMetaCls(Cls cls)
           
 boolean isDefaultSlotMetaCls(Cls cls)
           
 boolean isFacetMetaCls(Cls cls)
           
 boolean isLoading()
           
 boolean isMetaCls(Cls cls)
           
 boolean isSlotMetaCls(Cls cls)
           
 boolean isValidOwnSlotValue(Frame frame, Slot slot, Object value)
           
protected  FrameManager makeFrameManager()
           
 Instance makeSimpleInstance(String clsName, FrameID id)
          create an instance of the correct java class but do not put it in the kb
 void moveDirectSubclass(Cls parent, Cls child, Cls afterCls)
           
 void moveDirectSuperclass(Cls child, Cls parent, Cls afterCls)
           
 void moveOwnSlotValue(Frame frame, Slot slot, int fromIndex, int toIndex)
           
 void moveTemplateFacetValue(Cls cls, Slot slot, Facet facet, int fromIndex, int toIndex)
           
 Instance newInstance(String name, Cls cls, FrameID id, boolean isNew)
           
 void notifyVisibilityChanged(Frame frame)
           
 void removeClsListener(Cls cls, ClsListener listener)
           
 void removeDirectSuperclass(Cls child, Cls parent)
           
 void removeDirectSuperslot(Slot slot, Slot superSlot)
           
 void removeDirectTemplateSlot(Cls cls, Slot slot)
           
 void removeFacetListener(Facet facet, FacetListener listener)
           
 void removeFrameListener(Frame frame, FrameListener listener)
           
 void removeInstanceListener(Instance instance, InstanceListener listener)
           
 void removeJavaLoadPackage(String packageName)
           
 void removeKnowledgeBaseListener(KnowledgeBaseListener listener)
           
 void removeOwnSlotValue(Frame frame, Slot slot, Object value)
          remove all occurances of value
 void removeSlotListener(Slot slot, SlotListener listener)
           
 void removeTemplateFacetOverrides(Cls cls, Slot slot)
           
 void setAbstract(Cls cls, boolean isAbstract)
           
 void setAllowedClses(Slot slot, Collection clses)
           
 void setAllowedParents(Slot slot, Collection parents)
           
 void setAllowedValues(Slot slot, Collection values)
           
 void setAllowsMultipleValues(Slot slot, boolean b)
           
 void setAssociatedFacet(Slot slot, Facet facet)
           
 void setAssociatedSlot(Facet facet, Slot slot)
           
 void setAutoUpdateFacetValues(boolean b)
           
 void setBuildString(String s)
           
 void setChanged(boolean b)
           
 Object setClientInformation(Object key, Object value)
           
 void setDefaultClsMetaCls(Cls cls)
           
 void setDefaultFacetMetaCls(Cls cls)
           
 void setDefaultSlotMetaCls(Cls cls)
           
 void setDefaultValues(Frame frame, Collection values)
           
 Instance setDirectType(Instance instance, Cls type)
           
 void setDirectTypeOfSubclasses(Cls cls, Cls metaCls)
           
 void setDirectTypeOfSubslots(Slot slot, Cls cls)
           
 void setDocumentation(Frame frame, Collection docs)
           
 void setDocumentation(Frame frame, String doc)
           
 boolean setEventsEnabled(boolean enabled)
           
 void setFrameIDAllocator(FrameIDAllocator allocator)
           
 void setFrameNamePrefix(String prefix)
           
 void setInverseSlot(Slot slot, Slot inverseSlot)
           
 void setLoading(boolean loading)
           
 void setMaximumCardinality(Slot slot, int max)
           
 void setMaximumValue(Slot slot, Number min)
           
 void setMinimumCardinality(Slot slot, int min)
           
 void setMinimumValue(Slot slot, Number min)
           
 void setName(String name)
           
 void setNextFrameNumber(int i)
           
 void setOwnSlotValue(Frame frame, Slot slot, Object value)
           
 void setOwnSlotValues(Frame frame, Slot slot, Collection values)
           
 void setProject(Project project)
           
 void setSlotValueFacetChecking(boolean b)
          Checks every call that changes an own slot value that the new value is consistent with all facets.
 void setStorage(Storage storage)
           
 void setTemplateFacetValue(Cls cls, Slot slot, Facet facet, Object value)
           
 void setTemplateFacetValues(Cls cls, Slot slot, Facet facet, Collection values)
           
 void setTemplateSlotAllowedClses(Cls cls, Slot slot, Collection clses)
           
 void setTemplateSlotAllowedParents(Cls cls, Slot slot, Collection clses)
           
 void setTemplateSlotAllowedValues(Cls cls, Slot slot, Collection values)
           
 void setTemplateSlotAllowsMultipleValues(Cls cls, Slot slot, boolean allowed)
           
 void setTemplateSlotDefaultValues(Cls cls, Slot slot, Collection values)
           
 void setTemplateSlotDocumentation(Cls cls, Slot slot, Collection doc)
           
 void setTemplateSlotDocumentation(Cls cls, Slot slot, String doc)
           
 void setTemplateSlotMaximumCardinality(Cls cls, Slot slot, int max)
           
 void setTemplateSlotMaximumValue(Cls cls, Slot slot, Number value)
           
 void setTemplateSlotMinimumCardinality(Cls cls, Slot slot, int min)
           
 void setTemplateSlotMinimumValue(Cls cls, Slot slot, Number value)
           
 void setTemplateSlotValue(Cls cls, Slot slot, Object value)
           
 void setTemplateSlotValues(Cls cls, Slot slot, Collection values)
           
 void setTemplateSlotValueType(Cls cls, Slot slot, ValueType type)
           
 void setUserName(String name)
           
 void setValueChecking(boolean b)
          Deprecated. Instead use eiter setSlotValueFacetChecking or setSlotValueTypeChecking
 void setValues(Slot slot, Collection values)
           
 void setValueType(Slot slot, ValueType valueType)
           
 void setValueTypeFacetValues(Cls cls, Slot slot, Collection values)
           
 void setValueTypeOwnSlotValues(Slot slot, Collection values)
           
 void setVersionString(String s)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultKnowledgeBase

public DefaultKnowledgeBase(KnowledgeBaseFactory factory)
Method Detail

addClsListener

public void addClsListener(Cls cls,
                           ClsListener listener)

addDirectSuperclass

public void addDirectSuperclass(Cls child,
                                Cls parent)

addDirectSuperslot

public void addDirectSuperslot(Slot slot,
                               Slot superslot)

addDirectTemplateSlot

public void addDirectTemplateSlot(Cls cls,
                                  Slot slot)

addFacetListener

public void addFacetListener(Facet facet,
                             FacetListener listener)

addFrameListener

public void addFrameListener(Frame frame,
                             FrameListener listener)

addInstance

protected void addInstance(Instance instance,
                           String name,
                           Cls type,
                           boolean isNew)

addInstanceListener

public void addInstanceListener(Instance instance,
                                InstanceListener listener)

addJavaLoadPackage

public void addJavaLoadPackage(String packageName)
Description copied from interface: KnowledgeBase
This method requires some background information. When Protege wants to create a simple instance in the kb it creates an instance of the java class "DefaultSimpleInstance". Programmers can subclass this class and give the subclass the name of a class in the kb. Then when protege wants to create an instance of the class in the kb it will instead make an instance of the programmers java class rather than DefaultSimpleInstance. In order for this to work the user must specify the package that their java class appears in. (The class file must also be in the plugins directory.) For example, consider a protege project with a class A. Now a programmer creates a subclass of model.DefaultSimpleInstance and calls it org.me.A. He puts this .class file in the plugins/org/me directory. (Presumably he creates the subclass this in order to add additional methods onto org.me.A to provide some sort of desired functionality. The desired behavior is that when the user creates an instance of the kb class A that the system will create an instance of org.me.A and put it in the kb. Then when the programmer queries the kb for "get me instances of A" he will get back instances which can be cast to org.me.A. So, what this method does is to tell the system what package to search to find the java class to create. When the system creates an instance of A it searches all the packages, in order, to find a java class with the name .A. If it finds one then it uses it to create an instance. If it doesn't find any matches then it creates an instance of DefaultSimpleInstance.
Specified by:
addJavaLoadPackage in interface KnowledgeBase

addKnowledgeBaseListener

public void addKnowledgeBaseListener(KnowledgeBaseListener listener)
Specified by:
addKnowledgeBaseListener in interface KnowledgeBase

addOwnSlotValue

public void addOwnSlotValue(Frame frame,
                            Slot slot,
                            Object value)

addOwnSlotValue

public void addOwnSlotValue(Frame frame,
                            Slot slot,
                            Object value,
                            int index)

addSlotListener

public void addSlotListener(Slot slot,
                            SlotListener listener)

addTemplateFacetValue

public void addTemplateFacetValue(Cls cls,
                                  Slot slot,
                                  Facet facet,
                                  Object value)

addTemplateFacetValue

public void addTemplateFacetValue(Cls cls,
                                  Slot slot,
                                  Facet facet,
                                  Object value,
                                  int index)

addTemplateSlotValue

public void addTemplateSlotValue(Cls cls,
                                 Slot slot,
                                 Object value)

allocateFrameID

public FrameID allocateFrameID()

areValidOwnSlotValues

public boolean areValidOwnSlotValues(Frame frame,
                                     Slot slot,
                                     Collection values)
Specified by:
areValidOwnSlotValues in interface KnowledgeBase

beginTransaction

public boolean beginTransaction()

changeFrameName

public void changeFrameName(Frame frame,
                            String newName)
Specified by:
changeFrameName in interface KnowledgeBase

containsFrame

public boolean containsFrame(String name)
Specified by:
containsFrame in interface KnowledgeBase

createCls

public Cls createCls(String name,
                     Collection directSuperclasses)
Specified by:
createCls in interface KnowledgeBase

createCls

public Cls createCls(String name,
                     Collection parents,
                     Cls metaCls)
Specified by:
createCls in interface KnowledgeBase

createCls

public Cls createCls(String name,
                     Collection parents,
                     Cls metaCls,
                     boolean isNew)
Specified by:
createCls in interface KnowledgeBase

createFacet

public Facet createFacet(String name)
Specified by:
createFacet in interface KnowledgeBase

createFacet

public Facet createFacet(String name,
                         Cls metaCls)
Specified by:
createFacet in interface KnowledgeBase

createFacet

public Facet createFacet(String name,
                         Cls metaCls,
                         boolean isNew)
Specified by:
createFacet in interface KnowledgeBase

createInstance

public Instance createInstance(String name,
                               Cls cls)
Specified by:
createInstance in interface KnowledgeBase

createInstance

public Instance createInstance(String name,
                               Cls cls,
                               boolean isNew)
Specified by:
createInstance in interface KnowledgeBase

createSimpleInstance

public Instance createSimpleInstance(String name,
                                     Cls cls)

createSimpleInstance

public Instance createSimpleInstance(String name,
                                     Cls cls,
                                     boolean isNew)

createSlot

public Slot createSlot(String name)
Specified by:
createSlot in interface KnowledgeBase

createSlot

public Slot createSlot(String name,
                       Cls metaCls)
Specified by:
createSlot in interface KnowledgeBase

createSlot

public Slot createSlot(String name,
                       Cls metaCls,
                       Collection superslots,
                       boolean isNew)
Specified by:
createSlot in interface KnowledgeBase

createSlot

public Slot createSlot(String name,
                       Cls metaCls,
                       boolean isNew)
Specified by:
createSlot in interface KnowledgeBase

createUniqueFrameName

public String createUniqueFrameName(String name)
Specified by:
createUniqueFrameName in interface KnowledgeBase

deleteCls

public void deleteCls(Cls cls)
Specified by:
deleteCls in interface KnowledgeBase

deleteFacet

public void deleteFacet(Facet facet)
Specified by:
deleteFacet in interface KnowledgeBase

deleteFrame

public void deleteFrame(Frame frame)
Specified by:
deleteFrame in interface KnowledgeBase

deleteInstance

public void deleteInstance(Instance instance)
Specified by:
deleteInstance in interface KnowledgeBase

deleteSimpleInstance

public void deleteSimpleInstance(SimpleInstance instance)

deleteSlot

public void deleteSlot(Slot slot)
Specified by:
deleteSlot in interface KnowledgeBase

dispose

public void dispose()
Specified by:
dispose in interface Disposable

endTransaction

public boolean endTransaction(boolean doCommit)

finalize

public void finalize()
Overrides:
finalize in class Object

getAllowedClses

public Collection getAllowedClses(Slot slot)

getAllowedParents

public Collection getAllowedParents(Slot slot)

getAllowedValues

public Collection getAllowedValues(Slot slot)

getAllowsMultipleValues

public boolean getAllowsMultipleValues(Slot slot)

getAssociatedFacet

public Facet getAssociatedFacet(Slot slot)

getAssociatedSlot

public Slot getAssociatedSlot(Facet facet)

getBrowserText

public String getBrowserText(Instance instance)

getBuildString

public String getBuildString()
Description copied from interface: KnowledgeBase
Returns a string that contains something like "build 840" that refers to the build of Protege in use when this kb was last saved. This string format is not reliable and may change.
Specified by:
getBuildString in interface KnowledgeBase

getClientInformation

public Object getClientInformation(Object key)
Description copied from interface: KnowledgeBase
Allows a programmer to hang arbitrary information on a kb and retrieve it later. This information is not persistent. Since all programmers share the same "client information space" we recommend that your "key" be your java.lang.Class object. If you want to store more than one piece of information then you can make your value a set (or a map). Thus the common usage would be:
 
         Map myGoodStuff = new HashMap();
      myGoodStuff.put("foo", "bar");
       kb.setClientInformation(myClass.class, myGoodStuff);
        // ... later
       Map myGoodStuff = (Map) kb.getClientInformation(myClass.class);
 
Widget writers typically don't need this sort of thing but backend authors do because one instance of the backend may need to communicate information to another instance (the loader to the storer, for example). This is very similar to the "client property" feature on javax.swing.JComponent or the client information on MS Windows windows and it exists for the same reasons. It allows you to store anything you want.
Specified by:
getClientInformation in interface KnowledgeBase

getCls

public Cls getCls(String name)
Specified by:
getCls in interface KnowledgeBase

getClsCount

public int getClsCount()
Specified by:
getClsCount in interface KnowledgeBase

getClses

public Collection getClses()
Specified by:
getClses in interface KnowledgeBase

getClsNameMatches

public Collection getClsNameMatches(String s,
                                    int maxMatches)
Description copied from interface: KnowledgeBase
Not a regexp. Allows "*" for "match any sequence" at the begining or end. Case-sensitivity is screwy. For systems with all of the information in memory (text files) then the search is case-insensitive. For database backend systems then the case-sensitivity is determined by the case-sensitivety of searching in the database. This means that mySQL and MS Access provide case-insensitive searchs while Oracle provides case-sensitive searches. This different behavior is less than ideal and will be dealt with someday.
Specified by:
getClsNameMatches in interface KnowledgeBase

getDefaultClsMetaCls

public Cls getDefaultClsMetaCls()
Specified by:
getDefaultClsMetaCls in interface KnowledgeBase

getDefaultFacetMetaCls

public Cls getDefaultFacetMetaCls()
Specified by:
getDefaultFacetMetaCls in interface KnowledgeBase

getDefaultSlotMetaCls

public Cls getDefaultSlotMetaCls()
Specified by:
getDefaultSlotMetaCls in interface KnowledgeBase

getDefaultValues

public Collection getDefaultValues(Frame frame)

getDefaultValuesFacet

public Facet getDefaultValuesFacet()

getDefaultValuesSlot

public Slot getDefaultValuesSlot()

getDirectInstanceCount

public int getDirectInstanceCount(Cls type)

getDirectInstances

public Collection getDirectInstances(Cls type)

getDirectInstancesSlot

public Slot getDirectInstancesSlot()

getDirectSubclassCount

public int getDirectSubclassCount(Cls parent)

getDirectSubclasses

public Collection getDirectSubclasses(Cls parent)

getDirectSubclassesSlot

public Slot getDirectSubclassesSlot()

getDirectSubslotCount

public int getDirectSubslotCount(Slot slot)

getDirectSubslots

public Collection getDirectSubslots(Slot slot)

getDirectSuperclassCount

public int getDirectSuperclassCount(Cls cls)

getDirectSuperclasses

public Collection getDirectSuperclasses(Cls cls)

getDirectSuperclassesSlot

public Slot getDirectSuperclassesSlot()

getDirectSuperslotCount

public int getDirectSuperslotCount(Slot slot)

getDirectSuperslots

public Collection getDirectSuperslots(Slot slot)

getDirectTemplateFacetValues

public Collection getDirectTemplateFacetValues(Cls cls,
                                               Slot slot,
                                               Facet facet)

getDirectTemplateSlots

public Collection getDirectTemplateSlots(Cls cls)

getDirectTemplateSlotsSlot

public Slot getDirectTemplateSlotsSlot()

getDirectTemplateSlotValues

public Collection getDirectTemplateSlotValues(Cls cls,
                                              Slot slot)

getDirectType

public Cls getDirectType(Instance instance)

getDirectTypeSlot

public Slot getDirectTypeSlot()

getDocumentation

public Collection getDocumentation(Frame frame)

getFacet

public Facet getFacet(String name)
Specified by:
getFacet in interface KnowledgeBase

getFacetCount

public int getFacetCount()
Specified by:
getFacetCount in interface KnowledgeBase

getFacets

public Collection getFacets()
Specified by:
getFacets in interface KnowledgeBase

getFrame

public Frame getFrame(FrameID id)

getFrame

public Frame getFrame(String name)
Specified by:
getFrame in interface KnowledgeBase

getFrameCount

public int getFrameCount()
Specified by:
getFrameCount in interface KnowledgeBase

getFrameCreationTimestamp

public String getFrameCreationTimestamp(Frame frame)
Specified by:
getFrameCreationTimestamp in interface KnowledgeBase

getFrameCreator

public String getFrameCreator(Frame frame)
Specified by:
getFrameCreator in interface KnowledgeBase

getFrameLastModificationTimestamp

public String getFrameLastModificationTimestamp(Frame frame)
Specified by:
getFrameLastModificationTimestamp in interface KnowledgeBase

getFrameLastModifier

public String getFrameLastModifier(Frame frame)
Specified by:
getFrameLastModifier in interface KnowledgeBase

getFrameNameMatches

public Collection getFrameNameMatches(String s,
                                      int maxMatches)
Specified by:
getFrameNameMatches in interface KnowledgeBase

getFrameNamePrefix

public String getFrameNamePrefix()
Specified by:
getFrameNamePrefix in interface KnowledgeBase

getFrames

public Collection getFrames()
Specified by:
getFrames in interface KnowledgeBase

getInstance

public Instance getInstance(String name)
Specified by:
getInstance in interface KnowledgeBase

getInstanceCount

public int getInstanceCount(Cls type)

getInstances

public Collection getInstances()
Specified by:
getInstances in interface KnowledgeBase

getInstances

public Collection getInstances(Cls type)
Specified by:
getInstances in interface KnowledgeBase

getInvalidOwnSlotValuesText

public String getInvalidOwnSlotValuesText(Frame frame,
                                          Slot slot,
                                          Collection values)
Specified by:
getInvalidOwnSlotValuesText in interface KnowledgeBase

getInvalidOwnSlotValueText

public String getInvalidOwnSlotValueText(Frame frame,
                                         Slot slot,
                                         Object value)
Specified by:
getInvalidOwnSlotValueText in interface KnowledgeBase

getInverseSlot

public Slot getInverseSlot(Slot slot)

getKnowledgeBaseFactory

public KnowledgeBaseFactory getKnowledgeBaseFactory()
Specified by:
getKnowledgeBaseFactory in interface KnowledgeBase

getMatchingFrames

public Collection getMatchingFrames(Slot slot,
                                    Facet facet,
                                    boolean isTemplate,
                                    String s,
                                    int nMatches)
Specified by:
getMatchingFrames in interface KnowledgeBase

getMaximumCardinality

public int getMaximumCardinality(Slot slot)

getMaximumValue

public Number getMaximumValue(Slot slot)

getMinimumCardinality

public int getMinimumCardinality(Slot slot)

getMinimumValue

public Number getMinimumValue(Slot slot)

getName

public String getName()
Specified by:
getName in interface KnowledgeBase

getName

public String getName(Frame frame)

getNameSlot

public Slot getNameSlot()

getNextFrameNumber

public int getNextFrameNumber()
Specified by:
getNextFrameNumber in interface KnowledgeBase

getOwnSlotAllowsMultipleValues

public boolean getOwnSlotAllowsMultipleValues(Frame frame,
                                              Slot slot)

getOwnSlotAndSubslotValues

public Collection getOwnSlotAndSubslotValues(Frame frame,
                                             Slot slot)

getOwnSlotDefaultValues

public Collection getOwnSlotDefaultValues(Frame frame,
                                          Slot slot)

getOwnSlotFacets

public Collection getOwnSlotFacets(Frame frame,
                                   Slot slot)

getOwnSlotFacetValues

public Collection getOwnSlotFacetValues(Frame frame,
                                        Slot slot,
                                        Facet facet)

getOwnSlots

public Collection getOwnSlots(Frame frame)

getOwnSlotValue

public Object getOwnSlotValue(Frame frame,
                              Slot slot)

getOwnSlotValueCount

public int getOwnSlotValueCount(Frame frame,
                                Slot slot)

getOwnSlotValues

public Collection getOwnSlotValues(Frame frame,
                                   Slot slot)

getOwnSlotValueType

public ValueType getOwnSlotValueType(Frame frame,
                                     Slot slot)

getProject

public Project getProject()
Specified by:
getProject in interface KnowledgeBase

getReachableSimpleInstances

public Collection getReachableSimpleInstances(Collection roots)
Specified by:
getReachableSimpleInstances in interface KnowledgeBase

getReferences

public Collection getReferences(Object o,
                                int maxReferences)
Specified by:
getReferences in interface KnowledgeBase

getRootCls

public Cls getRootCls()
Specified by:
getRootCls in interface KnowledgeBase

getRootClses

public Collection getRootClses()
Description copied from interface: KnowledgeBase
A convenience method that returns ":THING" wrapped in a collection.
Specified by:
getRootClses in interface KnowledgeBase

getRootClsMetaCls

public Cls getRootClsMetaCls()
Specified by:
getRootClsMetaCls in interface KnowledgeBase

getRootFacetMetaCls

public Cls getRootFacetMetaCls()
Specified by:
getRootFacetMetaCls in interface KnowledgeBase

getRootSlotMetaCls

public Cls getRootSlotMetaCls()
Specified by:
getRootSlotMetaCls in interface KnowledgeBase

getRootSlots

public Collection getRootSlots()
Specified by:
getRootSlots in interface KnowledgeBase

getSlot

public Slot getSlot(String name)
Specified by:
getSlot in interface KnowledgeBase

getSlotCount

public int getSlotCount()
Specified by:
getSlotCount in interface KnowledgeBase

getSlots

public Collection getSlots()
Specified by:
getSlots in interface KnowledgeBase

getSlotValueLastModificationTimestamp

public String getSlotValueLastModificationTimestamp(Frame frame,
                                                    Slot slot,
                                                    boolean isTemplate)
Specified by:
getSlotValueLastModificationTimestamp in interface KnowledgeBase

getSlotValueLastModifier

public String getSlotValueLastModifier(Frame frame,
                                       Slot slot,
                                       boolean isTemplate)
Specified by:
getSlotValueLastModifier in interface KnowledgeBase

getStorage

public Storage getStorage()

getSubclassCount

public int getSubclassCount(Cls parent)

getSubclasses

public Collection getSubclasses(Cls parent)
Specified by:
getSubclasses in interface KnowledgeBase

getSubslots

public Collection getSubslots(Slot slot)

getSuperclassCount

public int getSuperclassCount(Cls child)

getSuperclasses

public Collection getSuperclasses(Cls child)

getSuperslots

public Collection getSuperslots(Slot slot)

getTemplateFacets

public Collection getTemplateFacets(Cls cls,
                                    Slot slot)

getTemplateFacetValue

public Object getTemplateFacetValue(Cls cls,
                                    Slot slot,
                                    Facet facet)

getTemplateFacetValues

public Collection getTemplateFacetValues(Cls cls,
                                         Slot slot,
                                         Facet facet)

getTemplateSlotAllowedClses

public Collection getTemplateSlotAllowedClses(Cls cls,
                                              Slot slot)

getTemplateSlotAllowedParents

public Collection getTemplateSlotAllowedParents(Cls cls,
                                                Slot slot)

getTemplateSlotAllowedValues

public Collection getTemplateSlotAllowedValues(Cls cls,
                                               Slot slot)

getTemplateSlotAllowsMultipleValues

public boolean getTemplateSlotAllowsMultipleValues(Cls cls,
                                                   Slot slot)

getTemplateSlotClses

public Collection getTemplateSlotClses(Slot slot)

getTemplateSlotDefaultValues

public Collection getTemplateSlotDefaultValues(Cls cls,
                                               Slot slot)

getTemplateSlotDocumentation

public Collection getTemplateSlotDocumentation(Cls cls,
                                               Slot slot)

getTemplateSlotMaximumCardinality

public int getTemplateSlotMaximumCardinality(Cls cls,
                                             Slot slot)

getTemplateSlotMaximumValue

public Number getTemplateSlotMaximumValue(Cls cls,
                                          Slot slot)

getTemplateSlotMinimumCardinality

public int getTemplateSlotMinimumCardinality(Cls cls,
                                             Slot slot)

getTemplateSlotMinimumValue

public Number getTemplateSlotMinimumValue(Cls cls,
                                          Slot slot)

getTemplateSlots

public Collection getTemplateSlots(Cls cls)

getTemplateSlotValue

public Object getTemplateSlotValue(Cls cls,
                                   Slot slot)

getTemplateSlotValues

public Collection getTemplateSlotValues(Cls cls,
                                        Slot slot)

getTemplateSlotValueType

public ValueType getTemplateSlotValueType(Cls cls,
                                          Slot slot)

getUnreachableSimpleInstances

public Collection getUnreachableSimpleInstances(Collection roots)
Specified by:
getUnreachableSimpleInstances in interface KnowledgeBase

getUserName

public String getUserName()
Specified by:
getUserName in interface KnowledgeBase

getValues

public Collection getValues(Slot slot)

getValuesFacet

public Facet getValuesFacet()

getValuesSlot

public Slot getValuesSlot()

getValueType

public ValueType getValueType(Slot slot)

getVersionString

public String getVersionString()
Specified by:
getVersionString in interface KnowledgeBase

getVersionString

public String getVersionString(String s)

hasChanged

public boolean hasChanged()
Specified by:
hasChanged in interface KnowledgeBase

hasDirectlyOverriddenTemplateFacet

public boolean hasDirectlyOverriddenTemplateFacet(Cls cls,
                                                  Slot slot,
                                                  Facet facet)

hasDirectlyOverriddenTemplateSlot

public boolean hasDirectlyOverriddenTemplateSlot(Cls cls,
                                                 Slot slot)

hasDirectSubclass

public boolean hasDirectSubclass(Cls parent,
                                 Cls child)

hasDirectSuperclass

public boolean hasDirectSuperclass(Cls child,
                                   Cls parent)

hasDirectTemplateSlot

public boolean hasDirectTemplateSlot(Cls cls,
                                     Slot slot)

hasDirectType

public boolean hasDirectType(Instance instance,
                             Cls type)

hasInheritedTemplateSlot

public boolean hasInheritedTemplateSlot(Cls cls,
                                        Slot slot)

hasOverriddenTemplateFacet

public boolean hasOverriddenTemplateFacet(Cls cls,
                                          Slot slot,
                                          Facet facet)

hasOverriddenTemplateSlot

public boolean hasOverriddenTemplateSlot(Cls cls,
                                         Slot slot)

hasOwnSlot

public boolean hasOwnSlot(Frame frame,
                          Slot slot)

hasSlotValueAtSomeFrame

public boolean hasSlotValueAtSomeFrame(Slot slot)

hasSubclass

public boolean hasSubclass(Cls parent,
                           Cls child)

hasSuperclass

public boolean hasSuperclass(Cls child,
                             Cls superclass)

hasTemplateFacet

public boolean hasTemplateFacet(Cls cls,
                                Slot slot,
                                Facet facet)

hasTemplateSlot

public boolean hasTemplateSlot(Cls cls,
                               Slot slot)

hasType

public boolean hasType(Instance instance,
                       Cls type)

isAbstract

public boolean isAbstract(Cls cls)

isAutoUpdatingFacetValues

public boolean isAutoUpdatingFacetValues()
Specified by:
isAutoUpdatingFacetValues in interface KnowledgeBase

isClsMetaCls

public boolean isClsMetaCls(Cls cls)
Specified by:
isClsMetaCls in interface KnowledgeBase

isDefaultClsMetaCls

public boolean isDefaultClsMetaCls(Cls cls)
Specified by:
isDefaultClsMetaCls in interface KnowledgeBase

isDefaultFacetMetaCls

public boolean isDefaultFacetMetaCls(Cls cls)
Specified by:
isDefaultFacetMetaCls in interface KnowledgeBase

isDefaultSlotMetaCls

public boolean isDefaultSlotMetaCls(Cls cls)
Specified by:
isDefaultSlotMetaCls in interface KnowledgeBase

isFacetMetaCls

public boolean isFacetMetaCls(Cls cls)
Specified by:
isFacetMetaCls in interface KnowledgeBase

isLoading

public boolean isLoading()
Specified by:
isLoading in interface KnowledgeBase

isMetaCls

public boolean isMetaCls(Cls cls)

isSlotMetaCls

public boolean isSlotMetaCls(Cls cls)
Specified by:
isSlotMetaCls in interface KnowledgeBase

isValidOwnSlotValue

public boolean isValidOwnSlotValue(Frame frame,
                                   Slot slot,
                                   Object value)
Specified by:
isValidOwnSlotValue in interface KnowledgeBase

makeFrameManager

protected FrameManager makeFrameManager()

makeSimpleInstance

public Instance makeSimpleInstance(String clsName,
                                   FrameID id)
create an instance of the correct java class but do not put it in the kb

moveDirectSubclass

public void moveDirectSubclass(Cls parent,
                               Cls child,
                               Cls afterCls)

moveDirectSuperclass

public void moveDirectSuperclass(Cls child,
                                 Cls parent,
                                 Cls afterCls)

moveOwnSlotValue

public void moveOwnSlotValue(Frame frame,
                             Slot slot,
                             int fromIndex,
                             int toIndex)

moveTemplateFacetValue

public void moveTemplateFacetValue(Cls cls,
                                   Slot slot,
                                   Facet facet,
                                   int fromIndex,
                                   int toIndex)

newInstance

public Instance newInstance(String name,
                            Cls cls,
                            FrameID id,
                            boolean isNew)

notifyVisibilityChanged

public void notifyVisibilityChanged(Frame frame)

removeClsListener

public void removeClsListener(Cls cls,
                              ClsListener listener)

removeDirectSuperclass

public void removeDirectSuperclass(Cls child,
                                   Cls parent)

removeDirectSuperslot

public void removeDirectSuperslot(Slot slot,
                                  Slot superSlot)

removeDirectTemplateSlot

public void removeDirectTemplateSlot(Cls cls,
                                     Slot slot)

removeFacetListener

public void removeFacetListener(Facet facet,
                                FacetListener listener)

removeFrameListener

public void removeFrameListener(Frame frame,
                                FrameListener listener)

removeInstanceListener

public void removeInstanceListener(Instance instance,
                                   InstanceListener listener)

removeJavaLoadPackage

public void removeJavaLoadPackage(String packageName)
Specified by:
removeJavaLoadPackage in interface KnowledgeBase

removeKnowledgeBaseListener

public void removeKnowledgeBaseListener(KnowledgeBaseListener listener)
Specified by:
removeKnowledgeBaseListener in interface KnowledgeBase

removeOwnSlotValue

public void removeOwnSlotValue(Frame frame,
                               Slot slot,
                               Object value)
remove all occurances of value

removeSlotListener

public void removeSlotListener(Slot slot,
                               SlotListener listener)

removeTemplateFacetOverrides

public void removeTemplateFacetOverrides(Cls cls,
                                         Slot slot)

setAbstract

public void setAbstract(Cls cls,
                        boolean isAbstract)

setAllowedClses

public void setAllowedClses(Slot slot,
                            Collection clses)

setAllowedParents

public void setAllowedParents(Slot slot,
                              Collection parents)

setAllowedValues

public void setAllowedValues(Slot slot,
                             Collection values)

setAllowsMultipleValues

public void setAllowsMultipleValues(Slot slot,
                                    boolean b)

setAssociatedFacet

public void setAssociatedFacet(Slot slot,
                               Facet facet)

setAssociatedSlot

public void setAssociatedSlot(Facet facet,
                              Slot slot)

setAutoUpdateFacetValues

public void setAutoUpdateFacetValues(boolean b)
Specified by:
setAutoUpdateFacetValues in interface KnowledgeBase

setBuildString

public void setBuildString(String s)
Specified by:
setBuildString in interface KnowledgeBase

setChanged

public void setChanged(boolean b)
Specified by:
setChanged in interface KnowledgeBase

setClientInformation

public Object setClientInformation(Object key,
                                   Object value)
Specified by:
setClientInformation in interface KnowledgeBase

setDefaultClsMetaCls

public void setDefaultClsMetaCls(Cls cls)
Specified by:
setDefaultClsMetaCls in interface KnowledgeBase

setDefaultFacetMetaCls

public void setDefaultFacetMetaCls(Cls cls)
Specified by:
setDefaultFacetMetaCls in interface KnowledgeBase

setDefaultSlotMetaCls

public void setDefaultSlotMetaCls(Cls cls)
Specified by:
setDefaultSlotMetaCls in interface KnowledgeBase

setDefaultValues

public void setDefaultValues(Frame frame,
                             Collection values)

setDirectType

public Instance setDirectType(Instance instance,
                              Cls type)

setDirectTypeOfSubclasses

public void setDirectTypeOfSubclasses(Cls cls,
                                      Cls metaCls)

setDirectTypeOfSubslots

public void setDirectTypeOfSubslots(Slot slot,
                                    Cls cls)

setDocumentation

public void setDocumentation(Frame frame,
                             String doc)

setDocumentation

public void setDocumentation(Frame frame,
                             Collection docs)

setEventsEnabled

public boolean setEventsEnabled(boolean enabled)
Specified by:
setEventsEnabled in interface KnowledgeBase

setFrameIDAllocator

public void setFrameIDAllocator(FrameIDAllocator allocator)

setFrameNamePrefix

public void setFrameNamePrefix(String prefix)
Specified by:
setFrameNamePrefix in interface KnowledgeBase

setInverseSlot

public void setInverseSlot(Slot slot,
                           Slot inverseSlot)

setLoading

public void setLoading(boolean loading)
Specified by:
setLoading in interface KnowledgeBase

setMaximumCardinality

public void setMaximumCardinality(Slot slot,
                                  int max)

setMaximumValue

public void setMaximumValue(Slot slot,
                            Number min)

setMinimumCardinality

public void setMinimumCardinality(Slot slot,
                                  int min)

setMinimumValue

public void setMinimumValue(Slot slot,
                            Number min)

setName

public void setName(String name)
Specified by:
setName in interface KnowledgeBase

setNextFrameNumber

public void setNextFrameNumber(int i)
Specified by:
setNextFrameNumber in interface KnowledgeBase

setOwnSlotValue

public void setOwnSlotValue(Frame frame,
                            Slot slot,
                            Object value)

setOwnSlotValues

public void setOwnSlotValues(Frame frame,
                             Slot slot,
                             Collection values)

setProject

public void setProject(Project project)
Specified by:
setProject in interface KnowledgeBase

setSlotValueFacetChecking

public void setSlotValueFacetChecking(boolean b)
Checks every call that changes an own slot value that the new value is consistent with all facets. This checking is disabled by default. It can significately slow down the system but is useful for tracking down bugs in code that calls the api (both system and user code).

setStorage

public void setStorage(Storage storage)

setTemplateFacetValue

public void setTemplateFacetValue(Cls cls,
                                  Slot slot,
                                  Facet facet,
                                  Object value)

setTemplateFacetValues

public void setTemplateFacetValues(Cls cls,
                                   Slot slot,
                                   Facet facet,
                                   Collection values)

setTemplateSlotAllowedClses

public void setTemplateSlotAllowedClses(Cls cls,
                                        Slot slot,
                                        Collection clses)

setTemplateSlotAllowedParents

public void setTemplateSlotAllowedParents(Cls cls,
                                          Slot slot,
                                          Collection clses)

setTemplateSlotAllowedValues

public void setTemplateSlotAllowedValues(Cls cls,
                                         Slot slot,
                                         Collection values)

setTemplateSlotAllowsMultipleValues

public void setTemplateSlotAllowsMultipleValues(Cls cls,
                                                Slot slot,
                                                boolean allowed)

setTemplateSlotDefaultValues

public void setTemplateSlotDefaultValues(Cls cls,
                                         Slot slot,
                                         Collection values)

setTemplateSlotDocumentation

public void setTemplateSlotDocumentation(Cls cls,
                                         Slot slot,
                                         String doc)

setTemplateSlotDocumentation

public void setTemplateSlotDocumentation(Cls cls,
                                         Slot slot,
                                         Collection doc)

setTemplateSlotMaximumCardinality

public void setTemplateSlotMaximumCardinality(Cls cls,
                                              Slot slot,
                                              int max)

setTemplateSlotMaximumValue

public void setTemplateSlotMaximumValue(Cls cls,
                                        Slot slot,
                                        Number value)

setTemplateSlotMinimumCardinality

public void setTemplateSlotMinimumCardinality(Cls cls,
                                              Slot slot,
                                              int min)

setTemplateSlotMinimumValue

public void setTemplateSlotMinimumValue(Cls cls,
                                        Slot slot,
                                        Number value)

setTemplateSlotValue

public void setTemplateSlotValue(Cls cls,
                                 Slot slot,
                                 Object value)

setTemplateSlotValues

public void setTemplateSlotValues(Cls cls,
                                  Slot slot,
                                  Collection values)

setTemplateSlotValueType

public void setTemplateSlotValueType(Cls cls,
                                     Slot slot,
                                     ValueType type)

setUserName

public void setUserName(String name)
Specified by:
setUserName in interface KnowledgeBase

setValueChecking

public void setValueChecking(boolean b)
Deprecated. Instead use eiter setSlotValueFacetChecking or setSlotValueTypeChecking

Specified by:
setValueChecking in interface KnowledgeBase

setValues

public void setValues(Slot slot,
                      Collection values)

setValueType

public void setValueType(Slot slot,
                         ValueType valueType)

setValueTypeFacetValues

public void setValueTypeFacetValues(Cls cls,
                                    Slot slot,
                                    Collection values)

setValueTypeOwnSlotValues

public void setValueTypeOwnSlotValues(Slot slot,
                                      Collection values)

setVersionString

public void setVersionString(String s)
Specified by:
setVersionString in interface KnowledgeBase

toString

public String toString()
Overrides:
toString in class Object

Protege-2000 1.7

Submit a bug report or feature request
Protege-2000 is a trademark of Stanford University.
Copyright (c) 1998-2002 Stanford University.