|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openprovenance.model.OPMGraph org.openprovenance.model.IndexedOPMGraph
public class IndexedOPMGraph
This class provides a set of indexes over information contained in an OPMGraph, facilitating its navigation. Its constructor takes an OPMGraph builds an index for it. Of course, for the index to be maintained, one cannot access, say the list of edges, and mutate it. Instead, one has to use the add methods provided.
Note that code is not thread-safe. TODO: index annotation, index edges
Field Summary | |
---|---|
protected ObjectFactory |
of
|
Fields inherited from class org.openprovenance.model.OPMGraph |
---|
accounts, agents, annotation, annotations, artifacts, causalDependencies, id, processes |
Constructor Summary | |
---|---|
IndexedOPMGraph(OPMFactory oFactory,
OPMGraph graph)
|
Method Summary | |
---|---|
Account |
addAccount(Account account)
|
Account |
addAccount(String name,
Account account)
|
Agent |
addAgent(Agent agent)
|
Agent |
addAgent(String name,
Agent agent)
|
Artifact |
addArtifact(Artifact artifact)
|
Artifact |
addArtifact(String name,
Artifact artifact)
|
Process |
addProcess(Process process)
|
Process |
addProcess(String name,
Process process)
|
Used |
addUsed(Used used)
Add a used edge to the graph. |
WasControlledBy |
addWasControlledBy(WasControlledBy wasControlledBy)
Add a wasControlledBy edge to the graph. |
WasDerivedFrom |
addWasDerivedFrom(WasDerivedFrom wasDerivedFrom)
Add a wasDerivedFrom edge to the graph. |
WasGeneratedBy |
addWasGeneratedBy(WasGeneratedBy wasGeneratedBy)
Add a wasGeneratedBy edge to the graph. |
WasTriggeredBy |
addWasTriggeredBy(WasTriggeredBy wasTriggeredBy)
Add a wasTriggeredBy edge to the graph. |
Account |
getAccount(String name)
|
Agent |
getAgent(String name)
|
Artifact |
getArtifact(String name)
|
Process |
getProcess(String name)
|
Collection<Used> |
getUsed()
Return all used edges for this graph. |
Collection<Used> |
getUsed(Artifact p)
Return all used edges with artifact a as a cause. |
Collection<Used> |
getUsed(Process p)
Return all used edges with process p as an effect. |
Collection<WasControlledBy> |
getWasControlledBy()
Return all WasControlledBy edges for this graph. |
Collection<WasControlledBy> |
getWasControlledBy(Agent a)
Return all WasControlledBy edges with artifact a as a cause. |
Collection<WasControlledBy> |
getWasControlledBy(Process p)
Return all WasControlledBy edges with process p as an effect. |
Collection<WasDerivedFrom> |
getWasDerivedFrom()
Return all WasDerivedFrom edges for this graph. |
Collection<WasDerivedFrom> |
getWasDerivedFromWithCause(Artifact a)
Return all WasDerivedFrom edges with artifact a as a cause. |
Collection<WasDerivedFrom> |
getWasDerivedFromWithEffect(Artifact a)
Return all WasDerivedFrom edges with artifact a as an effect . |
Collection<WasGeneratedBy> |
getWasGeneratedBy()
Return all WasGeneratedBy edges for this graph. |
Collection<WasGeneratedBy> |
getWasGeneratedBy(Artifact p)
Return all WasGeneratedBy edges with artifact a as a cause. |
Collection<WasGeneratedBy> |
getWasGeneratedBy(Process p)
Return all WasGeneratedBy edges with process p as an effect. |
Collection<WasTriggeredBy> |
getWasTriggeredBy()
Return all WasTriggeredBy edges for this graph. |
Collection<WasTriggeredBy> |
getWasTriggeredByWithCause(Process a)
Return all WasTriggeredBy edges with process p as a cause. |
Collection<WasTriggeredBy> |
getWasTriggeredByWithEffect(Process a)
Return all WasTriggeredBy edges with process a as an effect. |
Methods inherited from class org.openprovenance.model.OPMGraph |
---|
equals, equals, getAccounts, getAgents, getAnnotation, getAnnotations, getArtifacts, getCausalDependencies, getId, getProcesses, hashCode, hashCode, setAccounts, setAgents, setAnnotations, setArtifacts, setCausalDependencies, setId, setProcesses, toString, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final ObjectFactory of
Constructor Detail |
---|
public IndexedOPMGraph(OPMFactory oFactory, OPMGraph graph)
Method Detail |
---|
public Collection<Used> getUsed()
public Collection<Used> getUsed(Process p)
public Collection<Used> getUsed(Artifact p)
public Collection<WasGeneratedBy> getWasGeneratedBy()
public Collection<WasGeneratedBy> getWasGeneratedBy(Process p)
public Collection<WasGeneratedBy> getWasGeneratedBy(Artifact p)
public Collection<WasDerivedFrom> getWasDerivedFrom()
public Collection<WasDerivedFrom> getWasDerivedFromWithCause(Artifact a)
public Collection<WasDerivedFrom> getWasDerivedFromWithEffect(Artifact a)
public Collection<WasTriggeredBy> getWasTriggeredBy()
public Collection<WasTriggeredBy> getWasTriggeredByWithCause(Process a)
public Collection<WasTriggeredBy> getWasTriggeredByWithEffect(Process a)
public Collection<WasControlledBy> getWasControlledBy()
public Collection<WasControlledBy> getWasControlledBy(Process p)
public Collection<WasControlledBy> getWasControlledBy(Agent a)
public Account getAccount(String name)
public Account addAccount(String name, Account account)
public Account addAccount(Account account)
public Artifact addArtifact(Artifact artifact)
public Artifact addArtifact(String name, Artifact artifact)
public Agent addAgent(Agent agent)
public Agent addAgent(String name, Agent agent)
public Process addProcess(Process process)
public Process addProcess(String name, Process process)
public Process getProcess(String name)
public Artifact getArtifact(String name)
public Agent getAgent(String name)
public Used addUsed(Used used)
public WasGeneratedBy addWasGeneratedBy(WasGeneratedBy wasGeneratedBy)
public WasDerivedFrom addWasDerivedFrom(WasDerivedFrom wasDerivedFrom)
public WasControlledBy addWasControlledBy(WasControlledBy wasControlledBy)
public WasTriggeredBy addWasTriggeredBy(WasTriggeredBy wasTriggeredBy)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |