|
Algernon Software | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jatha.dynatype.StandardLispValue
org.algernon.kb.okbc.protege.AlgernonProtegeObject
org.algernon.kb.okbc.protege.AlgernonProtegeFrame
org.algernon.kb.okbc.protege.AlgernonProtegeRelation
This defines an Algernon relation in Protege. minCardinality and maxCardinality must be Integers. defaultValue and inverseRelation can be null.
| Field Summary |
| Fields inherited from class org.algernon.kb.okbc.protege.AlgernonProtegeFrame |
m_frame, m_kb |
| Fields inherited from class org.algernon.kb.okbc.protege.AlgernonProtegeObject |
f_algy |
| Fields inherited from class org.jatha.dynatype.StandardLispValue |
f_lisp |
| Constructor Summary | |
AlgernonProtegeRelation(AlgernonProtegeKB kb,
Slot slot)
Creates an AlgernonProtegeRelation from an already-existing slot. |
|
AlgernonProtegeRelation(AlgernonProtegeKB kb,
String name,
Object range,
Integer minCardinality,
Integer maxCardinality,
Object defaultValue,
AlgernonRelation inverseRelation)
|
|
| Method Summary | |
List |
getArgumentTypes()
Returns a list of the argument types for this relation. |
int |
getMaximumCardinality()
Returns the maximum cardinality of this relation. |
int |
getMinimumCardinality()
Returns the minimum cardinality of this relation. |
protected List |
processDomainAndRange(Collection domains,
ValueType valueType,
Collection specificType)
Helper function to turn a set of Domains and a Range into the form needed by the AlgernonCompiler. |
boolean |
rangeIsSimpleType()
Returns true if the range is a simple, that is, non-frame, type. |
private void |
setClassRange()
This is only called when the range is :CLASS. |
void |
setDefaultValue(Object defaultValue)
Sets the default value of a template slot. |
void |
setInverseRelation(AlgernonRelation inverseRelation)
Sets the inverse relation of this relation. |
void |
setMaxCardinality(Integer maxCardinality)
Sets the maximum cardinality of the Relation. |
void |
setMinCardinality(Integer minCardinality)
Sets the minimum cardinality of the Relation. |
void |
setRange(AlgernonClass range)
Sets the range of the relation. |
void |
setRange(LispValue range)
Sets the range of a relation when it is a value type such as :INTEGER, instead of a class. |
void |
setRange(Object range)
Sets the range of a relation when it is a value type such as :INTEGER, instead of a class. |
| Methods inherited from class org.algernon.kb.okbc.protege.AlgernonProtegeFrame |
addRelationValue, deleteAllRelationValues, deleteRelationValue, deleteRelationValues, display, getDisplayName, getImplementation, getKB, getName, getOwnRelationValues, getParents, getPossibleRelationValues, getRelationValues, getRootClasses, getSuperclasses, hasParent, hasRootClass, hasSuperclass, setDisplayName, setName, toString |
| Methods inherited from class org.algernon.kb.okbc.protege.AlgernonProtegeObject |
getAlgernon |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.algernon.kb.AlgernonFrame |
addRelationValue, deleteAllRelationValues, deleteRelationValue, deleteRelationValues, getDisplayName, getImplementation, getKB, getName, getOwnRelationValues, getParents, getPossibleRelationValues, getRelationValues, getRootClasses, getSuperclasses, hasParent, hasRootClass, hasSuperclass, setDisplayName, setName |
| Methods inherited from interface org.algernon.io.Displayable |
display |
| Constructor Detail |
public AlgernonProtegeRelation(AlgernonProtegeKB kb,
String name,
Object range,
Integer minCardinality,
Integer maxCardinality,
Object defaultValue,
AlgernonRelation inverseRelation)
throws AlgernonDataException
public AlgernonProtegeRelation(AlgernonProtegeKB kb,
Slot slot)
kb - The KB of the slot.slot - The Slot around which an AlgernonProtegeRelation should be created.| Method Detail |
public void setInverseRelation(AlgernonRelation inverseRelation)
setInverseRelation in interface AlgernonRelationinverseRelation -
public void setDefaultValue(Object defaultValue)
throws AlgernonDataException
setDefaultValue in interface AlgernonRelationdefaultValue -
AlgernonDataExceptionpublic void setMaxCardinality(Integer maxCardinality)
setMaxCardinality in interface AlgernonRelationmaxCardinality - public void setMinCardinality(Integer minCardinality)
setMinCardinality in interface AlgernonRelationminCardinality - public void setRange(Object range)
range - the value type of the relation.private void setClassRange()
public void setRange(LispValue range)
setRange in interface AlgernonRelationrange - the value type of the relation.public void setRange(AlgernonClass range)
setRange in interface AlgernonRelationrange - a Class which is the range of the relation.
public List getArgumentTypes()
throws AlgernonDataException
getArgumentTypes in interface AlgernonRelationAlgernonDataException
protected List processDomainAndRange(Collection domains,
ValueType valueType,
Collection specificType)
throws AlgernonDataException
domains - Collection of domains, as returned by Protege's slot.getTemplateSlotClsesvalueType - A ValueType, as returned by Protege's slot.getValueType()
AlgernonDataExceptionpublic int getMinimumCardinality()
getMinimumCardinality in interface AlgernonRelationpublic int getMaximumCardinality()
getMaximumCardinality in interface AlgernonRelationpublic boolean rangeIsSimpleType()
rangeIsSimpleType in interface AlgernonRelation
|
Algernon Software | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||