ix.iview.domain
Class UIDomain

java.lang.Object
  extended by ix.icore.AbstractAnnotatedObject
      extended by ix.iview.domain.UIDomain
All Implemented Interfaces:
Annotated, DomainListener, Named, EditableObject, ObjectManager, UIEditableObject, UIObject, DomainObjectManager, java.io.Serializable, java.util.EventListener

public class UIDomain
extends AbstractAnnotatedObject
implements UIObject, Named, DomainListener, DomainObjectManager

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.

See Also:
Serialized Form

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

name

public java.lang.String name

comments

public java.lang.String comments

annotations

public Annotations annotations

baseReference

protected java.lang.String baseReference

grammar

protected UIGrammar grammar

graphs

public java.util.HashMap graphs
list of graphs that apply to Refinements; should be UIRefinement slot


dataChangeListeners

java.util.HashSet dataChangeListeners
Constructor Detail

UIDomain

public UIDomain(Domain baseDomain,
                DomainEditor editor)

UIDomain

public UIDomain(DomainEditor editor)

UIDomain

public UIDomain(java.lang.String name,
                DomainEditor editor)
Method Detail

setCurrentDomain

public void setCurrentDomain(Domain domain)

noteSetEditor

public void noteSetEditor(AbstractSetEditor setEd)
Specified by:
noteSetEditor in interface ObjectManager

getGrammar

public UIGrammar getGrammar()

setGrammar

public void setGrammar(UIGrammar grammar)

ensureConstruct

public void ensureConstruct(UIObject object)

addConstruct

public boolean addConstruct(UIObject object)

updateConstruct

public void updateConstruct(UIObject object)

removeConstruct

public void removeConstruct(Named object)

changeName

public void changeName(java.lang.Object object,
                       java.lang.String newName)

getDomain

public Domain getDomain()
Description copied from interface: UIObject
Gets the base domain.

Specified by:
getDomain in interface UIObject
Specified by:
getDomain in interface DomainObjectManager

getUIDomain

public UIDomain getUIDomain()
Description copied from interface: UIObject
Gets the ui domain of which this object is part.

Specified by:
getUIDomain in interface UIObject
Specified by:
getUIDomain in interface DomainObjectManager

hasOriginal

public boolean hasOriginal()
Description copied from interface: UIObject
Determines whether the object has an original in the base domain.

Specified by:
hasOriginal in interface UIEditableObject
Specified by:
hasOriginal in interface UIObject

getOriginal

public IXObject getOriginal()
Description copied from interface: UIObject
Gets the object that corresponds to this one in the original domain.

Specified by:
getOriginal in interface UIObject

getBaseObject

public IXObject getBaseObject()
Description copied from interface: UIObject
Gets the object that corresponds to this one in the domain.

Specified by:
getBaseObject in interface UIEditableObject
Specified by:
getBaseObject in interface UIObject

makeBaseObject

public IXObject makeBaseObject()
Description copied from interface: UIObject
Makes an empty object of the right class that can represent this UIObject in the domain.

Specified by:
makeBaseObject in interface UIObject

setBaseObject

public void setBaseObject(IXObject object)
Description copied from interface: UIObject
Sets the object that will represent this one in the domain.

Specified by:
setBaseObject in interface UIObject

getBaseReference

public java.lang.Object getBaseReference()
Description copied from interface: UIObject
Gets the Id that can be used to identify the base object in the domain.

Specified by:
getBaseReference in interface UIObject

setBaseReference

public void setBaseReference(java.lang.Object o)
Description copied from interface: UIObject
Sets the Id that can be used to identify the base object in the domain.

Specified by:
setBaseReference in interface UIObject

getBaseClass

public java.lang.Class getBaseClass()
Description copied from interface: UIObject
Gets the class of objects that can represent this one in the domain.

Specified by:
getBaseClass in interface UIObject

isUndefined

public boolean isUndefined()
A refinement is undefined if all its data fields are empty except the pattern which may have data in it.

Specified by:
isUndefined in interface UIEditableObject

isEmpty

public boolean isEmpty()
Description copied from interface: UIObject
Determines whether the object has any information in it.

Specified by:
isEmpty in interface UIEditableObject
Specified by:
isEmpty in interface UIObject

getName

public java.lang.String getName()
Specified by:
getName in interface Named

setName

public void setName(java.lang.String name)
Specified by:
setName in interface UIObject

getComments

public java.lang.String getComments()
Overrides:
getComments in class AbstractAnnotatedObject

setComments

public void setComments(java.lang.String comments)
Overrides:
setComments in class AbstractAnnotatedObject

getAnnotations

public Annotations getAnnotations()
Specified by:
getAnnotations in interface Annotated
Overrides:
getAnnotations in class AbstractAnnotatedObject

setAnnotations

public void setAnnotations(Annotations annotations)
Specified by:
setAnnotations in interface Annotated
Overrides:
setAnnotations in class AbstractAnnotatedObject

collectChanges

public java.util.List collectChanges()
Collects the differences between this object and the base one (draft).

Specified by:
collectChanges in interface UIObject
Returns:
a list of strings describing changes

collectChangesFromOriginal

public java.util.List collectChangesFromOriginal()
Collects the differences between this object and the published one.

Specified by:
collectChangesFromOriginal in interface UIObject
Returns:
a list of strings describing changes

collectChanges

public java.util.List collectChanges(Domain domain)

collectChanges

public java.util.List collectChanges(Domain domain,
                                     java.lang.String which)

hasChanged

public boolean hasChanged(Domain domain)
Finds out whether the domain has changed from the given one. The domain has not changed if the domain's own fields (name) have not changed.


hasChanged

public boolean hasChanged()
Finds out whether the domain has changed from the draft.

Specified by:
hasChanged in interface UIEditableObject
Specified by:
hasChanged in interface UIObject

hasChangedFromOriginal

public boolean hasChangedFromOriginal()
Finds out whether the domain has changed from the published/original one.

Specified by:
hasChangedFromOriginal in interface UIEditableObject
Specified by:
hasChangedFromOriginal in interface UIObject

nameHasChanged

public boolean nameHasChanged(java.lang.Object nameThing)
Description copied from interface: UIObject
Determines whether the object's identifying fields have changed

Specified by:
nameHasChanged in interface UIObject

setValue

public boolean setValue(java.lang.String field,
                        java.lang.Object value)
Description copied from interface: UIObject
Sets the given field to the given value. Should default to UIUtil.setObjectFieldValue(Object object, String field, Class fieldClass, Object value).

Specified by:
setValue in interface EditableObject
Specified by:
setValue in interface UIObject

sameValue

public boolean sameValue(java.lang.String field,
                         java.lang.Object value,
                         java.lang.Object otherValue)
Description copied from interface: UIObject
Determines whether the two given values of the given field differ

Specified by:
sameValue in interface EditableObject
Specified by:
sameValue in interface UIObject

saveToDomain

public void saveToDomain()
Save the object's own info into its base object

Specified by:
saveToDomain in interface UIObject

saveToDomain

public void saveToDomain(java.lang.Object domainObject)
Description copied from interface: UIObject
Saves the contents of this object into the given object.

Specified by:
saveToDomain in interface UIObject

loadFromDomain

public void loadFromDomain()
load the object's own information (name) from the original domain

Specified by:
loadFromDomain in interface UIObject

loadFromDomain

public void loadFromDomain(java.lang.Object domainObject)
Description copied from interface: UIObject
Loads the contents of this object from the given object. The given object should be of the right class (same as the result of getBaseClass()).

Specified by:
loadFromDomain in interface UIObject

loadFromOriginal

public void loadFromOriginal()
Description copied from interface: UIObject
Loads the contents of this object from its original domain object.

Specified by:
loadFromOriginal in interface UIObject

insertFromDomain

public void insertFromDomain(java.lang.Object domainObject)

addToDomain

public void addToDomain(Domain domain)
Description copied from interface: UIObject
Adds the contents of this UIObject to the domain (part of publish).

Specified by:
addToDomain in interface UIObject

updateInDomain

public void updateInDomain(Domain domain)
Description copied from interface: UIObject
Updates the base object in the domain with the contents of this object.

Specified by:
updateInDomain in interface UIObject

removeFromDomain

public void removeFromDomain(Domain domain)
Description copied from interface: UIObject
Removes the object's corresponding base object from the domain.

Specified by:
removeFromDomain in interface UIObject

moveToUIDomain

public void moveToUIDomain(UIDomain uiDomain)
Description copied from interface: UIObject
Move the object from its current UIDomain to the given one.

Specified by:
moveToUIDomain in interface UIObject

noteChange

public void noteChange()
Description copied from interface: UIObject
Get the UIDomain to note the change of this object.

Specified by:
noteChange in interface UIObject

hasChangedAll

public boolean hasChangedAll()
Finds out whether the domain and its constructs have changed from the draft.


hasChangedAllFromOriginal

public boolean hasChangedAllFromOriginal()
Finds out whether the domain and its constructs have changed from the original.


hasChangedConstructsFromOriginal

public boolean hasChangedConstructsFromOriginal()
Finds out whether the domain and its constructs have changed from the original.


isSaving

public boolean isSaving(Domain domain)
Specified by:
isSaving in interface DomainObjectManager

isSaving

public boolean isSaving()
Specified by:
isSaving in interface ObjectManager

hasChangedAll

public boolean hasChangedAll(Domain domain)
Finds out whether anything in the domain (inc. constructs) have changed from the given one. The domain has not changed if there are no added/edited/removed notes and the domain's own fields have not changed.


collectAllChanges

public java.util.List collectAllChanges()
Collects the differences between this object and the published one.

Returns:
a list of strings describing changes

collectAllChanges

public java.util.List collectAllChanges(Domain domain)

newUIObject

public UIObject newUIObject(IXObject object)

getAllRefinements

public java.util.List getAllRefinements()

getAllObjectClasses

public java.util.List getAllObjectClasses()

hasObjectSystem

public boolean hasObjectSystem()

hasRefinements

public boolean hasRefinements()

getObjectClassTree

public java.util.List getObjectClassTree()
Find all object classes in the domain


getObjectClassRoot

public UIObjectClass getObjectClassRoot()

getObjectClassTreeOld

public java.util.List getObjectClassTreeOld()

getObjectClassRootOld

public UIObjectClass getObjectClassRootOld()

getNamedRefinement

public java.lang.Object getNamedRefinement(java.lang.String name)
Finds a refinement whose name matches the given string.

Returns:
a UIRefinement, a Refinement, or null - depending on which exists.

getNamedObjectClass

public java.lang.Object getNamedObjectClass(java.lang.String name)
Finds an objectClass whose name matches the given string.

Returns:
an UIObjectClass, ObjectClass, or null - depending on which exists

getUIObject

public UIObject getUIObject(IXObject object)

findUIObject

public UIObject findUIObject(java.lang.Object object)

isCurrentObject

public boolean isCurrentObject(java.lang.Object o)

getMatchingRefinements

public java.util.Set getMatchingRefinements(java.lang.String pattern)
Finds refinements whose names match the given string.

Returns:
the matches sorted by how early the string appears in the name

getMatchingObjectClasses

public java.util.Set getMatchingObjectClasses(java.lang.String pattern)

getMatchingRefinements

public java.util.Set getMatchingRefinements(LList pattern)

isMatchingRefinement

public boolean isMatchingRefinement(LList pattern,
                                    java.lang.Object o)
Checks whether the given object is a refinement that matches the pattern. If it has been removed, it never matches. If it is an original or has been added or edited, it matches if the patterns match.


refinementAdded

public void refinementAdded(RefinementEvent e)
DomainListener

Specified by:
refinementAdded in interface DomainListener

objectClassAdded

public void objectClassAdded(DomainEvent e)
DomainListener


addedObject

public void addedObject(UIObject uio,
                        IXObject original)
from UIRefinement and UIObjectClass when they are created


declareAllVariables

public boolean declareAllVariables()
Declare the variables of all refinements as they are currently used. Will declare typos as they are, so user should tidy up at some point! Will also declare "none" if no variables are currently used.

Returns:
false if user changed their mind, true otherwise.

findVariableUsers

public java.util.Collection findVariableUsers(ItemVar var)
Finds all refinements that use the variable with the given name. Does not look at whether the refinement declares it (used during consistency checks!)

Returns:
a list of the refinements that use the variable

findVariableUsers

public java.util.Collection findVariableUsers(java.lang.String name)
Finds all refinements that use the variable with the given name. Does not look at whether the refinement declares it (used during consistency checks!)

Returns:
a list of the refinements that use the variable

findVariablesUsed

public java.util.Set findVariablesUsed()
Finds all variables that are used within the domain's refinements. Does not look at whether the refinement declares it (used during consistency checks!)

Returns:
a set of variables used

fullSaveToDomain

public void fullSaveToDomain()
Save the object and all its components into its base object


fullSaveToDomain

public void fullSaveToDomain(java.lang.Object domainObject)

publishToDomain

public void publishToDomain()

revertToOriginal

public void revertToOriginal()
Reverts the domain and all its construct to the last published domain. If the domain has not been published, reverts to the original (usually an empty domain).


addUIDomainListener

public void addUIDomainListener(UIDomainListener listener)

getUIDomainListeners

public java.util.HashSet getUIDomainListeners()

setUIDomainListeners

public void setUIDomainListeners(java.util.HashSet listeners)

removeUIDomainListener

public void removeUIDomainListener(UIDomainListener listener)

fireConstructAdded

public void fireConstructAdded(DomainEvent e)

fireConstructAdded

public void fireConstructAdded(AbstractSetEditor se,
                               java.lang.Object object)
Specified by:
fireConstructAdded in interface ObjectManager

fireConstructEdited

public void fireConstructEdited(AbstractSetEditor se,
                                java.lang.Object object)
Specified by:
fireConstructEdited in interface ObjectManager

fireConstructRemoved

public void fireConstructRemoved(AbstractSetEditor se,
                                 java.lang.Object object)
Specified by:
fireConstructRemoved in interface ObjectManager

fireDomainEdited

public void fireDomainEdited()
The domain's own fields changed (currently only name)


fireDomainCleared

public void fireDomainCleared()

fireDomainSet

public void fireDomainSet(Domain domain)

addDataChangeListener

public void addDataChangeListener(DataChangeListener l)
Specified by:
addDataChangeListener in interface EditableObject

removeDataChangeListener

public void removeDataChangeListener(DataChangeListener l)
Specified by:
removeDataChangeListener in interface EditableObject

setDomain

public void setDomain(Domain domain)
clears this domain, then sets it to the new one.


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

clearThis

public void clearThis()

clearQuiet

public void clearQuiet()
This gets rid of everything, including lists that keep track of changes.


clear

public void clear()

clearBase

public void clearBase()

clearDraft

public void clearDraft()
Clear all constructs in the draft domain. If there is a base-domain, note that all its constructs are removed.


setDomainFile

public void setDomainFile(java.io.File file)

getDomainFile

public java.io.File getDomainFile(java.io.File file)

saveDomain

public java.io.File saveDomain()
Save the UIDomain to a local file - does not publish! If the domain has been saved before, it uses the previous file (warning about overwriting). Otherwise it will ask the user for a file.


saveDomainAs

public java.io.File saveDomainAs()
Save the UIDomain to a local file - does not publish! If the domain has been saved before, it uses the previous file (warning about overwriting). Otherwise it will ask the user for a file.


saveDomain

public java.io.File saveDomain(java.io.File file)
Save the UIDomain to the given local file - does not publish! Assumes that this domain is up-to-date! Call this with a null argument for saveAs behaviour.


analyseDomain

public void analyseDomain()

checkConsistency

public void checkConsistency()

collectInconsistencies

public java.util.HashMap collectInconsistencies()

checkAndListConsistency

public boolean checkAndListConsistency()
todo!!!!!!!!!!


checkAndReportConsistency

public void checkAndReportConsistency()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

print

public java.lang.String print()
Specified by:
print in interface UIObject

printSets

public java.lang.String printSets()

printDetailedSets

public java.lang.String printDetailedSets()

setLoading

public void setLoading(boolean onOff)

isLoading

public boolean isLoading()
Specified by:
isLoading in interface ObjectManager

setOverwrite

public void setOverwrite(boolean onOff)

insertDomain

public void insertDomain()
Loads a domain from a file into the draft domain. loads the domain object into this, adds all refinements, and fires change.


loadDomain

public void loadDomain()
Clears the draft domain (noting all of original domain as removed) and loads a domain-file into the draft domain.


addGraph

public void addGraph(Named g)

fireGraphAdded

public void fireGraphAdded(java.lang.Object g)

getAllGraphs

public LList getAllGraphs()

getNamedGraph

public Named getNamedGraph(java.lang.String name)

removeNamedGraph

public void removeNamedGraph(java.lang.String name)