use of au.gov.asd.tac.constellation.plugins.PluginInteraction in project constellation by constellation-app.
the class MiscNGTest method testCreateTransactionToNonexistentDestinationInPluginTest.
@Test
public void testCreateTransactionToNonexistentDestinationInPluginTest() {
try {
final DualGraph graph = new DualGraph(null);
graph.setUndoManager(new UndoRedo.Manager());
PluginExecution.withPlugin(new SimpleEditPlugin() {
@Override
public void edit(final GraphWriteMethods wg, final PluginInteraction interaction, final PluginParameters parameters) throws InterruptedException, PluginException {
for (int i = 0; i < 10; i++) {
final String s = String.format("x%d", i);
wg.addAttribute(GraphElementType.VERTEX, ObjectAttributeDescription.ATTRIBUTE_NAME, s, s, 99, null);
wg.addAttribute(GraphElementType.TRANSACTION, FloatAttributeDescription.ATTRIBUTE_NAME, s, s, 99, null);
}
int vx = 0;
for (int i = 0; i < 100; i++) {
vx = wg.addVertex();
}
final int tx = wg.addTransaction(vx, vx + 1, true);
Assert.fail("Shouldn't get here, wg.addTransaction() should fail.");
System.out.printf("New transaction: %d\n", tx);
}
@Override
public String getName() {
return "Build graph + tx failure test";
}
}).executeNow(graph);
} catch (InterruptedException ex) {
Assert.fail("Nothing was interrupted.");
} catch (PluginException ex) {
Assert.fail("There shouldn't be a plugin exception.");
} catch (RuntimeException ex) {
final boolean containsIllegalArgumentException = ex.getLocalizedMessage().contains("Attempt to create transaction to destination vertex that does not exist");
Assert.assertTrue(containsIllegalArgumentException);
}
}
use of au.gov.asd.tac.constellation.plugins.PluginInteraction in project constellation by constellation-app.
the class DefaultPluginEnvironment method executePluginLater.
@Override
public Future<?> executePluginLater(final Graph graph, final Plugin plugin, final PluginParameters parameters, final boolean interactive, final List<Future<?>> async, final PluginSynchronizer synchronizer) {
if (graph == null) {
LOGGER.log(Level.INFO, GRAPH_NULL_WARNING_MESSAGE, plugin.getName());
}
return getPluginExecutor().submit(() -> {
Thread.currentThread().setName(THREAD_POOL_NAME);
// vertices have been relocated is not sensible.
if (async != null) {
for (final Future<?> future : async) {
if (future != null) {
try {
future.get();
} catch (final InterruptedException ex) {
LOGGER.log(Level.SEVERE, "Execution interrupted", ex);
Thread.currentThread().interrupt();
} catch (final ExecutionException ex) {
LOGGER.log(Level.SEVERE, "Execution Exception", ex);
}
}
}
}
final ThreadConstraints callingConstraints = ThreadConstraints.getConstraints();
final boolean alwaysSilent = callingConstraints.isAlwaysSilent() || callingConstraints.getSilentCount() > 0;
PluginReport currentReport = null;
final GraphReport graphReport = graph == null ? null : GraphReportManager.getGraphReport(graph.getId());
if (graphReport != null) {
currentReport = graphReport.addPluginReport(plugin);
callingConstraints.setCurrentReport(currentReport);
}
try {
ConstellationLogger.getDefault().pluginStarted(plugin, parameters, graph);
} catch (final Exception ex) {
LOGGER.log(Level.SEVERE, ex.getLocalizedMessage());
}
final PluginManager manager = new PluginManager(DefaultPluginEnvironment.this, plugin, graph, interactive, synchronizer);
final PluginGraphs graphs = new DefaultPluginGraphs(manager);
final PluginInteraction interaction = new DefaultPluginInteraction(manager, currentReport);
try {
if (parameters != null) {
plugin.updateParameters(graph, parameters);
}
if (interactive && parameters != null) {
if (interaction.prompt(plugin.getName(), parameters)) {
ThreadConstraints calledConstraints = ThreadConstraints.getConstraints();
calledConstraints.setAlwaysSilent(alwaysSilent);
try {
plugin.run(graphs, interaction, parameters);
} finally {
calledConstraints.setAlwaysSilent(false);
calledConstraints.setSilentCount(0);
if (synchronizer != null) {
synchronizer.finished();
}
}
}
} else {
final ThreadConstraints calledConstraints = ThreadConstraints.getConstraints();
calledConstraints.setAlwaysSilent(alwaysSilent);
try {
plugin.run(graphs, interaction, parameters);
} finally {
calledConstraints.setAlwaysSilent(false);
calledConstraints.setSilentCount(0);
if (synchronizer != null) {
synchronizer.finished();
}
}
}
} catch (final InterruptedException ex) {
auditPluginError(plugin, ex);
reportException(plugin.getName(), interaction, currentReport, null, ex);
Thread.currentThread().interrupt();
} catch (final PluginException ex) {
auditPluginError(plugin, ex);
reportException(plugin.getName(), interaction, currentReport, ex.getNotificationLevel(), ex);
} catch (final Exception ex) {
auditPluginError(plugin, ex);
reportException(plugin.getName(), interaction, currentReport, PluginNotificationLevel.ERROR, ex);
} finally {
if (currentReport != null) {
currentReport.stop();
callingConstraints.setCurrentReport(null);
currentReport.firePluginReportChangedEvent();
}
try {
ConstellationLogger.getDefault().pluginStopped(plugin, parameters);
} catch (final Exception ex) {
LOGGER.log(Level.SEVERE, ex.getLocalizedMessage());
}
}
return null;
});
}
use of au.gov.asd.tac.constellation.plugins.PluginInteraction in project constellation by constellation-app.
the class DefaultPluginEnvironment method executeEditPluginNow.
@Override
public Object executeEditPluginNow(final GraphWriteMethods graph, final Plugin plugin, final PluginParameters parameters, final boolean interactive) throws InterruptedException, PluginException {
if (graph == null) {
LOGGER.log(Level.FINE, GRAPH_NULL_WARNING_MESSAGE, plugin.getName());
}
final ThreadConstraints callingConstraints = ThreadConstraints.getConstraints();
final int silentCount = callingConstraints.getSilentCount();
final boolean alwaysSilent = callingConstraints.isAlwaysSilent();
callingConstraints.setSilentCount(0);
callingConstraints.setAlwaysSilent(alwaysSilent || silentCount > 0);
final GraphReport graphReport = graph == null ? null : GraphReportManager.getGraphReport(graph.getId());
PluginReport parentReport = null;
PluginReport currentReport = null;
if (graphReport != null) {
parentReport = callingConstraints.getCurrentReport();
if (parentReport == null) {
currentReport = graphReport.addPluginReport(plugin);
} else {
currentReport = parentReport.addChildReport(plugin);
}
callingConstraints.setCurrentReport(currentReport);
}
final PluginManager manager = new PluginManager(DefaultPluginEnvironment.this, plugin, graph, interactive, null);
final PluginInteraction interaction = new DefaultPluginInteraction(manager, currentReport);
try {
ConstellationLogger.getDefault().pluginStarted(plugin, parameters, GraphNode.getGraph(graph != null ? graph.getId() : null));
} catch (final Exception ex) {
LOGGER.log(Level.SEVERE, ex.getLocalizedMessage());
}
try {
plugin.run(graph, interaction, parameters);
} catch (final InterruptedException ex) {
auditPluginError(plugin, ex);
reportException(plugin.getName(), interaction, currentReport, null, ex);
Thread.currentThread().interrupt();
throw ex;
} catch (final PluginException ex) {
auditPluginError(plugin, ex);
reportException(plugin.getName(), interaction, currentReport, ex.getNotificationLevel(), ex);
throw ex;
} catch (final Exception ex) {
auditPluginError(plugin, ex);
reportException(plugin.getName(), interaction, currentReport, PluginNotificationLevel.ERROR, ex);
throw ex;
} finally {
callingConstraints.setSilentCount(silentCount);
callingConstraints.setAlwaysSilent(alwaysSilent);
if (currentReport != null) {
currentReport.stop();
callingConstraints.setCurrentReport(parentReport);
currentReport.firePluginReportChangedEvent();
}
try {
ConstellationLogger.getDefault().pluginStopped(plugin, parameters);
} catch (final Exception ex) {
LOGGER.log(Level.SEVERE, ex.getLocalizedMessage());
}
}
return null;
}
use of au.gov.asd.tac.constellation.plugins.PluginInteraction in project constellation by constellation-app.
the class ManageTemplatesAction method actionPerformed.
@Override
public void actionPerformed(final ActionEvent e) {
final Plugin plugin = PluginRegistry.get(GraphNodePluginRegistry.MANAGE_TEMPLATES);
final PluginParameters params = plugin.createParameters();
final PluginParametersSwingDialog dialog = new PluginParametersSwingDialog(Bundle.CTL_ManageTemplatesAction(), params);
dialog.showAndWait();
if (PluginParametersDialog.OK.equals(dialog.getResult())) {
Future<?> f = PluginExecution.withPlugin(plugin).withParameters(params).executeLater(null);
PluginExecution.withPlugin(new SimplePlugin() {
@Override
public String getName() {
return "Update Template Menu";
}
@Override
protected void execute(final PluginGraphs graphs, final PluginInteraction interaction, final PluginParameters parameters) throws InterruptedException, PluginException {
NewSchemaGraphAction.recreateTemplateMenuItems();
}
}).waitingFor(f).executeLater(null);
}
}
use of au.gov.asd.tac.constellation.plugins.PluginInteraction in project constellation by constellation-app.
the class AbstractGeoExportPlugin method read.
@Override
public void read(final GraphReadMethods graph, final PluginInteraction interaction, final PluginParameters parameters) throws InterruptedException, PluginException {
if (parameters.getStringValue(OUTPUT_PARAMETER_ID) == null) {
NotifyDisplayer.display("Invalid output file provided, cannot be empty", NotifyDescriptor.ERROR_MESSAGE);
return;
}
if (parameters.getSingleChoice(ELEMENT_TYPE_PARAMETER_ID) == null) {
NotifyDisplayer.display("Invalid element type provided, cannot be empty", NotifyDescriptor.ERROR_MESSAGE);
return;
}
final File output = new File(parameters.getStringValue(OUTPUT_PARAMETER_ID));
final GraphElementType elementType = (GraphElementType) ((ElementTypeParameterValue) parameters.getSingleChoice(ELEMENT_TYPE_PARAMETER_ID)).getObjectValue();
final List<GraphAttribute> graphAttributes = parameters.getMultiChoiceValue(ATTRIBUTES_PARAMETER_ID).getChoicesData().stream().map(attributeChoice -> (GraphAttribute) ((GraphAttributeParameterValue) attributeChoice).getObjectValue()).collect(Collectors.toList());
final boolean selectedOnly = parameters.getBooleanValue(SELECTED_ONLY_PARAMETER_ID);
final int vertexIdentifierAttributeId = VisualConcept.VertexAttribute.IDENTIFIER.get(graph);
final int vertexSelectedAttributeId = VisualConcept.VertexAttribute.SELECTED.get(graph);
final int vertexLatitudeAttributeId = SpatialConcept.VertexAttribute.LATITUDE.get(graph);
final int vertexLongitudeAttributeId = SpatialConcept.VertexAttribute.LONGITUDE.get(graph);
final int vertexShapeAttributeId = SpatialConcept.VertexAttribute.SHAPE.get(graph);
final int transactionIdentifierAttributeId = VisualConcept.TransactionAttribute.IDENTIFIER.get(graph);
final int transactionSelectedAttributeId = VisualConcept.TransactionAttribute.SELECTED.get(graph);
final int transactionLatitudeAttributeId = SpatialConcept.TransactionAttribute.LATITUDE.get(graph);
final int transactionLongitudeAttributeId = SpatialConcept.TransactionAttribute.LONGITUDE.get(graph);
final int transactionShapeAttributeId = SpatialConcept.TransactionAttribute.SHAPE.get(graph);
final Map<String, String> shapes = new HashMap<>();
final Map<String, Map<String, Object>> attributes = new HashMap<>();
switch(elementType) {
case VERTEX:
final int vertexCount = graph.getVertexCount();
for (int vertexPosition = 0; vertexPosition < vertexCount; vertexPosition++) {
final int vertexId = graph.getVertex(vertexPosition);
final boolean vertexSelected = graph.getBooleanValue(vertexSelectedAttributeId, vertexId);
final String vertexIdentifier = graph.getStringValue(vertexIdentifierAttributeId, vertexId);
final Float vertexLatitude = vertexLatitudeAttributeId == GraphConstants.NOT_FOUND ? null : graph.getObjectValue(vertexLatitudeAttributeId, vertexId);
final Float vertexLongitude = vertexLongitudeAttributeId == GraphConstants.NOT_FOUND ? null : graph.getObjectValue(vertexLongitudeAttributeId, vertexId);
final String vertexShape = vertexShapeAttributeId == GraphConstants.NOT_FOUND ? null : graph.getStringValue(vertexShapeAttributeId, vertexId);
// if the vertex represents a valid geospatial shape, record it
boolean shapeFound = false;
if ((!selectedOnly || vertexSelected) && StringUtils.isNotBlank(vertexShape) && Shape.isValidGeoJson(vertexShape)) {
shapes.put(vertexIdentifier, vertexShape);
shapeFound = true;
} else if ((!selectedOnly || vertexSelected) && vertexLatitude != null && vertexLongitude != null) {
try {
final String vertexPoint = Shape.generateShape(vertexIdentifier, GeometryType.POINT, Arrays.asList(Tuple.create((double) vertexLongitude, (double) vertexLatitude)));
shapes.put(vertexIdentifier, vertexPoint);
shapeFound = true;
} catch (IOException ex) {
throw new PluginException(PluginNotificationLevel.ERROR, ex);
}
} else {
// Do nothing
}
// ... and record all its attributes
if (shapeFound) {
final Map<String, Object> attributeMap = new HashMap<>();
for (final GraphAttribute graphAttribute : graphAttributes) {
final Object attributeValue = graph.getObjectValue(graphAttribute.getId(), vertexId);
attributeMap.put(graphAttribute.getName(), attributeValue);
}
attributes.put(vertexIdentifier, attributeMap);
}
}
break;
case TRANSACTION:
final int transactionCount = graph.getTransactionCount();
for (int transactionPosition = 0; transactionPosition < transactionCount; transactionPosition++) {
final int transactionId = graph.getTransaction(transactionPosition);
final boolean transactionSelected = graph.getBooleanValue(transactionSelectedAttributeId, transactionId);
final String transactionIdentifier = graph.getStringValue(transactionIdentifierAttributeId, transactionId);
final Float transactionLatitude = transactionLatitudeAttributeId == GraphConstants.NOT_FOUND ? null : graph.getObjectValue(transactionLatitudeAttributeId, transactionId);
final Float transactionLongitude = transactionLongitudeAttributeId == GraphConstants.NOT_FOUND ? null : graph.getObjectValue(transactionLongitudeAttributeId, transactionId);
final String transactionShape = transactionShapeAttributeId == GraphConstants.NOT_FOUND ? null : graph.getStringValue(transactionShapeAttributeId, transactionId);
final int sourceVertexId = graph.getTransactionSourceVertex(transactionId);
final String sourceVertexIdentifier = graph.getStringValue(vertexIdentifierAttributeId, sourceVertexId);
final Float sourceVertexLatitude = vertexLatitudeAttributeId == GraphConstants.NOT_FOUND ? null : graph.getObjectValue(vertexLatitudeAttributeId, sourceVertexId);
final Float sourceVertexLongitude = vertexLongitudeAttributeId == GraphConstants.NOT_FOUND ? null : graph.getObjectValue(vertexLongitudeAttributeId, sourceVertexId);
final String sourceVertexShape = vertexShapeAttributeId == GraphConstants.NOT_FOUND ? null : graph.getStringValue(vertexShapeAttributeId, sourceVertexId);
final int destinationVertexId = graph.getTransactionDestinationVertex(transactionId);
final String destinationVertexIdentifier = graph.getStringValue(vertexIdentifierAttributeId, destinationVertexId);
final Float destinationVertexLatitude = vertexLatitudeAttributeId == GraphConstants.NOT_FOUND ? null : graph.getObjectValue(vertexLatitudeAttributeId, destinationVertexId);
final Float destinationVertexLongitude = vertexLongitudeAttributeId == GraphConstants.NOT_FOUND ? null : graph.getObjectValue(vertexLongitudeAttributeId, destinationVertexId);
final String destinationVertexShape = vertexShapeAttributeId == GraphConstants.NOT_FOUND ? null : graph.getStringValue(vertexShapeAttributeId, destinationVertexId);
// if the transaction represents a valid geospatial shape, record it
boolean shapeFound = false;
if ((!selectedOnly || transactionSelected) && StringUtils.isNotBlank(transactionShape) && Shape.isValidGeoJson(transactionShape)) {
shapes.put(transactionIdentifier, transactionShape);
shapeFound = true;
} else if ((!selectedOnly || transactionSelected) && transactionLatitude != null && transactionLongitude != null) {
try {
final String transactionPoint = Shape.generateShape(transactionIdentifier, GeometryType.POINT, Arrays.asList(Tuple.create((double) transactionLongitude, (double) transactionLatitude)));
shapes.put(transactionIdentifier, transactionPoint);
shapeFound = true;
} catch (IOException ex) {
throw new PluginException(PluginNotificationLevel.ERROR, ex);
}
} else {
// Do nothing
}
// ... and record all its attributes
if (shapeFound) {
final Map<String, Object> attributeMap = new HashMap<>();
final int transactionAttributeCount = graph.getAttributeCount(GraphElementType.TRANSACTION);
for (int transactionAttributePosition = 0; transactionAttributePosition < transactionAttributeCount; transactionAttributePosition++) {
final int transactionAttributeId = graph.getAttribute(GraphElementType.TRANSACTION, transactionAttributePosition);
final String transactionAttributeName = graph.getAttributeName(transactionAttributeId);
if (Character.isUpperCase(transactionAttributeName.charAt(0))) {
final Object transactionAttributeValue = graph.getObjectValue(transactionAttributeId, transactionId);
attributeMap.put(GraphRecordStoreUtilities.TRANSACTION + transactionAttributeName, transactionAttributeValue);
}
}
final int vertexAttributeCount = graph.getAttributeCount(GraphElementType.VERTEX);
for (int vertexAttributePosition = 0; vertexAttributePosition < vertexAttributeCount; vertexAttributePosition++) {
final int vertexAttributeId = graph.getAttribute(GraphElementType.VERTEX, vertexAttributePosition);
final String sourceVertexAttributeName = graph.getAttributeName(vertexAttributeId);
if (Character.isUpperCase(sourceVertexAttributeName.charAt(0))) {
final Object sourceVertexAttributeValue = graph.getObjectValue(vertexAttributeId, sourceVertexId);
attributeMap.put(GraphRecordStoreUtilities.SOURCE + sourceVertexAttributeName, sourceVertexAttributeValue);
}
final String destinationVertexAttributeName = graph.getAttributeName(vertexAttributeId);
if (Character.isUpperCase(destinationVertexAttributeName.charAt(0))) {
final Object destinationVertexAttributeValue = graph.getObjectValue(vertexAttributeId, destinationVertexId);
attributeMap.put(GraphRecordStoreUtilities.DESTINATION + destinationVertexAttributeName, destinationVertexAttributeValue);
}
}
attributes.put(transactionIdentifier, attributeMap);
}
// if the source vertex represents a valid geospatial shape, record it
shapeFound = false;
if ((!selectedOnly || transactionSelected) && StringUtils.isNotBlank(sourceVertexShape) && Shape.isValidGeoJson(sourceVertexShape)) {
shapes.put(sourceVertexIdentifier, sourceVertexShape);
shapeFound = true;
} else if ((!selectedOnly || transactionSelected) && sourceVertexLatitude != null && sourceVertexLongitude != null) {
try {
final String vertexPoint = Shape.generateShape(sourceVertexIdentifier, GeometryType.POINT, Arrays.asList(Tuple.create((double) sourceVertexLongitude, (double) sourceVertexLatitude)));
shapes.put(sourceVertexIdentifier, vertexPoint);
shapeFound = true;
} catch (IOException ex) {
throw new PluginException(PluginNotificationLevel.ERROR, ex);
}
} else {
// Do nothing
}
// ... and record all its attributes
if (shapeFound) {
final Map<String, Object> attributeMap = new HashMap<>();
final int transactionAttributeCount = graph.getAttributeCount(GraphElementType.TRANSACTION);
for (int transactionAttributePosition = 0; transactionAttributePosition < transactionAttributeCount; transactionAttributePosition++) {
final int transactionAttributeId = graph.getAttribute(GraphElementType.TRANSACTION, transactionAttributePosition);
final String transactionAttributeName = graph.getAttributeName(transactionAttributeId);
if (Character.isUpperCase(transactionAttributeName.charAt(0))) {
final Object transactionAttributeValue = graph.getObjectValue(transactionAttributeId, transactionId);
attributeMap.put(GraphRecordStoreUtilities.TRANSACTION + transactionAttributeName, transactionAttributeValue);
}
}
final int vertexAttributeCount = graph.getAttributeCount(GraphElementType.VERTEX);
for (int vertexAttributePosition = 0; vertexAttributePosition < vertexAttributeCount; vertexAttributePosition++) {
final int vertexAttributeId = graph.getAttribute(GraphElementType.VERTEX, vertexAttributePosition);
final String sourceVertexAttributeName = graph.getAttributeName(vertexAttributeId);
if (Character.isUpperCase(sourceVertexAttributeName.charAt(0))) {
final Object sourceVertexAttributeValue = graph.getObjectValue(vertexAttributeId, sourceVertexId);
attributeMap.put(GraphRecordStoreUtilities.SOURCE + sourceVertexAttributeName, sourceVertexAttributeValue);
}
final String destinationVertexAttributeName = graph.getAttributeName(vertexAttributeId);
if (Character.isUpperCase(destinationVertexAttributeName.charAt(0))) {
final Object destinationVertexAttributeValue = graph.getObjectValue(vertexAttributeId, destinationVertexId);
attributeMap.put(GraphRecordStoreUtilities.DESTINATION + destinationVertexAttributeName, destinationVertexAttributeValue);
}
}
attributes.put(sourceVertexIdentifier, attributeMap);
}
// if the destination vertex represents a valid geospatial shape, record it
shapeFound = false;
if ((!selectedOnly || transactionSelected) && StringUtils.isNotBlank(destinationVertexShape) && Shape.isValidGeoJson(destinationVertexShape)) {
shapes.put(destinationVertexIdentifier, destinationVertexShape);
shapeFound = true;
} else if ((!selectedOnly || transactionSelected) && destinationVertexLatitude != null && destinationVertexLongitude != null) {
try {
final String vertexPoint = Shape.generateShape(destinationVertexIdentifier, GeometryType.POINT, Arrays.asList(Tuple.create((double) destinationVertexLongitude, (double) destinationVertexLatitude)));
shapes.put(destinationVertexIdentifier, vertexPoint);
shapeFound = true;
} catch (IOException ex) {
throw new PluginException(PluginNotificationLevel.ERROR, ex);
}
} else {
// Do nothing
}
// ... and record all its attributes
if (shapeFound) {
final Map<String, Object> attributeMap = new HashMap<>();
final int transactionAttributeCount = graph.getAttributeCount(GraphElementType.TRANSACTION);
for (int transactionAttributePosition = 0; transactionAttributePosition < transactionAttributeCount; transactionAttributePosition++) {
final int transactionAttributeId = graph.getAttribute(GraphElementType.TRANSACTION, transactionAttributePosition);
final String transactionAttributeName = graph.getAttributeName(transactionAttributeId);
if (Character.isUpperCase(transactionAttributeName.charAt(0))) {
final Object transactionAttributeValue = graph.getObjectValue(transactionAttributeId, transactionId);
attributeMap.put(GraphRecordStoreUtilities.TRANSACTION + transactionAttributeName, transactionAttributeValue);
}
}
final int vertexAttributeCount = graph.getAttributeCount(GraphElementType.VERTEX);
for (int vertexAttributePosition = 0; vertexAttributePosition < vertexAttributeCount; vertexAttributePosition++) {
final int vertexAttributeId = graph.getAttribute(GraphElementType.VERTEX, vertexAttributePosition);
final String sourceVertexAttributeName = graph.getAttributeName(vertexAttributeId);
if (Character.isUpperCase(sourceVertexAttributeName.charAt(0))) {
final Object sourceVertexAttributeValue = graph.getObjectValue(vertexAttributeId, sourceVertexId);
attributeMap.put(GraphRecordStoreUtilities.SOURCE + sourceVertexAttributeName, sourceVertexAttributeValue);
}
final String destinationVertexAttributeName = graph.getAttributeName(vertexAttributeId);
if (Character.isUpperCase(destinationVertexAttributeName.charAt(0))) {
final Object destinationVertexAttributeValue = graph.getObjectValue(vertexAttributeId, destinationVertexId);
attributeMap.put(GraphRecordStoreUtilities.DESTINATION + destinationVertexAttributeName, destinationVertexAttributeValue);
}
}
attributes.put(destinationVertexIdentifier, attributeMap);
}
}
break;
default:
throw new PluginException(PluginNotificationLevel.ERROR, "Invalid element type");
}
try {
exportGeo(parameters, GraphNode.getGraphNode(graph.getId()).getDisplayName(), shapes, attributes, output);
} catch (IOException ex) {
throw new PluginException(PluginNotificationLevel.ERROR, ex);
}
ConstellationLoggerHelper.exportPropertyBuilder(this, GraphRecordStoreUtilities.getVertices(graph, false, false, false).getAll(GraphRecordStoreUtilities.SOURCE + VisualConcept.VertexAttribute.LABEL), output, ConstellationLoggerHelper.SUCCESS);
}
Aggregations