|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.iview.domain.UIRefinement
public class UIRefinement
Mirrors the domain's Refinement and adds UI, Graph, and TreeNode things
Nested Class Summary | |
---|---|
class |
UIRefinement.ConstraintTypeException
|
class |
UIRefinement.NodeTypeException
|
Field Summary | |
---|---|
Annotations |
annotations
|
protected java.util.List |
autoPoints
|
protected Refinement |
baseObject
|
protected java.lang.String |
baseReference
|
java.lang.String |
comments
|
java.util.List |
constraints
|
(package private) java.util.HashSet |
dataChangeListeners
|
protected IGraph |
graph
name of the original refinement |
java.util.List |
issues
|
java.lang.String |
name
|
java.util.List |
nodes
|
java.util.List |
orderings
|
LList |
pattern
|
protected UIDomain |
uiDomain
|
java.util.List |
variableDeclarations
|
Fields inherited from interface ix.icore.domain.SchemaTerms |
---|
O_NONE, O_OTHER, O_PARALLEL, O_SEQUENCE |
Constructor Summary | |
---|---|
UIRefinement(UIDomain uiDomain)
|
|
UIRefinement(UIDomain uiDomain,
Refinement original)
|
Method Summary | |
---|---|
void |
addConstraint(java.lang.Object newValue)
|
void |
addDataChangeListener(DataChangeListener l)
|
void |
addIssue(Issue issue)
|
void |
addNode(NodeSpec node)
|
void |
addOrdering(Constraint newValue)
|
void |
addOrdering(Ordering newValue)
|
void |
addToDomain()
|
void |
addToDomain(Domain domain)
Adds the contents of this UIObject to the domain (part of publish). |
void |
checkConsistency()
|
java.util.Enumeration |
children()
|
void |
clearConstraints()
|
void |
clearIssues()
|
void |
clearNodes()
|
void |
clearOrderings()
|
void |
clearPattern()
|
UIRefinement |
cloneThis()
|
java.util.List |
collectChanges()
Collects the differences between this object and the base one. |
java.util.List |
collectChanges(Refinement original)
Collects the differences between this object and the given one. |
java.util.List |
collectChanges(Refinement original,
java.lang.String which)
|
java.util.List |
collectChangesFromOriginal()
Collects the differences between this object and the base one. |
static boolean |
constraintMentionsNode(Constraint c,
Name nodeId)
|
static boolean |
constraintMentionsNode(Ordering o,
Name nodeId)
|
boolean |
deleteConstraint(Constraint c)
Removes the given constraint; |
void |
deleteIssue(Issue issue)
|
void |
deleteNode(NodeSpec node)
|
protected void |
deleteNodeConstraints(NodeSpec node)
|
static java.util.List |
filterForConditions(java.util.List constraints)
Gets the list of conditions and effects that are in the constraints. |
static java.util.List |
filterForVariable(ItemVar var,
java.util.List constraints)
Searches the given constraints for ones that constrain the variable, i.e. pattern assignments that have the variable as their subject. |
static NodeSpec |
findEditedNode(java.util.List oldNodes,
LList pattern)
Tries to find a node in the given list with a similar pattern. |
NodeSpec |
findNode(java.util.List nodeList,
LList pattern)
Tries to find a node in the given list whose pattern matches the given pattern. |
NodeSpec |
findNode(LList pattern)
Tries to find a node within this refinement whose pattern matches the given pattern. |
NodeSpec |
findNode(Name id)
|
boolean |
getAllowsChildren()
|
Annotations |
getAnnotations()
|
java.lang.Class |
getBaseClass()
Gets the class of objects that can represent this one in the domain. |
IXObject |
getBaseObject()
Gets the object that corresponds to this one in the domain. |
java.lang.Object |
getBaseReference()
Gets the Id that can be used to identify the base object in the domain. |
javax.swing.tree.TreeNode |
getChildAt(int index)
|
int |
getChildCount()
|
java.lang.String |
getComments()
|
java.util.List |
getConditions()
|
java.util.List |
getConstraints()
|
Domain |
getDomain()
Gets the base domain. |
IGraph |
getGraph()
|
Name |
getHighestNodeId()
|
static Name |
getHighestNodeId(java.util.List nodes)
|
int |
getIndex(javax.swing.tree.TreeNode node)
|
java.util.List |
getIssues()
|
java.lang.String |
getName()
|
Name |
getNewNodeId()
|
java.util.List |
getNodes()
|
java.util.List |
getOrderings()
|
java.lang.String |
getOrderingType()
Gets the refinement's ordering type (none, parallel, sequence, other). |
java.lang.String |
getOrderingType(java.util.Collection orderings)
|
IXObject |
getOriginal()
Gets the object that corresponds to this one in the original domain. |
java.util.List |
getOtherConstraints()
|
javax.swing.tree.TreeNode |
getParent()
|
LList |
getPattern()
|
Constraint |
getTypeConstraint(ItemVar var)
|
java.util.List |
getTypeConstraints()
|
UIDomain |
getUIDomain()
Gets the ui domain of which this object is part. |
java.util.List |
getVariableConstraints(ItemVar var)
Find all (world-state) constraints that have the given variable in them. |
java.util.List |
getVariableDeclarations()
|
java.util.SortedSet |
getVariablesUsed()
|
IGraph |
graphFromPosition(Refinement refinement,
java.lang.Object pos)
|
boolean |
hasAnonConstraints()
|
boolean |
hasChanged()
Finds out whether the refinement has changed from the base-object (i.e. since the object was last saved to draft). |
boolean |
hasChanged(Refinement original)
Finds out whether the refinement has changed from the given object. |
boolean |
hasChangedFromOriginal()
Finds out whether the refinement has changed from the original. |
boolean |
hasChangedNoDebug(Refinement original)
Finds out whether the refinement has changed from the given object. |
boolean |
hasConditions()
|
boolean |
hasOrderings()
|
boolean |
hasOriginal()
Determines whether the object has an original in the base domain. |
boolean |
isEmpty()
A refinement is empty if all its data fields are empty. |
boolean |
isEmpty(Refinement refinement)
A refinement is empty if all its data fields are empty. |
boolean |
isLeaf()
|
static boolean |
isRef(NodeSpec node,
java.lang.Object o)
Check whether the given object is a reference to the given node. |
boolean |
isUndefined()
A refinement is undefined if all its data fields are empty except the pattern which may have data in it. |
void |
loadCanvasPositionGraphFromDomain(Refinement refinement)
|
void |
loadFromDomain()
Loads this object from its baseObject. |
void |
loadFromDomain(java.lang.Object domainObject)
Loads the contents of this object from the given object. |
void |
loadFromOriginal()
Loads this object from its original in the domain if it has one, otherwise clear the object. |
void |
loadMGraphFromDomain(Refinement refinement)
|
IXObject |
makeBaseObject()
Makes an empty object of the right class that can represent this UIObject in the domain. |
java.util.List |
makeSequence()
|
boolean |
matchesPattern(LList pattern)
|
void |
moveToUIDomain(UIDomain uiDomain)
Move the object from its current UIDomain to the given one. |
boolean |
nameHasChanged(java.lang.Object nameThing)
Determines whether the object's identifying fields have changed |
void |
noteChange()
Get the UIDomain to note the change of this object |
boolean |
orderingsAreSequential()
Checks whether the orderings are a sequence of the nodes. |
boolean |
orderingsAreSequential(java.util.Collection orderings)
|
static java.util.List |
parseIssues(UIDomain uiDomain,
java.lang.String sIssues)
Builds a LList of nodes from a string that contains node descriptions. |
static java.util.List |
parseNodes(UIDomain uiDomain,
java.lang.String expansion)
Builds a LList of nodes from a string that contains node descriptions. |
java.lang.String |
print()
|
void |
removeDataChangeListener(DataChangeListener l)
|
void |
removeFromDomain()
|
void |
removeFromDomain(Domain domain)
Removes the object's corresponding base object from the domain. |
void |
removeGraph(IGraph g)
|
boolean |
sameNodes(java.util.List nodes,
java.util.List otherNodes)
|
boolean |
sameValue(java.lang.String field,
java.lang.Object value,
java.lang.Object otherValue)
Determines whether the two given values of the given field differ |
void |
saveCanvasPositionGraphToDomain(Refinement refinement)
|
void |
saveMGraphToDomain(Refinement refinement)
|
void |
saveToDomain()
Saves this object into a suitable baseObject. |
void |
saveToDomain(java.lang.Object domainObject)
Saves the contents of this object into the given object. |
void |
setAnnotations(Annotations annotations)
|
void |
setAutoPoints(java.util.List points)
|
void |
setBaseObject(IXObject object)
Sets the object that will represent this one in the domain. |
void |
setBaseReference(java.lang.Object ref)
Sets the Id that can be used to identify the base object in the domain. |
void |
setComments(java.lang.String comments)
|
void |
setConditions(java.util.List conditions)
|
void |
setConstraints(java.util.List cs)
|
void |
setGraph(IGraph g)
|
void |
setIssues(java.util.List issues)
|
void |
setLegalName(java.lang.String name)
|
void |
setName(java.lang.String newName)
|
void |
setNodes(java.util.List nodes)
|
void |
setOrderings(java.util.List orderings)
|
void |
setOrderingType(java.lang.String type)
Sets the refinement's ordering type (none, parallel, sequence, other) if it is allowed to. |
void |
setOtherConstraints(java.util.List constraints)
|
void |
setPattern(LList pattern)
|
void |
setTypeConstraint(ItemVar var,
Constraint constraint)
|
void |
setTypeConstraints(java.util.List typeConstrs)
|
boolean |
setValue(java.lang.String field,
java.lang.Object value)
Sets the given field to the given value. |
void |
setVariableConstraints(ItemVar var,
java.util.List varConstrs)
Replace all Find all previous (world-state) constraints that have the given variable in them with the given ones. |
void |
setVariableDeclarations(java.util.List vars)
|
static boolean |
similarPattern(LList patternOne,
LList patternTwo)
|
void |
updateInDomain()
|
void |
updateInDomain(Domain domain)
Updates the base object in the domain with the contents of this object. |
void |
updateNodes(java.util.List nodes)
|
void |
updateOrderings()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String name
public LList pattern
public java.util.List nodes
public java.util.List orderings
public java.util.List constraints
public java.util.List issues
public java.lang.String comments
public java.util.List variableDeclarations
public Annotations annotations
protected UIDomain uiDomain
protected Refinement baseObject
protected java.lang.String baseReference
protected IGraph graph
protected java.util.List autoPoints
java.util.HashSet dataChangeListeners
Constructor Detail |
---|
public UIRefinement(UIDomain uiDomain)
public UIRefinement(UIDomain uiDomain, Refinement original)
Method Detail |
---|
public UIRefinement cloneThis()
public java.lang.String getName()
getName
in interface Named
public void setName(java.lang.String newName)
setName
in interface UIObject
public void setLegalName(java.lang.String name)
public LList getPattern()
public void setPattern(LList pattern)
public void clearPattern()
public java.util.List getNodes()
public void setNodes(java.util.List nodes)
public void updateNodes(java.util.List nodes)
public void clearNodes()
public java.util.List getOrderings()
public void setOrderings(java.util.List orderings)
public void clearOrderings()
public void updateOrderings()
public java.util.List getConstraints()
public void setConstraints(java.util.List cs)
public void clearConstraints()
public boolean deleteConstraint(Constraint c)
public java.util.List getConditions()
public void setConditions(java.util.List conditions)
public java.util.List getTypeConstraints()
public void setTypeConstraints(java.util.List typeConstrs)
public Constraint getTypeConstraint(ItemVar var)
public void setTypeConstraint(ItemVar var, Constraint constraint)
public java.util.List getVariableConstraints(ItemVar var)
public void setVariableConstraints(ItemVar var, java.util.List varConstrs)
public static java.util.List filterForConditions(java.util.List constraints)
constraints
- a list of constraint objects that may contain
conditions or effects.
public static java.util.List filterForVariable(ItemVar var, java.util.List constraints)
var
- the variable to be constrainedconstraints
- a list of constraints that may contain variable
constraints.
public java.util.List getOtherConstraints()
public void setOtherConstraints(java.util.List constraints)
public boolean hasOrderings()
public boolean hasConditions()
public boolean hasAnonConstraints()
public java.util.List getIssues()
public void setIssues(java.util.List issues)
public void deleteIssue(Issue issue)
public void clearIssues()
public java.lang.String getComments()
public void setComments(java.lang.String comments)
public Annotations getAnnotations()
public void setAnnotations(Annotations annotations)
public Domain getDomain()
UIObject
getDomain
in interface UIObject
public UIDomain getUIDomain()
UIObject
getUIDomain
in interface UIObject
public void moveToUIDomain(UIDomain uiDomain)
UIObject
moveToUIDomain
in interface UIObject
public java.lang.Object getBaseReference()
UIObject
getBaseReference
in interface UIObject
public void setBaseReference(java.lang.Object ref)
UIObject
setBaseReference
in interface UIObject
public IXObject getBaseObject()
UIObject
getBaseObject
in interface UIEditableObject
getBaseObject
in interface UIObject
public IXObject makeBaseObject()
UIObject
makeBaseObject
in interface UIObject
public void setBaseObject(IXObject object)
UIObject
setBaseObject
in interface UIObject
public java.lang.Class getBaseClass()
UIObject
getBaseClass
in interface UIObject
public boolean hasOriginal()
UIObject
hasOriginal
in interface UIEditableObject
hasOriginal
in interface UIObject
public void saveToDomain()
saveToDomain
in interface UIObject
public void saveToDomain(java.lang.Object domainObject)
UIObject
saveToDomain
in interface UIObject
public void loadFromDomain()
loadFromDomain
in interface UIObject
public java.util.List getVariableDeclarations()
public void setVariableDeclarations(java.util.List vars)
public java.util.SortedSet getVariablesUsed()
public void loadFromDomain(java.lang.Object domainObject)
UIObject
loadFromDomain
in interface UIObject
public void saveMGraphToDomain(Refinement refinement)
public void saveCanvasPositionGraphToDomain(Refinement refinement)
public void loadMGraphFromDomain(Refinement refinement)
public void loadCanvasPositionGraphFromDomain(Refinement refinement)
public IGraph graphFromPosition(Refinement refinement, java.lang.Object pos)
public IXObject getOriginal()
UIObject
getOriginal
in interface UIObject
public void loadFromOriginal()
loadFromOriginal
in interface UIObject
public boolean sameNodes(java.util.List nodes, java.util.List otherNodes)
public void addToDomain()
public void addToDomain(Domain domain)
UIObject
addToDomain
in interface UIObject
public void updateInDomain() throws DomainReferenceException
DomainReferenceException
public void updateInDomain(Domain domain) throws DomainReferenceException
UIObject
updateInDomain
in interface UIObject
DomainReferenceException
public void removeFromDomain() throws DomainReferenceException
DomainReferenceException
public void removeFromDomain(Domain domain) throws DomainReferenceException
UIObject
removeFromDomain
in interface UIObject
DomainReferenceException
public void noteChange()
noteChange
in interface UIObject
public boolean isUndefined()
isUndefined
in interface UIEditableObject
public boolean isEmpty()
isEmpty
in interface UIEditableObject
isEmpty
in interface UIObject
public boolean isEmpty(Refinement refinement)
public boolean hasChanged()
hasChanged
in interface UIEditableObject
hasChanged
in interface UIObject
public java.util.List collectChanges(Refinement original)
public java.util.List collectChanges(Refinement original, java.lang.String which)
public java.util.List collectChanges()
collectChanges
in interface UIObject
public java.util.List collectChangesFromOriginal()
collectChangesFromOriginal
in interface UIObject
public boolean hasChangedNoDebug(Refinement original)
public boolean hasChanged(Refinement original)
public boolean hasChangedFromOriginal()
hasChangedFromOriginal
in interface UIEditableObject
hasChangedFromOriginal
in interface UIObject
public boolean nameHasChanged(java.lang.Object nameThing)
UIObject
nameHasChanged
in interface UIObject
public boolean sameValue(java.lang.String field, java.lang.Object value, java.lang.Object otherValue)
UIObject
sameValue
in interface EditableObject
sameValue
in interface UIObject
public boolean setValue(java.lang.String field, java.lang.Object value)
UIObject
setValue
in interface EditableObject
setValue
in interface UIObject
public void checkConsistency()
public static java.util.List parseNodes(UIDomain uiDomain, java.lang.String expansion)
expansion
- a string containing node descriptions (patterns)
seperated by new lines.
public static java.util.List parseIssues(UIDomain uiDomain, java.lang.String sIssues)
expansion
- a string containing node descriptions (patterns)
seperated by new lines.
public void deleteNode(NodeSpec node)
protected void deleteNodeConstraints(NodeSpec node)
public boolean matchesPattern(LList pattern)
public NodeSpec findNode(Name id)
public NodeSpec findNode(LList pattern)
public NodeSpec findNode(java.util.List nodeList, LList pattern)
public static NodeSpec findEditedNode(java.util.List oldNodes, LList pattern)
public static boolean similarPattern(LList patternOne, LList patternTwo)
public static boolean constraintMentionsNode(Constraint c, Name nodeId)
public static boolean constraintMentionsNode(Ordering o, Name nodeId)
public Name getNewNodeId()
public Name getHighestNodeId()
public static Name getHighestNodeId(java.util.List nodes)
public void addNode(NodeSpec node)
public void addIssue(Issue issue)
public void addConstraint(java.lang.Object newValue) throws UIRefinement.ConstraintTypeException
UIRefinement.ConstraintTypeException
public void addOrdering(Constraint newValue)
public void addOrdering(Ordering newValue)
public java.lang.String getOrderingType()
public java.lang.String getOrderingType(java.util.Collection orderings)
public void setOrderingType(java.lang.String type)
public boolean orderingsAreSequential()
public boolean orderingsAreSequential(java.util.Collection orderings)
public java.util.List makeSequence()
public static boolean isRef(NodeSpec node, java.lang.Object o)
public java.lang.String print()
print
in interface UIObject
public void addDataChangeListener(DataChangeListener l)
addDataChangeListener
in interface EditableObject
public void removeDataChangeListener(DataChangeListener l)
removeDataChangeListener
in interface EditableObject
public void setGraph(IGraph g)
public IGraph getGraph()
public void removeGraph(IGraph g)
public void setAutoPoints(java.util.List points)
public java.util.Enumeration children()
children
in interface javax.swing.tree.TreeNode
public boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
public javax.swing.tree.TreeNode getChildAt(int index)
getChildAt
in interface javax.swing.tree.TreeNode
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
public int getIndex(javax.swing.tree.TreeNode node)
getIndex
in interface javax.swing.tree.TreeNode
public javax.swing.tree.TreeNode getParent()
getParent
in interface javax.swing.tree.TreeNode
public boolean isLeaf()
isLeaf
in interface javax.swing.tree.TreeNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |