Protege 2.1.1

edu.stanford.smi.protege.model
Class DefaultFacet

java.lang.Object
  extended byedu.stanford.smi.protege.model.DefaultFrame
      extended byedu.stanford.smi.protege.model.DefaultInstance
          extended byedu.stanford.smi.protege.model.DefaultFacet
All Implemented Interfaces:
Comparable, Facet, Frame, Instance, Serializable
Direct Known Subclasses:
DefaultKnowledgeBase_Test.TestFacet

public class DefaultFacet
extends DefaultInstance
implements Facet

Default implementation of Facet interface. Forwards all method calls to its DefaultKnowledgeBase.

Author:
Ray Fergerson
See Also:
Serialized Form

Constructor Summary
DefaultFacet(KnowledgeBase kb, FrameID id)
           
 
Method Summary
 void addFacetListener(FacetListener listener)
           
 boolean areValidValues(Frame frame, Slot slot, Collection slotValues)
           
 boolean getAllowsMultipleValues()
           
 Slot getAssociatedSlot()
           
 FacetConstraint getConstraint()
           
 Icon getIcon()
           
 String getInvalidValuesText(Frame frame, Slot slot, Collection slotValues)
           
 String getInvalidValueText(Frame frame, Slot slot, Object item)
           
 ValueType getValueType()
           
 boolean isValidValue(Frame frame, Slot slot, Object value)
           
 void removeFacetListener(FacetListener listener)
           
 Collection resolveValues(Collection existingValues, Collection newValues)
           
 void setAssociatedSlot(Slot slot)
           
 void setConstraint(FacetConstraint c)
           
 String toString()
           
 
Methods inherited from class edu.stanford.smi.protege.model.DefaultInstance
addDirectType, addInstanceListener, copy, deepCopy, getBrowserText, getDirectType, getDirectTypes, getOwnFacetValue, getOwnFacetValues, getReachableSimpleInstances, hasDirectType, hasType, removeDirectType, removeInstanceListener, setDirectType, shallowCopy
 
Methods inherited from class edu.stanford.smi.protege.model.DefaultFrame
addFrameListener, addOwnFacetValue, addOwnSlotValue, areValidOwnSlotValues, compareTo, delete, equals, equals, getDefaultKnowledgeBase, getDefiningProjectURI, getDirectOwnSlotValue, getDirectOwnSlotValues, getDocumentation, getFrameID, getInvalidOwnSlotValuesText, getInvalidOwnSlotValueText, getKnowledgeBase, getName, getOwnSlotAllowsMultipleValues, getOwnSlotAndSubslotValues, getOwnSlotDefaultValues, getOwnSlotFacets, getOwnSlotFacetValues, getOwnSlots, getOwnSlotValue, getOwnSlotValueCount, getOwnSlotValues, getOwnSlotValueType, getProject, getReferences, getReferences, hashCode, hasOwnSlot, isDeleted, isEditable, isIncluded, isSystem, isValid, isValidOwnSlotValue, isVisible, markDeleted, moveOwnSlotValue, removeFrameListener, removeOwnSlotValue, setDirectOwnSlotValue, setDirectOwnSlotValues, setDocumentation, setDocumentation, setEditable, setIncluded, setKnowledgeBase, setName, setOwnFacetValue, setOwnFacetValues, setOwnSlotValue, setOwnSlotValues, setSystem, setVisible
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.stanford.smi.protege.model.Instance
addDirectType, addInstanceListener, getDirectType, getDirectTypes, getReachableSimpleInstances, hasDirectType, hasType, removeDirectType, removeInstanceListener, setDirectType
 
Methods inherited from interface edu.stanford.smi.protege.model.Frame
addFrameListener, addOwnFacetValue, addOwnSlotValue, areValidOwnSlotValues, copy, deepCopy, delete, getBrowserText, getDefiningProjectURI, getDirectOwnSlotValue, getDirectOwnSlotValues, getDocumentation, getFrameID, getInvalidOwnSlotValuesText, getInvalidOwnSlotValueText, getKnowledgeBase, getName, getOwnFacetValue, getOwnFacetValues, getOwnSlotAllowsMultipleValues, getOwnSlotAndSubslotValues, getOwnSlotDefaultValues, getOwnSlotFacets, getOwnSlotFacetValues, getOwnSlots, getOwnSlotValue, getOwnSlotValueCount, getOwnSlotValues, getOwnSlotValueType, getProject, getReferences, getReferences, hasOwnSlot, isDeleted, isEditable, isIncluded, isSystem, isValid, isValidOwnSlotValue, isVisible, markDeleted, moveOwnSlotValue, removeFrameListener, removeOwnSlotValue, setDirectOwnSlotValue, setDirectOwnSlotValues, setDocumentation, setDocumentation, setEditable, setIncluded, setName, setOwnFacetValue, setOwnFacetValues, setOwnSlotValue, setOwnSlotValues, setVisible, shallowCopy
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

DefaultFacet

public DefaultFacet(KnowledgeBase kb,
                    FrameID id)
Method Detail

addFacetListener

public void addFacetListener(FacetListener listener)
Specified by:
addFacetListener in interface Facet

areValidValues

public boolean areValidValues(Frame frame,
                              Slot slot,
                              Collection slotValues)
Specified by:
areValidValues in interface Facet

getAssociatedSlot

public Slot getAssociatedSlot()
Specified by:
getAssociatedSlot in interface Facet

getConstraint

public FacetConstraint getConstraint()
Specified by:
getConstraint in interface Facet

getInvalidValuesText

public String getInvalidValuesText(Frame frame,
                                   Slot slot,
                                   Collection slotValues)
Specified by:
getInvalidValuesText in interface Facet

getInvalidValueText

public String getInvalidValueText(Frame frame,
                                  Slot slot,
                                  Object item)
Specified by:
getInvalidValueText in interface Facet

getValueType

public ValueType getValueType()
Specified by:
getValueType in interface Facet

getAllowsMultipleValues

public boolean getAllowsMultipleValues()
Specified by:
getAllowsMultipleValues in interface Facet

isValidValue

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

removeFacetListener

public void removeFacetListener(FacetListener listener)
Specified by:
removeFacetListener in interface Facet

setAssociatedSlot

public void setAssociatedSlot(Slot slot)
Specified by:
setAssociatedSlot in interface Facet

setConstraint

public void setConstraint(FacetConstraint c)
Specified by:
setConstraint in interface Facet

resolveValues

public Collection resolveValues(Collection existingValues,
                                Collection newValues)
Specified by:
resolveValues in interface Facet

toString

public String toString()
Specified by:
toString in class DefaultFrame

getIcon

public Icon getIcon()
Specified by:
getIcon in interface Frame
Overrides:
getIcon in class DefaultFrame

Protege 2.1.1

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2004 Stanford University.