From: jsimomaa Date: Wed, 20 Jun 2018 11:47:41 +0000 (+0300) Subject: Pushing some (very) old changes to remote.. should have done long ago X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F68%2F1868%2F2;p=simantics%2Fdistrict.git Pushing some (very) old changes to remote.. should have done long ago gitlab #1 Change-Id: I3ec1b6b460d82851f9c16188d3e6d80386f90770 --- diff --git a/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportModel.java b/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportModel.java index 2f13692b..e2a6b7ee 100644 --- a/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportModel.java +++ b/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportModel.java @@ -42,11 +42,33 @@ public class CSVImportModel { private Map componentMappings = new HashMap<>(); private boolean isVertexImport; private String sourceCRS; - private int tempIndex; - private int pressureIndex; - private int diameterIndex; - private int outerDiamterIndex; - private int nominalMassFlowIndex; + private int supplytempIndex = -1; + private int supplypressureIndex= -1; + private int diameterIndex = -1; + private int outerDiamterIndex = -1; + private int nominalMassFlowIndex = -1; + private int returnTempIndex = -1; + private int returnPressureIndex = -1; + private int deltaPressureIndex = -1; + private int deltaTemperatureIndex = -1; + private int heatPowerIndex = -1; + private int nominalHeadMIndex = -1; + private int nominalHeadBIndex = -1; + private int nominalFlowIndex = -1; + private int maximumHeadMIndex = -1; + private int heatLoadDsIndex = -1; + private int massFlowIndex = -1; + private int volFlowIndex = -1; + private int velocityIndex = -1; + private int flowAreaIndex = -1; + private int nominalPressureLossIndex = -1; + private int edgeFlowAreaIndex = -1; + private int kReturnIndex = -1; + private int kSupplyIndex = -1; + private int tGroundIndex = -1; + private int idIndex = -1; + private double edgePadding = 0.0001; // default + private int valvePositionIndx = -1; // Third page @@ -236,20 +258,36 @@ public class CSVImportModel { return sourceCRS; } - public void setTempIndex(int tempIndex) { - this.tempIndex = tempIndex; + public void setSupplyTempIndex(int supplyTempIndex) { + this.supplytempIndex = supplyTempIndex; } - public int getTempIndex() { - return tempIndex; + public int getSupplyTempIndex() { + return supplytempIndex; } - public void setPressureIndex(int pressureIndex) { - this.pressureIndex = pressureIndex; + public void setSupplyPressureIndex(int supplyPressureIndex) { + this.supplypressureIndex = supplyPressureIndex; } - public int getPressureIndex() { - return pressureIndex; + public int getSupplyPressureIndex() { + return supplypressureIndex; + } + + public void setReturnTempIndex(int returnTempIndex) { + this.returnTempIndex = returnTempIndex; + } + + public int getReturnTempIndex() { + return returnTempIndex; + } + + public void setReturnPressureIndex(int returnPressureIndex) { + this.returnPressureIndex = returnPressureIndex; + } + + public int getReturnPressureIndex() { + return returnPressureIndex; } public void setDiameterIndex(int parseInt) { @@ -276,4 +314,163 @@ public class CSVImportModel { return nominalMassFlowIndex; } + public void setDeltaPressureIndex(int parseInt) { + this.deltaPressureIndex = parseInt; + } + + public int getDeltaPressureIndex() { + return deltaPressureIndex; + } + + public void setDeltaTemperatureIndex(int parseInt) { + this.deltaTemperatureIndex = parseInt; + } + + public int getDeltaTemperatureIndex() { + return deltaTemperatureIndex; + } + + public void setHeatPowerIndex(int parseInt) { + this.heatPowerIndex = parseInt; + } + + public int getHeatPowerIndex() { + return heatPowerIndex; + } + + public void setNominalHeadMIndex(int parseInt) { + this.nominalHeadMIndex = parseInt; + } + + public int getNominalHeadMIndex() { + return nominalHeadMIndex; + } + + public void setNominalHeadBIndex(int parseInt) { + this.nominalHeadBIndex = parseInt; + } + + public int getNominalHeadBIndex() { + return nominalHeadBIndex; + } + + public void setNominalFlowIndex(int parseInt) { + this.nominalFlowIndex = parseInt; + } + + public int getNominalFlowIndex() { + return nominalFlowIndex; + } + + public void setMaximumHeadMIndex(int parseInt) { + this.maximumHeadMIndex = parseInt; + } + + public int getMaximumHeadMIndex() { + return maximumHeadMIndex; + } + + public void setHeatLoadDsIndex(int parseInt) { + this.heatLoadDsIndex = parseInt; + } + + public int getHeatLoadDsIndex() { + return heatLoadDsIndex; + } + + public void setMassFlowIndex(int parseInt) { + this.massFlowIndex = parseInt; + } + + public int getMassFlowIndex() { + return massFlowIndex; + } + + public void setVolFlowIndex(int parseInt) { + this.volFlowIndex = parseInt; + } + + public int getVolFlowIndex() { + return volFlowIndex; + } + + public void setVelocityIndex(int parseInt) { + this.velocityIndex = parseInt; + } + + public int getVelocityIndex() { + return velocityIndex; + } + + public void setFlowAreaIndex(int parseInt) { + this.flowAreaIndex = parseInt; + } + + public int getFlowAreaIndex() { + return flowAreaIndex; + } + + public void setNominalPressureLossIndex(int parseInt) { + this.nominalPressureLossIndex = parseInt; + } + + public int getNominalPressureLossIndex() { + return nominalPressureLossIndex; + } + + public void setEdgeFlowAreaIndex(int parseInt) { + this.edgeFlowAreaIndex = parseInt; + } + + public int getEdgeFlowAreaIndex() { + return edgeFlowAreaIndex; + } + + public void setKReturnIndex(int parseInt) { + this.kReturnIndex = parseInt; + } + + public int getkReturnIndex() { + return kReturnIndex; + } + + public void setKSupplyIndex(int parseInt) { + this.kSupplyIndex = parseInt; + } + + public int getkSupplyIndex() { + return kSupplyIndex; + } + + public void setTGroundIndex(int parseInt) { + this.tGroundIndex = parseInt; + } + + public int gettGroundIndex() { + return tGroundIndex; + } + + public int getIdIndex() { + return idIndex; + } + + public void setIdIndex(int idIndex) { + this.idIndex = idIndex; + } + + public void setEdgePapping(double edgePadding) { + this.edgePadding = edgePadding; + } + + public double getEdgePadding() { + return edgePadding; + } + + public void setValvePositionIndex(int valvePositionIndx) { + this.valvePositionIndx = valvePositionIndx; + } + + public int getValvePositionIndx() { + return valvePositionIndx; + } } diff --git a/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizard.java b/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizard.java index 7ce7d3c6..80bf1447 100644 --- a/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizard.java +++ b/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizard.java @@ -56,6 +56,7 @@ public class CSVImportWizard extends Wizard implements IImportWizard { @Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { + monitor.beginTask("Importing CSV", 1000); try { Path csvFile = model.getSource(); char delim = model.getDelimiter(); @@ -67,8 +68,24 @@ public class CSVImportWizard extends Wizard implements IImportWizard { int xCoordColumnIndex = model.getXCoordIndex(); int yCoordColumnIndex = model.getYCoordIndex(); int zCoordColumnIndex = model.getZCoordIndex(); - int tempColumnIndex = model.getTempIndex(); - int pressureColumnIndex = model.getPressureIndex(); + int supplyTempColumnIndex = model.getSupplyTempIndex(); + int returnTempColumnIndex = model.getReturnTempIndex(); + int supplyPressureColumnIndex = model.getSupplyPressureIndex(); + int returnPressureColumnIndex = model.getReturnPressureIndex(); + int dpIndex = model.getDeltaPressureIndex(); + int dtIndex = model.getDeltaTemperatureIndex(); + int heatPowerIndex = model.getHeatPowerIndex(); + int valvePositionIndex = model.getValvePositionIndx(); + int nominalHeadMIndex = model.getNominalHeadMIndex(); + int nominalHeadBIndex = model.getNominalHeadBIndex(); + int nominalFlowIndex = model.getNominalFlowIndex(); + int maximumHeadMIndex = model.getMaximumHeadMIndex(); + int heatLoadDsIndex = model.getHeatLoadDsIndex(); + int massFlowIndex = model.getMassFlowIndex(); + int volFlowIndex = model.getVolFlowIndex(); + int velocityIndex = model.getVelocityIndex(); + int flowAreaIndex = model.getFlowAreaIndex(); + int nominalPressureLossIndex = model.getNominalPressureLossIndex(); int startXCoordColumnIndex = model.getStartXCoordIndex(); int startYCoordColumnIndex = model.getStartYCoordIndex(); @@ -79,8 +96,15 @@ public class CSVImportWizard extends Wizard implements IImportWizard { int diameterColumnIndex= model.getDiameterIndex(); int outerDiameterColumnIndex = model.getOuterDiamterIndex(); int nominalMassFlowIndex = model.getNominalMassFlowIndex(); + int tGroundIndex = model.gettGroundIndex(); + int edgeFlowAreaIndex = model.getEdgeFlowAreaIndex(); + int kReturnIndex = model.getkReturnIndex(); + int kSupplyIndex = model.getkSupplyIndex(); int mappingColumn = model.getComponentMappingIndex(); + int idColumn = model.getIdIndex(); + + double padding = model.getEdgePadding(); String sourceEPSGCRS = model.getSourceCRS(); @@ -99,6 +123,7 @@ public class CSVImportWizard extends Wizard implements IImportWizard { @Override public void perform(WriteGraph graph) throws DatabaseException { + graph.markUndoPoint(); DistrictNetworkResource DN = DistrictNetworkResource.getInstance(graph); @@ -111,16 +136,19 @@ public class CSVImportWizard extends Wizard implements IImportWizard { if (model.isVertexImport()) { String xCoords = row.get(xCoordColumnIndex); String yCoords = row.get(yCoordColumnIndex); - double xCoord = Double.parseDouble(xCoords); + double xCoord = - Double.parseDouble(xCoords); // make negative for now double yCoord = Double.parseDouble(yCoords); - String zs = row.get(zCoordColumnIndex); double z = 0; - if (!zs.isEmpty()) { - try { - z = Double.parseDouble(zs); - } catch (NumberFormatException e) { - throw new DatabaseException(e); + if (zCoordColumnIndex != -1) { + String zs = row.get(zCoordColumnIndex); + + if (!zs.isEmpty()) { + try { + z = Double.parseDouble(zs); + } catch (NumberFormatException e) { + throw new DatabaseException(e); + } } } @@ -135,26 +163,28 @@ public class CSVImportWizard extends Wizard implements IImportWizard { } Resource vertex = DistrictNetworkUtil.createVertex(graph, model.getParentDiagram(), new double[] { coords[1], -coords[0]}, model.getComponentMappings().get(mappingValue)); + writeStringValue(graph, row, idColumn, vertex, DN.HasId); + graph.claimLiteral(vertex, DN.Vertex_HasElevation, z, Bindings.DOUBLE); - String tempS = row.get(tempColumnIndex); - if (!tempS.isEmpty()) { - try { - double temp = Double.parseDouble(tempS); - graph.claimLiteral(vertex, DN.Vertex_HasTemperature, temp, Bindings.DOUBLE); - } catch (NumberFormatException e) { - throw new DatabaseException(e); - } - } - String pressureS = row.get(pressureColumnIndex); - if (!pressureS.isEmpty()) { - try { - double pressure = Double.parseDouble(pressureS); - graph.claimLiteral(vertex, DN.Vertex_HasPressure, pressure, Bindings.DOUBLE); - } catch (NumberFormatException e) { - throw new DatabaseException(e); - } - } + writeValue(graph, row, supplyTempColumnIndex, vertex, DN.Vertex_HasSupplyTemperature); + writeValue(graph, row, returnTempColumnIndex, vertex, DN.Vertex_HasReturnTemperature); + writeValue(graph, row, supplyPressureColumnIndex, vertex, DN.Vertex_HasSupplyPressure); + writeValue(graph, row, returnPressureColumnIndex, vertex, DN.Vertex_HasReturnPressure); + writeValue(graph, row, dpIndex, vertex, DN.Vertex_HasDeltaPressure); + writeValue(graph, row, dtIndex, vertex, DN.Vertex_HasDeltaTemperature); + writeValue(graph, row, heatPowerIndex, vertex, DN.Vertex_HasHeatPower); + writeValue(graph, row, valvePositionIndex, vertex, DN.Vertex_HasValvePosition); + writeValue(graph, row, nominalHeadMIndex, vertex, DN.Vertex_HasNominalHeadM); + writeValue(graph, row, nominalHeadBIndex, vertex, DN.Vertex_HasNominalHeadB); + writeValue(graph, row, nominalFlowIndex, vertex, DN.Vertex_HasNominalFlow); + writeValue(graph, row, maximumHeadMIndex, vertex, DN.Vertex_HasMaximumHeadM); + writeValue(graph, row, heatLoadDsIndex, vertex, DN.Vertex_HasHeatLoadDs); + writeValue(graph, row, massFlowIndex, vertex, DN.Vertex_HasMassFlow); + writeValue(graph, row, volFlowIndex, vertex, DN.Vertex_HasVolFlow); + writeValue(graph, row, velocityIndex, vertex, DN.Vertex_HasVelocity); + writeValue(graph, row, flowAreaIndex, vertex, DN.Vertex_HasFlowArea); + writeValue(graph, row, nominalPressureLossIndex, vertex, DN.Vertex_HasNominalPressureLoss); } else { String startXCoords = row.get(startXCoordColumnIndex); @@ -162,10 +192,10 @@ public class CSVImportWizard extends Wizard implements IImportWizard { String endXCoords = row.get(endXCoordColumnIndex); String endYCoords = row.get(endYCoordColumnIndex); - double startXCoord = Double.parseDouble(startXCoords); + double startXCoord = - Double.parseDouble(startXCoords); // make negative double startYCoord = Double.parseDouble(startYCoords); - double endXCoord = Double.parseDouble(endXCoords); + double endXCoord = - Double.parseDouble(endXCoords); // make negative double endYCoord = Double.parseDouble(endYCoords); double[] startCoords; @@ -184,36 +214,17 @@ public class CSVImportWizard extends Wizard implements IImportWizard { startCoords = new double[] { startXCoord / MapScalingTransform.getScaleX(), startYCoord / MapScalingTransform.getScaleY() }; endCoords = new double[] { endXCoord / MapScalingTransform.getScaleX(), endYCoord / MapScalingTransform.getScaleY() }; } + + Resource edge = DNEdgeBuilder.create(graph, model.getParentDiagram(), model.getComponentMappings().get(mappingValue), new double[] { startCoords[1], -startCoords[0]}, new double[] { endCoords[1], -endCoords[0]}, padding); + writeStringValue(graph, row, idColumn, edge, DN.HasId); - Resource edge = DNEdgeBuilder.create(graph, model.getParentDiagram(), model.getComponentMappings().get(mappingValue), new double[] { startCoords[1], -startCoords[0]}, new double[] { endCoords[1], -endCoords[0]}, 0.0000001); - - String diameterS = row.get(diameterColumnIndex); - if (!diameterS.isEmpty()) { - try { - double diameter = Double.parseDouble(diameterS); - graph.claimLiteral(edge, DN.Edge_HasDiameter, diameter); - } catch (NumberFormatException e) { - throw new DatabaseException(e); - } - } - String outerDiameterS = row.get(outerDiameterColumnIndex); - if (!outerDiameterS.isEmpty()) { - try { - double outerDiameter = Double.parseDouble(outerDiameterS); - graph.claimLiteral(edge, DN.Edge_HasOuterDiameter, outerDiameter); - } catch (NumberFormatException e) { - throw new DatabaseException(e); - } - } - String nominalMassFlowS = row.get(nominalMassFlowIndex); - if (!nominalMassFlowS.isEmpty()) { - try { - double nominalMassFlow = Double.parseDouble(nominalMassFlowS); - graph.claimLiteral(edge, DN.Edge_HasNominalMassFlow, nominalMassFlow); - } catch (NumberFormatException e) { - throw new DatabaseException(e); - } - } + writeValue(graph, row, diameterColumnIndex, edge, DN.Edge_HasDiameter); + writeValue(graph, row, outerDiameterColumnIndex, edge, DN.Edge_HasOuterDiameter); + writeValue(graph, row, nominalMassFlowIndex, edge, DN.Edge_HasNominalMassFlow); + writeValue(graph, row, tGroundIndex, edge, DN.Edge_HasTGround); + writeValue(graph, row, kReturnIndex, edge, DN.Edge_HasKReturn); + writeValue(graph, row, kSupplyIndex, edge, DN.Edge_HasKSupply); + writeValue(graph, row, edgeFlowAreaIndex, edge, DN.Edge_HasFlowArea); } } catch (MismatchedDimensionException | TransformException | DatabaseException e) { throw new DatabaseException(e); @@ -238,4 +249,30 @@ public class CSVImportWizard extends Wizard implements IImportWizard { return false; } } + + private static void writeValue(WriteGraph graph, CSVRecord row, int index, Resource subject, Resource relation) throws DatabaseException { + if (index != -1) { + String stringValue = row.get(index); + if (!stringValue.isEmpty()) { + try { + graph.claimLiteral(subject, relation, Double.parseDouble(stringValue), Bindings.DOUBLE); + } catch (NumberFormatException e) { + throw new DatabaseException(e); + } + } + } + } + + private static void writeStringValue(WriteGraph graph, CSVRecord row, int index, Resource subject, Resource relation) throws DatabaseException { + if (index != -1) { + String stringValue = row.get(index); + if (!stringValue.isEmpty()) { + try { + graph.claimLiteral(subject, relation, stringValue, Bindings.STRING); + } catch (NumberFormatException e) { + throw new DatabaseException(e); + } + } + } + } } diff --git a/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizardFirstPage.java b/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizardFirstPage.java index 830b1264..9ba7e2da 100644 --- a/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizardFirstPage.java +++ b/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizardFirstPage.java @@ -100,6 +100,11 @@ public class CSVImportWizardFirstPage extends WizardPage implements FileSelectio } }); diagramCombo.setItems(diagrams.keySet().toArray(new String[diagrams.size()])); + if (diagrams.size() > 0) { + diagramCombo.select(0); + model.setParentDiagram(diagrams.get(diagramCombo.getItem(0))); + diagramCombo.getDisplay().asyncExec(() -> validateComplete()); + } } catch (DatabaseException e) { e.printStackTrace(); } diff --git a/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizardPage.java b/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizardPage.java index 23571930..0035f6b7 100644 --- a/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizardPage.java +++ b/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizardPage.java @@ -12,6 +12,7 @@ import org.eclipse.jface.dialogs.IPageChangeProvider; import org.eclipse.jface.dialogs.IPageChangedListener; import org.eclipse.jface.dialogs.PageChangedEvent; import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; import org.eclipse.jface.layout.TableColumnLayout; import org.eclipse.jface.viewers.ColumnWeightData; import org.eclipse.jface.wizard.IWizardContainer; @@ -31,6 +32,7 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.TableItem; +import org.eclipse.swt.widgets.Text; import org.geotools.referencing.CRS; import org.simantics.district.imports.ui.controls.DynamicComboFieldEditor; @@ -50,6 +52,7 @@ public class CSVImportWizardPage extends WizardPage { // Common for vertex and edge private DynamicComboFieldEditor componentMappingSelector; + private DynamicComboFieldEditor idSelector; private DynamicComboFieldEditor labelSelector; // For vertex import @@ -57,6 +60,25 @@ public class CSVImportWizardPage extends WizardPage { private DynamicComboFieldEditor yCoordSelector; private DynamicComboFieldEditor zValueSelector; + private DynamicComboFieldEditor supplyTempValueSelector; + private DynamicComboFieldEditor returnTempValueSelector; + private DynamicComboFieldEditor supplyPressureValueSelector; + private DynamicComboFieldEditor returnPressureValueSelector; + private DynamicComboFieldEditor dpSelector; + private DynamicComboFieldEditor dtSelector; + private DynamicComboFieldEditor heatPowerSelector; + private DynamicComboFieldEditor nominalHeadMSelector; + private DynamicComboFieldEditor nominalHeadBSelector; + private DynamicComboFieldEditor nominalFlowSelector; + private DynamicComboFieldEditor maximumHeadMSelector; + private DynamicComboFieldEditor heatLoadDsSelector; + private DynamicComboFieldEditor massFlowSelector; + private DynamicComboFieldEditor volFlowSelector; + private DynamicComboFieldEditor velocitySelector; + private DynamicComboFieldEditor flowAreaSelector; + private DynamicComboFieldEditor nominalPressureLossSelector; + private DynamicComboFieldEditor valvePositionSelector; + // For edge import private DynamicComboFieldEditor startXCoordSelector; private DynamicComboFieldEditor startYCoordSelector; @@ -64,8 +86,8 @@ public class CSVImportWizardPage extends WizardPage { private DynamicComboFieldEditor endXCoordSelector; private DynamicComboFieldEditor endYCoordSelector; private DynamicComboFieldEditor endZValueSelector; - private DynamicComboFieldEditor tempValueSelector; - private DynamicComboFieldEditor pressureValueSelector; + + private Text edgeConnectionPadding; private DynamicComboFieldEditor outerDiameterSelector; private DynamicComboFieldEditor diameterSelector; @@ -78,6 +100,14 @@ public class CSVImportWizardPage extends WizardPage { private Button isVertexImport; private Combo sourceCRSCombo; + + private DynamicComboFieldEditor edgeFlowAreaSelector; + + private DynamicComboFieldEditor kReturnSelector; + + private DynamicComboFieldEditor kSupplySelector; + + private DynamicComboFieldEditor tGroundSelector; protected CSVImportWizardPage(CSVImportModel model) { super("Import CSV Data"); @@ -96,7 +126,10 @@ public class CSVImportWizardPage extends WizardPage { delimiterCombo = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY); delimiterCombo.setToolTipText("Select the delimiter that is used to separate elements in the CSV file"); - delimiterCombo.setItems(model.getDelimiterFormats()); + String[] formats = model.getDelimiterFormats(); + delimiterCombo.setItems(formats); + if (formats.length > 0) + delimiterCombo.select(0); delimiterCombo.addSelectionListener(new SelectionListener() { @Override @@ -252,6 +285,27 @@ public class CSVImportWizardPage extends WizardPage { createEdgeIndexMappingField(indexMappingGroup); createCommonIndexMappingField(indexMappingGroup); + + if (!model.isVertexImport()) { + Label label = new Label(indexMappingGroup, SWT.NONE); + label.setText("Connection point padding"); + GridDataFactory.fillDefaults().applyTo(label); + edgeConnectionPadding = new Text(indexMappingGroup, SWT.BORDER); + GridDataFactory.fillDefaults().applyTo(edgeConnectionPadding); + edgeConnectionPadding.setText("0.0001"); // default + edgeConnectionPadding.addModifyListener(new ModifyListener() { + + @Override + public void modifyText(ModifyEvent e) { + try { + double padding = Double.parseDouble(""); + model.setEdgePapping(padding); + } catch (NumberFormatException ee) { + // ignore + } + } + }); + } } private void createCommonIndexMappingField(Group parent) { @@ -271,6 +325,21 @@ public class CSVImportWizardPage extends WizardPage { } }); + idSelector = new DynamicComboFieldEditor("id", "ID", parent); + idSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setIdIndex(Integer.parseInt(idSelector.getValue())); + validatePageComplete(); + } + }); + } private void createVertexIndexMappingField(Group parent) { @@ -317,8 +386,8 @@ public class CSVImportWizardPage extends WizardPage { validatePageComplete(); } }); - tempValueSelector = new DynamicComboFieldEditor("tempValue", "Temperature value", parent); - tempValueSelector.addComboListener(new SelectionListener() { + supplyTempValueSelector = new DynamicComboFieldEditor("tempValue", "Supply Temperature value", parent); + supplyTempValueSelector.addComboListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent e) { @@ -327,12 +396,12 @@ public class CSVImportWizardPage extends WizardPage { @Override public void widgetDefaultSelected(SelectionEvent e) { - model.setTempIndex(Integer.parseInt(tempValueSelector.getValue())); + model.setSupplyTempIndex(Integer.parseInt(supplyTempValueSelector.getValue())); validatePageComplete(); } }); - pressureValueSelector = new DynamicComboFieldEditor("pressureValue", "Pressure value", parent); - pressureValueSelector.addComboListener(new SelectionListener() { + returnTempValueSelector = new DynamicComboFieldEditor("returnTempValue", "Return Temperature value", parent); + returnTempValueSelector.addComboListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent e) { @@ -341,13 +410,242 @@ public class CSVImportWizardPage extends WizardPage { @Override public void widgetDefaultSelected(SelectionEvent e) { - model.setPressureIndex(Integer.parseInt(pressureValueSelector.getValue())); + model.setReturnTempIndex(Integer.parseInt(returnTempValueSelector.getValue())); + validatePageComplete(); + } + }); + supplyPressureValueSelector = new DynamicComboFieldEditor("pressureValue", "Supply Pressure value", parent); + supplyPressureValueSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setSupplyPressureIndex(Integer.parseInt(supplyPressureValueSelector.getValue())); + validatePageComplete(); + } + }); + returnPressureValueSelector = new DynamicComboFieldEditor("returnPressureValue", "Return Pressure value", parent); + returnPressureValueSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setReturnPressureIndex(Integer.parseInt(returnPressureValueSelector.getValue())); + validatePageComplete(); + } + }); + dpSelector = new DynamicComboFieldEditor("dpValue", "Delta pressure ", parent); + dpSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setDeltaPressureIndex(Integer.parseInt(dpSelector.getValue())); + validatePageComplete(); + } + }); + dtSelector = new DynamicComboFieldEditor("dtValue", "Delta temperature ", parent); + dtSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setDeltaTemperatureIndex(Integer.parseInt(dtSelector.getValue())); + validatePageComplete(); + } + }); + heatPowerSelector = new DynamicComboFieldEditor("heatPowerValue", "Heat Power", parent); + heatPowerSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setHeatPowerIndex(Integer.parseInt(heatPowerSelector.getValue())); + validatePageComplete(); + } + }); + nominalHeadMSelector = new DynamicComboFieldEditor("nominalHeadMValue", "nominalHeadM", parent); + nominalHeadMSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setNominalHeadMIndex(Integer.parseInt(nominalHeadMSelector.getValue())); + validatePageComplete(); + } + }); + nominalHeadBSelector = new DynamicComboFieldEditor("nominalHeadBValue", "nominalHeadB", parent); + nominalHeadBSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setNominalHeadBIndex(Integer.parseInt(nominalHeadBSelector.getValue())); + validatePageComplete(); + } + }); + nominalFlowSelector = new DynamicComboFieldEditor("nominalFlowValue", "nominalFlow", parent); + nominalFlowSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setNominalFlowIndex(Integer.parseInt(nominalFlowSelector.getValue())); + validatePageComplete(); + } + }); + + maximumHeadMSelector = new DynamicComboFieldEditor("maximumHeadMValue", "maximumHeadM", parent); + maximumHeadMSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setMaximumHeadMIndex(Integer.parseInt(maximumHeadMSelector.getValue())); + validatePageComplete(); + } + }); + heatLoadDsSelector = new DynamicComboFieldEditor("heatLoadDsValue", "heatLoadDs", parent); + heatLoadDsSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setHeatLoadDsIndex(Integer.parseInt(heatLoadDsSelector.getValue())); + validatePageComplete(); + } + }); + massFlowSelector = new DynamicComboFieldEditor("massFlowValue", "massFlow", parent); + massFlowSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setMassFlowIndex(Integer.parseInt(massFlowSelector.getValue())); + validatePageComplete(); + } + }); + volFlowSelector = new DynamicComboFieldEditor("volFlowValue", "volFlow", parent); + volFlowSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setVolFlowIndex(Integer.parseInt(volFlowSelector.getValue())); + validatePageComplete(); + } + }); + velocitySelector = new DynamicComboFieldEditor("velocityValue", "velocity", parent); + velocitySelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setVelocityIndex(Integer.parseInt(velocitySelector.getValue())); + validatePageComplete(); + } + }); + flowAreaSelector = new DynamicComboFieldEditor("flowAreaValue", "flowArea", parent); + flowAreaSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setFlowAreaIndex(Integer.parseInt(flowAreaSelector.getValue())); + validatePageComplete(); + } + }); + nominalPressureLossSelector = new DynamicComboFieldEditor("nominalPressureLossValue", "nominalPressureLoss", parent); + nominalPressureLossSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setNominalPressureLossIndex(Integer.parseInt(nominalPressureLossSelector.getValue())); + validatePageComplete(); + } + }); + valvePositionSelector = new DynamicComboFieldEditor("valvePositionSelectorValue", "valvePositionSelector", parent); + valvePositionSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setValvePositionIndex(Integer.parseInt(valvePositionSelector.getValue())); validatePageComplete(); } }); } private void createEdgeIndexMappingField(Group parent) { + +// Composite paddingComposite = new Composite(parent, SWT.NONE); +// GridLayoutFactory.fillDefaults().numColumns(2).applyTo(paddingComposite); + startXCoordSelector = new DynamicComboFieldEditor("startxCoord", "Start X Coordinate", parent); startXCoordSelector.addComboListener(new SelectionListener() { @@ -477,12 +775,69 @@ public class CSVImportWizardPage extends WizardPage { validatePageComplete(); } }); + edgeFlowAreaSelector = new DynamicComboFieldEditor("edgeFlowAreaValue", "Flow Area", parent); + edgeFlowAreaSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setEdgeFlowAreaIndex(Integer.parseInt(edgeFlowAreaSelector.getValue())); + validatePageComplete(); + } + }); + kReturnSelector = new DynamicComboFieldEditor("kReturnValue", "K Return", parent); + kReturnSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setKReturnIndex(Integer.parseInt(kReturnSelector.getValue())); + validatePageComplete(); + } + }); + kSupplySelector = new DynamicComboFieldEditor("kSupplyValue", "K Supply", parent); + kSupplySelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setKSupplyIndex(Integer.parseInt(kSupplySelector.getValue())); + validatePageComplete(); + } + }); + tGroundSelector = new DynamicComboFieldEditor("tGroundValue", "Temperature Ground", parent); + tGroundSelector.addComboListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + widgetDefaultSelected(e); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + model.setTGroundIndex(Integer.parseInt(tGroundSelector.getValue())); + validatePageComplete(); + } + }); } private void updateCombos() { - String[][] namesAndValues = new String[headerIndexAndValues.size()][]; + String[][] namesAndValues = new String[headerIndexAndValues.size() + 1][]; - int i = 0; + namesAndValues[0] = new String[] {"", "-1"}; + int i = 1; for (Entry entry : headerIndexAndValues.entrySet()) { int key = entry.getKey(); String value = entry.getValue(); @@ -499,6 +854,7 @@ public class CSVImportWizardPage extends WizardPage { updateEdgeCombos(namesAndValues); componentMappingSelector.updateCombo(namesAndValues); + idSelector.updateCombo(namesAndValues); } private void updateEdgeCombos(String[][] namesAndValues) { @@ -511,15 +867,37 @@ public class CSVImportWizardPage extends WizardPage { diameterSelector.updateCombo(namesAndValues); outerDiameterSelector.updateCombo(namesAndValues); nominalMassFlowSelector.updateCombo(namesAndValues); + edgeFlowAreaSelector.updateCombo(namesAndValues); + kReturnSelector.updateCombo(namesAndValues); + kSupplySelector.updateCombo(namesAndValues); + tGroundSelector.updateCombo(namesAndValues); } private void updateVertexCombos(String[][] namesAndValues) { xCoordSelector.updateCombo(namesAndValues); yCoordSelector.updateCombo(namesAndValues); zValueSelector.updateCombo(namesAndValues); - pressureValueSelector.updateCombo(namesAndValues); - tempValueSelector.updateCombo(namesAndValues); + supplyTempValueSelector.updateCombo(namesAndValues); + returnTempValueSelector.updateCombo(namesAndValues); + supplyPressureValueSelector.updateCombo(namesAndValues); + returnPressureValueSelector.updateCombo(namesAndValues); + dpSelector.updateCombo(namesAndValues); + dtSelector.updateCombo(namesAndValues); + heatPowerSelector.updateCombo(namesAndValues); + valvePositionSelector.updateCombo(namesAndValues); + nominalHeadMSelector.updateCombo(namesAndValues); + nominalHeadBSelector.updateCombo(namesAndValues); + nominalFlowSelector.updateCombo(namesAndValues); + maximumHeadMSelector.updateCombo(namesAndValues); + heatLoadDsSelector.updateCombo(namesAndValues); + massFlowSelector.updateCombo(namesAndValues); + volFlowSelector.updateCombo(namesAndValues); + velocitySelector.updateCombo(namesAndValues); + flowAreaSelector.updateCombo(namesAndValues); + nominalPressureLossSelector.updateCombo(namesAndValues); } + + private void updateHeaders() { if (headerTable != null) diff --git a/org.simantics.district.imports/src/org/simantics/district/imports/DistrictImportUtils.java b/org.simantics.district.imports/src/org/simantics/district/imports/DistrictImportUtils.java index f123855d..6b22746c 100644 --- a/org.simantics.district.imports/src/org/simantics/district/imports/DistrictImportUtils.java +++ b/org.simantics.district.imports/src/org/simantics/district/imports/DistrictImportUtils.java @@ -46,6 +46,7 @@ public class DistrictImportUtils { Map delimiters = new HashMap<>(); delimiters.put("Comma", ','); delimiters.put("Semicolon", ';'); + delimiters.put("Tabulator", '\t'); return delimiters; } diff --git a/org.simantics.district.maps/src/org/simantics/maps/MapScalingTransform.java b/org.simantics.district.maps/src/org/simantics/maps/MapScalingTransform.java index e208be71..f64a99f4 100644 --- a/org.simantics.district.maps/src/org/simantics/maps/MapScalingTransform.java +++ b/org.simantics.district.maps/src/org/simantics/maps/MapScalingTransform.java @@ -7,7 +7,7 @@ public class MapScalingTransform { private MapScalingTransform() { } - public static final AffineTransform INSTANCE = new AffineTransform(100000, 0, 0, 100000, 0, 0); + public static final AffineTransform INSTANCE = new AffineTransform(10000, 0, 0, 10000, 0, 0); public static double getScaleX() { return INSTANCE.getScaleX(); diff --git a/org.simantics.district.maps/src/org/simantics/maps/prefs/MapsClientPreferences.java b/org.simantics.district.maps/src/org/simantics/maps/prefs/MapsClientPreferences.java index b0611313..fbc8b9e0 100644 --- a/org.simantics.district.maps/src/org/simantics/maps/prefs/MapsClientPreferences.java +++ b/org.simantics.district.maps/src/org/simantics/maps/prefs/MapsClientPreferences.java @@ -34,7 +34,7 @@ public class MapsClientPreferences { } public static String possibleBuiltinServerURL() { - int port = getServerPreferences().getInt(P_DEFAULT_PORT, 8080); + int port = getServerPreferences().getInt(P_DEFAULT_PORT, 8585); String style = getServerPreferences().get(P_CURRENT_TM2STYLE, "mapbox-studio-osm-bright.tm2"); if (port != -1 && style != null) { try { diff --git a/org.simantics.district.network.ontology/META-INF/MANIFEST.MF b/org.simantics.district.network.ontology/META-INF/MANIFEST.MF index 6ac026c7..16df5e15 100644 --- a/org.simantics.district.network.ontology/META-INF/MANIFEST.MF +++ b/org.simantics.district.network.ontology/META-INF/MANIFEST.MF @@ -10,6 +10,7 @@ Require-Bundle: org.simantics.layer0, org.simantics.viewpoint.ontology;bundle-version="1.2.0", org.simantics.image2.ontology;bundle-version="1.2.0", org.simantics.selectionview.ontology;bundle-version="1.2.0", - org.simantics.selectionview.ui.ontology;bundle-version="1.1.0" + org.simantics.selectionview.ui.ontology;bundle-version="1.1.0", + org.simantics.g2d.ontology;bundle-version="1.1.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Export-Package: org.simantics.district.network.ontology diff --git a/org.simantics.district.network.ontology/graph.tg b/org.simantics.district.network.ontology/graph.tg index 9755fbfd..be35590c 100644 Binary files a/org.simantics.district.network.ontology/graph.tg and b/org.simantics.district.network.ontology/graph.tg differ diff --git a/org.simantics.district.network.ontology/graph/DistrictNetwork.pgraph b/org.simantics.district.network.ontology/graph/DistrictNetwork.pgraph index e819f445..75716c69 100644 --- a/org.simantics.district.network.ontology/graph/DistrictNetwork.pgraph +++ b/org.simantics.district.network.ontology/graph/DistrictNetwork.pgraph @@ -6,6 +6,7 @@ VP = IMAGE = SEL = SEL_UI = +G2D = DN = : L0.Ontology @L0.new @@ -50,6 +51,106 @@ DN.MappingParameterType -- DN.Mapping.OutputTerminal --> DN.Mapping.Terminal -- DN.Mapping.Id --> L0.String -- DN.Mapping.ComponentType --> STR.ComponentType -- DN.Mapping.VertexMapping.ElevationAttribute --> L0.String -- DN.Mapping.VertexMapping.TemperatureAttribute --> L0.String -- DN.Mapping.VertexMapping.PressureAttribute --> L0.String -- DN.Mapping.VertexMapping.SupplyTemperatureAttribute --> L0.String -- DN.Mapping.VertexMapping.ReturnTemperatureAttribute --> L0.String -- DN.Mapping.VertexMapping.SupplyPressureAttribute --> L0.String -- DN.Mapping.VertexMapping.ReturnPressureAttribute --> L0.String -- DN.Mapping.VertexMapping.DeltaPressureAttribute --> L0.String -- DN.Mapping.VertexMapping.DeltaTemperatureAttribute --> L0.String -- DN.Mapping.Terminals --> DN.Mapping.TerminalPair -- DN.Mapping.VertexMapping.dpAttribute --> L0.String -- DN.Mapping.VertexMapping.dtAttribute --> L0.String -- DN.Mapping.VertexMapping.HeatPowerAttribute --> L0.String -- DN.Mapping.VertexMapping.NominalHeadMAttribute --> L0.String -- DN.Mapping.VertexMapping.NominalHeadBAttribute --> L0.String -- DN.Mapping.VertexMapping.NominalFlowAttribute --> L0.String -- DN.Mapping.VertexMapping.MaximumHeadMAttribute --> L0.String -- DN.Mapping.VertexMapping.HeatLoadDsAttribute --> L0.String -- DN.Mapping.VertexMapping.MassFlowAttribute --> L0.String -- DN.Mapping.VertexMapping.VolFlowAttribute --> L0.String -- DN.Mapping.VertexMapping.VelocityAttribute --> L0.String -- DN.Mapping.VertexMapping.FlowAreaAttribute --> L0.String -- DN.Mapping.VertexMapping.ValvePositionAttribute --> L0.String -- DN.Mapping.VertexMapping.NominalPressureLossAttribute --> L0.String -- DN.Mapping.VertexMapping.NominalMassFlowAttribute --> L0.String -- DN.Mapping.Id >-- DN.Mapping.ComponentType >-- DN.Mapping.EdgeMapping.LengthAttribute --> L0.String -- DN.Mapping.EdgeMapping.DiameterAttribute --> L0.String -- DN.Mapping.EdgeMapping.OuterDiameterAttribute --> L0.String -- DN.Mapping.EdgeMapping.NominalMassFlowAttribute --> L0.String -- DN.Mapping.EdgeMapping.FlowAreaAttribute --> L0.String -- DN.Mapping.EdgeMapping.KReturnAttribute --> L0.String -- DN.Mapping.EdgeMapping.KSupplyAttribute --> L0.String -- DN.Mapping.EdgeMapping.TGroundAttribute --> L0.String -- DN.Mapping.Terminals + +DN.SCLMain : L0.SCLModule + L0.SCLModule.definition + """ + include "Simantics/District/SCLMain" + """ + +DN.DistrictProfile : DIA.Profile + L0.HasLabel "District Network Profile" + DIA.Profile.priority 0.0 + DIA.HasEntries + _ : DIA.Profile + @L0.list + DN.DistrictProfile.entry + L0.HasLabel "Component names" + @DIA.groupStyleProfileEntry DN.ComponentNameStyle DN.Groups.ElementGroup + DN.DistrictProfile.entry1 + L0.HasLabel "Id" + @DIA.groupStyleProfileEntry DN.ComponentIdStyle DN.Groups.ElementGroup + +DN.Groups : L0.Library + +DN.Groups.ElementGroup : DIA.TypeGroup + DIA.TypeGroup.HasType DIA.Element + +DN.ComponentNameStyle : DIA.ResourceSCLTextGridStyle + @MOD.scl DIA.ResourceSCLTextGridStyle.texts + """ + districtNetworkProfileStyle "http://www.simantics.org/Layer0-1.1/HasName" + """ + "String -> Variable -> (String, String, String)" + @G2D.fontProperty DIA.TextElement.font "Arial" 30 G2D.FontStyle.normal_font_style + +DN.ComponentIdStyle : DIA.ResourceSCLTextGridStyle + @MOD.scl DIA.ResourceSCLTextGridStyle.texts + """ + districtNetworkProfileStyle "http://www.simantics.org/Layer0-1.1/HasName" + """ + "String -> Variable -> (String, String, String)" + @G2D.fontProperty DIA.TextElement.font "Arial" 30 G2D.FontStyle.normal_font_style diff --git a/org.simantics.district.network.ontology/scl/Simantics/District/SCLMain.scl b/org.simantics.district.network.ontology/scl/Simantics/District/SCLMain.scl new file mode 100644 index 00000000..2d46af92 --- /dev/null +++ b/org.simantics.district.network.ontology/scl/Simantics/District/SCLMain.scl @@ -0,0 +1,13 @@ +import "Simantics/DB" +import "Simantics/Variables" + +districtNetworkProfileStyle :: String -> Resource -> (String, String, String) +districtNetworkProfileStyle relation element = do + rel = possibleResource relation + result = match rel with + Just rel -> do + match possibleRelatedValue element rel with + Just res -> res + Nothing -> "" + Nothing -> "" + ("", result, "") \ No newline at end of file diff --git a/org.simantics.district.network.ontology/src/org/simantics/district/network/ontology/DistrictNetworkResource.java b/org.simantics.district.network.ontology/src/org/simantics/district/network/ontology/DistrictNetworkResource.java index 4adb19d3..32aabfa2 100644 --- a/org.simantics.district.network.ontology/src/org/simantics/district/network/ontology/DistrictNetworkResource.java +++ b/org.simantics.district.network.ontology/src/org/simantics/district/network/ontology/DistrictNetworkResource.java @@ -16,10 +16,15 @@ public class DistrictNetworkResource { public final Resource Actions_NewDNDiagram; public final Resource AddLayerToDNDiagramTemplate; public final Resource BrowseContext; + public final Resource ComponentIdStyle; + public final Resource ComponentNameStyle; public final Resource Composite; public final Resource Connection; public final Resource Diagram; public final Resource Diagram_MappedDiagram; + public final Resource DistrictProfile; + public final Resource DistrictProfile_entry; + public final Resource DistrictProfile_entry1; public final Resource EPSG_4326; public final Resource Edge; public final Resource EdgeDefaultMapping; @@ -27,12 +32,20 @@ public class DistrictNetworkResource { public final Resource EdgeMappingParameterType; public final Resource Edge_HasDiameter; public final Resource Edge_HasDiameter_Inverse; + public final Resource Edge_HasFlowArea; + public final Resource Edge_HasFlowArea_Inverse; + public final Resource Edge_HasKReturn; + public final Resource Edge_HasKReturn_Inverse; + public final Resource Edge_HasKSupply; + public final Resource Edge_HasKSupply_Inverse; public final Resource Edge_HasLength; public final Resource Edge_HasLength_Inverse; public final Resource Edge_HasNominalMassFlow; public final Resource Edge_HasNominalMassFlow_Inverse; public final Resource Edge_HasOuterDiameter; public final Resource Edge_HasOuterDiameter_Inverse; + public final Resource Edge_HasTGround; + public final Resource Edge_HasTGround_Inverse; public final Resource Functions; public final Resource Functions_compositeInstantiator; public final Resource Functions_convertToValue; @@ -40,8 +53,12 @@ public class DistrictNetworkResource { public final Resource Functions_defaultVertexMappingModifier; public final Resource Functions_enumerationValues; public final Resource Functions_mappingModifier; + public final Resource Groups; + public final Resource Groups_ElementGroup; public final Resource HasEndVertex; public final Resource HasEndVertex_Inverse; + public final Resource HasId; + public final Resource HasId_Inverse; public final Resource HasInLayerTag; public final Resource HasInLayerTag_Inverse; public final Resource HasMapping; @@ -67,12 +84,22 @@ public class DistrictNetworkResource { public final Resource Mapping_EdgeMapping; public final Resource Mapping_EdgeMapping_DiameterAttribute; public final Resource Mapping_EdgeMapping_DiameterAttribute_Inverse; + public final Resource Mapping_EdgeMapping_FlowAreaAttribute; + public final Resource Mapping_EdgeMapping_FlowAreaAttribute_Inverse; + public final Resource Mapping_EdgeMapping_KReturnAttribute; + public final Resource Mapping_EdgeMapping_KReturnAttribute_Inverse; + public final Resource Mapping_EdgeMapping_KSupplyAttribute; + public final Resource Mapping_EdgeMapping_KSupplyAttribute_Inverse; public final Resource Mapping_EdgeMapping_LengthAttribute; public final Resource Mapping_EdgeMapping_LengthAttribute_Inverse; public final Resource Mapping_EdgeMapping_NominalMassFlowAttribute; public final Resource Mapping_EdgeMapping_NominalMassFlowAttribute_Inverse; public final Resource Mapping_EdgeMapping_OuterDiameterAttribute; public final Resource Mapping_EdgeMapping_OuterDiameterAttribute_Inverse; + public final Resource Mapping_EdgeMapping_TGroundAttribute; + public final Resource Mapping_EdgeMapping_TGroundAttribute_Inverse; + public final Resource Mapping_Id; + public final Resource Mapping_Id_Inverse; public final Resource Mapping_InputTerminal; public final Resource Mapping_InputTerminal_Inverse; public final Resource Mapping_OutputTerminal; @@ -82,23 +109,94 @@ public class DistrictNetworkResource { public final Resource Mapping_Terminals; public final Resource Mapping_Terminals_Inverse; public final Resource Mapping_VertexMapping; + public final Resource Mapping_VertexMapping_DeltaPressureAttribute; + public final Resource Mapping_VertexMapping_DeltaPressureAttribute_Inverse; + public final Resource Mapping_VertexMapping_DeltaTemperatureAttribute; + public final Resource Mapping_VertexMapping_DeltaTemperatureAttribute_Inverse; public final Resource Mapping_VertexMapping_ElevationAttribute; public final Resource Mapping_VertexMapping_ElevationAttribute_Inverse; - public final Resource Mapping_VertexMapping_PressureAttribute; - public final Resource Mapping_VertexMapping_PressureAttribute_Inverse; - public final Resource Mapping_VertexMapping_TemperatureAttribute; - public final Resource Mapping_VertexMapping_TemperatureAttribute_Inverse; + public final Resource Mapping_VertexMapping_FlowAreaAttribute; + public final Resource Mapping_VertexMapping_FlowAreaAttribute_Inverse; + public final Resource Mapping_VertexMapping_HeatLoadDsAttribute; + public final Resource Mapping_VertexMapping_HeatLoadDsAttribute_Inverse; + public final Resource Mapping_VertexMapping_HeatPowerAttribute; + public final Resource Mapping_VertexMapping_HeatPowerAttribute_Inverse; + public final Resource Mapping_VertexMapping_MassFlowAttribute; + public final Resource Mapping_VertexMapping_MassFlowAttribute_Inverse; + public final Resource Mapping_VertexMapping_MaximumHeadMAttribute; + public final Resource Mapping_VertexMapping_MaximumHeadMAttribute_Inverse; + public final Resource Mapping_VertexMapping_NominalFlowAttribute; + public final Resource Mapping_VertexMapping_NominalFlowAttribute_Inverse; + public final Resource Mapping_VertexMapping_NominalHeadBAttribute; + public final Resource Mapping_VertexMapping_NominalHeadBAttribute_Inverse; + public final Resource Mapping_VertexMapping_NominalHeadMAttribute; + public final Resource Mapping_VertexMapping_NominalHeadMAttribute_Inverse; + public final Resource Mapping_VertexMapping_NominalMassFlowAttribute; + public final Resource Mapping_VertexMapping_NominalMassFlowAttribute_Inverse; + public final Resource Mapping_VertexMapping_NominalPressureLossAttribute; + public final Resource Mapping_VertexMapping_NominalPressureLossAttribute_Inverse; + public final Resource Mapping_VertexMapping_ReturnPressureAttribute; + public final Resource Mapping_VertexMapping_ReturnPressureAttribute_Inverse; + public final Resource Mapping_VertexMapping_ReturnTemperatureAttribute; + public final Resource Mapping_VertexMapping_ReturnTemperatureAttribute_Inverse; + public final Resource Mapping_VertexMapping_SupplyPressureAttribute; + public final Resource Mapping_VertexMapping_SupplyPressureAttribute_Inverse; + public final Resource Mapping_VertexMapping_SupplyTemperatureAttribute; + public final Resource Mapping_VertexMapping_SupplyTemperatureAttribute_Inverse; + public final Resource Mapping_VertexMapping_ValvePositionAttribute; + public final Resource Mapping_VertexMapping_ValvePositionAttribute_Inverse; + public final Resource Mapping_VertexMapping_VelocityAttribute; + public final Resource Mapping_VertexMapping_VelocityAttribute_Inverse; + public final Resource Mapping_VertexMapping_VolFlowAttribute; + public final Resource Mapping_VertexMapping_VolFlowAttribute_Inverse; + public final Resource Mapping_VertexMapping_dpAttribute; + public final Resource Mapping_VertexMapping_dpAttribute_Inverse; + public final Resource Mapping_VertexMapping_dtAttribute; + public final Resource Mapping_VertexMapping_dtAttribute_Inverse; + public final Resource SCLMain; public final Resource SpatialRefSystem; public final Resource Vertex; public final Resource VertexDefaultMapping; public final Resource VertexDefaultMapping_Inverse; public final Resource VertexMappingParameterType; + public final Resource Vertex_HasDeltaPressure; + public final Resource Vertex_HasDeltaPressure_Inverse; + public final Resource Vertex_HasDeltaTemperature; + public final Resource Vertex_HasDeltaTemperature_Inverse; public final Resource Vertex_HasElevation; public final Resource Vertex_HasElevation_Inverse; - public final Resource Vertex_HasPressure; - public final Resource Vertex_HasPressure_Inverse; - public final Resource Vertex_HasTemperature; - public final Resource Vertex_HasTemperature_Inverse; + public final Resource Vertex_HasFlowArea; + public final Resource Vertex_HasFlowArea_Inverse; + public final Resource Vertex_HasHeatLoadDs; + public final Resource Vertex_HasHeatLoadDs_Inverse; + public final Resource Vertex_HasHeatPower; + public final Resource Vertex_HasHeatPower_Inverse; + public final Resource Vertex_HasMassFlow; + public final Resource Vertex_HasMassFlow_Inverse; + public final Resource Vertex_HasMaximumHeadM; + public final Resource Vertex_HasMaximumHeadM_Inverse; + public final Resource Vertex_HasNominalFlow; + public final Resource Vertex_HasNominalFlow_Inverse; + public final Resource Vertex_HasNominalHeadB; + public final Resource Vertex_HasNominalHeadB_Inverse; + public final Resource Vertex_HasNominalHeadM; + public final Resource Vertex_HasNominalHeadM_Inverse; + public final Resource Vertex_HasNominalPressureLoss; + public final Resource Vertex_HasNominalPressureLoss_Inverse; + public final Resource Vertex_HasReturnPressure; + public final Resource Vertex_HasReturnPressure_Inverse; + public final Resource Vertex_HasReturnTemperature; + public final Resource Vertex_HasReturnTemperature_Inverse; + public final Resource Vertex_HasSupplyPressure; + public final Resource Vertex_HasSupplyPressure_Inverse; + public final Resource Vertex_HasSupplyTemperature; + public final Resource Vertex_HasSupplyTemperature_Inverse; + public final Resource Vertex_HasValvePosition; + public final Resource Vertex_HasValvePosition_Inverse; + public final Resource Vertex_HasVelocity; + public final Resource Vertex_HasVelocity_Inverse; + public final Resource Vertex_HasVolFlow; + public final Resource Vertex_HasVolFlow_Inverse; public static class URIs { public static final String ActionContext = "http://www.simantics.org/DistrictNetwork-1.0/ActionContext"; @@ -107,10 +205,15 @@ public class DistrictNetworkResource { public static final String Actions_NewDNDiagram = "http://www.simantics.org/DistrictNetwork-1.0/Actions/NewDNDiagram"; public static final String AddLayerToDNDiagramTemplate = "http://www.simantics.org/DistrictNetwork-1.0/AddLayerToDNDiagramTemplate"; public static final String BrowseContext = "http://www.simantics.org/DistrictNetwork-1.0/BrowseContext"; + public static final String ComponentIdStyle = "http://www.simantics.org/DistrictNetwork-1.0/ComponentIdStyle"; + public static final String ComponentNameStyle = "http://www.simantics.org/DistrictNetwork-1.0/ComponentNameStyle"; public static final String Composite = "http://www.simantics.org/DistrictNetwork-1.0/Composite"; public static final String Connection = "http://www.simantics.org/DistrictNetwork-1.0/Connection"; public static final String Diagram = "http://www.simantics.org/DistrictNetwork-1.0/Diagram"; public static final String Diagram_MappedDiagram = "http://www.simantics.org/DistrictNetwork-1.0/Diagram/MappedDiagram"; + public static final String DistrictProfile = "http://www.simantics.org/DistrictNetwork-1.0/DistrictProfile"; + public static final String DistrictProfile_entry = "http://www.simantics.org/DistrictNetwork-1.0/DistrictProfile/entry"; + public static final String DistrictProfile_entry1 = "http://www.simantics.org/DistrictNetwork-1.0/DistrictProfile/entry1"; public static final String EPSG_4326 = "http://www.simantics.org/DistrictNetwork-1.0/EPSG_4326"; public static final String Edge = "http://www.simantics.org/DistrictNetwork-1.0/Edge"; public static final String EdgeDefaultMapping = "http://www.simantics.org/DistrictNetwork-1.0/EdgeDefaultMapping"; @@ -118,12 +221,20 @@ public class DistrictNetworkResource { public static final String EdgeMappingParameterType = "http://www.simantics.org/DistrictNetwork-1.0/EdgeMappingParameterType"; public static final String Edge_HasDiameter = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasDiameter"; public static final String Edge_HasDiameter_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasDiameter/Inverse"; + public static final String Edge_HasFlowArea = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasFlowArea"; + public static final String Edge_HasFlowArea_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasFlowArea/Inverse"; + public static final String Edge_HasKReturn = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasKReturn"; + public static final String Edge_HasKReturn_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasKReturn/Inverse"; + public static final String Edge_HasKSupply = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasKSupply"; + public static final String Edge_HasKSupply_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasKSupply/Inverse"; public static final String Edge_HasLength = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasLength"; public static final String Edge_HasLength_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasLength/Inverse"; public static final String Edge_HasNominalMassFlow = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasNominalMassFlow"; public static final String Edge_HasNominalMassFlow_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasNominalMassFlow/Inverse"; public static final String Edge_HasOuterDiameter = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasOuterDiameter"; public static final String Edge_HasOuterDiameter_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasOuterDiameter/Inverse"; + public static final String Edge_HasTGround = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasTGround"; + public static final String Edge_HasTGround_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasTGround/Inverse"; public static final String Functions = "http://www.simantics.org/DistrictNetwork-1.0/Functions"; public static final String Functions_compositeInstantiator = "http://www.simantics.org/DistrictNetwork-1.0/Functions/compositeInstantiator"; public static final String Functions_convertToValue = "http://www.simantics.org/DistrictNetwork-1.0/Functions/convertToValue"; @@ -131,8 +242,12 @@ public class DistrictNetworkResource { public static final String Functions_defaultVertexMappingModifier = "http://www.simantics.org/DistrictNetwork-1.0/Functions/defaultVertexMappingModifier"; public static final String Functions_enumerationValues = "http://www.simantics.org/DistrictNetwork-1.0/Functions/enumerationValues"; public static final String Functions_mappingModifier = "http://www.simantics.org/DistrictNetwork-1.0/Functions/mappingModifier"; + public static final String Groups = "http://www.simantics.org/DistrictNetwork-1.0/Groups"; + public static final String Groups_ElementGroup = "http://www.simantics.org/DistrictNetwork-1.0/Groups/ElementGroup"; public static final String HasEndVertex = "http://www.simantics.org/DistrictNetwork-1.0/HasEndVertex"; public static final String HasEndVertex_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/HasEndVertex_Inverse"; + public static final String HasId = "http://www.simantics.org/DistrictNetwork-1.0/HasId"; + public static final String HasId_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/HasId/Inverse"; public static final String HasInLayerTag = "http://www.simantics.org/DistrictNetwork-1.0/HasInLayerTag"; public static final String HasInLayerTag_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/HasInLayerTag/Inverse"; public static final String HasMapping = "http://www.simantics.org/DistrictNetwork-1.0/HasMapping"; @@ -158,12 +273,22 @@ public class DistrictNetworkResource { public static final String Mapping_EdgeMapping = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping"; public static final String Mapping_EdgeMapping_DiameterAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping/DiameterAttribute"; public static final String Mapping_EdgeMapping_DiameterAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping/DiameterAttribute/Inverse"; + public static final String Mapping_EdgeMapping_FlowAreaAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping/FlowAreaAttribute"; + public static final String Mapping_EdgeMapping_FlowAreaAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping/FlowAreaAttribute/Inverse"; + public static final String Mapping_EdgeMapping_KReturnAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping/KReturnAttribute"; + public static final String Mapping_EdgeMapping_KReturnAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping/KReturnAttribute/Inverse"; + public static final String Mapping_EdgeMapping_KSupplyAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping/KSupplyAttribute"; + public static final String Mapping_EdgeMapping_KSupplyAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping/KSupplyAttribute/Inverse"; public static final String Mapping_EdgeMapping_LengthAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping/LengthAttribute"; public static final String Mapping_EdgeMapping_LengthAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping/LengthAttribute/Inverse"; public static final String Mapping_EdgeMapping_NominalMassFlowAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping/NominalMassFlowAttribute"; public static final String Mapping_EdgeMapping_NominalMassFlowAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping/NominalMassFlowAttribute/Inverse"; public static final String Mapping_EdgeMapping_OuterDiameterAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping/OuterDiameterAttribute"; public static final String Mapping_EdgeMapping_OuterDiameterAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping/OuterDiameterAttribute/Inverse"; + public static final String Mapping_EdgeMapping_TGroundAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping/TGroundAttribute"; + public static final String Mapping_EdgeMapping_TGroundAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/EdgeMapping/TGroundAttribute/Inverse"; + public static final String Mapping_Id = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/Id"; + public static final String Mapping_Id_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/Id/Inverse"; public static final String Mapping_InputTerminal = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/InputTerminal"; public static final String Mapping_InputTerminal_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/InputTerminal/Inverse"; public static final String Mapping_OutputTerminal = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/OutputTerminal"; @@ -173,23 +298,94 @@ public class DistrictNetworkResource { public static final String Mapping_Terminals = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/Terminals"; public static final String Mapping_Terminals_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/Terminals/Inverse"; public static final String Mapping_VertexMapping = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping"; + public static final String Mapping_VertexMapping_DeltaPressureAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/DeltaPressureAttribute"; + public static final String Mapping_VertexMapping_DeltaPressureAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/DeltaPressureAttribute/Inverse"; + public static final String Mapping_VertexMapping_DeltaTemperatureAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/DeltaTemperatureAttribute"; + public static final String Mapping_VertexMapping_DeltaTemperatureAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/DeltaTemperatureAttribute/Inverse"; public static final String Mapping_VertexMapping_ElevationAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/ElevationAttribute"; public static final String Mapping_VertexMapping_ElevationAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/ElevationAttribute/Inverse"; - public static final String Mapping_VertexMapping_PressureAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/PressureAttribute"; - public static final String Mapping_VertexMapping_PressureAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/PressureAttribute/Inverse"; - public static final String Mapping_VertexMapping_TemperatureAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/TemperatureAttribute"; - public static final String Mapping_VertexMapping_TemperatureAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/TemperatureAttribute/Inverse"; + public static final String Mapping_VertexMapping_FlowAreaAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/FlowAreaAttribute"; + public static final String Mapping_VertexMapping_FlowAreaAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/FlowAreaAttribute/Inverse"; + public static final String Mapping_VertexMapping_HeatLoadDsAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/HeatLoadDsAttribute"; + public static final String Mapping_VertexMapping_HeatLoadDsAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/HeatLoadDsAttribute/Inverse"; + public static final String Mapping_VertexMapping_HeatPowerAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/HeatPowerAttribute"; + public static final String Mapping_VertexMapping_HeatPowerAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/HeatPowerAttribute/Inverse"; + public static final String Mapping_VertexMapping_MassFlowAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/MassFlowAttribute"; + public static final String Mapping_VertexMapping_MassFlowAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/MassFlowAttribute/Inverse"; + public static final String Mapping_VertexMapping_MaximumHeadMAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/MaximumHeadMAttribute"; + public static final String Mapping_VertexMapping_MaximumHeadMAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/MaximumHeadMAttribute/Inverse"; + public static final String Mapping_VertexMapping_NominalFlowAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/NominalFlowAttribute"; + public static final String Mapping_VertexMapping_NominalFlowAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/NominalFlowAttribute/Inverse"; + public static final String Mapping_VertexMapping_NominalHeadBAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/NominalHeadBAttribute"; + public static final String Mapping_VertexMapping_NominalHeadBAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/NominalHeadBAttribute/Inverse"; + public static final String Mapping_VertexMapping_NominalHeadMAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/NominalHeadMAttribute"; + public static final String Mapping_VertexMapping_NominalHeadMAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/NominalHeadMAttribute/Inverse"; + public static final String Mapping_VertexMapping_NominalMassFlowAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/NominalMassFlowAttribute"; + public static final String Mapping_VertexMapping_NominalMassFlowAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/NominalMassFlowAttribute/Inverse"; + public static final String Mapping_VertexMapping_NominalPressureLossAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/NominalPressureLossAttribute"; + public static final String Mapping_VertexMapping_NominalPressureLossAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/NominalPressureLossAttribute/Inverse"; + public static final String Mapping_VertexMapping_ReturnPressureAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/ReturnPressureAttribute"; + public static final String Mapping_VertexMapping_ReturnPressureAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/ReturnPressureAttribute/Inverse"; + public static final String Mapping_VertexMapping_ReturnTemperatureAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/ReturnTemperatureAttribute"; + public static final String Mapping_VertexMapping_ReturnTemperatureAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/ReturnTemperatureAttribute/Inverse"; + public static final String Mapping_VertexMapping_SupplyPressureAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/SupplyPressureAttribute"; + public static final String Mapping_VertexMapping_SupplyPressureAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/SupplyPressureAttribute/Inverse"; + public static final String Mapping_VertexMapping_SupplyTemperatureAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/SupplyTemperatureAttribute"; + public static final String Mapping_VertexMapping_SupplyTemperatureAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/SupplyTemperatureAttribute/Inverse"; + public static final String Mapping_VertexMapping_ValvePositionAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/ValvePositionAttribute"; + public static final String Mapping_VertexMapping_ValvePositionAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/ValvePositionAttribute/Inverse"; + public static final String Mapping_VertexMapping_VelocityAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/VelocityAttribute"; + public static final String Mapping_VertexMapping_VelocityAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/VelocityAttribute/Inverse"; + public static final String Mapping_VertexMapping_VolFlowAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/VolFlowAttribute"; + public static final String Mapping_VertexMapping_VolFlowAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/VolFlowAttribute/Inverse"; + public static final String Mapping_VertexMapping_dpAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/dpAttribute"; + public static final String Mapping_VertexMapping_dpAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/dpAttribute/Inverse"; + public static final String Mapping_VertexMapping_dtAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/dtAttribute"; + public static final String Mapping_VertexMapping_dtAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/dtAttribute/Inverse"; + public static final String SCLMain = "http://www.simantics.org/DistrictNetwork-1.0/SCLMain"; public static final String SpatialRefSystem = "http://www.simantics.org/DistrictNetwork-1.0/SpatialRefSystem"; public static final String Vertex = "http://www.simantics.org/DistrictNetwork-1.0/Vertex"; public static final String VertexDefaultMapping = "http://www.simantics.org/DistrictNetwork-1.0/VertexDefaultMapping"; public static final String VertexDefaultMapping_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/VertexDefaultMapping/Inverse"; public static final String VertexMappingParameterType = "http://www.simantics.org/DistrictNetwork-1.0/VertexMappingParameterType"; + public static final String Vertex_HasDeltaPressure = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasDeltaPressure"; + public static final String Vertex_HasDeltaPressure_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasDeltaPressure/Inverse"; + public static final String Vertex_HasDeltaTemperature = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasDeltaTemperature"; + public static final String Vertex_HasDeltaTemperature_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasDeltaTemperature/Inverse"; public static final String Vertex_HasElevation = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasElevation"; public static final String Vertex_HasElevation_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasElevation/Inverse"; - public static final String Vertex_HasPressure = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasPressure"; - public static final String Vertex_HasPressure_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasPressure/Inverse"; - public static final String Vertex_HasTemperature = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasTemperature"; - public static final String Vertex_HasTemperature_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasTemperature/Inverse"; + public static final String Vertex_HasFlowArea = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasFlowArea"; + public static final String Vertex_HasFlowArea_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasFlowArea/Inverse"; + public static final String Vertex_HasHeatLoadDs = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasHeatLoadDs"; + public static final String Vertex_HasHeatLoadDs_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasHeatLoadDs/Inverse"; + public static final String Vertex_HasHeatPower = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasHeatPower"; + public static final String Vertex_HasHeatPower_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasHeatPower/Inverse"; + public static final String Vertex_HasMassFlow = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasMassFlow"; + public static final String Vertex_HasMassFlow_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasMassFlow/Inverse"; + public static final String Vertex_HasMaximumHeadM = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasMaximumHeadM"; + public static final String Vertex_HasMaximumHeadM_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasMaximumHeadM/Inverse"; + public static final String Vertex_HasNominalFlow = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasNominalFlow"; + public static final String Vertex_HasNominalFlow_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasNominalFlow/Inverse"; + public static final String Vertex_HasNominalHeadB = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasNominalHeadB"; + public static final String Vertex_HasNominalHeadB_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasNominalHeadB/Inverse"; + public static final String Vertex_HasNominalHeadM = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasNominalHeadM"; + public static final String Vertex_HasNominalHeadM_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasNominalHeadM/Inverse"; + public static final String Vertex_HasNominalPressureLoss = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasNominalPressureLoss"; + public static final String Vertex_HasNominalPressureLoss_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasNominalPressureLoss/Inverse"; + public static final String Vertex_HasReturnPressure = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasReturnPressure"; + public static final String Vertex_HasReturnPressure_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasReturnPressure/Inverse"; + public static final String Vertex_HasReturnTemperature = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasReturnTemperature"; + public static final String Vertex_HasReturnTemperature_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasReturnTemperature/Inverse"; + public static final String Vertex_HasSupplyPressure = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasSupplyPressure"; + public static final String Vertex_HasSupplyPressure_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasSupplyPressure/Inverse"; + public static final String Vertex_HasSupplyTemperature = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasSupplyTemperature"; + public static final String Vertex_HasSupplyTemperature_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasSupplyTemperature/Inverse"; + public static final String Vertex_HasValvePosition = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasValvePosition"; + public static final String Vertex_HasValvePosition_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasValvePosition/Inverse"; + public static final String Vertex_HasVelocity = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasVelocity"; + public static final String Vertex_HasVelocity_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasVelocity/Inverse"; + public static final String Vertex_HasVolFlow = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasVolFlow"; + public static final String Vertex_HasVolFlow_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasVolFlow/Inverse"; } public static Resource getResourceOrNull(ReadGraph graph, String uri) { @@ -208,10 +404,15 @@ public class DistrictNetworkResource { Actions_NewDNDiagram = getResourceOrNull(graph, URIs.Actions_NewDNDiagram); AddLayerToDNDiagramTemplate = getResourceOrNull(graph, URIs.AddLayerToDNDiagramTemplate); BrowseContext = getResourceOrNull(graph, URIs.BrowseContext); + ComponentIdStyle = getResourceOrNull(graph, URIs.ComponentIdStyle); + ComponentNameStyle = getResourceOrNull(graph, URIs.ComponentNameStyle); Composite = getResourceOrNull(graph, URIs.Composite); Connection = getResourceOrNull(graph, URIs.Connection); Diagram = getResourceOrNull(graph, URIs.Diagram); Diagram_MappedDiagram = getResourceOrNull(graph, URIs.Diagram_MappedDiagram); + DistrictProfile = getResourceOrNull(graph, URIs.DistrictProfile); + DistrictProfile_entry = getResourceOrNull(graph, URIs.DistrictProfile_entry); + DistrictProfile_entry1 = getResourceOrNull(graph, URIs.DistrictProfile_entry1); EPSG_4326 = getResourceOrNull(graph, URIs.EPSG_4326); Edge = getResourceOrNull(graph, URIs.Edge); EdgeDefaultMapping = getResourceOrNull(graph, URIs.EdgeDefaultMapping); @@ -219,12 +420,20 @@ public class DistrictNetworkResource { EdgeMappingParameterType = getResourceOrNull(graph, URIs.EdgeMappingParameterType); Edge_HasDiameter = getResourceOrNull(graph, URIs.Edge_HasDiameter); Edge_HasDiameter_Inverse = getResourceOrNull(graph, URIs.Edge_HasDiameter_Inverse); + Edge_HasFlowArea = getResourceOrNull(graph, URIs.Edge_HasFlowArea); + Edge_HasFlowArea_Inverse = getResourceOrNull(graph, URIs.Edge_HasFlowArea_Inverse); + Edge_HasKReturn = getResourceOrNull(graph, URIs.Edge_HasKReturn); + Edge_HasKReturn_Inverse = getResourceOrNull(graph, URIs.Edge_HasKReturn_Inverse); + Edge_HasKSupply = getResourceOrNull(graph, URIs.Edge_HasKSupply); + Edge_HasKSupply_Inverse = getResourceOrNull(graph, URIs.Edge_HasKSupply_Inverse); Edge_HasLength = getResourceOrNull(graph, URIs.Edge_HasLength); Edge_HasLength_Inverse = getResourceOrNull(graph, URIs.Edge_HasLength_Inverse); Edge_HasNominalMassFlow = getResourceOrNull(graph, URIs.Edge_HasNominalMassFlow); Edge_HasNominalMassFlow_Inverse = getResourceOrNull(graph, URIs.Edge_HasNominalMassFlow_Inverse); Edge_HasOuterDiameter = getResourceOrNull(graph, URIs.Edge_HasOuterDiameter); Edge_HasOuterDiameter_Inverse = getResourceOrNull(graph, URIs.Edge_HasOuterDiameter_Inverse); + Edge_HasTGround = getResourceOrNull(graph, URIs.Edge_HasTGround); + Edge_HasTGround_Inverse = getResourceOrNull(graph, URIs.Edge_HasTGround_Inverse); Functions = getResourceOrNull(graph, URIs.Functions); Functions_compositeInstantiator = getResourceOrNull(graph, URIs.Functions_compositeInstantiator); Functions_convertToValue = getResourceOrNull(graph, URIs.Functions_convertToValue); @@ -232,8 +441,12 @@ public class DistrictNetworkResource { Functions_defaultVertexMappingModifier = getResourceOrNull(graph, URIs.Functions_defaultVertexMappingModifier); Functions_enumerationValues = getResourceOrNull(graph, URIs.Functions_enumerationValues); Functions_mappingModifier = getResourceOrNull(graph, URIs.Functions_mappingModifier); + Groups = getResourceOrNull(graph, URIs.Groups); + Groups_ElementGroup = getResourceOrNull(graph, URIs.Groups_ElementGroup); HasEndVertex = getResourceOrNull(graph, URIs.HasEndVertex); HasEndVertex_Inverse = getResourceOrNull(graph, URIs.HasEndVertex_Inverse); + HasId = getResourceOrNull(graph, URIs.HasId); + HasId_Inverse = getResourceOrNull(graph, URIs.HasId_Inverse); HasInLayerTag = getResourceOrNull(graph, URIs.HasInLayerTag); HasInLayerTag_Inverse = getResourceOrNull(graph, URIs.HasInLayerTag_Inverse); HasMapping = getResourceOrNull(graph, URIs.HasMapping); @@ -259,12 +472,22 @@ public class DistrictNetworkResource { Mapping_EdgeMapping = getResourceOrNull(graph, URIs.Mapping_EdgeMapping); Mapping_EdgeMapping_DiameterAttribute = getResourceOrNull(graph, URIs.Mapping_EdgeMapping_DiameterAttribute); Mapping_EdgeMapping_DiameterAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_EdgeMapping_DiameterAttribute_Inverse); + Mapping_EdgeMapping_FlowAreaAttribute = getResourceOrNull(graph, URIs.Mapping_EdgeMapping_FlowAreaAttribute); + Mapping_EdgeMapping_FlowAreaAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_EdgeMapping_FlowAreaAttribute_Inverse); + Mapping_EdgeMapping_KReturnAttribute = getResourceOrNull(graph, URIs.Mapping_EdgeMapping_KReturnAttribute); + Mapping_EdgeMapping_KReturnAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_EdgeMapping_KReturnAttribute_Inverse); + Mapping_EdgeMapping_KSupplyAttribute = getResourceOrNull(graph, URIs.Mapping_EdgeMapping_KSupplyAttribute); + Mapping_EdgeMapping_KSupplyAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_EdgeMapping_KSupplyAttribute_Inverse); Mapping_EdgeMapping_LengthAttribute = getResourceOrNull(graph, URIs.Mapping_EdgeMapping_LengthAttribute); Mapping_EdgeMapping_LengthAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_EdgeMapping_LengthAttribute_Inverse); Mapping_EdgeMapping_NominalMassFlowAttribute = getResourceOrNull(graph, URIs.Mapping_EdgeMapping_NominalMassFlowAttribute); Mapping_EdgeMapping_NominalMassFlowAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_EdgeMapping_NominalMassFlowAttribute_Inverse); Mapping_EdgeMapping_OuterDiameterAttribute = getResourceOrNull(graph, URIs.Mapping_EdgeMapping_OuterDiameterAttribute); Mapping_EdgeMapping_OuterDiameterAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_EdgeMapping_OuterDiameterAttribute_Inverse); + Mapping_EdgeMapping_TGroundAttribute = getResourceOrNull(graph, URIs.Mapping_EdgeMapping_TGroundAttribute); + Mapping_EdgeMapping_TGroundAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_EdgeMapping_TGroundAttribute_Inverse); + Mapping_Id = getResourceOrNull(graph, URIs.Mapping_Id); + Mapping_Id_Inverse = getResourceOrNull(graph, URIs.Mapping_Id_Inverse); Mapping_InputTerminal = getResourceOrNull(graph, URIs.Mapping_InputTerminal); Mapping_InputTerminal_Inverse = getResourceOrNull(graph, URIs.Mapping_InputTerminal_Inverse); Mapping_OutputTerminal = getResourceOrNull(graph, URIs.Mapping_OutputTerminal); @@ -274,23 +497,94 @@ public class DistrictNetworkResource { Mapping_Terminals = getResourceOrNull(graph, URIs.Mapping_Terminals); Mapping_Terminals_Inverse = getResourceOrNull(graph, URIs.Mapping_Terminals_Inverse); Mapping_VertexMapping = getResourceOrNull(graph, URIs.Mapping_VertexMapping); + Mapping_VertexMapping_DeltaPressureAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_DeltaPressureAttribute); + Mapping_VertexMapping_DeltaPressureAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_DeltaPressureAttribute_Inverse); + Mapping_VertexMapping_DeltaTemperatureAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_DeltaTemperatureAttribute); + Mapping_VertexMapping_DeltaTemperatureAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_DeltaTemperatureAttribute_Inverse); Mapping_VertexMapping_ElevationAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_ElevationAttribute); Mapping_VertexMapping_ElevationAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_ElevationAttribute_Inverse); - Mapping_VertexMapping_PressureAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_PressureAttribute); - Mapping_VertexMapping_PressureAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_PressureAttribute_Inverse); - Mapping_VertexMapping_TemperatureAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_TemperatureAttribute); - Mapping_VertexMapping_TemperatureAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_TemperatureAttribute_Inverse); + Mapping_VertexMapping_FlowAreaAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_FlowAreaAttribute); + Mapping_VertexMapping_FlowAreaAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_FlowAreaAttribute_Inverse); + Mapping_VertexMapping_HeatLoadDsAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_HeatLoadDsAttribute); + Mapping_VertexMapping_HeatLoadDsAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_HeatLoadDsAttribute_Inverse); + Mapping_VertexMapping_HeatPowerAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_HeatPowerAttribute); + Mapping_VertexMapping_HeatPowerAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_HeatPowerAttribute_Inverse); + Mapping_VertexMapping_MassFlowAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_MassFlowAttribute); + Mapping_VertexMapping_MassFlowAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_MassFlowAttribute_Inverse); + Mapping_VertexMapping_MaximumHeadMAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_MaximumHeadMAttribute); + Mapping_VertexMapping_MaximumHeadMAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_MaximumHeadMAttribute_Inverse); + Mapping_VertexMapping_NominalFlowAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_NominalFlowAttribute); + Mapping_VertexMapping_NominalFlowAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_NominalFlowAttribute_Inverse); + Mapping_VertexMapping_NominalHeadBAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_NominalHeadBAttribute); + Mapping_VertexMapping_NominalHeadBAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_NominalHeadBAttribute_Inverse); + Mapping_VertexMapping_NominalHeadMAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_NominalHeadMAttribute); + Mapping_VertexMapping_NominalHeadMAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_NominalHeadMAttribute_Inverse); + Mapping_VertexMapping_NominalMassFlowAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_NominalMassFlowAttribute); + Mapping_VertexMapping_NominalMassFlowAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_NominalMassFlowAttribute_Inverse); + Mapping_VertexMapping_NominalPressureLossAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_NominalPressureLossAttribute); + Mapping_VertexMapping_NominalPressureLossAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_NominalPressureLossAttribute_Inverse); + Mapping_VertexMapping_ReturnPressureAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_ReturnPressureAttribute); + Mapping_VertexMapping_ReturnPressureAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_ReturnPressureAttribute_Inverse); + Mapping_VertexMapping_ReturnTemperatureAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_ReturnTemperatureAttribute); + Mapping_VertexMapping_ReturnTemperatureAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_ReturnTemperatureAttribute_Inverse); + Mapping_VertexMapping_SupplyPressureAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_SupplyPressureAttribute); + Mapping_VertexMapping_SupplyPressureAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_SupplyPressureAttribute_Inverse); + Mapping_VertexMapping_SupplyTemperatureAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_SupplyTemperatureAttribute); + Mapping_VertexMapping_SupplyTemperatureAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_SupplyTemperatureAttribute_Inverse); + Mapping_VertexMapping_ValvePositionAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_ValvePositionAttribute); + Mapping_VertexMapping_ValvePositionAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_ValvePositionAttribute_Inverse); + Mapping_VertexMapping_VelocityAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_VelocityAttribute); + Mapping_VertexMapping_VelocityAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_VelocityAttribute_Inverse); + Mapping_VertexMapping_VolFlowAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_VolFlowAttribute); + Mapping_VertexMapping_VolFlowAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_VolFlowAttribute_Inverse); + Mapping_VertexMapping_dpAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_dpAttribute); + Mapping_VertexMapping_dpAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_dpAttribute_Inverse); + Mapping_VertexMapping_dtAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_dtAttribute); + Mapping_VertexMapping_dtAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_dtAttribute_Inverse); + SCLMain = getResourceOrNull(graph, URIs.SCLMain); SpatialRefSystem = getResourceOrNull(graph, URIs.SpatialRefSystem); Vertex = getResourceOrNull(graph, URIs.Vertex); VertexDefaultMapping = getResourceOrNull(graph, URIs.VertexDefaultMapping); VertexDefaultMapping_Inverse = getResourceOrNull(graph, URIs.VertexDefaultMapping_Inverse); VertexMappingParameterType = getResourceOrNull(graph, URIs.VertexMappingParameterType); + Vertex_HasDeltaPressure = getResourceOrNull(graph, URIs.Vertex_HasDeltaPressure); + Vertex_HasDeltaPressure_Inverse = getResourceOrNull(graph, URIs.Vertex_HasDeltaPressure_Inverse); + Vertex_HasDeltaTemperature = getResourceOrNull(graph, URIs.Vertex_HasDeltaTemperature); + Vertex_HasDeltaTemperature_Inverse = getResourceOrNull(graph, URIs.Vertex_HasDeltaTemperature_Inverse); Vertex_HasElevation = getResourceOrNull(graph, URIs.Vertex_HasElevation); Vertex_HasElevation_Inverse = getResourceOrNull(graph, URIs.Vertex_HasElevation_Inverse); - Vertex_HasPressure = getResourceOrNull(graph, URIs.Vertex_HasPressure); - Vertex_HasPressure_Inverse = getResourceOrNull(graph, URIs.Vertex_HasPressure_Inverse); - Vertex_HasTemperature = getResourceOrNull(graph, URIs.Vertex_HasTemperature); - Vertex_HasTemperature_Inverse = getResourceOrNull(graph, URIs.Vertex_HasTemperature_Inverse); + Vertex_HasFlowArea = getResourceOrNull(graph, URIs.Vertex_HasFlowArea); + Vertex_HasFlowArea_Inverse = getResourceOrNull(graph, URIs.Vertex_HasFlowArea_Inverse); + Vertex_HasHeatLoadDs = getResourceOrNull(graph, URIs.Vertex_HasHeatLoadDs); + Vertex_HasHeatLoadDs_Inverse = getResourceOrNull(graph, URIs.Vertex_HasHeatLoadDs_Inverse); + Vertex_HasHeatPower = getResourceOrNull(graph, URIs.Vertex_HasHeatPower); + Vertex_HasHeatPower_Inverse = getResourceOrNull(graph, URIs.Vertex_HasHeatPower_Inverse); + Vertex_HasMassFlow = getResourceOrNull(graph, URIs.Vertex_HasMassFlow); + Vertex_HasMassFlow_Inverse = getResourceOrNull(graph, URIs.Vertex_HasMassFlow_Inverse); + Vertex_HasMaximumHeadM = getResourceOrNull(graph, URIs.Vertex_HasMaximumHeadM); + Vertex_HasMaximumHeadM_Inverse = getResourceOrNull(graph, URIs.Vertex_HasMaximumHeadM_Inverse); + Vertex_HasNominalFlow = getResourceOrNull(graph, URIs.Vertex_HasNominalFlow); + Vertex_HasNominalFlow_Inverse = getResourceOrNull(graph, URIs.Vertex_HasNominalFlow_Inverse); + Vertex_HasNominalHeadB = getResourceOrNull(graph, URIs.Vertex_HasNominalHeadB); + Vertex_HasNominalHeadB_Inverse = getResourceOrNull(graph, URIs.Vertex_HasNominalHeadB_Inverse); + Vertex_HasNominalHeadM = getResourceOrNull(graph, URIs.Vertex_HasNominalHeadM); + Vertex_HasNominalHeadM_Inverse = getResourceOrNull(graph, URIs.Vertex_HasNominalHeadM_Inverse); + Vertex_HasNominalPressureLoss = getResourceOrNull(graph, URIs.Vertex_HasNominalPressureLoss); + Vertex_HasNominalPressureLoss_Inverse = getResourceOrNull(graph, URIs.Vertex_HasNominalPressureLoss_Inverse); + Vertex_HasReturnPressure = getResourceOrNull(graph, URIs.Vertex_HasReturnPressure); + Vertex_HasReturnPressure_Inverse = getResourceOrNull(graph, URIs.Vertex_HasReturnPressure_Inverse); + Vertex_HasReturnTemperature = getResourceOrNull(graph, URIs.Vertex_HasReturnTemperature); + Vertex_HasReturnTemperature_Inverse = getResourceOrNull(graph, URIs.Vertex_HasReturnTemperature_Inverse); + Vertex_HasSupplyPressure = getResourceOrNull(graph, URIs.Vertex_HasSupplyPressure); + Vertex_HasSupplyPressure_Inverse = getResourceOrNull(graph, URIs.Vertex_HasSupplyPressure_Inverse); + Vertex_HasSupplyTemperature = getResourceOrNull(graph, URIs.Vertex_HasSupplyTemperature); + Vertex_HasSupplyTemperature_Inverse = getResourceOrNull(graph, URIs.Vertex_HasSupplyTemperature_Inverse); + Vertex_HasValvePosition = getResourceOrNull(graph, URIs.Vertex_HasValvePosition); + Vertex_HasValvePosition_Inverse = getResourceOrNull(graph, URIs.Vertex_HasValvePosition_Inverse); + Vertex_HasVelocity = getResourceOrNull(graph, URIs.Vertex_HasVelocity); + Vertex_HasVelocity_Inverse = getResourceOrNull(graph, URIs.Vertex_HasVelocity_Inverse); + Vertex_HasVolFlow = getResourceOrNull(graph, URIs.Vertex_HasVolFlow); + Vertex_HasVolFlow_Inverse = getResourceOrNull(graph, URIs.Vertex_HasVolFlow_Inverse); } public static DistrictNetworkResource getInstance(ReadGraph graph) { diff --git a/org.simantics.district.network.ui.ontology/graph.tg b/org.simantics.district.network.ui.ontology/graph.tg index 2815e2f3..bb507c21 100644 Binary files a/org.simantics.district.network.ui.ontology/graph.tg and b/org.simantics.district.network.ui.ontology/graph.tg differ diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/adapters/DistrictNetworkAdditionalColor.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/adapters/DistrictNetworkAdditionalColor.java index ef3b10c9..dcf556ed 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/adapters/DistrictNetworkAdditionalColor.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/adapters/DistrictNetworkAdditionalColor.java @@ -17,12 +17,28 @@ public class DistrictNetworkAdditionalColor implements AdditionalColor { public static final Key KEY_DN_MAPPING_RESOURCE = new KeyOf(Resource.class, "DN_MAPPING_RESOURCE"); private static final long serialVersionUID = -6290147660355075322L; + + private static final org.simantics.utils.ui.color.Color lightBlue = new org.simantics.utils.ui.color.Color(34, 167, 240); + private static final org.simantics.utils.ui.color.Color lightRed = new org.simantics.utils.ui.color.Color(236, 100, 75); + private static final org.simantics.utils.ui.color.Color lightGreen = new org.simantics.utils.ui.color.Color(135, 211, 124); + private static final org.simantics.utils.ui.color.Color gray = new org.simantics.utils.ui.color.Color(108, 122, 137); + private static final org.simantics.utils.ui.color.Color orange = new org.simantics.utils.ui.color.Color(243, 156, 18); + private static final org.simantics.utils.ui.color.Color purple = new org.simantics.utils.ui.color.Color(190, 144, 212); public static final ElementHandler INSTANCE = new DistrictNetworkAdditionalColor(); private ColorPool colorPool = new ColorPool(); private List mappings = new ArrayList<>(); + public DistrictNetworkAdditionalColor() { + colorPool.add(lightBlue); + colorPool.add(lightRed); + colorPool.add(lightGreen); + colorPool.add(gray); + colorPool.add(orange); + colorPool.add(purple); + } + @Override public void setAdditionalColor(IElement e, Color c) { throw new UnsupportedOperationException("Not needed!"); diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/function/Functions.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/function/Functions.java index b6132d20..d80082ec 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/function/Functions.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/function/Functions.java @@ -35,7 +35,6 @@ import org.simantics.db.Resource; import org.simantics.db.Session; import org.simantics.db.WriteGraph; import org.simantics.db.common.request.IndexRoot; -import org.simantics.db.common.request.IndexRoots; import org.simantics.db.common.request.ObjectsWithType; import org.simantics.db.common.request.ReadRequest; import org.simantics.db.common.request.WriteRequest; @@ -123,7 +122,10 @@ public class Functions { mappings.forEach(mapping -> { try { String name = graph.getRelatedValue2(mapping, L0.HasName); - result.put(name, mapping); + Resource existing = result.put(name, mapping); + if (existing != null) { + LOGGER.warn("Duplicate mapping name! {} {} and existing is {}", name, mapping, existing); + } } catch (DatabaseException e) { e.printStackTrace(); } diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkEdgeNode.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkEdgeNode.java index cd35b2f0..745f2a80 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkEdgeNode.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkEdgeNode.java @@ -33,7 +33,6 @@ public class DistrictNetworkEdgeNode extends G2DNode { @Override public void init() { - } @Override diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkVertexNode.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkVertexNode.java index 011d682e..c566981e 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkVertexNode.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkVertexNode.java @@ -11,6 +11,7 @@ import java.awt.geom.Rectangle2D; import org.simantics.district.network.ModelledCRS; import org.simantics.district.network.ui.adapters.DistrictNetworkVertex; +import org.simantics.scenegraph.ParentNode; import org.simantics.scenegraph.g2d.G2DNode; import org.simantics.scenegraph.utils.GeometryUtils; import org.slf4j.Logger; @@ -116,6 +117,11 @@ public class DistrictNetworkVertexNode extends G2DNode { updateBounds(); } + @Override + public AffineTransform getTransform() { + return super.getTransform(); + } + private Rectangle2D calculateBounds(Rectangle2D rect) { Point2D calcPoint = calculatePoint2D(vertex); AffineTransform at = getTransform(); diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/MapRulerNode.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/MapRulerNode.java index b19c39bf..bb699269 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/MapRulerNode.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/MapRulerNode.java @@ -17,4 +17,8 @@ public class MapRulerNode extends RulerNode { return ModelledCRS.yToLatitude(value); } + @Override + protected int getMaxDigits() { + return 7; + } } diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/participants/DNTranslateMode.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/participants/DNTranslateMode.java index 9132fa2f..fda0fc71 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/participants/DNTranslateMode.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/participants/DNTranslateMode.java @@ -5,6 +5,8 @@ import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collection; +import javax.xml.bind.DataBindingException; + import org.simantics.Simantics; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -40,7 +42,7 @@ public class DNTranslateMode extends TranslateMode { Object obj = ElementUtils.getObject(e); - if (obj instanceof Resource) { + if (obj instanceof Resource && graph.isInstanceOf((Resource) obj, DN.Vertex)) { Resource res = (Resource) obj; diff --git a/org.simantics.district.network/scl/Simantics/District.scl b/org.simantics.district.network/scl/Simantics/District.scl index 8025c9ad..c92cc4cc 100644 --- a/org.simantics.district.network/scl/Simantics/District.scl +++ b/org.simantics.district.network/scl/Simantics/District.scl @@ -1,4 +1,8 @@ import "Simantics/DB" +import "Simantics/Ontologies" + +import "Map" as Map +import "MSet" as MSet importJava "org.simantics.district.network.DistrictNetworkUtil" where calculateDistance :: Resource -> Resource -> Double @@ -7,4 +11,70 @@ importJava "org.simantics.district.network.ModelledCRS" where xToLongitude :: Double -> Double yToLatitude :: Double -> Double longitudeToX :: Double -> Double - latitudeToY :: Double -> Double \ No newline at end of file + latitudeToY :: Double -> Double + +findBrokenConnections :: Resource -> () +findBrokenConnections diagram = do + elements = objectsWithType diagram L0.ConsistsOf DIA.DefinedElement + print $ "Found " + show (length elements) + " elements from diagram" + symbols = MMap.create () + iter (\el -> do + symbol = singleObject el L0.InstanceOf + print $ "Found symbol " + uriOf symbol + ccs = collectionToList $ objects_ symbol L0.ConsistsOf + connectionPointRelations = filter (\cc -> isSubrelationOf cc STR.IsConnectedTo) ccs + print $ "Found " + show (length connectionPointRelations) + " cprs" + iter (\cpr -> do + connectionPoints = objectsWithType el cpr DIA.Connector + print $ "Found " + show (length connectionPoints) + " cps" + if length connectionPoints > 1 /*|| length connectionPoints == 0*/ + then do + // get existing map + print $ "Found " + show (length connectionPoints) + " connections for element " + nameOf el + instances = match MMap.get symbols (uriOf symbol) with + Just m -> m + Nothing -> do + set = MSet.create () + MMap.put symbols (uriOf symbol) set + set + ignore $ MSet.add instances $ singleObject el MOD.ElementToComponent + else () + () + ) connectionPointRelations + ) elements + MMap.iter (\key val -> do + print key + MSet.iter (\v -> print (nameOf v)) val + () + ) symbols + () + +translateAllElements :: Resource -> () +translateAllElements diagram = do + print $ "Translating elements of diagram " + uriOf diagram + elements = objectsWithType diagram L0.ConsistsOf DIA.DefinedElement + print $ "Found " + show (length elements) + " elements from diagram" + iter (\el -> do + connectionPoints = objectsWithType el STR.IsConnectedTo DIA.Connector + print $ "Found " + show (length connectionPoints) + " connections for element " + nameOf el + ) elements + + +translateElement :: Resource -> () +translateElement elem = do + connectionPoints = objectsWithType elem STR.IsConnectedTo DIA.Connector + if length connectionPoints < 5 + then do //this we can handle + areConnected = MSet.create () + iter (\cp -> do + aconnector = singleObject cp DIA.AreConnected + //otherElem + () + ) [] + //if length areConnected == 2 + //then do // this we can handle - only two symbols + // () + //else () + () + else () + () diff --git a/org.simantics.district.network/src/org/simantics/district/network/DistrictNetworkUtil.java b/org.simantics.district.network/src/org/simantics/district/network/DistrictNetworkUtil.java index a2779803..165e6e96 100644 --- a/org.simantics.district.network/src/org/simantics/district/network/DistrictNetworkUtil.java +++ b/org.simantics.district.network/src/org/simantics/district/network/DistrictNetworkUtil.java @@ -35,7 +35,7 @@ public class DistrictNetworkUtil { graph.claim(edge, DN.HasMapping, mapping); - OrderedSetUtils.add(graph, composite, edge); + OrderedSetUtils.addFirst(graph, composite, edge); graph.claim(composite, L0.ConsistsOf, L0.PartOf, edge); claimFreshElementName(graph, composite, edge); diff --git a/org.simantics.maps.server/src/org/simantics/district/maps/server/prefs/MapsServerInitializer.java b/org.simantics.maps.server/src/org/simantics/district/maps/server/prefs/MapsServerInitializer.java index 365a9ee8..bd892b39 100644 --- a/org.simantics.maps.server/src/org/simantics/district/maps/server/prefs/MapsServerInitializer.java +++ b/org.simantics.maps.server/src/org/simantics/district/maps/server/prefs/MapsServerInitializer.java @@ -20,7 +20,7 @@ public class MapsServerInitializer extends AbstractPreferenceInitializer { node.putBoolean(MapsServerPreferences.P_START_AUTOMATICALLY, true); } if (!keyss.contains(MapsServerPreferences.P_DEFAULT_PORT)) { - node.putInt(MapsServerPreferences.P_DEFAULT_PORT, 8080); + node.putInt(MapsServerPreferences.P_DEFAULT_PORT, 8585); } } catch (BackingStoreException e) { e.printStackTrace(); diff --git a/org.simantics.maps.server/src/org/simantics/district/maps/server/prefs/MapsServerPreferences.java b/org.simantics.maps.server/src/org/simantics/district/maps/server/prefs/MapsServerPreferences.java index 8ccb8147..816fdbb4 100644 --- a/org.simantics.maps.server/src/org/simantics/district/maps/server/prefs/MapsServerPreferences.java +++ b/org.simantics.maps.server/src/org/simantics/district/maps/server/prefs/MapsServerPreferences.java @@ -25,7 +25,7 @@ public class MapsServerPreferences { } public static int defaultPort() { - return getPreferences().getInt(P_DEFAULT_PORT, 8080); + return getPreferences().getInt(P_DEFAULT_PORT, 8585); } public static String currentMBTiles() {