|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.mit.sketch.ddg.DomainDescription
public class DomainDescription
DomainDescription stores the description of all symbols in the domain.
The domain description
stores the information on whether some objects are special cases of other objects (i.e. have same constraints plus
some additional constraints). For example an isosceles triangle is a subclass of triangle.
There may be multiple inheritance, so the object dependencies are represented by a graph (sorted in topological order)
rather than by a hierarchy tree. For example a right triangle with 90-45-45 degree angles is a subclass of both a right triangle
and an isosceles triangle.
The class also stores the graphical look of objects for each description, that were shown to ther user to
demonstrate understanding of the system.
The name of the object should be a unique identifier of the object in the domain.
| Constructor Summary | |
|---|---|
DomainDescription()
Constructs an empty domain description |
|
| Method Summary | |
|---|---|
void |
addObject(ObjectDescription object,
DescribedDrawnObject describedDrawnObject)
Adds an object description to the domain without any connections to the other objects. |
void |
addObject(ObjectDescription object,
java.util.Vector parentNames,
DescribedDrawnObject describedDrawnObject)
Adds an object description to the domain with the information that the objects listed in parentNames are superclasses of this object (i.e. |
void |
clear()
Clear all the objects |
boolean |
containsObject(java.lang.String objectName)
Whether an object with a given name is in the domain. |
DescribedDrawnObject |
getDescribedDrawnObject(java.lang.String objectName)
Get the graphical view of the object with a given name. |
ObjectDescription |
getObject(java.lang.String objectName)
Get the object with a given name. |
boolean |
isEmpty()
Returns true if there are no objects in the domain |
DomainObjectGraph.MatchIterator |
matchIterator()
Return the match iterator for this domain |
java.util.Vector |
objectList()
Return a list of all object descriptions in the domain in level order starting with the most generic objects. |
void |
printObjectNames(java.io.PrintStream out)
Print the names of the objects in the domain to a given output stream. |
int |
size()
The number of objects in the domain |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DomainDescription()
| Method Detail |
|---|
public boolean isEmpty()
public int size()
public void clear()
public java.util.Vector objectList()
public void addObject(ObjectDescription object,
DescribedDrawnObject describedDrawnObject)
throws ObjectAlreadyExistsException
ObjectAlreadyExistsException
public void addObject(ObjectDescription object,
java.util.Vector parentNames,
DescribedDrawnObject describedDrawnObject)
throws ObjectAlreadyExistsException
ObjectAlreadyExistsExceptionpublic boolean containsObject(java.lang.String objectName)
public ObjectDescription getObject(java.lang.String objectName)
throws ObjectNotFoundException
ObjectNotFoundException
public DescribedDrawnObject getDescribedDrawnObject(java.lang.String objectName)
throws ObjectNotFoundException
ObjectNotFoundExceptionpublic void printObjectNames(java.io.PrintStream out)
public DomainObjectGraph.MatchIterator matchIterator()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||