use of au.gov.asd.tac.constellation.graph.schema.Schema in project constellation by constellation-app.
the class RatioOfReciprocityPluginNGTest method setUpMethod.
@BeforeMethod
public void setUpMethod() throws Exception {
// create an analytic graph
final Schema schema = SchemaFactoryUtilities.getSchemaFactory(AnalyticSchemaFactory.ANALYTIC_SCHEMA_ID).createSchema();
graph = new StoreGraph(schema);
// add attributes
transactionReciprocityAttribute = SnaConcept.TransactionAttribute.RATIO_OF_RECIPROCITY.ensure(graph);
// add vertices
vxId0 = graph.addVertex();
vxId1 = graph.addVertex();
vxId2 = graph.addVertex();
vxId3 = graph.addVertex();
vxId4 = graph.addVertex();
// add transactions
txId0 = graph.addTransaction(vxId0, vxId1, true);
txId1 = graph.addTransaction(vxId1, vxId2, true);
txId2 = graph.addTransaction(vxId1, vxId3, true);
txId3 = graph.addTransaction(vxId2, vxId3, true);
txId4 = graph.addTransaction(vxId3, vxId4, true);
// add reciprocal transactions
txId5 = graph.addTransaction(vxId2, vxId1, true);
txId6 = graph.addTransaction(vxId2, vxId1, true);
txId7 = graph.addTransaction(vxId3, vxId1, true);
txId8 = graph.addTransaction(vxId3, vxId1, true);
txId9 = graph.addTransaction(vxId3, vxId1, true);
txId10 = graph.addTransaction(vxId3, vxId2, true);
txId11 = graph.addTransaction(vxId3, vxId2, true);
txId12 = graph.addTransaction(vxId3, vxId2, true);
txId13 = graph.addTransaction(vxId3, vxId2, true);
}
use of au.gov.asd.tac.constellation.graph.schema.Schema in project constellation by constellation-app.
the class WeightActionNGTest method setUpMethod.
@BeforeMethod
public void setUpMethod() throws Exception {
// create an analytic graph
final Schema schema = SchemaFactoryUtilities.getSchemaFactory(AnalyticSchemaFactory.ANALYTIC_SCHEMA_ID).createSchema();
graph = new StoreGraph(schema);
// add attributes
transactionWeightAttribute = AnalyticConcept.TransactionAttribute.WEIGHT.ensure(graph);
// add vertices
vxId0 = graph.addVertex();
vxId1 = graph.addVertex();
vxId2 = graph.addVertex();
vxId3 = graph.addVertex();
vxId4 = graph.addVertex();
// add transactions
txId0 = graph.addTransaction(vxId0, vxId1, true);
txId1 = graph.addTransaction(vxId1, vxId2, true);
txId2 = graph.addTransaction(vxId1, vxId3, true);
txId3 = graph.addTransaction(vxId2, vxId3, true);
txId4 = graph.addTransaction(vxId3, vxId4, true);
// add more transactions
txId5 = graph.addTransaction(vxId1, vxId2, true);
txId6 = graph.addTransaction(vxId1, vxId3, true);
txId7 = graph.addTransaction(vxId1, vxId3, true);
txId8 = graph.addTransaction(vxId2, vxId3, true);
txId9 = graph.addTransaction(vxId2, vxId3, true);
txId10 = graph.addTransaction(vxId2, vxId3, true);
txId11 = graph.addTransaction(vxId3, vxId4, true);
txId12 = graph.addTransaction(vxId3, vxId4, true);
txId13 = graph.addTransaction(vxId3, vxId4, true);
}
use of au.gov.asd.tac.constellation.graph.schema.Schema in project constellation by constellation-app.
the class CommonNeighboursPluginNGTest method setUpMethod.
@BeforeMethod
public void setUpMethod() throws Exception {
// create an analytic graph
final Schema schema = SchemaFactoryUtilities.getSchemaFactory(AnalyticSchemaFactory.ANALYTIC_SCHEMA_ID).createSchema();
graph = new StoreGraph(schema);
// add attributes
transactionCNAttribute = SnaConcept.TransactionAttribute.COMMON_NEIGHBOURS.ensure(graph);
vertexSelectedAttribute = VisualConcept.VertexAttribute.SELECTED.ensure(graph);
// add vertices
vxId0 = graph.addVertex();
vxId1 = graph.addVertex();
vxId2 = graph.addVertex();
vxId3 = graph.addVertex();
vxId4 = graph.addVertex();
// add transactions
graph.addTransaction(vxId0, vxId1, true);
graph.addTransaction(vxId0, vxId2, true);
graph.addTransaction(vxId0, vxId3, true);
graph.addTransaction(vxId0, vxId4, true);
graph.addTransaction(vxId1, vxId2, true);
graph.addTransaction(vxId1, vxId3, true);
graph.addTransaction(vxId1, vxId4, true);
graph.addTransaction(vxId2, vxId3, true);
graph.addTransaction(vxId2, vxId4, true);
graph.addTransaction(vxId3, vxId4, true);
}
use of au.gov.asd.tac.constellation.graph.schema.Schema in project constellation by constellation-app.
the class CosineSimilarityPluginNGTest method setUpMethod.
@BeforeMethod
public void setUpMethod() throws Exception {
// create an analytic graph
final Schema schema = SchemaFactoryUtilities.getSchemaFactory(AnalyticSchemaFactory.ANALYTIC_SCHEMA_ID).createSchema();
graph = new StoreGraph(schema);
// add attributes
transactionCosineAttribute = SnaConcept.TransactionAttribute.COSINE_SIMILARITY.ensure(graph);
vertexSelectedAttribute = VisualConcept.VertexAttribute.SELECTED.ensure(graph);
transactionIdentifier = VisualConcept.TransactionAttribute.IDENTIFIER.ensure(graph);
// add vertices
vxId0 = graph.addVertex();
vxId1 = graph.addVertex();
vxId2 = graph.addVertex();
vxId3 = graph.addVertex();
vxId4 = graph.addVertex();
// add transactions
txId0 = graph.addTransaction(vxId0, vxId1, true);
txId1 = graph.addTransaction(vxId1, vxId2, true);
txId2 = graph.addTransaction(vxId1, vxId3, true);
txId3 = graph.addTransaction(vxId2, vxId3, true);
txId4 = graph.addTransaction(vxId3, vxId4, true);
}
use of au.gov.asd.tac.constellation.graph.schema.Schema in project constellation by constellation-app.
the class PreferentialAttachmentPluginNGTest method setUpMethod.
@BeforeMethod
public void setUpMethod() throws Exception {
// create an analytic graph
final Schema schema = SchemaFactoryUtilities.getSchemaFactory(AnalyticSchemaFactory.ANALYTIC_SCHEMA_ID).createSchema();
graph = new StoreGraph(schema);
// add attributes
transactionPAAttribute = SnaConcept.TransactionAttribute.PREFERENTIAL_ATTACHMENT.ensure(graph);
vertexSelectedAttribute = VisualConcept.VertexAttribute.SELECTED.ensure(graph);
// add vertices
vxId0 = graph.addVertex();
vxId1 = graph.addVertex();
vxId2 = graph.addVertex();
vxId3 = graph.addVertex();
vxId4 = graph.addVertex();
// add transactions
graph.addTransaction(vxId0, vxId1, true);
graph.addTransaction(vxId0, vxId2, true);
graph.addTransaction(vxId0, vxId3, true);
graph.addTransaction(vxId0, vxId4, true);
graph.addTransaction(vxId1, vxId2, true);
graph.addTransaction(vxId1, vxId3, true);
graph.addTransaction(vxId1, vxId4, true);
graph.addTransaction(vxId2, vxId3, true);
graph.addTransaction(vxId2, vxId4, true);
graph.addTransaction(vxId3, vxId4, true);
}
Aggregations