Protégé-OWL 3.4

edu.stanford.smi.protegex.owl.swrl.model.impl
Class DefaultSWRLImp

java.lang.Object
  extended by edu.stanford.smi.protege.model.DefaultFrame
      extended by edu.stanford.smi.protege.model.DefaultInstance
          extended by edu.stanford.smi.protege.model.DefaultSimpleInstance
              extended by edu.stanford.smi.protegex.owl.model.impl.DefaultRDFIndividual
                  extended by edu.stanford.smi.protegex.owl.model.impl.DefaultOWLIndividual
                      extended by edu.stanford.smi.protegex.owl.swrl.model.impl.AbstractSWRLIndividual
                          extended by edu.stanford.smi.protegex.owl.swrl.model.impl.DefaultSWRLImp
All Implemented Interfaces:
edu.stanford.smi.protege.model.Frame, edu.stanford.smi.protege.model.Instance, edu.stanford.smi.protege.model.Localizable, edu.stanford.smi.protege.model.SimpleInstance, OWLIndividual, ProtegeInstance, RDFIndividual, RDFObject, RDFResource, Visitable, SWRLImp, SWRLIndividual, Serializable, Comparable<edu.stanford.smi.protege.model.Frame>

public class DefaultSWRLImp
extends AbstractSWRLIndividual
implements SWRLImp

See Also:
Serialized Form

Field Summary
static String EMPTY_RULE_TEXT
           
 
Constructor Summary
DefaultSWRLImp()
           
DefaultSWRLImp(edu.stanford.smi.protege.model.KnowledgeBase kb, edu.stanford.smi.protege.model.FrameID id)
           
 
Method Summary
 boolean addRuleGroup(String name)
          Add a rule group name to a rule.
 SWRLImp createClone()
           
 void deleteImp()
          Deletes this and all depending objects of the rule.
 void disable()
           
 void disable(Set<String> ruleGroupNames)
           
 void disable(String ruleGroupName)
           
 void enable()
           
 void enable(Set<String> ruleGroupNames)
           
 void enable(String ruleGroupName)
           
 SWRLAtomList getBody()
           
 String getBrowserText()
          Gets a human-readable visual representation of this resource.
 SWRLAtomList getHead()
           
 Icon getIcon()
           
 Set getReferencedInstances()
           
 void getReferencedInstances(Set set)
          Collects all instances (SWRLInstances, classes, etc) that are somehow involved in the subexpression below this.
 Set<String> getRuleGroupNames()
           
 boolean isEnabled()
           
 boolean isInRuleGroup(String name)
           
 boolean isInRuleGroups(Set<String> names)
           
 boolean removeRuleGroup(String name)
          Remove a rule group name from a rule.
 void setBody(SWRLAtomList swrlAtomList)
           
 void setExpression(String parsableText)
          Tries to parse the given text to create head and body of this Imp.
 void setHead(SWRLAtomList swrlAtomList)
           
 
Methods inherited from class edu.stanford.smi.protegex.owl.swrl.model.impl.AbstractSWRLIndividual
accept
 
Methods inherited from class edu.stanford.smi.protegex.owl.model.impl.DefaultOWLIndividual
equalsStructurally
 
Methods inherited from class edu.stanford.smi.protegex.owl.model.impl.DefaultRDFIndividual
addComment, addDifferentFrom, addIsDefinedBy, addLabel, addPropertyValue, addPropertyValueListener, addProtegeType, addRDFType, addResourceListener, addSameAs, addVersionInfo, as, canAs, getAllValuesFromOnTypes, getComments, getDifferentFrom, getDocumentation, getHasValuesOnTypes, getIconLocation, getIconName, getInferredTypes, getIsDefinedBy, getLabels, getLocalName, getNamespace, getNamespacePrefix, getOWLModel, getPossibleRDFProperties, getPrefixedName, getPropertyValue, getPropertyValue, getPropertyValueAs, getPropertyValueCount, getPropertyValueLiteral, getPropertyValueLiterals, getPropertyValues, getPropertyValues, getPropertyValuesAs, getProtegeType, getProtegeTypes, getRDFProperties, getRDFType, getRDFTypes, getReferringAnonymousClasses, getSameAs, getURI, getVersionInfo, hasPropertyValue, hasPropertyValue, hasPropertyValue, hasPropertyValue, hasProtegeType, hasProtegeType, hasRDFType, hasRDFType, isAnonymous, isValidPropertyValue, listPropertyValues, listPropertyValues, listPropertyValuesAs, listRDFTypes, removeComment, removeDifferentFrom, removeIsDefinedBy, removeLabel, removePropertyValue, removePropertyValueListener, removeProtegeType, removeRDFType, removeResourceListener, removeSameAs, removeVersionInfo, setComment, setComments, setDocumentation, setInferredTypes, setPropertyValue, setPropertyValues, setProtegeType, setProtegeTypes, setRDFType, setRDFTypes, toString
 
Methods inherited from class edu.stanford.smi.protege.model.DefaultSimpleInstance
rename
 
Methods inherited from class edu.stanford.smi.protege.model.DefaultInstance
addDirectType, addInstanceListener, copy, deepCopy, getDirectType, getDirectTypes, getOwnFacetValue, getOwnFacetValues, getReachableSimpleInstances, hasDirectType, hasType, moveDirectType, removeDirectType, removeInstanceListener, setDirectType, setDirectTypes, shallowCopy
 
Methods inherited from class edu.stanford.smi.protege.model.DefaultFrame
addFrameListener, addOwnFacetValue, addOwnSlotValue, areValidOwnSlotValues, assertFrameName, compareTo, delete, equals, equals, getDefaultKnowledgeBase, getDefiningProjectURI, getDirectOwnSlotValue, getDirectOwnSlotValues, getFrameID, getInvalidOwnSlotValuesText, getInvalidOwnSlotValueText, getKnowledgeBase, getName, getOwnSlotAllowsMultipleValues, getOwnSlotAndSubslotValues, getOwnSlotDefaultValues, getOwnSlotFacets, getOwnSlotFacetValues, getOwnSlots, getOwnSlotValue, getOwnSlotValueCount, getOwnSlotValues, getOwnSlotValueType, getProject, getReferences, getReferences, hashCode, hasOwnSlot, isBeingDeleted, isDeleted, isEditable, isIncluded, isSystem, isValid, isValidOwnSlotValue, isVisible, localize, markDeleted, markDeleting, moveDirectOwnSlotValue, removeFrameListener, removeOwnSlotValue, setDirectOwnSlotValue, setDirectOwnSlotValues, setDocumentation, setEditable, setIncluded, 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.protegex.owl.model.RDFResource
addComment, addDifferentFrom, addIsDefinedBy, addLabel, addPropertyValue, addPropertyValueListener, addProtegeType, addRDFType, addResourceListener, addSameAs, addVersionInfo, as, canAs, delete, getAllValuesFromOnTypes, getComments, getDifferentFrom, getHasValuesOnTypes, getIconLocation, getIconName, getInferredTypes, getIsDefinedBy, getLabels, getLocalName, getName, getNamespace, getNamespacePrefix, getOWLModel, getPossibleRDFProperties, getPrefixedName, getPropertyValue, getPropertyValue, getPropertyValueAs, getPropertyValueCount, getPropertyValueLiteral, getPropertyValueLiterals, getPropertyValues, getPropertyValues, getPropertyValuesAs, getProtegeType, getProtegeTypes, getRDFProperties, getRDFType, getRDFTypes, getReferringAnonymousClasses, getSameAs, getURI, getVersionInfo, hasPropertyValue, hasPropertyValue, hasPropertyValue, hasPropertyValue, hasProtegeType, hasProtegeType, hasRDFType, hasRDFType, isAnonymous, isValidPropertyValue, isVisible, listPropertyValues, listPropertyValues, listPropertyValuesAs, listRDFTypes, removeComment, removeDifferentFrom, removeIsDefinedBy, removeLabel, removePropertyValue, removePropertyValueListener, removeProtegeType, removeRDFType, removeResourceListener, removeSameAs, removeVersionInfo, setComment, setComments, setInferredTypes, setPropertyValue, setPropertyValues, setProtegeType, setProtegeTypes, setRDFType, setRDFTypes, setVisible
 
Methods inherited from interface edu.stanford.smi.protegex.owl.model.ProtegeInstance
addDirectType, addFrameListener, addInstanceListener, addOwnFacetValue, addOwnSlotValue, areValidOwnSlotValues, copy, deepCopy, getDirectOwnSlotValue, getDirectOwnSlotValues, getDirectType, getDirectTypes, getDocumentation, getInvalidOwnSlotValuesText, getInvalidOwnSlotValueText, getKnowledgeBase, getOwnFacetValue, getOwnFacetValues, getOwnSlotAllowsMultipleValues, getOwnSlotAndSubslotValues, getOwnSlotDefaultValues, getOwnSlotFacets, getOwnSlotFacetValues, getOwnSlots, getOwnSlotValue, getOwnSlotValueCount, getOwnSlotValues, getOwnSlotValueType, getProject, getReachableSimpleInstances, getReferences, getReferences, hasDirectType, hasOwnSlot, hasType, isBeingDeleted, isDeleted, isEditable, isIncluded, isSystem, isValidOwnSlotValue, markDeleted, markDeleting, removeDirectType, removeFrameListener, removeInstanceListener, removeOwnSlotValue, setDirectOwnSlotValue, setDirectOwnSlotValues, setDirectType, setDirectTypes, setDocumentation, setDocumentation, setEditable, setIncluded, setOwnFacetValue, setOwnFacetValues, setOwnSlotValue, setOwnSlotValues, shallowCopy
 
Methods inherited from interface edu.stanford.smi.protege.model.Instance
moveDirectType
 
Methods inherited from interface edu.stanford.smi.protege.model.Frame
assertFrameName, getFrameID, isValid, moveDirectOwnSlotValue, rename
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface edu.stanford.smi.protegex.owl.model.RDFObject
equalsStructurally
 
Methods inherited from interface edu.stanford.smi.protegex.owl.model.visitor.Visitable
accept
 

Field Detail

EMPTY_RULE_TEXT

public static final String EMPTY_RULE_TEXT
See Also:
Constant Field Values
Constructor Detail

DefaultSWRLImp

public DefaultSWRLImp(edu.stanford.smi.protege.model.KnowledgeBase kb,
                      edu.stanford.smi.protege.model.FrameID id)

DefaultSWRLImp

public DefaultSWRLImp()
Method Detail

createClone

public SWRLImp createClone()
Specified by:
createClone in interface SWRLImp

deleteImp

public void deleteImp()
Description copied from interface: SWRLImp
Deletes this and all depending objects of the rule.

Specified by:
deleteImp in interface SWRLImp

getHead

public SWRLAtomList getHead()
Specified by:
getHead in interface SWRLImp

getBody

public SWRLAtomList getBody()
Specified by:
getBody in interface SWRLImp

setBody

public void setBody(SWRLAtomList swrlAtomList)
Specified by:
setBody in interface SWRLImp

setHead

public void setHead(SWRLAtomList swrlAtomList)
Specified by:
setHead in interface SWRLImp

getIcon

public Icon getIcon()
Specified by:
getIcon in interface edu.stanford.smi.protege.model.Frame
Specified by:
getIcon in interface ProtegeInstance
Overrides:
getIcon in class DefaultRDFIndividual
See Also:
ProtegeUI.getIcon(edu.stanford.smi.protegex.owl.model.RDFResource)

getReferencedInstances

public Set getReferencedInstances()
Specified by:
getReferencedInstances in interface SWRLImp

getReferencedInstances

public void getReferencedInstances(Set set)
Description copied from interface: SWRLIndividual
Collects all instances (SWRLInstances, classes, etc) that are somehow involved in the subexpression below this.

Specified by:
getReferencedInstances in interface SWRLIndividual
Specified by:
getReferencedInstances in class AbstractSWRLIndividual

getBrowserText

public String getBrowserText()
Description copied from interface: RDFResource
Gets a human-readable visual representation of this resource. This is typically just the name of the resource, but for example, with anonymous class expressions this will return the full expression including special symbols.

Specified by:
getBrowserText in interface edu.stanford.smi.protege.model.Frame
Specified by:
getBrowserText in interface ProtegeInstance
Specified by:
getBrowserText in interface RDFObject
Specified by:
getBrowserText in interface RDFResource
Overrides:
getBrowserText in class edu.stanford.smi.protege.model.DefaultInstance
Returns:
the browser text

setExpression

public void setExpression(String parsableText)
                   throws SWRLParseException
Description copied from interface: SWRLImp
Tries to parse the given text to create head and body of this Imp. This will replace the old content. This method can be used to implement editing of existing rules without deleting them.

Specified by:
setExpression in interface SWRLImp
Parameters:
parsableText - a SWRL expression
Throws:
SWRLParseException

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface SWRLImp

enable

public void enable()
Specified by:
enable in interface SWRLImp

enable

public void enable(String ruleGroupName)
Specified by:
enable in interface SWRLImp

enable

public void enable(Set<String> ruleGroupNames)
Specified by:
enable in interface SWRLImp

disable

public void disable()
Specified by:
disable in interface SWRLImp

disable

public void disable(String ruleGroupName)
Specified by:
disable in interface SWRLImp

disable

public void disable(Set<String> ruleGroupNames)
Specified by:
disable in interface SWRLImp

getRuleGroupNames

public Set<String> getRuleGroupNames()
Specified by:
getRuleGroupNames in interface SWRLImp

isInRuleGroup

public boolean isInRuleGroup(String name)
Specified by:
isInRuleGroup in interface SWRLImp

isInRuleGroups

public boolean isInRuleGroups(Set<String> names)
Specified by:
isInRuleGroups in interface SWRLImp

addRuleGroup

public boolean addRuleGroup(String name)
Add a rule group name to a rule. Returns true on success. The name must the name of an OWL individual of class RuleGroup defined in the ontology http://swrl.stanford.edu/ontologies/3.3/swrla.owl. Make the group enabled by default.

Specified by:
addRuleGroup in interface SWRLImp

removeRuleGroup

public boolean removeRuleGroup(String name)
Remove a rule group name from a rule. Returns true on success.

Specified by:
removeRuleGroup in interface SWRLImp

Protégé-OWL 3.4

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