java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.imp.registry.EmbeddedSharedObject
de.grogra.graph.object.sg.impl.SecGraphImpl
- All Implemented Interfaces:
GraphContext
,GraphManagerContext
,GraphObject
,SecGraph
,ProducingNode
,DisposableField
,Manageable
,Shareable
,RegistryContext
,Selectable
,Cloneable
-
Nested Class Summary
Nested classes/interfaces inherited from class de.grogra.imp.registry.EmbeddedSharedObject
EmbeddedSharedObject.GetExtFromMimeType
-
Field Summary
Fields inherited from interface de.grogra.graph.object.sg.SecGraph
PRODUCTION_ROOT, QUERY_ROOT
-
Constructor Summary
ConstructorDescriptionSecGraphImpl
(Node node, Context ctx) SecGraphImpl
(Context ctx) SecGraphImpl
(Context ctx, Node root) SecGraphImpl
(Context ctx, GraphContext inp) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(GraphContext inp) void
apply the given SecGraph on this SecGraphvoid
Apply a RGG function on the SecGraphvoid
Apply an XL Query on the SecGraphvoid
clear()
removes all Nodes except the rootclone()
clone the graph of the rootnode and returns itGives an array of node types and number contained in the GraphObjectvoid
void
execute()
run this SecGraph as a rule on the MainGraphvoid
run this SecGraph as a rule on the given secGraphgetGraph()
Return the graph manager of the GraphObject.create a new producer to initialize the GraphManage where the file should be storedgetName()
Gives the name if one existsReturn a node of the given nameThe java class name of the object typegetProductionRoot
(boolean create) getQueryRoot
(boolean create) Returns theRegistry
which is linked with this instance.Return the root node of the GraphObject, i.e. the root of the object loadedvoid
function triggered by the saving of the projectboolean
True if the object is not "empty" as its persistence depends how the mimetype write content, a java object with some value could be defined as "empty"boolean
test if this SecGraph incldues the SecGraph SGboolean
test if this SecGraph incldues the given SecGraph or if the query SecGraph of this graph is included in the given SecGraphboolean
test if this graph is included in the ProjectGraphboolean
inProjectGraph
(boolean asQuery) test if this graph is included in the ProjectGraph or if the query SecGraph of this graph is included in the Project Graphboolean
boolean
check if the secgraph includes a queryRootboolean
check if the secgraph includes a QueryRoot and a ProductionRootquery()
void
set the project graph to be teh current onevoid
reload()
If the GraphObject uses some modules defined in the project, reload forces the modules in the GraphObject to be relinked after compilationresolve()
Resolves the real object if a reference is used If the real object is used the function returns it selfstatic void
void
setAutoRecreate
(boolean b) defines if the SecGraph is automatically recreated if the model is savedvoid
set this graph to be the currently used onevoid
setRootNode
(Node root) Set the rootnode of a GraphObject object.creates a Node holding a instanciation of the SecGraphtoSelection
(Context ctx) Converts this object into aSelection
.void
Opens the 2d view of the current graphvoid
Opens the 3d view of the current graphvoid
write()
Override the file GraphObject in the project with its current version.Methods inherited from class de.grogra.imp.registry.EmbeddedSharedObject
getProvider, getProvider, initProvider, manageableReadResolve
Methods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getStamp, removeReference
-
Field Details
-
MIME_TYPE
-
$TYPE
-
-
Constructor Details
-
SecGraphImpl
-
SecGraphImpl
-
SecGraphImpl
-
SecGraphImpl
-
-
Method Details
-
getMimeType
Description copied from class:EmbeddedSharedObject
Manage where the file should be stored- Specified by:
getMimeType
in classEmbeddedSharedObject
-
getResourceDirectoryName
- Specified by:
getResourceDirectoryName
in classEmbeddedSharedObject
-
getObjectType
Description copied from class:EmbeddedSharedObject
The java class name of the object type- Specified by:
getObjectType
in classEmbeddedSharedObject
-
isAutoRecreate
public boolean isAutoRecreate() -
view2d
Description copied from interface:GraphObject
Opens the 2d view of the current graph- Specified by:
view2d
in interfaceGraphObject
-
view3d
Description copied from interface:GraphObject
Opens the 3d view of the current graph- Specified by:
view3d
in interfaceGraphObject
-
getGraph
Description copied from interface:GraphObject
Return the graph manager of the GraphObject. It is different from the graph manager of the project & workbench.- Specified by:
getGraph
in interfaceGraphContext
- Specified by:
getGraph
in interfaceGraphManagerContext
- Specified by:
getGraph
in interfaceGraphObject
-
reload
public void reload()Description copied from interface:GraphObject
If the GraphObject uses some modules defined in the project, reload forces the modules in the GraphObject to be relinked after compilation- Specified by:
reload
in interfaceGraphObject
-
clear
public void clear()Description copied from interface:SecGraph
removes all Nodes except the root -
write
public void write()Description copied from interface:GraphObject
Override the file GraphObject in the project with its current version. Required on GraphObject created in RGG to be saved- Specified by:
write
in interfaceGraphObject
-
apply
Description copied from interface:SecGraph
Apply a RGG function on the SecGraph -
applyXL
Description copied from interface:SecGraph
Apply an XL Query on the SecGraph -
toInstance
Description copied from interface:SecGraph
creates a Node holding a instanciation of the SecGraph- Specified by:
toInstance
in interfaceSecGraph
- Returns:
- the Node
-
handleSaveEvent
public void handleSaveEvent()Description copied from interface:SecGraph
function triggered by the saving of the project- Specified by:
handleSaveEvent
in interfaceSecGraph
-
setAutoRecreate
public void setAutoRecreate(boolean b) Description copied from interface:SecGraph
defines if the SecGraph is automatically recreated if the model is saved- Specified by:
setAutoRecreate
in interfaceSecGraph
- Parameters:
b
- sets if recreated or not
-
producer$begin
- Specified by:
producer$begin
in interfaceSecGraph
-
getInitalProducer
Description copied from interface:SecGraph
create a new producer to initialize the Graph- Specified by:
getInitalProducer
in interfaceSecGraph
- Returns:
-
setCurrent
public void setCurrent()Description copied from interface:SecGraph
set this graph to be the currently used one- Specified by:
setCurrent
in interfaceSecGraph
-
releaseCurrent
public void releaseCurrent()Description copied from interface:SecGraph
set the project graph to be teh current one- Specified by:
releaseCurrent
in interfaceSecGraph
-
save
-
getRootNode
Description copied from interface:GraphObject
Return the root node of the GraphObject, i.e. the root of the object loaded- Specified by:
getRootNode
in interfaceGraphObject
- Returns:
- a Node
-
setRootNode
Description copied from interface:GraphObject
Set the rootnode of a GraphObject object.- Specified by:
setRootNode
in interfaceGraphObject
-
cloneGraph
Description copied from interface:GraphObject
clone the graph of the rootnode and returns it- Specified by:
cloneGraph
in interfaceGraphObject
- Returns:
- Throws:
CloneNotSupportedException
-
describes
Description copied from interface:GraphObject
Gives an array of node types and number contained in the GraphObject- Specified by:
describes
in interfaceGraphObject
- Returns:
-
getNode
Description copied from interface:GraphObject
Return a node of the given name- Specified by:
getNode
in interfaceGraphObject
- Parameters:
key
- : the name of the type of node
-
getRegistry
Description copied from interface:RegistryContext
Returns theRegistry
which is linked with this instance.- Specified by:
getRegistry
in interfaceRegistryContext
- Returns:
- the registry linked with this instance
-
includes
public boolean includes(SecGraph sg) throws de.grogra.graph.object.sg.impl.exception.NoQueryGraphException Description copied from interface:SecGraph
test if this SecGraph incldues the SecGraph SG -
inProjectGraph
public boolean inProjectGraph() throws de.grogra.graph.object.sg.impl.exception.NoQueryGraphExceptionDescription copied from interface:SecGraph
test if this graph is included in the ProjectGraph- Specified by:
inProjectGraph
in interfaceSecGraph
- Returns:
- Throws:
de.grogra.graph.object.sg.impl.exception.NoQueryGraphException
-
includes
public boolean includes(SecGraph sg, boolean asQuery) throws de.grogra.graph.object.sg.impl.exception.NoQueryGraphException Description copied from interface:SecGraph
test if this SecGraph incldues the given SecGraph or if the query SecGraph of this graph is included in the given SecGraph -
inProjectGraph
public boolean inProjectGraph(boolean asQuery) throws de.grogra.graph.object.sg.impl.exception.NoQueryGraphException Description copied from interface:SecGraph
test if this graph is included in the ProjectGraph or if the query SecGraph of this graph is included in the Project Graph- Specified by:
inProjectGraph
in interfaceSecGraph
- Returns:
- Throws:
de.grogra.graph.object.sg.impl.exception.NoQueryGraphException
-
execute
public void execute() throws de.grogra.graph.object.sg.impl.exception.NoRuleGraphExceptionDescription copied from interface:SecGraph
run this SecGraph as a rule on the MainGraph -
execute
public void execute(SecGraph sg) throws de.grogra.graph.object.sg.impl.exception.NoRuleGraphException Description copied from interface:SecGraph
run this SecGraph as a rule on the given secGraph -
apply
public void apply(SecGraph rule) throws de.grogra.graph.object.sg.impl.exception.NoRuleGraphException Description copied from interface:SecGraph
apply the given SecGraph on this SecGraph -
getQueryRoot
- Specified by:
getQueryRoot
in interfaceSecGraph
-
getProductionRoot
- Specified by:
getProductionRoot
in interfaceSecGraph
-
query
-
production
- Specified by:
production
in interfaceSecGraph
-
isQueryGraph
public boolean isQueryGraph()Description copied from interface:SecGraph
check if the secgraph includes a queryRoot- Specified by:
isQueryGraph
in interfaceSecGraph
- Returns:
-
isRuleGraph
public boolean isRuleGraph()Description copied from interface:SecGraph
check if the secgraph includes a QueryRoot and a ProductionRoot- Specified by:
isRuleGraph
in interfaceSecGraph
- Returns:
-
getName
Description copied from interface:GraphObject
Gives the name if one exists- Specified by:
getName
in interfaceGraphObject
- Returns:
-
toSelection
Description copied from interface:Selectable
Converts this object into aSelection
.- Specified by:
toSelection
in interfaceSelectable
- Parameters:
ctx
- the UI context- Returns:
- a selection, or
null
if this is not possible
-
produceNode
- Specified by:
produceNode
in interfaceProducingNode
-
resolve
Description copied from interface:GraphObject
Resolves the real object if a reference is used If the real object is used the function returns it self- Specified by:
resolve
in interfaceGraphObject
- Returns:
-
manageableWriteReplace
- Specified by:
manageableWriteReplace
in interfaceManageable
- Overrides:
manageableWriteReplace
in classEmbeddedSharedObject
-
clone
- Specified by:
clone
in interfaceSecGraph
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
add
-
disposeField
public void disposeField()- Specified by:
disposeField
in interfaceDisposableField
-
getExtension
- Specified by:
getExtension
in classEmbeddedSharedObject
-
hasContent
public boolean hasContent()Description copied from class:EmbeddedSharedObject
True if the object is not "empty" as its persistence depends how the mimetype write content, a java object with some value could be defined as "empty"- Specified by:
hasContent
in classEmbeddedSharedObject
-
getManageableType
- Specified by:
getManageableType
in interfaceManageable
- Overrides:
getManageableType
in classEmbeddedSharedObject
-