}
GraphFactory factory = graphModel.factory();
//Attributes - Manually merge models with new dynamic cols
attributeModel = Lookup.getDefault().lookup(AttributeController.class).getModel();
AttributeTable nodeTable = container.getAttributeModel().getNodeTable();
AttributeTable edgeTable = container.getAttributeModel().getEdgeTable();
for (AttributeColumn column : nodeTable.getColumns()) {
AttributeColumn existingCol = attributeModel.getNodeTable().getColumn(column.getTitle());
if (existingCol == null) {
if (!column.getOrigin().equals(AttributeOrigin.PROPERTY)) {
AttributeType dynamicType = TypeConvertor.getDynamicType(column.getType());
if (dynamicType != null && !column.getType().isDynamicType()) {
attributeModel.getNodeTable().addColumn(column.getId(), column.getTitle(), dynamicType, column.getOrigin(), null);
} else {
attributeModel.getNodeTable().addColumn(column.getId(), column.getTitle(), column.getType(), column.getOrigin(), column.getDefaultValue());
}
}
}
}
for (AttributeColumn column : edgeTable.getColumns()) {
AttributeColumn existingCol = attributeModel.getEdgeTable().getColumn(column.getTitle());
if (existingCol == null) {
if (!column.getOrigin().equals(AttributeOrigin.PROPERTY)) {
AttributeType dynamicType = TypeConvertor.getDynamicType(column.getType());
if (dynamicType != null && !column.getType().isDynamicType()) {