|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xqhs.util.config.Config
net.xqhs.util.logging.Unit
net.xqhs.graphs.matchingPlatform.GMPImplementation
public class GMPImplementation
An implementation of GraphMatchingPlatform using TrackingGraph instances for the principal graph and
its shadows.
For each pattern in the platform, a GraphMatcherPersistent process is kept and updated with changes to the
principal graph.
| Nested Class Summary | |
|---|---|
static class |
GMPImplementation.PrincipalGraph
An implementation of GraphMatchingPlatform.PlatformPrincipalGraph and
GraphMatchingPlatform.PlatformShadowGraph that extends TrackingGraph. |
| Nested classes/interfaces inherited from class net.xqhs.util.config.Config |
|---|
net.xqhs.util.config.Config.ConfigLockedException |
| Nested classes/interfaces inherited from interface net.xqhs.graphs.matchingPlatform.GraphMatchingPlatform |
|---|
GraphMatchingPlatform.PlatformPrincipalGraph, GraphMatchingPlatform.PlatformShadowGraph |
| Field Summary | |
|---|---|
(package private) GraphMatchingPlatform.PlatformShadowGraph |
matchingGraph
The graph against which the matching is done. |
(package private) MonitorPack |
monitor
The MonitorPack instance to use for performance measuring. |
(package private) java.util.Map<GraphPattern,GraphMatcherPersistent> |
patterns
The patterns in the platform, as a map between the patterns and the corresponding persistent matching processes. |
(package private) GraphMatchingPlatform.PlatformPrincipalGraph |
principalGraph
The principal graph of the platform. |
| Fields inherited from class net.xqhs.util.logging.Unit |
|---|
DEFAULT_LEVEL, DEFAULT_UNIT_NAME |
| Constructor Summary | |
|---|---|
GMPImplementation()
|
|
| Method Summary | |
|---|---|
GMPImplementation |
addPattern(GraphPattern pattern)
Adds a new pattern to the platform. |
int |
getGraphSequence()
Retrieves the sequence of the last change to the principal graph. |
GraphMatchingProcess |
getMatcherAgainstGraph(GraphPattern pattern)
Retrieves a GraphMatchingPlatform for the specified pattern and the current sequence of the
principal graph (not the matching sequence). |
java.util.Set<Match> |
getMatches(GraphPattern pattern,
int maxK)
Builds and returns the matches between the specified pattern and the principal graph (as it is in the current matching sequence). |
int |
getMathingSequence()
Retrieves the current 'matching sequence', which is incremented by GraphMatchingPlatform.incrementSequence(). |
java.util.Collection<GraphPattern> |
getPatterns()
|
GraphMatchingPlatform.PlatformPrincipalGraph |
getPrincipalGraph()
Retrieves the principal graph of the platform. |
java.util.Set<Match> |
incrementSequence()
Builds and returns the full matches between the patterns and the principal graph with the next set of operations (transaction) applied, moving the matching sequence one step closer to the graph sequence. |
java.util.List<java.util.Map.Entry<java.lang.Integer,java.util.Set<Match>>> |
incrementSequence(int targetSequence)
Applies GraphMatchingPlatform.incrementSequence() until the matching process (matching sequence) reaches desired sequence of
the principal graph. |
java.util.List<java.util.Map.Entry<java.lang.Integer,java.util.Set<Match>>> |
incrementSequenceFastForward()
Applies GraphMatchingPlatform.incrementSequence() until the matching process is synchronized with the principal graph. |
GMPImplementation |
removePattern(GraphPattern pattern)
Removes a pattern from the platform. |
GMPImplementation |
setMonitor(MonitorPack monitorLink)
Sets the MonitorPack instance to use for monitoring. |
GMPImplementation |
setPrincipalGraph(GraphMatchingPlatform.PlatformPrincipalGraph graph)
Sets the principal graph of the platform. |
| Methods inherited from class net.xqhs.util.logging.Unit |
|---|
compose, dbg, doExit, getDefaultUnitName, getUnitName, l, le, lf, li, lock, lockedR, lr, lr, lw, setLink, setLink, setLogDisplay, setLogEnsureNew, setLoggerClass, setLoggerType, setLoggerTypeClass, setLogLevel, setLogReporter, setUnitName, setUnitName |
| Methods inherited from class net.xqhs.util.config.Config |
|---|
build, ensureLocked, locked, lockedEx, makeDefaults |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
MonitorPack monitor
MonitorPack instance to use for performance measuring.
GraphMatchingPlatform.PlatformPrincipalGraph principalGraph
java.util.Map<GraphPattern,GraphMatcherPersistent> patterns
GraphMatchingPlatform.PlatformShadowGraph matchingGraph
| Constructor Detail |
|---|
public GMPImplementation()
| Method Detail |
|---|
public GMPImplementation setMonitor(MonitorPack monitorLink)
MonitorPack instance to use for monitoring.
monitorLink - - the monitor.
public GMPImplementation setPrincipalGraph(GraphMatchingPlatform.PlatformPrincipalGraph graph)
GraphMatchingPlatformIf another graph was previously set, all old data is cleared and patterns are re-added to match the new graph.
setPrincipalGraph in interface GraphMatchingPlatformgraph - - the graph, as a GraphMatchingPlatform.PlatformPrincipalGraph.
public GraphMatchingPlatform.PlatformPrincipalGraph getPrincipalGraph()
GraphMatchingPlatform
getPrincipalGraph in interface GraphMatchingPlatformpublic GMPImplementation addPattern(GraphPattern pattern)
GraphMatchingPlatform
addPattern in interface GraphMatchingPlatformpattern - - the GraphPattern to add.
public GMPImplementation removePattern(GraphPattern pattern)
GraphMatchingPlatform
removePattern in interface GraphMatchingPlatformpattern - - the GraphPattern to remove.
public java.util.Collection<GraphPattern> getPatterns()
getPatterns in interface GraphMatchingPlatformCollection of existing patterns in the platform. May be an unmodifiable or immutable list.public java.util.Set<Match> incrementSequence()
GraphMatchingPlatform
If the matching process was already synchronized with the principal graph, null is returned.
incrementSequence in interface GraphMatchingPlatformnull if the sequence cannot be
incremented.public java.util.List<java.util.Map.Entry<java.lang.Integer,java.util.Set<Match>>> incrementSequence(int targetSequence)
GraphMatchingPlatformGraphMatchingPlatform.incrementSequence() until the matching process (matching sequence) reaches desired sequence of
the principal graph. For each incremented sequence, the corresponding complete list of full matches is returned.
If the matching process was already synchronized with the principal graph, an empty list is returned.
incrementSequence in interface GraphMatchingPlatformtargetSequence - - the desired sequence to reach.
public java.util.List<java.util.Map.Entry<java.lang.Integer,java.util.Set<Match>>> incrementSequenceFastForward()
GraphMatchingPlatformGraphMatchingPlatform.incrementSequence() until the matching process is synchronized with the principal graph.
If the matching process was already synchronized with the principal graph, an empty list is returned.
incrementSequenceFastForward in interface GraphMatchingPlatform
public java.util.Set<Match> getMatches(GraphPattern pattern,
int maxK)
GraphMatchingPlatformmaxK (inclusive) are returned.
getMatches in interface GraphMatchingPlatformpattern - - the pattern for which to get the matches.maxK - - the maximum k for retrieved matches.
public int getMathingSequence()
GraphMatchingPlatformGraphMatchingPlatform.incrementSequence().
getMathingSequence in interface GraphMatchingPlatformpublic int getGraphSequence()
GraphMatchingPlatform
getGraphSequence in interface GraphMatchingPlatformpublic GraphMatchingProcess getMatcherAgainstGraph(GraphPattern pattern)
GraphMatchingPlatformGraphMatchingPlatform for the specified pattern and the current sequence of the
principal graph (not the matching sequence). Matching is done against a shadow of the principal graph. Any
subsequent changes to the principal graph will not be visible in the matching process.
Except for the snapshot of the principal graph, this method uses no resources of the platform. The return matching process is independent of the platform's patterns and matching processes.
getMatcherAgainstGraph in interface GraphMatchingPlatformpattern - - the pattern to match (can also be a normal graph).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||