+
+ private static Resource attributeMappingToVertexAttribute(ReadGraph graph, DistrictNetworkResource DN, Resource attribute) throws DatabaseException {
+ Resource attr = null;
+ if (attribute.equals(DN.Mapping_VertexMapping_ElevationAttribute))
+ attr = DN.Vertex_HasElevation;
+ else if (attribute.equals(DN.Mapping_VertexMapping_AddressAttribute))
+ attr = DN.Vertex_HasAddress;
+ else if (attribute.equals(DN.Mapping_VertexMapping_DeltaPressureAttribute))
+ attr = DN.Vertex_HasDeltaPressure;
+ else if (attribute.equals(DN.Mapping_VertexMapping_DeltaTemperatureAttribute))
+ attr = DN.Vertex_HasDeltaTemperature;
+ else if (attribute.equals(DN.Mapping_VertexMapping_dpAttribute))
+ attr = DN.Vertex_HasDeltaPressure;
+ else if (attribute.equals(DN.Mapping_VertexMapping_dtAttribute))
+ attr = DN.Vertex_HasDeltaTemperature;
+ else if (attribute.equals(DN.Mapping_VertexMapping_FlowAreaAttribute))
+ attr = DN.Vertex_HasFlowArea;
+ else if (attribute.equals(DN.Mapping_VertexMapping_HeatLoadDsAttribute))
+ attr = DN.Vertex_HasHeatLoadDs;
+ else if (attribute.equals(DN.Mapping_VertexMapping_HeatPowerAttribute))
+ attr = DN.Vertex_HasHeatPower;
+ else if (attribute.equals(DN.Mapping_VertexMapping_MassFlowAttribute))
+ attr = DN.Vertex_HasMassFlow;
+ else if (attribute.equals(DN.Mapping_VertexMapping_MaximumHeadMAttribute))
+ attr = DN.Vertex_HasMaximumHeadM;
+ else if (attribute.equals(DN.Mapping_VertexMapping_NominalFlowAttribute))
+ attr = DN.Vertex_HasNominalFlow;
+ else if (attribute.equals(DN.Mapping_VertexMapping_NominalHeadBAttribute))
+ attr = DN.Vertex_HasNominalHeadB_Inverse;
+ else if (attribute.equals(DN.Mapping_VertexMapping_NominalHeadMAttribute))
+ attr = DN.Vertex_HasNominalHeadM;
+ else if (attribute.equals(DN.Mapping_VertexMapping_NominalMassFlowAttribute))
+ attr = DN.Vertex_HasNominalFlow;
+ else if (attribute.equals(DN.Mapping_VertexMapping_NominalPressureLossAttribute))
+ attr = DN.Vertex_HasNominalPressureLoss;
+ else if (attribute.equals(DN.Mapping_VertexMapping_ReturnPressureAttribute))
+ attr = DN.Vertex_HasReturnPressure;
+ else if (attribute.equals(DN.Mapping_VertexMapping_ReturnTemperatureAttribute))
+ attr = DN.Vertex_HasReturnTemperature;
+ else if (attribute.equals(DN.Mapping_VertexMapping_SupplyPressureAttribute))
+ attr = DN.Vertex_HasSupplyPressure;
+ else if (attribute.equals(DN.Mapping_VertexMapping_SupplyTemperatureAttribute))
+ attr = DN.Vertex_HasSupplyTemperature;
+ else if (attribute.equals(DN.Mapping_VertexMapping_ValvePositionAttribute))
+ attr = DN.Vertex_HasValvePosition;
+ else if (attribute.equals(DN.Mapping_VertexMapping_VelocityAttribute))
+ attr = DN.Vertex_HasVelocity;
+ else if (attribute.equals(DN.Mapping_VertexMapping_VolFlowAttribute))
+ attr = DN.Vertex_HasVolFlow;
+ else if (attribute.equals(DN.Mapping_VertexMapping_XAttribute))
+ attr = null; // ignore this!
+ else if (attribute.equals(DN.Mapping_VertexMapping_YAttribute))
+ attr = null; // ignore this!
+ return attr;
+ }