ix.icore.info
Class IRelation

java.lang.Object
  extended by ix.icore.AbstractAnnotatedObject
      extended by ix.icore.AbstractIXObject
          extended by ix.icore.info.AbstractIObject
              extended by ix.icore.info.IRelation
All Implemented Interfaces:
Annotated, Named, IObject, IThing, IXObject, EditableObject, java.io.Serializable

public class IRelation
extends AbstractIObject

A relationship between two or more pieces of information (concepts) with attribute values and constraints. For the moment, all relations are assumed to be binary (linking just two concepts).

See Also:
Serialized Form

Field Summary
 IConcept fromConcept
           
 IConcept toConcept
           
 
Fields inherited from class ix.icore.info.AbstractIObject
attVals, dataChangeListeners, name, type
 
Fields inherited from class ix.icore.AbstractAnnotatedObject
annotationListeners, annotations
 
Constructor Summary
IRelation()
           
IRelation(IRelationType relationType)
           
IRelation(IRelationType relationType, IConcept from, IConcept to)
           
 
Method Summary
 boolean checkConsistency()
          Checks that the concepts are of the right type
 java.lang.Object getAttributeValue(java.lang.String attName)
           
 IConcept getFrom()
           
 IConcept getTo()
           
 boolean isAttributesEmpty()
          A refinement is empty if all its data fields are empty.
 boolean sameAttributeValue(java.lang.String field, java.lang.Object value, java.lang.Object otherValue)
           
 boolean setAttributeValue(java.lang.String attName, java.lang.Object value)
           
 void setFrom(IConcept from)
           
 void setRelation(IConcept from, IConcept to)
           
 void setTo(IConcept to)
           
 
Methods inherited from class ix.icore.info.AbstractIObject
addDataChangeListener, getAttributes, getName, getType, getValue, isEmpty, isEmptyValue, nameHasChanged, removeDataChangeListener, sameValue, setName, setType, setValue, setValue
 
Methods inherited from class ix.icore.AbstractAnnotatedObject
addAnnotationListener, annMap, clearAnnotations, fireSetAnnotation, getAnnotation, getAnnotations, getComments, makeAnnMap, removeAnnotation, setAnnotation, setAnnotations, setComments, takeAnnotations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ix.icore.Annotated
addAnnotationListener, clearAnnotations, fireSetAnnotation, getAnnotation, getAnnotations, removeAnnotation, setAnnotation, setAnnotations, takeAnnotations
 

Field Detail

fromConcept

public IConcept fromConcept

toConcept

public IConcept toConcept
Constructor Detail

IRelation

public IRelation()

IRelation

public IRelation(IRelationType relationType)

IRelation

public IRelation(IRelationType relationType,
                 IConcept from,
                 IConcept to)
Method Detail

setRelation

public void setRelation(IConcept from,
                        IConcept to)

setFrom

public void setFrom(IConcept from)

setTo

public void setTo(IConcept to)

getFrom

public IConcept getFrom()

getTo

public IConcept getTo()

setAttributeValue

public boolean setAttributeValue(java.lang.String attName,
                                 java.lang.Object value)
Overrides:
setAttributeValue in class AbstractIObject

getAttributeValue

public java.lang.Object getAttributeValue(java.lang.String attName)
Overrides:
getAttributeValue in class AbstractIObject

isAttributesEmpty

public boolean isAttributesEmpty()
A refinement is empty if all its data fields are empty. Note: the refinement may not have started out as empty - check whether it has a base-object for full emptiness.

Overrides:
isAttributesEmpty in class AbstractIObject

sameAttributeValue

public boolean sameAttributeValue(java.lang.String field,
                                  java.lang.Object value,
                                  java.lang.Object otherValue)
Specified by:
sameAttributeValue in class AbstractIObject

checkConsistency

public boolean checkConsistency()
Checks that the concepts are of the right type

Specified by:
checkConsistency in interface IObject
Specified by:
checkConsistency in class AbstractIObject