|
Protege 3.5 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.smi.protege.model.DefaultKnowledgeBase
public class DefaultKnowledgeBase
Default implementation of the KnowledgeBase interface. Delegates almost everything to the FrameStore chain. Implements wrapper methods for some calls to make the interface easier to use.
Field Summary | |
---|---|
static String |
SERVER_PROCESS_USER
|
Fields inherited from interface edu.stanford.smi.protege.model.KnowledgeBase |
---|
MAXIMUM_CARDINALITY_UNBOUNDED, UNLIMITED_MATCHES |
Constructor Summary | |
---|---|
DefaultKnowledgeBase()
|
|
DefaultKnowledgeBase(KnowledgeBaseFactory factory)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String SERVER_PROCESS_USER
Constructor Detail |
---|
public DefaultKnowledgeBase(KnowledgeBaseFactory factory)
public DefaultKnowledgeBase()
Method Detail |
---|
protected SystemFrames createSystemFrames()
protected FrameFactory createFrameFactory()
protected FrameStoreManager createFrameStoreManager()
public FrameStoreManager getFrameStoreManager()
getFrameStoreManager
in interface KnowledgeBase
public FrameStore getHeadFrameStore()
public SystemFrames getSystemFrames()
getSystemFrames
in interface KnowledgeBase
public FrameFactory getFrameFactory()
getFrameFactory
in interface KnowledgeBase
public void close()
public boolean setCleanDispatchEnabled(boolean b)
setCleanDispatchEnabled
in interface KnowledgeBase
public boolean setArgumentCheckingEnabled(boolean b)
setArgumentCheckingEnabled
in interface KnowledgeBase
public boolean isJournalingEnabled()
isJournalingEnabled
in interface KnowledgeBase
public boolean isCallCachingEnabled()
isCallCachingEnabled
in interface KnowledgeBase
public boolean setJournalingEnabled(boolean b)
setJournalingEnabled
in interface KnowledgeBase
public boolean setUndoEnabled(boolean b)
setUndoEnabled
in interface KnowledgeBase
public boolean setEventDispatchEnabled(boolean b)
public boolean setCallCachingEnabled(boolean b)
setCallCachingEnabled
in interface KnowledgeBase
public boolean setGenerateEventsEnabled(boolean b)
setGenerateEventsEnabled
in interface KnowledgeBase
public boolean isUndoEnabled()
isUndoEnabled
in interface KnowledgeBase
public void flushEvents() throws ProtegeException
flushEvents
in interface KnowledgeBase
ProtegeException
public List getDirectOwnSlotValues(Frame frame, Slot slot)
getDirectOwnSlotValues
in interface KnowledgeBase
public Cls createCls(String name, Collection directSuperclasses, Collection directTypes, boolean loadDefaults)
public Cls createCls(FrameID id, Collection directSuperclasses, Collection directTypes, boolean loadDefaults)
createCls
in interface KnowledgeBase
id
- Pass null to cause the system to generate an idpublic Slot createSlot(String name, Cls directType, Collection superslots, boolean loadDefaults)
createSlot
in interface KnowledgeBase
name
- Pass null to cause the system to generate a namepublic Slot createSlot(FrameID id, Collection directTypes, Collection superslots, boolean loadDefaults)
public SimpleInstance createSimpleInstance(String name, Cls directType, boolean loadDefaults)
public SimpleInstance createSimpleInstance(FrameID id, Collection types, boolean loadDefaults)
createSimpleInstance
in interface KnowledgeBase
id
- Pass null to cause the system to generate an idpublic SimpleInstance createSimpleInstance(FrameID id, Cls directType, boolean loadDefaults)
public void setDirectOwnSlotValues(Frame frame, Slot slot, Collection values)
setDirectOwnSlotValues
in interface KnowledgeBase
public Frame getFrame(FrameID id)
getFrame
in interface KnowledgeBase
public Frame getFrame(String name)
getFrame
in interface KnowledgeBase
public Collection getOwnSlotValues(Frame frame, Slot slot)
getOwnSlotValues
in interface KnowledgeBase
public Object getDirectOwnSlotValue(Frame frame, Slot slot)
getDirectOwnSlotValue
in interface KnowledgeBase
public Collection<Slot> getOwnSlots(Frame frame)
getOwnSlots
in interface KnowledgeBase
public Collection getTemplateSlots(Cls cls)
getTemplateSlots
in interface KnowledgeBase
public Collection<Reference> getReferences(Frame frame)
public void deleteFrame(Frame frame)
deleteFrame
in interface KnowledgeBase
@Deprecated public boolean setEventsEnabled(boolean b)
setEventsEnabled
in interface KnowledgeBase
@Deprecated public boolean getEventsEnabled()
getEventsEnabled
in interface KnowledgeBase
public boolean getGenerateEventsEnabled()
getGenerateEventsEnabled
in interface KnowledgeBase
public boolean getDispatchEventsEnabled()
getDispatchEventsEnabled
in interface KnowledgeBase
public boolean setDispatchEventsEnabled(boolean b)
setDispatchEventsEnabled
in interface KnowledgeBase
public boolean setChangeMonitorEnabled(boolean b)
setChangeMonitorEnabled
in interface KnowledgeBase
public Cls getDirectType(Instance instance)
getDirectType
in interface KnowledgeBase
public Collection<Cls> getDirectSuperclasses(Cls cls)
getDirectSuperclasses
in interface KnowledgeBase
public String getName(Frame frame)
getName
in interface KnowledgeBase
public void addJavaLoadPackage(String packageName)
KnowledgeBase
addJavaLoadPackage
in interface KnowledgeBase
public boolean areValidOwnSlotValues(Frame frame, Slot slot, Collection values)
areValidOwnSlotValues
in interface KnowledgeBase
public boolean containsFrame(String name)
containsFrame
in interface KnowledgeBase
public Cls createCls(String name, Collection superclasses)
createCls
in interface KnowledgeBase
name
- Pass null to cause the system to generate a namepublic Cls createCls(String name, Collection superclasses, Cls directType)
createCls
in interface KnowledgeBase
name
- Pass null to cause the system to generate a namepublic Cls createCls(String name, Collection superclasses, Cls directType, boolean initializeDefaults)
createCls
in interface KnowledgeBase
name
- Pass null to cause the system to generate a namepublic Facet createFacet(String name)
createFacet
in interface KnowledgeBase
name
- Pass null to cause the system to generate a namepublic Facet createFacet(String name, Cls directType)
createFacet
in interface KnowledgeBase
name
- Pass null to cause the system to generate a namepublic Facet createFacet(String name, Cls directType, boolean initializeDefaults)
createFacet
in interface KnowledgeBase
name
- Pass null to cause the system to generate a namepublic Facet createFacet(FrameID id, Collection directTypes, boolean initializeDefaults)
public Instance createInstance(String name, Cls directType)
createInstance
in interface KnowledgeBase
name
- Pass null to cause the system to generate a namepublic Instance createInstance(String name, Collection directTypes)
createInstance
in interface KnowledgeBase
name
- Pass null to cause the system to generate a namepublic Instance createInstance(String name, Cls directType, boolean initializeDefaults)
createInstance
in interface KnowledgeBase
name
- Pass null to cause the system to generate a namepublic Instance createInstance(FrameID id, Cls directType, boolean initializeDefaults)
createInstance
in interface KnowledgeBase
id
- Pass null to cause the system to generate an idpublic Instance createInstance(FrameID id, Collection directTypes, boolean initializeDefaults)
createInstance
in interface KnowledgeBase
id
- Pass null to cause the system to generate an idpublic Slot createSlot(String name)
createSlot
in interface KnowledgeBase
name
- Pass null to cause the system to generate a namepublic Slot createSlot(String name, Cls directType)
createSlot
in interface KnowledgeBase
name
- Pass null to cause the system to generate a namepublic Slot createSlot(String name, Cls directType, boolean loadDefaults)
createSlot
in interface KnowledgeBase
name
- Pass null to cause the system to generate a name@Deprecated public String createUniqueFrameName(String name)
createUniqueFrameName
in interface KnowledgeBase
public void deleteCls(Cls cls)
deleteCls
in interface KnowledgeBase
public void deleteFacet(Facet facet)
deleteFacet
in interface KnowledgeBase
public void deleteInstance(Instance instance)
deleteInstance
in interface KnowledgeBase
public void deleteSimpleInstance(SimpleInstance simpleInstance)
public void deleteSlot(Slot slot)
deleteSlot
in interface KnowledgeBase
public String getBuildString()
KnowledgeBase
getBuildString
in interface KnowledgeBase
public Object getClientInformation(Object key)
KnowledgeBase
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.
getClientInformation
in interface KnowledgeBase
public Cls getCls(String name)
getCls
in interface KnowledgeBase
public int getClsCount()
getClsCount
in interface KnowledgeBase
public int getSimpleInstanceCount()
getSimpleInstanceCount
in interface KnowledgeBase
public Collection<Cls> getClses()
getClses
in interface KnowledgeBase
public Collection getClsNameMatches(String name, int maxMatches)
KnowledgeBase
getClsNameMatches
in interface KnowledgeBase
public Cls getDefaultClsMetaCls()
KnowledgeBase
getDefaultClsMetaCls
in interface KnowledgeBase
public Cls getDefaultFacetMetaCls()
getDefaultFacetMetaCls
in interface KnowledgeBase
public Cls getDefaultSlotMetaCls()
getDefaultSlotMetaCls
in interface KnowledgeBase
public Facet getFacet(String name)
getFacet
in interface KnowledgeBase
public int getFacetCount()
getFacetCount
in interface KnowledgeBase
public Collection getFacets()
getFacets
in interface KnowledgeBase
public int getFrameCount()
getFrameCount
in interface KnowledgeBase
public String getFrameCreationTimestamp(Frame frame)
getFrameCreationTimestamp
in interface KnowledgeBase
public String getFrameCreator(Frame frame)
getFrameCreator
in interface KnowledgeBase
public String getFrameLastModificationTimestamp(Frame frame)
getFrameLastModificationTimestamp
in interface KnowledgeBase
public String getFrameLastModifier(Frame frame)
getFrameLastModifier
in interface KnowledgeBase
public Collection<Frame> getFrameNameMatches(String name, int maxMatches)
getFrameNameMatches
in interface KnowledgeBase
public Collection getFramesWithValue(Slot slot, Facet facet, boolean isTemplate, Object value)
KnowledgeBase
getFramesWithValue
in interface KnowledgeBase
slot
- The slot to use. Must not be null.facet
- If null then the value parameter is a slot value. Otherwise it is a facet value.isTemplate
- If true then the return value is a template slot/facet value.value
- A value to match exactly. The type of the object can be one of those listed in the documentation
for Frame
public Set getFramesWithMatchingDirectOwnSlotValue(Slot slot, String value, int maxMatches)
public String getFrameNamePrefix()
getFrameNamePrefix
in interface KnowledgeBase
public Collection getFrames()
getFrames
in interface KnowledgeBase
public Instance getInstance(String name)
getInstance
in interface KnowledgeBase
public SimpleInstance getSimpleInstance(String name)
getSimpleInstance
in interface KnowledgeBase
public Collection<Instance> getInstances()
getInstances
in interface KnowledgeBase
@Deprecated public Collection<Instance> getInstances(Cls cls)
getInstances
in interface KnowledgeBase
public String getInvalidOwnSlotValuesText(Frame frame, Slot slot, Collection values)
getInvalidOwnSlotValuesText
in interface KnowledgeBase
public String getInvalidOwnSlotValueText(Frame frame, Slot slot, Object value)
getInvalidOwnSlotValueText
in interface KnowledgeBase
public KnowledgeBaseFactory getKnowledgeBaseFactory()
getKnowledgeBaseFactory
in interface KnowledgeBase
public Collection getMatchingFrames(Slot slot, Facet facet, boolean isTemplate, String value, int maxMatches)
KnowledgeBase
getMatchingFrames
in interface KnowledgeBase
slot
- The slot to use. Must not be null.facet
- If null then the matchString parameter is a slot value. Otherwise it is a facet value.isTemplate
- If true then the return value is a template slot/facet value.value
- The string to match on. The string can include wild cards. The matching is case insensitive.maxMatches
- maximum number of matches. Use -1 to get all matches. Be careful though. If the use
searches on "e" do you really want to return 1M frames?
public String getName()
getName
in interface KnowledgeBase
@Deprecated public int getNextFrameNumber()
getNextFrameNumber
in interface KnowledgeBase
public Project getProject()
getProject
in interface KnowledgeBase
public Collection getReachableSimpleInstances(Collection rootInstances)
getReachableSimpleInstances
in interface KnowledgeBase
public Collection getReferences(Object object, int maxRefs)
getReferences
in interface KnowledgeBase
public Collection<Reference> getMatchingReferences(String s, int maxRefs)
getMatchingReferences
in interface KnowledgeBase
public Collection<Cls> getClsesWithMatchingBrowserText(String s, Collection superclasses, int maxMatches)
getClsesWithMatchingBrowserText
in interface KnowledgeBase
public Cls getRootCls()
getRootCls
in interface KnowledgeBase
public Collection getRootClses()
getRootClses
in interface KnowledgeBase
public Cls getRootClsMetaCls()
getRootClsMetaCls
in interface KnowledgeBase
public Cls getRootFacetMetaCls()
getRootFacetMetaCls
in interface KnowledgeBase
public Cls getRootSlotMetaCls()
getRootSlotMetaCls
in interface KnowledgeBase
public Collection getRootSlots()
getRootSlots
in interface KnowledgeBase
public Slot getSlot(String name)
getSlot
in interface KnowledgeBase
public int getSlotCount()
getSlotCount
in interface KnowledgeBase
public Collection<Slot> getSlots()
getSlots
in interface KnowledgeBase
@Deprecated public String getSlotValueLastModificationTimestamp(Frame frame, Slot slot, boolean isTemplate)
getSlotValueLastModificationTimestamp
in interface KnowledgeBase
@Deprecated public String getSlotValueLastModifier(Frame frame, Slot slot, boolean isTemplate)
getSlotValueLastModifier
in interface KnowledgeBase
public Collection getSubclasses(Cls cls)
getSubclasses
in interface KnowledgeBase
public Collection getUnreachableSimpleInstances(Collection rootInstances)
getUnreachableSimpleInstances
in interface KnowledgeBase
public String getUserName()
getUserName
in interface KnowledgeBase
public String getVersionString()
getVersionString
in interface KnowledgeBase
public boolean hasChanged()
hasChanged
in interface KnowledgeBase
public boolean isAutoUpdatingFacetValues()
isAutoUpdatingFacetValues
in interface KnowledgeBase
public boolean isClsMetaCls(Cls cls)
isClsMetaCls
in interface KnowledgeBase
public static boolean equals(Object o1, Object o2)
public boolean isDefaultClsMetaCls(Cls cls)
isDefaultClsMetaCls
in interface KnowledgeBase
public boolean isDefaultFacetMetaCls(Cls cls)
isDefaultFacetMetaCls
in interface KnowledgeBase
public boolean isDefaultSlotMetaCls(Cls cls)
isDefaultSlotMetaCls
in interface KnowledgeBase
public boolean isFacetMetaCls(Cls cls)
isFacetMetaCls
in interface KnowledgeBase
public boolean isLoading()
isLoading
in interface KnowledgeBase
public boolean isSlotMetaCls(Cls cls)
isSlotMetaCls
in interface KnowledgeBase
public boolean isValidOwnSlotValue(Frame frame, Slot slot, Object value)
isValidOwnSlotValue
in interface KnowledgeBase
public void removeJavaLoadPackage(String packageName)
removeJavaLoadPackage
in interface KnowledgeBase
@Deprecated public void setAutoUpdateFacetValues(boolean autoUpdate)
setAutoUpdateFacetValues
in interface KnowledgeBase
public boolean setModificationRecordUpdatingEnabled(boolean enabled)
setModificationRecordUpdatingEnabled
in interface KnowledgeBase
public void setBuildString(String buildString)
setBuildString
in interface KnowledgeBase
public void setChanged(boolean changed)
setChanged
in interface KnowledgeBase
public Object setClientInformation(Object key, Object value)
setClientInformation
in interface KnowledgeBase
public void setDefaultClsMetaCls(Cls cls)
setDefaultClsMetaCls
in interface KnowledgeBase
public void setDefaultFacetMetaCls(Cls cls)
setDefaultFacetMetaCls
in interface KnowledgeBase
public void setDefaultSlotMetaCls(Cls cls)
setDefaultSlotMetaCls
in interface KnowledgeBase
public void setFrameNamePrefix(String prefix)
setFrameNamePrefix
in interface KnowledgeBase
public void setLoading(boolean loading)
public void setName(String name)
setName
in interface KnowledgeBase
@Deprecated public void setNextFrameNumber(int number)
setNextFrameNumber
in interface KnowledgeBase
public void setProject(Project project)
setProject
in interface KnowledgeBase
protected void adjustForClient()
protected void adjustForServer()
@Deprecated public void setValueChecking(boolean checking)
KnowledgeBase
setValueChecking
in interface KnowledgeBase
public boolean setFacetCheckingEnabled(boolean enabled)
setFacetCheckingEnabled
in interface KnowledgeBase
public void setVersionString(String versionString)
setVersionString
in interface KnowledgeBase
public void dispose()
dispose
in interface Disposable
public boolean isClosed()
isClosed
in interface KnowledgeBase
public Collection getReachableSimpleInstances(Frame frame)
@Deprecated public void addOwnSlotValue(Frame frame, Slot slot, Object value)
addOwnSlotValue
in interface KnowledgeBase
public Collection getDocumentation(Frame frame)
getDocumentation
in interface KnowledgeBase
public boolean getOwnSlotAllowsMultipleValues(Frame frame, Slot slot)
getOwnSlotAllowsMultipleValues
in interface KnowledgeBase
@Deprecated public Collection getOwnSlotAndSubslotValues(Frame frame, Slot slot)
getOwnSlotAndSubslotValues
in interface KnowledgeBase
public Collection getOwnSlotDefaultValues(Frame frame, Slot slot)
getOwnSlotDefaultValues
in interface KnowledgeBase
@Deprecated public Collection getOwnSlotFacets(Frame frame, Slot slot)
getOwnSlotFacets
in interface KnowledgeBase
@Deprecated public Collection getOwnSlotFacetValues(Frame frame, Slot slot, Facet facet)
getOwnSlotFacetValues
in interface KnowledgeBase
public Collection getOwnFacets(Frame frame, Slot slot)
public Collection getOwnFacetValues(Frame frame, Slot slot, Facet facet)
public Object getOwnSlotValue(Frame frame, Slot slot)
getOwnSlotValue
in interface KnowledgeBase
public int getOwnSlotValueCount(Frame frame, Slot slot)
getOwnSlotValueCount
in interface KnowledgeBase
public ValueType getOwnSlotValueType(Frame frame, Slot slot)
getOwnSlotValueType
in interface KnowledgeBase
public boolean hasOwnSlot(Frame frame, Slot slot)
hasOwnSlot
in interface KnowledgeBase
public void moveDirectOwnSlotValue(Frame frame, Slot slot, int from, int to)
moveDirectOwnSlotValue
in interface KnowledgeBase
@Deprecated public void removeOwnSlotValue(Frame frame, Slot slot, Object value)
removeOwnSlotValue
in interface KnowledgeBase
public void setDocumentation(Frame frame, String text)
setDocumentation
in interface KnowledgeBase
public void setDocumentation(Frame frame, Collection text)
setDocumentation
in interface KnowledgeBase
@Deprecated public void setOwnSlotValue(Frame frame, Slot slot, Object value)
public void setDirectOwnSlotValue(Frame frame, Slot slot, Object value)
@Deprecated public void setOwnSlotValues(Frame frame, Slot slot, Collection values)
KnowledgeBase
setOwnSlotValues
in interface KnowledgeBase
public void notifyVisibilityChanged(Frame frame)
notifyVisibilityChanged
in interface KnowledgeBase
public Slot getAssociatedSlot(Facet facet)
getAssociatedSlot
in interface KnowledgeBase
public void setAssociatedSlot(Facet facet, Slot slot)
setAssociatedSlot
in interface KnowledgeBase
public void addDirectSuperclass(Cls cls, Cls superclass)
addDirectSuperclass
in interface KnowledgeBase
public void removeDirectSuperclass(Cls cls, Cls superclass)
removeDirectSuperclass
in interface KnowledgeBase
public void addDirectType(Instance instance, Cls directType)
addDirectType
in interface KnowledgeBase
public void removeDirectType(Instance instance, Cls directType)
removeDirectType
in interface KnowledgeBase
public void moveDirectType(Instance instance, Cls directType, int index)
moveDirectType
in interface KnowledgeBase
public void addDirectTemplateSlot(Cls cls, Slot slot)
addDirectTemplateSlot
in interface KnowledgeBase
public void removeDirectTemplateSlot(Cls cls, Slot slot)
removeDirectTemplateSlot
in interface KnowledgeBase
@Deprecated public void addTemplateFacetValue(Cls cls, Slot slot, Facet facet, Object value)
addTemplateFacetValue
in interface KnowledgeBase
@Deprecated public void addTemplateSlotValue(Cls cls, Slot slot, Object value)
addTemplateSlotValue
in interface KnowledgeBase
public Slot getNameSlot()
getNameSlot
in interface KnowledgeBase
public int getDirectInstanceCount(Cls cls)
getDirectInstanceCount
in interface KnowledgeBase
public Collection<Instance> getDirectInstances(Cls cls)
getDirectInstances
in interface KnowledgeBase
public int getDirectSubclassCount(Cls cls)
getDirectSubclassCount
in interface KnowledgeBase
public Collection getDirectSubclasses(Cls cls)
getDirectSubclasses
in interface KnowledgeBase
public int getDirectSuperclassCount(Cls cls)
getDirectSuperclassCount
in interface KnowledgeBase
public List getDirectTemplateFacetValues(Cls cls, Slot slot, Facet facet)
getDirectTemplateFacetValues
in interface KnowledgeBase
public Collection getDirectTemplateSlots(Cls cls)
getDirectTemplateSlots
in interface KnowledgeBase
public List getDirectTemplateSlotValues(Cls cls, Slot slot)
getDirectTemplateSlotValues
in interface KnowledgeBase
public int getInstanceCount(Cls cls)
getInstanceCount
in interface KnowledgeBase
public Collection getSuperclasses(Cls cls)
getSuperclasses
in interface KnowledgeBase
public Collection getTemplateFacets(Cls cls, Slot slot)
getTemplateFacets
in interface KnowledgeBase
public Object getTemplateFacetValue(Cls cls, Slot slot, Facet facet)
getTemplateFacetValue
in interface KnowledgeBase
public Collection getTemplateFacetValues(Cls cls, Slot slot, Facet facet)
getTemplateFacetValues
in interface KnowledgeBase
public Collection getTemplateSlotAllowedClses(Cls cls, Slot slot)
getTemplateSlotAllowedClses
in interface KnowledgeBase
public Collection getTemplateSlotAllowedParents(Cls cls, Slot slot)
getTemplateSlotAllowedParents
in interface KnowledgeBase
public Collection getTemplateSlotAllowedValues(Cls cls, Slot slot)
getTemplateSlotAllowedValues
in interface KnowledgeBase
public boolean getTemplateSlotAllowsMultipleValues(Cls cls, Slot slot)
getTemplateSlotAllowsMultipleValues
in interface KnowledgeBase
public Collection getTemplateSlotDefaultValues(Cls cls, Slot slot)
getTemplateSlotDefaultValues
in interface KnowledgeBase
public Collection getTemplateSlotDocumentation(Cls cls, Slot slot)
getTemplateSlotDocumentation
in interface KnowledgeBase
public int getTemplateSlotMaximumCardinality(Cls cls, Slot slot)
getTemplateSlotMaximumCardinality
in interface KnowledgeBase
public Integer getTemplateSlotMaximumCardinality2(Cls cls, Slot slot)
public Integer getTemplateSlotMinimumCardinality2(Cls cls, Slot slot)
public Number getTemplateSlotMaximumValue(Cls cls, Slot slot)
getTemplateSlotMaximumValue
in interface KnowledgeBase
public int getTemplateSlotMinimumCardinality(Cls cls, Slot slot)
getTemplateSlotMinimumCardinality
in interface KnowledgeBase
public Number getTemplateSlotMinimumValue(Cls cls, Slot slot)
getTemplateSlotMinimumValue
in interface KnowledgeBase
public Object getTemplateSlotValue(Cls cls, Slot slot)
getTemplateSlotValue
in interface KnowledgeBase
public Collection getTemplateSlotValues(Cls cls, Slot slot)
getTemplateSlotValues
in interface KnowledgeBase
public ValueType getTemplateSlotValueType(Cls cls, Slot slot)
getTemplateSlotValueType
in interface KnowledgeBase
public boolean hasDirectlyOverriddenTemplateFacet(Cls cls, Slot slot, Facet facet)
hasDirectlyOverriddenTemplateFacet
in interface KnowledgeBase
public boolean hasDirectlyOverriddenTemplateSlot(Cls cls, Slot slot)
hasDirectlyOverriddenTemplateSlot
in interface KnowledgeBase
public Collection getDirectlyOverriddenTemplateSlots(Cls cls)
getDirectlyOverriddenTemplateSlots
in interface KnowledgeBase
public Collection getDirectlyOverriddenTemplateFacets(Cls cls, Slot slot)
getDirectlyOverriddenTemplateFacets
in interface KnowledgeBase
public boolean hasDirectSuperslot(Slot slot, Slot superslot)
hasDirectSuperslot
in interface KnowledgeBase
public boolean hasSuperslot(Slot slot, Slot superslot)
hasSuperslot
in interface KnowledgeBase
public boolean hasDirectSuperclass(Cls cls, Cls superclass)
hasDirectSuperclass
in interface KnowledgeBase
public boolean hasDirectTemplateSlot(Cls cls, Slot slot)
hasDirectTemplateSlot
in interface KnowledgeBase
public boolean hasInheritedTemplateSlot(Cls cls, Slot slot)
hasInheritedTemplateSlot
in interface KnowledgeBase
public Collection getInheritedTemplateSlots(Cls cls)
public boolean hasOverriddenTemplateSlot(Cls cls, Slot slot)
hasOverriddenTemplateSlot
in interface KnowledgeBase
public Collection getOverriddenTemplateSlots(Cls cls)
public boolean hasOverriddenTemplateFacet(Cls cls, Slot slot, Facet facet)
hasOverriddenTemplateFacet
in interface KnowledgeBase
public Collection getOverriddenTemplateFacets(Cls cls, Slot slot)
getOverriddenTemplateFacets
in interface KnowledgeBase
@Deprecated public void removeTemplateFacetOverrides(Cls cls, Slot slot)
removeTemplateFacetOverrides
in interface KnowledgeBase
public void removeDirectTemplateFacetOverrides(Cls cls, Slot slot)
public boolean hasSuperclass(Cls cls, Cls superclass)
hasSuperclass
in interface KnowledgeBase
public boolean hasTemplateSlot(Cls cls, Slot slot)
hasTemplateSlot
in interface KnowledgeBase
public boolean isAbstract(Cls cls)
isAbstract
in interface KnowledgeBase
public boolean isMetaCls(Cls cls)
isMetaCls
in interface KnowledgeBase
public void moveDirectSubclass(Cls cls, Cls subclass, Cls afterclass)
moveDirectSubclass
in interface KnowledgeBase
public void moveDirectSubclass(Cls cls, Cls subclass, int index)
public void moveDirectSubslot(Slot slot, Slot subslot, Slot afterslot)
moveDirectSubslot
in interface KnowledgeBase
public void moveDirectSubslot(Slot slot, Slot subslot, int index)
public void moveDirectTemplateSlot(Cls cls, Slot slot, int toIndex)
moveDirectTemplateSlot
in interface KnowledgeBase
public void setAbstract(Cls cls, boolean isAbstract)
setAbstract
in interface KnowledgeBase
public void setDirectTypeOfSubclasses(Cls cls, Cls type)
setDirectTypeOfSubclasses
in interface KnowledgeBase
@Deprecated public void setTemplateFacetValue(Cls cls, Slot slot, Facet facet, Object value)
setTemplateFacetValue
in interface KnowledgeBase
public void setDirectTemplateFacetValue(Cls cls, Slot slot, Facet facet, Object value)
@Deprecated public void setTemplateFacetValues(Cls cls, Slot slot, Facet facet, Collection values)
setTemplateFacetValues
in interface KnowledgeBase
public void setDirectTemplateFacetValues(Cls cls, Slot slot, Facet facet, Collection values)
public void setTemplateSlotAllowedClses(Cls cls, Slot slot, Collection values)
setTemplateSlotAllowedClses
in interface KnowledgeBase
public void setTemplateSlotAllowedParents(Cls cls, Slot slot, Collection values)
setTemplateSlotAllowedParents
in interface KnowledgeBase
public void setTemplateSlotAllowedValues(Cls cls, Slot slot, Collection values)
setTemplateSlotAllowedValues
in interface KnowledgeBase
public void setTemplateSlotAllowsMultipleValues(Cls cls, Slot slot, boolean allowsMultiple)
setTemplateSlotAllowsMultipleValues
in interface KnowledgeBase
public void setTemplateSlotDefaultValues(Cls cls, Slot slot, Collection values)
setTemplateSlotDefaultValues
in interface KnowledgeBase
public void setTemplateSlotDocumentation(Cls cls, Slot slot, String doc)
setTemplateSlotDocumentation
in interface KnowledgeBase
public void setTemplateSlotDocumentation(Cls cls, Slot slot, Collection docs)
setTemplateSlotDocumentation
in interface KnowledgeBase
public void setTemplateSlotMaximumCardinality(Cls cls, Slot slot, int value)
setTemplateSlotMaximumCardinality
in interface KnowledgeBase
public void setTemplateSlotMaximumValue(Cls cls, Slot slot, Number value)
setTemplateSlotMaximumValue
in interface KnowledgeBase
public void setTemplateSlotMinimumCardinality(Cls cls, Slot slot, int value)
setTemplateSlotMinimumCardinality
in interface KnowledgeBase
public void setTemplateSlotMinimumValue(Cls cls, Slot slot, Number value)
setTemplateSlotMinimumValue
in interface KnowledgeBase
public void setTemplateSlotValue(Cls cls, Slot slot, Object value)
setTemplateSlotValue
in interface KnowledgeBase
@Deprecated public void setTemplateSlotValues(Cls cls, Slot slot, Collection values)
setTemplateSlotValues
in interface KnowledgeBase
public void setDirectTemplateSlotValues(Cls cls, Slot slot, Collection values)
public void setTemplateSlotValueType(Cls cls, Slot slot, ValueType type)
setTemplateSlotValueType
in interface KnowledgeBase
public void addInstance(Instance instance, String name, Cls type, boolean isNew)
addInstance
in interface KnowledgeBase
public String getBrowserText(Instance instance)
getBrowserText
in interface KnowledgeBase
protected String getMissingTypeString(Instance instance)
protected String getDisplaySlotNotSetString(Instance instance)
protected String getDisplaySlotPatternValueNotSetString(Instance instance, BrowserSlotPattern slotPattern)
protected String toString(BrowserSlotPattern pattern)
protected String toString(Object o)
protected String toStringForFrame(Frame frame)
protected String toStringForObject(Object o)
public Collection getDirectTypes(Instance instance)
getDirectTypes
in interface KnowledgeBase
public boolean hasDirectType(Instance instance, Cls cls)
hasDirectType
in interface KnowledgeBase
public boolean hasType(Instance instance, Cls cls)
hasType
in interface KnowledgeBase
public Collection getTypes(Instance instance)
public Instance setDirectType(Instance instance, Cls type)
setDirectType
in interface KnowledgeBase
public Instance setDirectTypes(Instance instance, Collection newTypes)
setDirectTypes
in interface KnowledgeBase
public void addDirectTypes(Instance instance, Collection types)
public void removeDirectTypes(Instance instance, Collection types)
public void addDirectSuperslot(Slot slot, Slot superslot)
addDirectSuperslot
in interface KnowledgeBase
public Collection getAllowedClses(Slot slot)
getAllowedClses
in interface KnowledgeBase
public Collection getAllowedParents(Slot slot)
getAllowedParents
in interface KnowledgeBase
public Collection getAllowedValues(Slot slot)
getAllowedValues
in interface KnowledgeBase
public boolean getAllowsMultipleValues(Slot slot)
getAllowsMultipleValues
in interface KnowledgeBase
public Facet getAssociatedFacet(Slot slot)
getAssociatedFacet
in interface KnowledgeBase
public Collection getDefaultValues(Slot slot)
getDefaultValues
in interface KnowledgeBase
public int getDirectSubslotCount(Slot slot)
getDirectSubslotCount
in interface KnowledgeBase
public Collection getDirectSubslots(Slot slot)
getDirectSubslots
in interface KnowledgeBase
public Collection getDirectSuperslots(Slot slot)
getDirectSuperslots
in interface KnowledgeBase
public int getDirectSuperslotCount(Slot slot)
getDirectSuperslotCount
in interface KnowledgeBase
public Slot getInverseSlot(Slot slot)
getInverseSlot
in interface KnowledgeBase
public Integer getMaximumCardinality2(Slot slot)
public int getMaximumCardinality(Slot slot)
getMaximumCardinality
in interface KnowledgeBase
public Number getMaximumValue(Slot slot)
getMaximumValue
in interface KnowledgeBase
public int getMinimumCardinality(Slot slot)
getMinimumCardinality
in interface KnowledgeBase
public Number getMinimumValue(Slot slot)
getMinimumValue
in interface KnowledgeBase
public Collection getSubslots(Slot slot)
getSubslots
in interface KnowledgeBase
public Collection getSuperslots(Slot slot)
getSuperslots
in interface KnowledgeBase
public Collection getDirectDomain(Slot slot)
getDirectDomain
in interface KnowledgeBase
public Collection getDomain(Slot slot)
getDomain
in interface KnowledgeBase
public Collection getValues(Slot slot)
getValues
in interface KnowledgeBase
public ValueType getValueType(Slot slot)
getValueType
in interface KnowledgeBase
public boolean hasSlotValueAtSomeFrame(Slot slot)
hasSlotValueAtSomeFrame
in interface KnowledgeBase
public void removeDirectSuperslot(Slot slot, Slot superslot)
removeDirectSuperslot
in interface KnowledgeBase
public void setAllowedClses(Slot slot, Collection clses)
setAllowedClses
in interface KnowledgeBase
public void setAllowedParents(Slot slot, Collection parents)
setAllowedParents
in interface KnowledgeBase
public void setAllowedValues(Slot slot, Collection values)
setAllowedValues
in interface KnowledgeBase
public void setAllowsMultipleValues(Slot slot, boolean allowsMultiple)
setAllowsMultipleValues
in interface KnowledgeBase
public void setAssociatedFacet(Slot slot, Facet facet)
setAssociatedFacet
in interface KnowledgeBase
public void setDefaultValues(Slot slot, Collection values)
setDefaultValues
in interface KnowledgeBase
public void setDirectTypeOfSubslots(Slot slot, Cls type)
setDirectTypeOfSubslots
in interface KnowledgeBase
public void setInverseSlot(Slot slot, Slot inverseSlot)
setInverseSlot
in interface KnowledgeBase
public void setMaximumCardinality(Slot slot, int max)
setMaximumCardinality
in interface KnowledgeBase
public void setMaximumValue(Slot slot, Number max)
setMaximumValue
in interface KnowledgeBase
public void setMinimumCardinality(Slot slot, int min)
setMinimumCardinality
in interface KnowledgeBase
public void setMinimumValue(Slot slot, Number min)
setMinimumValue
in interface KnowledgeBase
public void setValues(Slot slot, Collection values)
setValues
in interface KnowledgeBase
public void setValueType(Slot slot, ValueType newType)
setValueType
in interface KnowledgeBase
public void setUserName(String userName)
public void addFrameListener(Frame frame, FrameListener listener)
KnowledgeBase
addFrameListener
in interface KnowledgeBase
public void addFrameListener(FrameListener listener)
KnowledgeBase
addFrameListener
in interface KnowledgeBase
public void removeFrameListener(Frame frame, FrameListener listener)
removeFrameListener
in interface KnowledgeBase
public void removeFrameListener(FrameListener listener)
removeFrameListener
in interface KnowledgeBase
public void addSlotListener(Slot slot, SlotListener listener)
addSlotListener
in interface KnowledgeBase
public void addSlotListener(SlotListener listener)
addSlotListener
in interface KnowledgeBase
public void removeSlotListener(Slot slot, SlotListener listener)
removeSlotListener
in interface KnowledgeBase
public void removeSlotListener(SlotListener listener)
removeSlotListener
in interface KnowledgeBase
public void addInstanceListener(Instance instance, InstanceListener listener)
addInstanceListener
in interface KnowledgeBase
public void addInstanceListener(InstanceListener listener)
addInstanceListener
in interface KnowledgeBase
public void removeInstanceListener(Instance instance, InstanceListener listener)
removeInstanceListener
in interface KnowledgeBase
public void removeInstanceListener(InstanceListener listener)
removeInstanceListener
in interface KnowledgeBase
public void addClsListener(ClsListener listener)
KnowledgeBase
addClsListener
in interface KnowledgeBase
public void addClsListener(Cls cls, ClsListener listener)
KnowledgeBase
addClsListener
in interface KnowledgeBase
public void removeClsListener(Cls cls, ClsListener listener)
removeClsListener
in interface KnowledgeBase
public void removeClsListener(ClsListener listener)
removeClsListener
in interface KnowledgeBase
public void addKnowledgeBaseListener(KnowledgeBaseListener listener)
addKnowledgeBaseListener
in interface KnowledgeBase
public void removeKnowledgeBaseListener(KnowledgeBaseListener listener)
removeKnowledgeBaseListener
in interface KnowledgeBase
public void addFacetListener(Facet facet, FacetListener listener)
KnowledgeBase
addFacetListener
in interface KnowledgeBase
public void addFacetListener(FacetListener listener)
KnowledgeBase
addFacetListener
in interface KnowledgeBase
public void removeFacetListener(Facet facet, FacetListener listener)
removeFacetListener
in interface KnowledgeBase
public void removeFacetListener(FacetListener listener)
removeFacetListener
in interface KnowledgeBase
public void addServerProjectListener(ServerProjectListener listener)
addServerProjectListener
in interface KnowledgeBase
public void removeServerProjectListener(ServerProjectListener listener)
removeServerProjectListener
in interface KnowledgeBase
public String toString()
toString
in class Object
public Collection getCurrentUsers()
getCurrentUsers
in interface KnowledgeBase
public boolean beginTransaction(String name)
KnowledgeBase
beginTransaction() - commitTransaction() or rollbackTransaction()
block.
beginTransaction
in interface KnowledgeBase
name
- the human-readable name of the following transaction
KnowledgeBase.endTransaction()
public boolean beginTransaction(String name, String appliedToFrameName)
beginTransaction
in interface KnowledgeBase
public boolean commitTransaction()
KnowledgeBase
commitTransaction
in interface KnowledgeBase
KnowledgeBase.beginTransaction(java.lang.String)
public boolean rollbackTransaction()
KnowledgeBase
rollbackTransaction
in interface KnowledgeBase
KnowledgeBase.beginTransaction(java.lang.String)
@Deprecated public boolean endTransaction(boolean doCommit)
endTransaction
in interface KnowledgeBase
doCommit
- true: commits transaction
false: rolls back transaction
@Deprecated public boolean endTransaction()
endTransaction
in interface KnowledgeBase
KnowledgeBase.beginTransaction(java.lang.String)
public void setFrameFactory(FrameFactory factory)
setFrameFactory
in interface KnowledgeBase
public CommandManager getCommandManager()
getCommandManager
in interface KnowledgeBase
public void setFrameNameValidator(FrameNameValidator validator)
setFrameNameValidator
in interface KnowledgeBase
public boolean isValidFrameName(String name, Frame frame)
isValidFrameName
in interface KnowledgeBase
public String getInvalidFrameNameDescription(String name, Frame frame)
getInvalidFrameNameDescription
in interface KnowledgeBase
public void setPollForEvents(boolean b)
setPollForEvents
in interface KnowledgeBase
@Deprecated public void setDirectBrowserSlot(Cls cls, Slot slot)
setDirectBrowserSlot
in interface KnowledgeBase
cls
- slot
- public void setDirectBrowserSlotPattern(Cls cls, BrowserSlotPattern slotPattern)
setDirectBrowserSlotPattern
in interface KnowledgeBase
public void removeFrameStore(FrameStore frameStore)
removeFrameStore
in interface KnowledgeBase
public void insertFrameStore(FrameStore newFrameStore)
KnowledgeBase
insertFrameStore
in interface KnowledgeBase
public void insertFrameStore(FrameStore newFrameStore, int position)
KnowledgeBase
insertFrameStore
in interface KnowledgeBase
position
- Position in the frame store list to insert this frame store.public List<FrameStore> getFrameStores()
KnowledgeBase
getFrameStores
in interface KnowledgeBase
public void setTerminalFrameStore(FrameStore store)
public FrameStore getTerminalFrameStore()
public void clearAllListeners()
clearAllListeners
in interface KnowledgeBase
public FrameCounts getFrameCounts()
getFrameCounts
in interface KnowledgeBase
public BrowserSlotPattern getDirectBrowserSlotPattern(Cls cls)
getDirectBrowserSlotPattern
in interface KnowledgeBase
public void setDirectBrowserTextPattern(Cls cls, BrowserSlotPattern pattern)
public Set getDirectOwnSlotValuesClosure(Frame frame, Slot slot)
getDirectOwnSlotValuesClosure
in interface KnowledgeBase
@Deprecated public boolean getValueChecking()
getValueChecking
in interface KnowledgeBase
public boolean getFacetCheckingEnabled()
public void startJournaling(URI journal)
startJournaling
in interface KnowledgeBase
public void stopJournaling()
stopJournaling
in interface KnowledgeBase
public boolean setGenerateDeletingFrameEventsEnabled(boolean enabled)
setGenerateDeletingFrameEventsEnabled
in interface KnowledgeBase
public void flushCache()
flushCache
in interface KnowledgeBase
public Cls getReifiedRelationCls()
getReifiedRelationCls
in interface KnowledgeBase
public Slot getReifedRelationFromSlot()
getReifedRelationFromSlot
in interface KnowledgeBase
public Slot getReifedRelationToSlot()
getReifedRelationToSlot
in interface KnowledgeBase
public void addTransactionListener(TransactionListener listener)
addTransactionListener
in interface KnowledgeBase
public void removeTransactionListener(TransactionListener listener)
removeTransactionListener
in interface KnowledgeBase
public Collection<Frame> executeQuery(Query q)
executeQuery
in interface KnowledgeBase
public ServerCacheStateMachine getCacheMachine()
public void setCacheMachine(ServerCacheStateMachine machine)
public Frame rename(Frame frame, String name)
rename
in interface KnowledgeBase
public void assertFrameName(Frame frame)
assertFrameName
in interface KnowledgeBase
|
Protege 3.5 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |