|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.icore.AbstractAnnotatedObject ix.iview.domain.UIDomain
public class UIDomain
Mirrors the Domain for safe editing and adds UI things and change management. A UIDomain maintains the link to a base domain. It can publish changes in the base domain. UIDomain also contains a link to the DomainEditor which is the one that keeps track of which uiDomain is current.
Field Summary | |
---|---|
Annotations |
annotations
|
protected java.lang.String |
baseReference
|
java.lang.String |
comments
|
(package private) java.util.HashSet |
dataChangeListeners
|
protected UIGrammar |
grammar
|
java.util.HashMap |
graphs
list of graphs that apply to Refinements; should be UIRefinement slot |
java.lang.String |
name
|
Fields inherited from class ix.icore.AbstractAnnotatedObject |
---|
annotationListeners |
Constructor Summary | |
---|---|
UIDomain(Domain baseDomain,
DomainEditor editor)
|
|
UIDomain(DomainEditor editor)
|
|
UIDomain(java.lang.String name,
DomainEditor editor)
|
Method Summary | |
---|---|
boolean |
addConstruct(UIObject object)
|
void |
addDataChangeListener(DataChangeListener l)
|
void |
addedObject(UIObject uio,
IXObject original)
from UIRefinement and UIObjectClass when they are created |
void |
addGraph(Named g)
|
void |
addToDomain(Domain domain)
Adds the contents of this UIObject to the domain (part of publish). |
void |
addUIDomainListener(UIDomainListener listener)
|
void |
analyseDomain()
|
void |
changeName(java.lang.Object object,
java.lang.String newName)
|
boolean |
checkAndListConsistency()
todo!!!!!!!!!! |
void |
checkAndReportConsistency()
|
void |
checkConsistency()
|
void |
clear()
|
void |
clearBase()
|
void |
clearDraft()
Clear all constructs in the draft domain. |
void |
clearQuiet()
This gets rid of everything, including lists that keep track of changes. |
void |
clearThis()
|
java.lang.Object |
clone()
|
java.util.List |
collectAllChanges()
Collects the differences between this object and the published one. |
java.util.List |
collectAllChanges(Domain domain)
|
java.util.List |
collectChanges()
Collects the differences between this object and the base one (draft). |
java.util.List |
collectChanges(Domain domain)
|
java.util.List |
collectChanges(Domain domain,
java.lang.String which)
|
java.util.List |
collectChangesFromOriginal()
Collects the differences between this object and the published one. |
java.util.HashMap |
collectInconsistencies()
|
boolean |
declareAllVariables()
Declare the variables of all refinements as they are currently used. |
void |
ensureConstruct(UIObject object)
|
UIObject |
findUIObject(java.lang.Object object)
|
java.util.Set |
findVariablesUsed()
Finds all variables that are used within the domain's refinements. |
java.util.Collection |
findVariableUsers(ItemVar var)
Finds all refinements that use the variable with the given name. |
java.util.Collection |
findVariableUsers(java.lang.String name)
Finds all refinements that use the variable with the given name. |
void |
fireConstructAdded(AbstractSetEditor se,
java.lang.Object object)
|
void |
fireConstructAdded(DomainEvent e)
|
void |
fireConstructEdited(AbstractSetEditor se,
java.lang.Object object)
|
void |
fireConstructRemoved(AbstractSetEditor se,
java.lang.Object object)
|
void |
fireDomainCleared()
|
void |
fireDomainEdited()
The domain's own fields changed (currently only name) |
void |
fireDomainSet(Domain domain)
|
void |
fireGraphAdded(java.lang.Object g)
|
void |
fullSaveToDomain()
Save the object and all its components into its base object |
void |
fullSaveToDomain(java.lang.Object domainObject)
|
LList |
getAllGraphs()
|
java.util.List |
getAllObjectClasses()
|
java.util.List |
getAllRefinements()
|
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. |
java.lang.String |
getComments()
|
Domain |
getDomain()
Gets the base domain. |
java.io.File |
getDomainFile(java.io.File file)
|
UIGrammar |
getGrammar()
|
java.util.Set |
getMatchingObjectClasses(java.lang.String pattern)
|
java.util.Set |
getMatchingRefinements(LList pattern)
|
java.util.Set |
getMatchingRefinements(java.lang.String pattern)
Finds refinements whose names match the given string. |
java.lang.String |
getName()
|
Named |
getNamedGraph(java.lang.String name)
|
java.lang.Object |
getNamedObjectClass(java.lang.String name)
Finds an objectClass whose name matches the given string. |
java.lang.Object |
getNamedRefinement(java.lang.String name)
Finds a refinement whose name matches the given string. |
UIObjectClass |
getObjectClassRoot()
|
UIObjectClass |
getObjectClassRootOld()
|
java.util.List |
getObjectClassTree()
Find all object classes in the domain |
java.util.List |
getObjectClassTreeOld()
|
IXObject |
getOriginal()
Gets the object that corresponds to this one in the original domain. |
UIDomain |
getUIDomain()
Gets the ui domain of which this object is part. |
java.util.HashSet |
getUIDomainListeners()
|
UIObject |
getUIObject(IXObject object)
|
boolean |
hasChanged()
Finds out whether the domain has changed from the draft. |
boolean |
hasChanged(Domain domain)
Finds out whether the domain has changed from the given one. |
boolean |
hasChangedAll()
Finds out whether the domain and its constructs have changed from the draft. |
boolean |
hasChangedAll(Domain domain)
Finds out whether anything in the domain (inc. constructs) have changed from the given one. |
boolean |
hasChangedAllFromOriginal()
Finds out whether the domain and its constructs have changed from the original. |
boolean |
hasChangedConstructsFromOriginal()
Finds out whether the domain and its constructs have changed from the original. |
boolean |
hasChangedFromOriginal()
Finds out whether the domain has changed from the published/original one. |
boolean |
hasObjectSystem()
|
boolean |
hasOriginal()
Determines whether the object has an original in the base domain. |
boolean |
hasRefinements()
|
void |
insertDomain()
Loads a domain from a file into the draft domain. |
void |
insertFromDomain(java.lang.Object domainObject)
|
boolean |
isCurrentObject(java.lang.Object o)
|
boolean |
isEmpty()
Determines whether the object has any information in it. |
boolean |
isLoading()
|
boolean |
isMatchingRefinement(LList pattern,
java.lang.Object o)
Checks whether the given object is a refinement that matches the pattern. |
boolean |
isSaving()
|
boolean |
isSaving(Domain domain)
|
boolean |
isUndefined()
A refinement is undefined if all its data fields are empty except the pattern which may have data in it. |
void |
loadDomain()
Clears the draft domain (noting all of original domain as removed) and loads a domain-file into the draft domain. |
void |
loadFromDomain()
load the object's own information (name) from the original domain |
void |
loadFromDomain(java.lang.Object domainObject)
Loads the contents of this object from the given object. |
void |
loadFromOriginal()
Loads the contents of this object from its original domain object. |
IXObject |
makeBaseObject()
Makes an empty object of the right class that can represent this UIObject in the domain. |
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 |
UIObject |
newUIObject(IXObject object)
|
void |
noteChange()
Get the UIDomain to note the change of this object. |
void |
noteSetEditor(AbstractSetEditor setEd)
|
void |
objectClassAdded(DomainEvent e)
DomainListener |
java.lang.String |
print()
|
java.lang.String |
printDetailedSets()
|
java.lang.String |
printSets()
|
void |
publishToDomain()
|
void |
refinementAdded(RefinementEvent e)
DomainListener |
void |
removeConstruct(Named object)
|
void |
removeDataChangeListener(DataChangeListener l)
|
void |
removeFromDomain(Domain domain)
Removes the object's corresponding base object from the domain. |
void |
removeNamedGraph(java.lang.String name)
|
void |
removeUIDomainListener(UIDomainListener listener)
|
void |
revertToOriginal()
Reverts the domain and all its construct to the last published domain. |
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 |
java.io.File |
saveDomain()
Save the UIDomain to a local file - does not publish! |
java.io.File |
saveDomain(java.io.File file)
Save the UIDomain to the given local file - does not publish! |
java.io.File |
saveDomainAs()
Save the UIDomain to a local file - does not publish! |
void |
saveToDomain()
Save the object's own info into its base object |
void |
saveToDomain(java.lang.Object domainObject)
Saves the contents of this object into the given object. |
void |
setAnnotations(Annotations annotations)
|
void |
setBaseObject(IXObject object)
Sets the object that will represent this one in the domain. |
void |
setBaseReference(java.lang.Object o)
Sets the Id that can be used to identify the base object in the domain. |
void |
setComments(java.lang.String comments)
|
void |
setCurrentDomain(Domain domain)
|
void |
setDomain(Domain domain)
clears this domain, then sets it to the new one. |
void |
setDomainFile(java.io.File file)
|
void |
setGrammar(UIGrammar grammar)
|
void |
setLoading(boolean onOff)
|
void |
setName(java.lang.String name)
|
void |
setOverwrite(boolean onOff)
|
void |
setUIDomainListeners(java.util.HashSet listeners)
|
boolean |
setValue(java.lang.String field,
java.lang.Object value)
Sets the given field to the given value. |
java.lang.String |
toString()
|
void |
updateConstruct(UIObject object)
|
void |
updateInDomain(Domain domain)
Updates the base object in the domain with the contents of this object. |
Methods inherited from class ix.icore.AbstractAnnotatedObject |
---|
addAnnotationListener, annMap, clearAnnotations, fireSetAnnotation, getAnnotation, makeAnnMap, removeAnnotation, setAnnotation, takeAnnotations |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public java.lang.String name
public java.lang.String comments
public Annotations annotations
protected java.lang.String baseReference
protected UIGrammar grammar
public java.util.HashMap graphs
java.util.HashSet dataChangeListeners
Constructor Detail |
---|
public UIDomain(Domain baseDomain, DomainEditor editor)
public UIDomain(DomainEditor editor)
public UIDomain(java.lang.String name, DomainEditor editor)
Method Detail |
---|
public void setCurrentDomain(Domain domain)
public void noteSetEditor(AbstractSetEditor setEd)
noteSetEditor
in interface ObjectManager
public UIGrammar getGrammar()
public void setGrammar(UIGrammar grammar)
public void ensureConstruct(UIObject object)
public boolean addConstruct(UIObject object)
public void updateConstruct(UIObject object)
public void removeConstruct(Named object)
public void changeName(java.lang.Object object, java.lang.String newName)
public Domain getDomain()
UIObject
getDomain
in interface UIObject
getDomain
in interface DomainObjectManager
public UIDomain getUIDomain()
UIObject
getUIDomain
in interface UIObject
getUIDomain
in interface DomainObjectManager
public boolean hasOriginal()
UIObject
hasOriginal
in interface UIEditableObject
hasOriginal
in interface UIObject
public IXObject getOriginal()
UIObject
getOriginal
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.Object getBaseReference()
UIObject
getBaseReference
in interface UIObject
public void setBaseReference(java.lang.Object o)
UIObject
setBaseReference
in interface UIObject
public java.lang.Class getBaseClass()
UIObject
getBaseClass
in interface UIObject
public boolean isUndefined()
isUndefined
in interface UIEditableObject
public boolean isEmpty()
UIObject
isEmpty
in interface UIEditableObject
isEmpty
in interface UIObject
public java.lang.String getName()
getName
in interface Named
public void setName(java.lang.String name)
setName
in interface UIObject
public java.lang.String getComments()
getComments
in class AbstractAnnotatedObject
public void setComments(java.lang.String comments)
setComments
in class AbstractAnnotatedObject
public Annotations getAnnotations()
getAnnotations
in interface Annotated
getAnnotations
in class AbstractAnnotatedObject
public void setAnnotations(Annotations annotations)
setAnnotations
in interface Annotated
setAnnotations
in class AbstractAnnotatedObject
public java.util.List collectChanges()
collectChanges
in interface UIObject
public java.util.List collectChangesFromOriginal()
collectChangesFromOriginal
in interface UIObject
public java.util.List collectChanges(Domain domain)
public java.util.List collectChanges(Domain domain, java.lang.String which)
public boolean hasChanged(Domain domain)
public boolean hasChanged()
hasChanged
in interface UIEditableObject
hasChanged
in interface UIObject
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 setValue(java.lang.String field, java.lang.Object value)
UIObject
setValue
in interface EditableObject
setValue
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 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 void loadFromDomain(java.lang.Object domainObject)
UIObject
loadFromDomain
in interface UIObject
public void loadFromOriginal()
UIObject
loadFromOriginal
in interface UIObject
public void insertFromDomain(java.lang.Object domainObject)
public void addToDomain(Domain domain)
UIObject
addToDomain
in interface UIObject
public void updateInDomain(Domain domain)
UIObject
updateInDomain
in interface UIObject
public void removeFromDomain(Domain domain)
UIObject
removeFromDomain
in interface UIObject
public void moveToUIDomain(UIDomain uiDomain)
UIObject
moveToUIDomain
in interface UIObject
public void noteChange()
UIObject
noteChange
in interface UIObject
public boolean hasChangedAll()
public boolean hasChangedAllFromOriginal()
public boolean hasChangedConstructsFromOriginal()
public boolean isSaving(Domain domain)
isSaving
in interface DomainObjectManager
public boolean isSaving()
isSaving
in interface ObjectManager
public boolean hasChangedAll(Domain domain)
public java.util.List collectAllChanges()
public java.util.List collectAllChanges(Domain domain)
public UIObject newUIObject(IXObject object)
public java.util.List getAllRefinements()
public java.util.List getAllObjectClasses()
public boolean hasObjectSystem()
public boolean hasRefinements()
public java.util.List getObjectClassTree()
public UIObjectClass getObjectClassRoot()
public java.util.List getObjectClassTreeOld()
public UIObjectClass getObjectClassRootOld()
public java.lang.Object getNamedRefinement(java.lang.String name)
public java.lang.Object getNamedObjectClass(java.lang.String name)
public UIObject getUIObject(IXObject object)
public UIObject findUIObject(java.lang.Object object)
public boolean isCurrentObject(java.lang.Object o)
public java.util.Set getMatchingRefinements(java.lang.String pattern)
public java.util.Set getMatchingObjectClasses(java.lang.String pattern)
public java.util.Set getMatchingRefinements(LList pattern)
public boolean isMatchingRefinement(LList pattern, java.lang.Object o)
public void refinementAdded(RefinementEvent e)
refinementAdded
in interface DomainListener
public void objectClassAdded(DomainEvent e)
public void addedObject(UIObject uio, IXObject original)
public boolean declareAllVariables()
public java.util.Collection findVariableUsers(ItemVar var)
public java.util.Collection findVariableUsers(java.lang.String name)
public java.util.Set findVariablesUsed()
public void fullSaveToDomain()
public void fullSaveToDomain(java.lang.Object domainObject)
public void publishToDomain()
public void revertToOriginal()
public void addUIDomainListener(UIDomainListener listener)
public java.util.HashSet getUIDomainListeners()
public void setUIDomainListeners(java.util.HashSet listeners)
public void removeUIDomainListener(UIDomainListener listener)
public void fireConstructAdded(DomainEvent e)
public void fireConstructAdded(AbstractSetEditor se, java.lang.Object object)
fireConstructAdded
in interface ObjectManager
public void fireConstructEdited(AbstractSetEditor se, java.lang.Object object)
fireConstructEdited
in interface ObjectManager
public void fireConstructRemoved(AbstractSetEditor se, java.lang.Object object)
fireConstructRemoved
in interface ObjectManager
public void fireDomainEdited()
public void fireDomainCleared()
public void fireDomainSet(Domain domain)
public void addDataChangeListener(DataChangeListener l)
addDataChangeListener
in interface EditableObject
public void removeDataChangeListener(DataChangeListener l)
removeDataChangeListener
in interface EditableObject
public void setDomain(Domain domain)
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public void clearThis()
public void clearQuiet()
public void clear()
public void clearBase()
public void clearDraft()
public void setDomainFile(java.io.File file)
public java.io.File getDomainFile(java.io.File file)
public java.io.File saveDomain()
public java.io.File saveDomainAs()
public java.io.File saveDomain(java.io.File file)
public void analyseDomain()
public void checkConsistency()
public java.util.HashMap collectInconsistencies()
public boolean checkAndListConsistency()
public void checkAndReportConsistency()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String print()
print
in interface UIObject
public java.lang.String printSets()
public java.lang.String printDetailedSets()
public void setLoading(boolean onOff)
public boolean isLoading()
isLoading
in interface ObjectManager
public void setOverwrite(boolean onOff)
public void insertDomain()
public void loadDomain()
public void addGraph(Named g)
public void fireGraphAdded(java.lang.Object g)
public LList getAllGraphs()
public Named getNamedGraph(java.lang.String name)
public void removeNamedGraph(java.lang.String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |