use of au.gov.asd.tac.constellation.graph.schema.Schema in project constellation by constellation-app.
the class GraphRecordStoreUtilitiesNGTest method setUpMethod.
@BeforeMethod
public void setUpMethod() throws Exception {
final Schema schema = SchemaFactoryUtilities.getSchemaFactory(AnalyticSchemaFactory.ANALYTIC_SCHEMA_ID).createSchema();
graph = new StoreGraph(schema);
graph.getSchema().newGraph(graph);
}
use of au.gov.asd.tac.constellation.graph.schema.Schema in project constellation by constellation-app.
the class CompleteGraphBuilderPluginNGTest method setUpMethod.
@BeforeMethod
public void setUpMethod() throws Exception {
final Schema schema = SchemaFactoryUtilities.getSchemaFactory(AnalyticSchemaFactory.ANALYTIC_SCHEMA_ID).createSchema();
graph = new StoreGraph(schema);
}
use of au.gov.asd.tac.constellation.graph.schema.Schema in project constellation by constellation-app.
the class GraphVisualAccessNGTest method setUpMethod.
@BeforeMethod
public void setUpMethod() throws Exception {
final Schema schema = SchemaFactoryUtilities.getSchemaFactory(AnalyticSchemaFactory.ANALYTIC_SCHEMA_ID).createSchema();
sGraph = new StoreGraph();
vxId1 = sGraph.addVertex();
vxId2 = sGraph.addVertex();
tId1 = sGraph.addTransaction(vxId1, vxId2, true);
graph = new DualGraph(schema, sGraph);
}
use of au.gov.asd.tac.constellation.graph.schema.Schema in project constellation by constellation-app.
the class HopHalfNGTest method setUpMethod.
@BeforeMethod
public void setUpMethod() throws Exception {
final Schema ss = SchemaFactoryUtilities.getSchemaFactory(VisualSchemaFactory.VISUAL_SCHEMA_ID).createSchema();
graph = new StoreGraph(ss);
attrX = graph.addAttribute(GraphElementType.VERTEX, FloatAttributeDescription.ATTRIBUTE_NAME, "x", "x", 0.0, null);
if (attrX == Graph.NOT_FOUND) {
fail();
}
attrY = graph.addAttribute(GraphElementType.VERTEX, FloatAttributeDescription.ATTRIBUTE_NAME, "y", "y", 0.0, null);
if (attrY == Graph.NOT_FOUND) {
fail();
}
attrZ = graph.addAttribute(GraphElementType.VERTEX, FloatAttributeDescription.ATTRIBUTE_NAME, "z", "z", 0.0, null);
if (attrZ == Graph.NOT_FOUND) {
fail();
}
vAttrId = graph.addAttribute(GraphElementType.VERTEX, BooleanAttributeDescription.ATTRIBUTE_NAME, "selected", "selected", false, null);
if (vAttrId == Graph.NOT_FOUND) {
fail();
}
tAttrId = graph.addAttribute(GraphElementType.TRANSACTION, BooleanAttributeDescription.ATTRIBUTE_NAME, "selected", "selected", false, null);
if (tAttrId == Graph.NOT_FOUND) {
fail();
}
vxId1 = graph.addVertex();
graph.setFloatValue(attrX, vxId1, 1.0f);
graph.setFloatValue(attrY, vxId1, 1.0f);
graph.setBooleanValue(vAttrId, vxId1, false);
vxId2 = graph.addVertex();
graph.setFloatValue(attrX, vxId2, 5.0f);
graph.setFloatValue(attrY, vxId2, 1.0f);
graph.setBooleanValue(vAttrId, vxId2, false);
vxId3 = graph.addVertex();
graph.setFloatValue(attrX, vxId3, 1.0f);
graph.setFloatValue(attrY, vxId3, 5.0f);
graph.setBooleanValue(vAttrId, vxId3, false);
vxId4 = graph.addVertex();
graph.setFloatValue(attrX, vxId4, 5.0f);
graph.setFloatValue(attrY, vxId4, 5.0f);
graph.setBooleanValue(vAttrId, vxId4, false);
vxId5 = graph.addVertex();
graph.setFloatValue(attrX, vxId5, 10.0f);
graph.setFloatValue(attrY, vxId5, 10.0f);
graph.setBooleanValue(vAttrId, vxId5, false);
vxId6 = graph.addVertex();
graph.setFloatValue(attrX, vxId6, 15.0f);
graph.setFloatValue(attrY, vxId6, 15.0f);
graph.setBooleanValue(vAttrId, vxId6, false);
vxId7 = graph.addVertex();
graph.setFloatValue(attrX, vxId7, 100.0f);
graph.setFloatValue(attrY, vxId7, 100.0f);
graph.setBooleanValue(vAttrId, vxId7, false);
txId1 = graph.addTransaction(vxId1, vxId2, false);
txId2 = graph.addTransaction(vxId1, vxId3, false);
txId3 = graph.addTransaction(vxId2, vxId4, true);
txId4 = graph.addTransaction(vxId4, vxId2, true);
txId5 = graph.addTransaction(vxId5, vxId6, false);
}
use of au.gov.asd.tac.constellation.graph.schema.Schema in project constellation by constellation-app.
the class HopOneNGTest method setUpMethod.
@BeforeMethod
public void setUpMethod() throws Exception {
final Schema ss = SchemaFactoryUtilities.getSchemaFactory(VisualSchemaFactory.VISUAL_SCHEMA_ID).createSchema();
graph = new StoreGraph(ss);
attrX = graph.addAttribute(GraphElementType.VERTEX, FloatAttributeDescription.ATTRIBUTE_NAME, "x", "x", 0.0, null);
if (attrX == Graph.NOT_FOUND) {
fail();
}
attrY = graph.addAttribute(GraphElementType.VERTEX, FloatAttributeDescription.ATTRIBUTE_NAME, "y", "y", 0.0, null);
if (attrY == Graph.NOT_FOUND) {
fail();
}
attrZ = graph.addAttribute(GraphElementType.VERTEX, FloatAttributeDescription.ATTRIBUTE_NAME, "z", "z", 0.0, null);
if (attrZ == Graph.NOT_FOUND) {
fail();
}
vAttrId = graph.addAttribute(GraphElementType.VERTEX, BooleanAttributeDescription.ATTRIBUTE_NAME, "selected", "selected", false, null);
if (vAttrId == Graph.NOT_FOUND) {
fail();
}
tAttrId = graph.addAttribute(GraphElementType.TRANSACTION, BooleanAttributeDescription.ATTRIBUTE_NAME, "selected", "selected", false, null);
if (tAttrId == Graph.NOT_FOUND) {
fail();
}
vxId1 = graph.addVertex();
graph.setFloatValue(attrX, vxId1, 1.0f);
graph.setFloatValue(attrY, vxId1, 1.0f);
graph.setBooleanValue(vAttrId, vxId1, false);
vxId2 = graph.addVertex();
graph.setFloatValue(attrX, vxId2, 5.0f);
graph.setFloatValue(attrY, vxId2, 1.0f);
graph.setBooleanValue(vAttrId, vxId2, false);
vxId3 = graph.addVertex();
graph.setFloatValue(attrX, vxId3, 1.0f);
graph.setFloatValue(attrY, vxId3, 5.0f);
graph.setBooleanValue(vAttrId, vxId3, false);
vxId4 = graph.addVertex();
graph.setFloatValue(attrX, vxId4, 5.0f);
graph.setFloatValue(attrY, vxId4, 5.0f);
graph.setBooleanValue(vAttrId, vxId4, false);
vxId5 = graph.addVertex();
graph.setFloatValue(attrX, vxId5, 10.0f);
graph.setFloatValue(attrY, vxId5, 10.0f);
graph.setBooleanValue(vAttrId, vxId5, false);
vxId6 = graph.addVertex();
graph.setFloatValue(attrX, vxId6, 15.0f);
graph.setFloatValue(attrY, vxId6, 15.0f);
graph.setBooleanValue(vAttrId, vxId6, false);
vxId7 = graph.addVertex();
graph.setFloatValue(attrX, vxId7, 100.0f);
graph.setFloatValue(attrY, vxId7, 100.0f);
graph.setBooleanValue(vAttrId, vxId7, false);
txId1 = graph.addTransaction(vxId1, vxId2, false);
txId2 = graph.addTransaction(vxId1, vxId3, false);
txId3 = graph.addTransaction(vxId2, vxId4, true);
txId4 = graph.addTransaction(vxId4, vxId2, true);
txId5 = graph.addTransaction(vxId5, vxId6, false);
}
Aggregations