org.eclipse.ohf.stem.tests.util
Class TestUtil

java.lang.Object
  extended by org.eclipse.ohf.stem.tests.util.TestUtil

public class TestUtil
extends java.lang.Object

This class contains utility methods for testing STEM.


Constructor Summary
TestUtil()
           
 
Method Summary
static Edge createDynamicallyLabeledEdge(org.eclipse.emf.common.util.URI nodeAURI, org.eclipse.emf.common.util.URI nodeBURI)
           
static Edge createDynamicallyLabeledEdge(org.eclipse.emf.common.util.URI nodeAURI, org.eclipse.emf.common.util.URI nodeBURI, org.eclipse.emf.common.util.URI edgeURI)
           
static Node createDynamicalyLabeledNode()
           
static TestDynamicLabel1 createDynamicLabel(org.eclipse.emf.common.util.URI uriOfIdentifiableToBeLabeled)
           
static TestDynamicLabel1 createDynamicLabel(org.eclipse.emf.common.util.URI labelURI, org.eclipse.emf.common.util.URI uriOfIdentifiableToBeLabeled)
           
static TestDynamicNodeLabel createDynamicNodeLabel()
           
static TestDynamicNodeLabel createDynamicNodeLabel(org.eclipse.emf.common.util.URI uriOfIdentifiableToBeLabeled)
           
static TestDynamicNodeLabel createDynamicNodeLabel(org.eclipse.emf.common.util.URI labelURI, org.eclipse.emf.common.util.URI uriOfIdentifiableToBeLabeled)
           
static org.eclipse.emf.common.util.URI createNextIdentifiableToLabelURI()
           
static Edge createStaticallyLabeledEdge(org.eclipse.emf.common.util.URI nodeAURI, org.eclipse.emf.common.util.URI nodeBURI)
           
static Edge createStaticallyLabeledEdge(org.eclipse.emf.common.util.URI edgeURI, org.eclipse.emf.common.util.URI nodeAURI, org.eclipse.emf.common.util.URI nodeBURI)
           
static Edge createStaticallyLabeledEdge(org.eclipse.emf.common.util.URI edgeURI, org.eclipse.emf.common.util.URI nodeAURI, org.eclipse.emf.common.util.URI nodeBURI, boolean directed)
           
static Node createStaticallyLabeledNode()
           
static Node createStaticallyLabeledNode(org.eclipse.emf.common.util.URI nodeURI)
           
static Label createStaticLabel()
           
static Label createStaticLabel(org.eclipse.emf.common.util.URI uriOfIdentifiableToBeLabeled)
           
static Label createStaticLabel(org.eclipse.emf.common.util.URI labelURI, org.eclipse.emf.common.util.URI uriOfIdentifiableToBeLabeled)
           
static StaticNodeLabel createStaticNodeLabel(org.eclipse.emf.common.util.URI labelURI, org.eclipse.emf.common.util.URI uriOfIdentifiableToBeLabeled)
           
static void resetCounters()
          Reset the counters
static void serializeIdentifiable(Identifiable identifiable, org.eclipse.emf.common.util.URI fileURI)
          Serialize an Identifiable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestUtil

public TestUtil()
Method Detail

resetCounters

public static void resetCounters()
Reset the counters


createStaticLabel

public static Label createStaticLabel()
Returns:
a static label instance

createStaticLabel

public static Label createStaticLabel(org.eclipse.emf.common.util.URI uriOfIdentifiableToBeLabeled)
Parameters:
uriOfIdentifiableToBeLabeled -
Returns:
a static label instance

createStaticLabel

public static Label createStaticLabel(org.eclipse.emf.common.util.URI labelURI,
                                      org.eclipse.emf.common.util.URI uriOfIdentifiableToBeLabeled)
Parameters:
labelURI -
uriOfIdentifiableToBeLabeled -
Returns:
a static label instance

createDynamicLabel

public static TestDynamicLabel1 createDynamicLabel(org.eclipse.emf.common.util.URI uriOfIdentifiableToBeLabeled)
Parameters:
uriOfIdentifiableToBeLabeled -
Returns:
a unique dynamic label

createDynamicLabel

public static TestDynamicLabel1 createDynamicLabel(org.eclipse.emf.common.util.URI labelURI,
                                                   org.eclipse.emf.common.util.URI uriOfIdentifiableToBeLabeled)
Parameters:
labelURI -
uriOfIdentifiableToBeLabeled -
Returns:
a unique dynamic label

createStaticNodeLabel

public static StaticNodeLabel createStaticNodeLabel(org.eclipse.emf.common.util.URI labelURI,
                                                    org.eclipse.emf.common.util.URI uriOfIdentifiableToBeLabeled)
Parameters:
labelURI -
uriOfIdentifiableToBeLabeled -
Returns:
a static node label

createDynamicNodeLabel

public static TestDynamicNodeLabel createDynamicNodeLabel()
Returns:
a unique dynamic node label

createDynamicNodeLabel

public static TestDynamicNodeLabel createDynamicNodeLabel(org.eclipse.emf.common.util.URI uriOfIdentifiableToBeLabeled)
Parameters:
uriOfIdentifiableToBeLabeled -
Returns:
a unique dynamic node label

createDynamicNodeLabel

public static TestDynamicNodeLabel createDynamicNodeLabel(org.eclipse.emf.common.util.URI labelURI,
                                                          org.eclipse.emf.common.util.URI uriOfIdentifiableToBeLabeled)
Parameters:
labelURI -
uriOfIdentifiableToBeLabeled -
Returns:
a unique dynamic label

createNextIdentifiableToLabelURI

public static org.eclipse.emf.common.util.URI createNextIdentifiableToLabelURI()
Returns:
a unique URI for a Identifiable to label

createDynamicallyLabeledEdge

public static Edge createDynamicallyLabeledEdge(org.eclipse.emf.common.util.URI nodeAURI,
                                                org.eclipse.emf.common.util.URI nodeBURI)
Parameters:
nodeAURI - the URI of the A node the edge links to
nodeBURI - the URI of the B node the edge links to
Returns:
a dynamically labeled edge linking nodes with the two URI's

createDynamicallyLabeledEdge

public static Edge createDynamicallyLabeledEdge(org.eclipse.emf.common.util.URI nodeAURI,
                                                org.eclipse.emf.common.util.URI nodeBURI,
                                                org.eclipse.emf.common.util.URI edgeURI)
Parameters:
nodeAURI - the URI of the A node the edge links to
nodeBURI - the URI of the B node the edge links to
edgeURI - uri to use for the edge
Returns:
a dynamically labeled edge linking nodes with the two URI's

createStaticallyLabeledEdge

public static Edge createStaticallyLabeledEdge(org.eclipse.emf.common.util.URI nodeAURI,
                                               org.eclipse.emf.common.util.URI nodeBURI)
Parameters:
nodeAURI - the URI of the A node the edge links to
nodeBURI - the URI of the B node the edge links to
Returns:
a statically labeled edge linking nodes with the two URI's

createStaticallyLabeledEdge

public static Edge createStaticallyLabeledEdge(org.eclipse.emf.common.util.URI edgeURI,
                                               org.eclipse.emf.common.util.URI nodeAURI,
                                               org.eclipse.emf.common.util.URI nodeBURI)
Parameters:
edgeURI -
nodeAURI -
nodeBURI -
Returns:
a statically labeled edge

createStaticallyLabeledEdge

public static Edge createStaticallyLabeledEdge(org.eclipse.emf.common.util.URI edgeURI,
                                               org.eclipse.emf.common.util.URI nodeAURI,
                                               org.eclipse.emf.common.util.URI nodeBURI,
                                               boolean directed)
Parameters:
edgeURI -
nodeAURI -
nodeBURI -
directed -
Returns:
a statically labeled edge

createDynamicalyLabeledNode

public static Node createDynamicalyLabeledNode()
Returns:
a dynamically labeled node

createStaticallyLabeledNode

public static Node createStaticallyLabeledNode(org.eclipse.emf.common.util.URI nodeURI)
Parameters:
nodeURI -
Returns:
a dynamically labeled node

createStaticallyLabeledNode

public static Node createStaticallyLabeledNode()
Returns:
a dynamically labeled node

serializeIdentifiable

public static void serializeIdentifiable(Identifiable identifiable,
                                         org.eclipse.emf.common.util.URI fileURI)
Serialize an Identifiable

Parameters:
identifiable -
fileURI -