@enervance/insight-cim-model 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/westnetz-integral7/integral7-load.config.js.map +1 -1
- package/dist/config/westnetz-neplan/neplan-load.config.js +6 -1
- package/dist/config/westnetz-neplan/neplan-load.config.js.map +1 -1
- package/dist/constants/cim-class-definition.js +19 -0
- package/dist/constants/cim-class-definition.js.map +1 -1
- package/dist/constants/cim-class-names.d.ts +10 -0
- package/dist/constants/cim-class-names.js +10 -0
- package/dist/constants/cim-class-names.js.map +1 -1
- package/dist/constants/init-data/ASSET_HEALTH_EVENTS.js +10 -0
- package/dist/constants/init-data/ASSET_HEALTH_EVENTS.js.map +1 -1
- package/dist/constants/init-data/PSR_TYPES.js +17 -0
- package/dist/constants/init-data/PSR_TYPES.js.map +1 -1
- package/dist/converter/cgmes-validator.d.ts +5 -0
- package/dist/converter/cgmes-validator.js +23 -0
- package/dist/converter/cgmes-validator.js.map +1 -0
- package/dist/converter/integral7/ConverterIntegral7.d.ts +26 -19
- package/dist/converter/integral7/ConverterIntegral7.js +595 -272
- package/dist/converter/integral7/ConverterIntegral7.js.map +1 -1
- package/dist/converter/integral7/model/integral/BaseClass.d.ts +1 -0
- package/dist/converter/integral7/model/integral/BaseClass.js.map +1 -1
- package/dist/converter/integral7/model/interfaces.d.ts +36 -0
- package/dist/converter/integral7/sql/integral.sql.d.ts +10 -0
- package/dist/converter/integral7/sql/integral.sql.js +25 -1
- package/dist/converter/integral7/sql/integral.sql.js.map +1 -1
- package/dist/converter/integral7/utils.d.ts +3 -0
- package/dist/converter/integral7/utils.js +81 -17
- package/dist/converter/integral7/utils.js.map +1 -1
- package/dist/etl-neplan/etl-neplan-csv.d.ts +37 -0
- package/dist/etl-neplan/etl-neplan-csv.js +243 -0
- package/dist/etl-neplan/etl-neplan-csv.js.map +1 -0
- package/dist/etl-neplan/etl-neplan-geo.d.ts +12 -0
- package/dist/etl-neplan/etl-neplan-geo.js +74 -0
- package/dist/etl-neplan/etl-neplan-geo.js.map +1 -0
- package/dist/etl-neplan/neplan-contingency-analysis.js +0 -20
- package/dist/etl-neplan/neplan-contingency-analysis.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/default-values-config.d.ts +171 -0
- package/dist/interfaces/default-values-config.js +3 -0
- package/dist/interfaces/default-values-config.js.map +1 -0
- package/dist/interfaces/model/common/ILocation.d.ts +15 -0
- package/dist/interfaces/model/common/ILocation.js +3 -0
- package/dist/interfaces/model/common/ILocation.js.map +1 -0
- package/dist/interfaces/model/core/IIdentifiedObject.d.ts +3 -0
- package/dist/interfaces/model/wires/IACLineSegment.d.ts +10 -0
- package/dist/interfaces/model/wires/IConductor.d.ts +2 -1
- package/dist/model/assets/Asset.d.ts +12 -5
- package/dist/model/assets/Asset.js +86 -21
- package/dist/model/assets/Asset.js.map +1 -1
- package/dist/model/assets/LifecycleDate.d.ts +1 -0
- package/dist/model/assets/LifecycleDate.js +9 -1
- package/dist/model/assets/LifecycleDate.js.map +1 -1
- package/dist/model/common/CoordinateSystem.d.ts +3 -1
- package/dist/model/common/CoordinateSystem.js +13 -1
- package/dist/model/common/CoordinateSystem.js.map +1 -1
- package/dist/model/common/Location.d.ts +5 -3
- package/dist/model/common/Location.js +17 -11
- package/dist/model/common/Location.js.map +1 -1
- package/dist/model/common/PositionPoint.d.ts +9 -3
- package/dist/model/common/PositionPoint.js +23 -1
- package/dist/model/common/PositionPoint.js.map +1 -1
- package/dist/model/common/Status.d.ts +2 -1
- package/dist/model/common/Status.js +9 -1
- package/dist/model/common/Status.js.map +1 -1
- package/dist/model/core/ACDCTerminal.d.ts +2 -0
- package/dist/model/core/ACDCTerminal.js +9 -1
- package/dist/model/core/ACDCTerminal.js.map +1 -1
- package/dist/model/core/BaseVoltage.js.map +1 -1
- package/dist/model/core/Bay.js.map +1 -1
- package/dist/model/core/GeographicalRegion.js.map +1 -1
- package/dist/model/core/IdentifiedObject.d.ts +3 -1
- package/dist/model/core/IdentifiedObject.js +42 -21
- package/dist/model/core/IdentifiedObject.js.map +1 -1
- package/dist/model/core/PowerSystemResource.js.map +1 -1
- package/dist/model/core/SubGeographicalRegion.js.map +1 -1
- package/dist/model/core/Substation.d.ts +1 -0
- package/dist/model/core/Substation.js +3 -2
- package/dist/model/core/Substation.js.map +1 -1
- package/dist/model/core/Terminal.d.ts +3 -1
- package/dist/model/core/Terminal.js +14 -14
- package/dist/model/core/Terminal.js.map +1 -1
- package/dist/model/core/VoltageLevel.js +4 -2
- package/dist/model/core/VoltageLevel.js.map +1 -1
- package/dist/model/dc/ACDCConverter.d.ts +3 -0
- package/dist/model/dc/ACDCConverter.js +56 -14
- package/dist/model/dc/ACDCConverter.js.map +1 -1
- package/dist/model/dc/ACDCConverterDCTerminal.js +2 -6
- package/dist/model/dc/ACDCConverterDCTerminal.js.map +1 -1
- package/dist/model/dc/CsConverter.d.ts +2 -0
- package/dist/model/dc/CsConverter.js +45 -17
- package/dist/model/dc/CsConverter.js.map +1 -1
- package/dist/model/dc/DCConverterUnit.d.ts +2 -0
- package/dist/model/dc/DCConverterUnit.js +13 -7
- package/dist/model/dc/DCConverterUnit.js.map +1 -1
- package/dist/model/dc/DCLine.js.map +1 -1
- package/dist/model/dc/DCLineSegment.js +4 -8
- package/dist/model/dc/DCLineSegment.js.map +1 -1
- package/dist/model/dc/VsConverter.d.ts +2 -0
- package/dist/model/dc/VsConverter.js +53 -5
- package/dist/model/dc/VsConverter.js.map +1 -1
- package/dist/model/equivalents/EquivalentBranch.d.ts +2 -0
- package/dist/model/equivalents/EquivalentBranch.js +63 -0
- package/dist/model/equivalents/EquivalentBranch.js.map +1 -1
- package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.js +0 -3
- package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.js.map +1 -1
- package/dist/model/extensions/enervance/wires/EVACLineSegment.d.ts +16 -0
- package/{src/model/wires/PetersenCoil.ts → dist/model/extensions/enervance/wires/EVACLineSegment.js} +43 -47
- package/dist/model/extensions/enervance/wires/EVACLineSegment.js.map +1 -0
- package/dist/model/extensions/enervance/wires/EVACLineSubSegment.d.ts +25 -0
- package/dist/model/extensions/enervance/wires/EVACLineSubSegment.js +126 -0
- package/dist/model/extensions/enervance/wires/EVACLineSubSegment.js.map +1 -0
- package/dist/model/extensions/neplan-westnetz/assets/WNFacility.js +4 -12
- package/dist/model/extensions/neplan-westnetz/assets/WNFacility.js.map +1 -1
- package/dist/model/extensions/neplan-westnetz/common/WNLocation.d.ts +18 -0
- package/dist/model/extensions/neplan-westnetz/common/WNLocation.js +82 -0
- package/dist/model/extensions/neplan-westnetz/common/WNLocation.js.map +1 -0
- package/dist/model/extensions/neplan-westnetz/core/WNConnectivityNode.d.ts +5 -0
- package/dist/model/extensions/neplan-westnetz/core/WNConnectivityNode.js +23 -0
- package/dist/model/extensions/neplan-westnetz/core/WNConnectivityNode.js.map +1 -1
- package/dist/model/generation/GeneratingUnit.d.ts +2 -0
- package/dist/model/generation/GeneratingUnit.js +23 -0
- package/dist/model/generation/GeneratingUnit.js.map +1 -1
- package/dist/model/generation/ThermalGeneratingUnit.js.map +1 -1
- package/dist/model/loadmodel/ConformLoad.d.ts +6 -1
- package/dist/model/loadmodel/ConformLoad.js +48 -3
- package/dist/model/loadmodel/ConformLoad.js.map +1 -1
- package/dist/model/loadmodel/ConformLoadGroup.d.ts +7 -0
- package/dist/model/loadmodel/ConformLoadGroup.js +48 -0
- package/dist/model/loadmodel/ConformLoadGroup.js.map +1 -0
- package/dist/model/loadmodel/EnergyArea.d.ts +3 -0
- package/dist/model/loadmodel/EnergyArea.js +8 -0
- package/dist/model/loadmodel/EnergyArea.js.map +1 -0
- package/dist/model/loadmodel/LoadArea.d.ts +10 -0
- package/dist/model/loadmodel/LoadArea.js +51 -0
- package/dist/model/loadmodel/LoadArea.js.map +1 -0
- package/dist/model/loadmodel/LoadGroup.d.ts +8 -0
- package/dist/model/loadmodel/LoadGroup.js +21 -0
- package/dist/model/loadmodel/LoadGroup.js.map +1 -0
- package/dist/model/loadmodel/SubLoadArea.d.ts +14 -0
- package/dist/model/loadmodel/SubLoadArea.js +63 -0
- package/dist/model/loadmodel/SubLoadArea.js.map +1 -0
- package/dist/model/model/Model.d.ts +40 -11
- package/dist/model/model/Model.js +100 -6
- package/dist/model/model/Model.js.map +1 -1
- package/dist/model/operationallimits/CurrentLimit.js.map +1 -1
- package/dist/model/operationallimits/OperationalLimitSet.js.map +1 -1
- package/dist/model/wires/ACLineSegment.d.ts +6 -2
- package/dist/model/wires/ACLineSegment.js +51 -44
- package/dist/model/wires/ACLineSegment.js.map +1 -1
- package/dist/model/wires/AsynchronousMachine.d.ts +2 -1
- package/dist/model/wires/AsynchronousMachine.js +34 -34
- package/dist/model/wires/AsynchronousMachine.js.map +1 -1
- package/dist/model/wires/BusbarSection.d.ts +2 -0
- package/dist/model/wires/BusbarSection.js +6 -0
- package/dist/model/wires/BusbarSection.js.map +1 -1
- package/dist/model/wires/Conductor.d.ts +4 -1
- package/dist/model/wires/Conductor.js +15 -6
- package/dist/model/wires/Conductor.js.map +1 -1
- package/dist/model/wires/EnergyConsumer.d.ts +6 -2
- package/dist/model/wires/EnergyConsumer.js +24 -3
- package/dist/model/wires/EnergyConsumer.js.map +1 -1
- package/dist/model/wires/EnergySource.d.ts +8 -4
- package/dist/model/wires/EnergySource.js +37 -21
- package/dist/model/wires/EnergySource.js.map +1 -1
- package/dist/model/wires/ExternalNetworkInjection.d.ts +2 -0
- package/dist/model/wires/ExternalNetworkInjection.js +81 -1
- package/dist/model/wires/ExternalNetworkInjection.js.map +1 -1
- package/dist/model/wires/Line.js.map +1 -1
- package/dist/model/wires/LinearShuntCompensator.d.ts +15 -0
- package/dist/model/wires/LinearShuntCompensator.js +96 -0
- package/dist/model/wires/LinearShuntCompensator.js.map +1 -0
- package/dist/model/wires/PowerTransformer.js +0 -3
- package/dist/model/wires/PowerTransformer.js.map +1 -1
- package/dist/model/wires/PowerTransformerEnd.js.map +1 -1
- package/dist/model/wires/RatioTapChanger.js.map +1 -1
- package/dist/model/wires/RatioTapChangerTable.js.map +1 -1
- package/dist/model/wires/RegulatingCondEq.d.ts +3 -0
- package/dist/model/wires/RegulatingCondEq.js +17 -6
- package/dist/model/wires/RegulatingCondEq.js.map +1 -1
- package/dist/model/wires/RegulatingControl.d.ts +2 -0
- package/dist/model/wires/RegulatingControl.js +43 -7
- package/dist/model/wires/RegulatingControl.js.map +1 -1
- package/dist/model/wires/RotatingMachine.d.ts +2 -0
- package/dist/model/wires/RotatingMachine.js +17 -0
- package/dist/model/wires/RotatingMachine.js.map +1 -1
- package/dist/model/wires/SeriesCompensator.d.ts +2 -1
- package/dist/model/wires/SeriesCompensator.js +42 -42
- package/dist/model/wires/SeriesCompensator.js.map +1 -1
- package/dist/model/wires/ShuntCompensator.d.ts +17 -0
- package/dist/model/wires/ShuntCompensator.js +50 -0
- package/dist/model/wires/ShuntCompensator.js.map +1 -0
- package/dist/model/wires/SynchronousMachine.d.ts +2 -0
- package/dist/model/wires/SynchronousMachine.js +70 -5
- package/dist/model/wires/SynchronousMachine.js.map +1 -1
- package/dist/model/wires/TapChangerControl.js.map +1 -1
- package/dist/util/utils.d.ts +8 -1
- package/dist/util/utils.js +13 -38
- package/dist/util/utils.js.map +1 -1
- package/dist/util/xml/xml.serializer.d.ts +3 -1
- package/dist/util/xml/xml.serializer.js +46 -45
- package/dist/util/xml/xml.serializer.js.map +1 -1
- package/package.json +4 -1
- package/.nycrc +0 -28
- package/jasmine/jasmine_all.json +0 -13
- package/jasmine/jasmine_fuseki_interface.json +0 -13
- package/jasmine/jasmine_fuseki_psdm.json +0 -13
- package/jasmine/jasmine_integral_7.json +0 -13
- package/jasmine/jasmine_psdm.json +0 -13
- package/src/config/lew-sincal/lew-sincal-load.config.ts +0 -58
- package/src/config/power-system-datamodel/psdm-load.config.ts +0 -57
- package/src/config/westnetz-integral7/integral7-load.config.ts +0 -53
- package/src/config/westnetz-neplan/callbacks/cb-connectivitynode.ts +0 -159
- package/src/config/westnetz-neplan/callbacks/cb-psr.ts +0 -30
- package/src/config/westnetz-neplan/callbacks/cb-wnenergyconsumer.ts +0 -70
- package/src/config/westnetz-neplan/neplan-load.config.ts +0 -131
- package/src/config/westnetz-neplan/property-handler-westenergy.config.ts +0 -52
- package/src/constants/cim-class-definition.ts +0 -169
- package/src/constants/cim-class-names.ts +0 -118
- package/src/constants/cim-constants.ts +0 -5
- package/src/constants/init-data/ASSET_HEALTH_EVENTS.ts +0 -45
- package/src/constants/init-data/ASSSET_OWNER.ts +0 -11
- package/src/constants/init-data/JENA_SPARQL.ts +0 -328
- package/src/constants/init-data/PSR_TYPES.ts +0 -75
- package/src/constants/init-data/xml/AssetHealtEvent.xml +0 -45
- package/src/constants/init-data/xml/AssetOwner.xml +0 -11
- package/src/constants/init-data/xml/PsrType.xml +0 -80
- package/src/constants/rdf-xml.ts +0 -52
- package/src/converter/PSDM/ConverterPowerSystemDataModel.ts +0 -546
- package/src/converter/PSDM/model/FixedFeedIn.ts +0 -28
- package/src/converter/PSDM/model/Line.ts +0 -39
- package/src/converter/PSDM/model/LineType.ts +0 -29
- package/src/converter/PSDM/model/Load.ts +0 -38
- package/src/converter/PSDM/model/Node.ts +0 -16
- package/src/converter/PSDM/model/TimeSeriesMapping.ts +0 -13
- package/src/converter/PSDM/model/Transformer.ts +0 -34
- package/src/converter/PSDM/model/TransformerType.ts +0 -49
- package/src/converter/PSDM/model/geo/Crs.ts +0 -4
- package/src/converter/PSDM/model/geo/GeoPosition.ts +0 -7
- package/src/converter/integral7/ConverterIntegral7.ts +0 -3916
- package/src/converter/integral7/config/db-config.ts +0 -13
- package/src/converter/integral7/config/generation-unit-fuel-types.ts +0 -51
- package/src/converter/integral7/config/integral-prefix.ts +0 -20
- package/src/converter/integral7/model/integral/BaseClass.ts +0 -28
- package/src/converter/integral7/model/integral/BaseClassNsg.ts +0 -21
- package/src/converter/integral7/model/integral/Hgueleitung.ts +0 -12
- package/src/converter/integral7/model/integral/KnotenSo.ts +0 -41
- package/src/converter/integral7/model/integral/KnotenSoNsg.ts +0 -24
- package/src/converter/integral7/model/integral/Kopfstation.ts +0 -46
- package/src/converter/integral7/model/integral/Leitung.ts +0 -73
- package/src/converter/integral7/model/integral/LeitungNsg.ts +0 -46
- package/src/converter/integral7/model/integral/Point.ts +0 -14
- package/src/converter/integral7/model/integral/Schaltanlage.ts +0 -151
- package/src/converter/integral7/model/integral/SchaltanlageNSG.ts +0 -30
- package/src/converter/integral7/model/integral/Schaltanlagenabschnitt.ts +0 -44
- package/src/converter/integral7/model/integral/SchaltanlagenabschnittNsg.ts +0 -27
- package/src/converter/integral7/model/integral/Schaltfeld.ts +0 -116
- package/src/converter/integral7/model/integral/SchaltfeldNsg.ts +0 -35
- package/src/converter/integral7/model/integral/Standort.ts +0 -53
- package/src/converter/integral7/model/integral/StandortNsg.ts +0 -24
- package/src/converter/integral7/model/integral/Trafo2w.ts +0 -22
- package/src/converter/integral7/model/integral/Trafo2wNsg.ts +0 -13
- package/src/converter/integral7/model/interfaces.ts +0 -450
- package/src/converter/integral7/sql/integral.sql.ts +0 -345
- package/src/converter/integral7/utils-schema.ts +0 -50
- package/src/converter/integral7/utils-trafo3w.ts +0 -321
- package/src/converter/integral7/utils.ts +0 -693
- package/src/etl-neplan/etl-neplan-contingency-analysis.ts +0 -188
- package/src/etl-neplan/etl-neplan-feederline.ts +0 -229
- package/src/etl-neplan/etl-neplan.ts +0 -344
- package/src/etl-neplan/neplan-contingency-analysis.ts +0 -571
- package/src/graph/Types.ts +0 -7
- package/src/graph/connections/connection.ts +0 -29
- package/src/graph/edges/edge.ts +0 -27
- package/src/graph/graph-interfaces.ts +0 -21
- package/src/graph/graph-util.ts +0 -158
- package/src/graph/graph.ts +0 -84
- package/src/graph/nodes/node.ts +0 -43
- package/src/index.ts +0 -307
- package/src/interfaces/model/assets/IAsset.ts +0 -5
- package/src/interfaces/model/assets/IAssetContainer.ts +0 -5
- package/src/interfaces/model/assets/IFacility.ts +0 -5
- package/src/interfaces/model/common/IDocument.ts +0 -5
- package/src/interfaces/model/core/IACDCTerminal.ts +0 -8
- package/src/interfaces/model/core/IBaseVoltage.ts +0 -7
- package/src/interfaces/model/core/IConductingEquipment.ts +0 -16
- package/src/interfaces/model/core/IConnectivityNode.ts +0 -27
- package/src/interfaces/model/core/IConnectivityNodeContainer.ts +0 -11
- package/src/interfaces/model/core/IEquipment.ts +0 -11
- package/src/interfaces/model/core/IEquipmentContainer.ts +0 -12
- package/src/interfaces/model/core/IFeeder.ts +0 -21
- package/src/interfaces/model/core/IIdentifiedObject.ts +0 -108
- package/src/interfaces/model/core/IPowerSystemResource.ts +0 -3
- package/src/interfaces/model/core/ISubstation.ts +0 -8
- package/src/interfaces/model/core/ITerminal.ts +0 -57
- package/src/interfaces/model/core/IVoltageLevel.ts +0 -14
- package/src/interfaces/model/diagram/IDiagram.ts +0 -21
- package/src/interfaces/model/diagram/IDiagramObject.ts +0 -21
- package/src/interfaces/model/diagram/IDiagramObjectPoint.ts +0 -16
- package/src/interfaces/model/domain/IActivePower.ts +0 -3
- package/src/interfaces/model/domain/IAngleDegrees.ts +0 -3
- package/src/interfaces/model/domain/IApparentPower.ts +0 -3
- package/src/interfaces/model/domain/ICurrentFlow.ts +0 -3
- package/src/interfaces/model/domain/IDataType.ts +0 -9
- package/src/interfaces/model/domain/IReactivePower.ts +0 -3
- package/src/interfaces/model/domain/IVoltage.ts +0 -3
- package/src/interfaces/model/domain/UnitMultiplier.ts +0 -13
- package/src/interfaces/model/domain/UnitSymbol.ts +0 -30
- package/src/interfaces/model/enums/EnumShapeInfo.ts +0 -5
- package/src/interfaces/model/faults/IFault.ts +0 -11
- package/src/interfaces/model/model/IModel.ts +0 -91
- package/src/interfaces/model/operations/IOutage.ts +0 -23
- package/src/interfaces/model/operations/ISwitchingAction.ts +0 -9
- package/src/interfaces/model/operations/ISwitchingPlan.ts +0 -26
- package/src/interfaces/model/statevariables/ISvPowerFlow.ts +0 -20
- package/src/interfaces/model/statevariables/ISvVoltage.ts +0 -16
- package/src/interfaces/model/topology/ITopologicalIsland.ts +0 -11
- package/src/interfaces/model/topology/ITopologicalNode.ts +0 -24
- package/src/interfaces/model/wires/IACLineSegment.ts +0 -4
- package/src/interfaces/model/wires/IBusbarSection.ts +0 -4
- package/src/interfaces/model/wires/ICompositeSwitch.ts +0 -6
- package/src/interfaces/model/wires/IConductor.ts +0 -6
- package/src/interfaces/model/wires/IConnector.ts +0 -5
- package/src/interfaces/model/wires/IDisconnector.ts +0 -4
- package/src/interfaces/model/wires/IEnergyConsumer.ts +0 -7
- package/src/interfaces/model/wires/IEnergySource.ts +0 -20
- package/src/interfaces/model/wires/IExternalNetworkInjection.ts +0 -34
- package/src/interfaces/model/wires/ILoadBreakSwitch.ts +0 -4
- package/src/interfaces/model/wires/IPowerTransformer.ts +0 -7
- package/src/interfaces/model/wires/IPowerTransformerEnd.ts +0 -10
- package/src/interfaces/model/wires/IProtectedSwitch.ts +0 -4
- package/src/interfaces/model/wires/IRegulatingCondEq.ts +0 -4
- package/src/interfaces/model/wires/ISwitch.ts +0 -11
- package/src/interfaces/model/wires/ITransformerEnd.ts +0 -14
- package/src/interfaces/observable/IObservable.ts +0 -6
- package/src/interfaces/observable/IObserver.ts +0 -3
- package/src/interfaces/persistence-interfaces.ts +0 -12
- package/src/interfaces/schema-settings/ShapeInfos.ts +0 -28
- package/src/model/assetinfo/AssetInfo.ts +0 -13
- package/src/model/assetinfo/CableInfo.ts +0 -8
- package/src/model/assetinfo/OverheadWireInfo.ts +0 -8
- package/src/model/assetinfo/PowerTransformer2WInfo.ts +0 -13
- package/src/model/assetinfo/PowerTransformer3WInfo.ts +0 -18
- package/src/model/assetinfo/PowerTransformerInfo.ts +0 -14
- package/src/model/assetinfo/TapChangerInfo.ts +0 -60
- package/src/model/assetinfo/TransformerEndInfo.ts +0 -38
- package/src/model/assetinfo/WireInfo.ts +0 -22
- package/src/model/assets/AggregateScore.ts +0 -9
- package/src/model/assets/AnalyticScore.ts +0 -41
- package/src/model/assets/Asset.ts +0 -164
- package/src/model/assets/AssetContainer.ts +0 -11
- package/src/model/assets/AssetDeployment.ts +0 -122
- package/src/model/assets/AssetHealthEvent.ts +0 -73
- package/src/model/assets/AssetOrganisationRole.ts +0 -51
- package/src/model/assets/AssetOwner.ts +0 -54
- package/src/model/assets/DeploymentDate.ts +0 -20
- package/src/model/assets/DeploymentStateKind.ts +0 -7
- package/src/model/assets/Facility.ts +0 -107
- package/src/model/assets/FacilityKind.ts +0 -9
- package/src/model/assets/HealthScore.ts +0 -59
- package/src/model/assets/LifecycleDate.ts +0 -17
- package/src/model/assets/RiskScore.ts +0 -7
- package/src/model/assets/TransformerApplicationKind.ts +0 -6
- package/src/model/common/ActivityRecord.ts +0 -93
- package/src/model/common/CoordinateSystem.ts +0 -81
- package/src/model/common/Document.ts +0 -9
- package/src/model/common/Location.ts +0 -237
- package/src/model/common/OrganisationRole.ts +0 -7
- package/src/model/common/PositionPoint.ts +0 -121
- package/src/model/common/Status.ts +0 -11
- package/src/model/core/ACDCTerminal.ts +0 -63
- package/src/model/core/BaseVoltage.ts +0 -129
- package/src/model/core/Bay.ts +0 -178
- package/src/model/core/ConductingEquipment.ts +0 -182
- package/src/model/core/ConnectivityNode.ts +0 -417
- package/src/model/core/ConnectivityNodeContainer.ts +0 -26
- package/src/model/core/Curve.ts +0 -55
- package/src/model/core/CurveData.ts +0 -74
- package/src/model/core/CurveStyle.ts +0 -4
- package/src/model/core/Equipment.ts +0 -184
- package/src/model/core/EquipmentContainer.ts +0 -40
- package/src/model/core/Feeder.ts +0 -186
- package/src/model/core/GeographicalRegion.ts +0 -34
- package/src/model/core/IdentifiedObject.ts +0 -393
- package/src/model/core/PSRType.ts +0 -164
- package/src/model/core/PhaseCode.ts +0 -23
- package/src/model/core/PowerSystemResource.ts +0 -109
- package/src/model/core/SubGeographicalRegion.ts +0 -58
- package/src/model/core/Substation.ts +0 -290
- package/src/model/core/Terminal.ts +0 -422
- package/src/model/core/VoltageLevel.ts +0 -192
- package/src/model/dc/ACDCConverter.ts +0 -66
- package/src/model/dc/ACDCConverterDCTerminal.ts +0 -64
- package/src/model/dc/CsConverter.ts +0 -68
- package/src/model/dc/CsOperatingModeKind.ts +0 -4
- package/src/model/dc/CsPpccControlKind.ts +0 -5
- package/src/model/dc/DCBaseTerminal.ts +0 -30
- package/src/model/dc/DCConductingEquipment.ts +0 -8
- package/src/model/dc/DCConverterOperatingModeKind.ts +0 -6
- package/src/model/dc/DCConverterUnit.ts +0 -60
- package/src/model/dc/DCEquipmentContainer.ts +0 -8
- package/src/model/dc/DCLine.ts +0 -56
- package/src/model/dc/DCLineSegment.ts +0 -81
- package/src/model/dc/DCNode.ts +0 -49
- package/src/model/dc/DCPolarityKind.ts +0 -5
- package/src/model/dc/DCTerminal.ts +0 -45
- package/src/model/dc/VsConverter.ts +0 -48
- package/src/model/dc/VsPpccControlKind.ts +0 -7
- package/src/model/dc/VsQpccControlKind.ts +0 -5
- package/src/model/diagram/Diagram.ts +0 -136
- package/src/model/diagram/DiagramObject.ts +0 -338
- package/src/model/diagram/DiagramObjectPoint.ts +0 -196
- package/src/model/diagram/DiagramStyle.ts +0 -32
- package/src/model/diagram/OrientationKind.ts +0 -4
- package/src/model/domain/ActivePower.ts +0 -14
- package/src/model/domain/AngleDegrees.ts +0 -14
- package/src/model/domain/ApparentPower.ts +0 -14
- package/src/model/domain/Capacitance.ts +0 -15
- package/src/model/domain/CapacitancePerLength.ts +0 -15
- package/src/model/domain/ConductancePerLength.ts +0 -14
- package/src/model/domain/CurrentFlow.ts +0 -14
- package/src/model/domain/Reactance.ts +0 -15
- package/src/model/domain/ReactancePerLength.ts +0 -14
- package/src/model/domain/ReactivePower.ts +0 -14
- package/src/model/domain/Resistance.ts +0 -14
- package/src/model/domain/ResistancePerLength.ts +0 -14
- package/src/model/domain/UnitMultiplier.ts +0 -13
- package/src/model/domain/UnitSymbol.ts +0 -30
- package/src/model/domain/Voltage.ts +0 -14
- package/src/model/equivalents/EquivalentBranch.ts +0 -203
- package/src/model/equivalents/EquivalentEquipment.ts +0 -8
- package/src/model/extensions/amprion/core/AMPRIONBay.ts +0 -106
- package/src/model/extensions/amprion/core/AMPRIONConnectivityNode.ts +0 -51
- package/src/model/extensions/amprion/model/AmprionModel.ts +0 -92
- package/src/model/extensions/amprion/project/AMPRIONConstructionProject.ts +0 -174
- package/src/model/extensions/amprion/project/AMPRIONConstructionProjectBundle.ts +0 -89
- package/src/model/extensions/amprion/project/AMPRIONConstructionProjectPlan.ts +0 -64
- package/src/model/extensions/amprion/project/AMPRIONErpProject.ts +0 -21
- package/src/model/extensions/amprion/project/AMPRIONErpProjectPhase.ts +0 -89
- package/src/model/extensions/amprion/project/AMPRIONErpProjectStructure.ts +0 -36
- package/src/model/extensions/amprion/project/AMPRIONProjectPriorityKind.ts +0 -5
- package/src/model/extensions/amprion/wires/AMPRIONSeriesCompensator.ts +0 -53
- package/src/model/extensions/enervance/assets/EVImportanceScore.ts +0 -58
- package/src/model/extensions/enervance/core/EVTerminal.ts +0 -63
- package/src/model/extensions/enervance/operations/EVTerminalAction.ts +0 -144
- package/src/model/extensions/neplan-westnetz/assets/WNFacility.ts +0 -121
- package/src/model/extensions/neplan-westnetz/core/WNConnectivityNode.ts +0 -344
- package/src/model/extensions/neplan-westnetz/core/WNFeeder.ts +0 -133
- package/src/model/extensions/neplan-westnetz/faults/WNFaultConnectivityNode.ts +0 -113
- package/src/model/extensions/neplan-westnetz/operations/WNOutage.ts +0 -111
- package/src/model/extensions/neplan-westnetz/wires/WNEnergyConsumer.ts +0 -451
- package/src/model/faults/EquipmentFault.ts +0 -9
- package/src/model/faults/Fault.ts +0 -41
- package/src/model/faults/LineFault.ts +0 -10
- package/src/model/generation/FossilFuel.ts +0 -53
- package/src/model/generation/FuelType.ts +0 -8
- package/src/model/generation/GeneratingUnit.ts +0 -157
- package/src/model/generation/GeneratorControlSource.ts +0 -6
- package/src/model/generation/HydroEnergyConversionKind.ts +0 -4
- package/src/model/generation/HydroGeneratingUnit.ts +0 -14
- package/src/model/generation/HydroPlantStorageKind.ts +0 -5
- package/src/model/generation/HydroPowerPlant.ts +0 -13
- package/src/model/generation/HydroPump.ts +0 -13
- package/src/model/generation/NuclearGeneratingUnit.ts +0 -8
- package/src/model/generation/SolarGeneratingUnit.ts +0 -8
- package/src/model/generation/ThermalGeneratingUnit.ts +0 -42
- package/src/model/generation/WindGenUnitKind.ts +0 -4
- package/src/model/generation/WindGeneratingUnit.ts +0 -84
- package/src/model/loadmodel/ConformLoad.ts +0 -34
- package/src/model/model/Model.ts +0 -1253
- package/src/model/operationallimits/CurrentLimit.ts +0 -92
- package/src/model/operationallimits/ENTSOEOperationalLimitType.ts +0 -5
- package/src/model/operationallimits/LimitTypeKind.ts +0 -9
- package/src/model/operationallimits/OperationalLimit.ts +0 -68
- package/src/model/operationallimits/OperationalLimitDirectionKind.ts +0 -5
- package/src/model/operationallimits/OperationalLimitSet.ts +0 -124
- package/src/model/operationallimits/OperationalLimitType.ts +0 -94
- package/src/model/operations/Outage.ts +0 -68
- package/src/model/operations/SwitchAction.ts +0 -121
- package/src/model/operations/SwitchActionKind.ts +0 -6
- package/src/model/operations/SwitchingAction.ts +0 -43
- package/src/model/operations/SwitchingPlan.ts +0 -141
- package/src/model/operations/UnplannedOutage.ts +0 -9
- package/src/model/statevariables/StateVariable.ts +0 -28
- package/src/model/statevariables/SvPowerFlow.ts +0 -75
- package/src/model/statevariables/SvStatus.ts +0 -51
- package/src/model/statevariables/SvTapStep.ts +0 -54
- package/src/model/statevariables/SvVoltage.ts +0 -74
- package/src/model/topology/TopologicalIsland.ts +0 -57
- package/src/model/topology/TopologicalNode.ts +0 -203
- package/src/model/wires/ACLineSegment.ts +0 -309
- package/src/model/wires/AsynchronousMachine.ts +0 -93
- package/src/model/wires/AsynchronousMachineKind.ts +0 -5
- package/src/model/wires/Breaker.ts +0 -82
- package/src/model/wires/BusbarSection.ts +0 -70
- package/src/model/wires/Clamp.ts +0 -33
- package/src/model/wires/CompositeSwitch.ts +0 -13
- package/src/model/wires/Conductor.ts +0 -55
- package/src/model/wires/Connector.ts +0 -16
- package/src/model/wires/Cut.ts +0 -7
- package/src/model/wires/Disconnector.ts +0 -120
- package/src/model/wires/EarthFaultCompensator.ts +0 -20
- package/src/model/wires/EnergyConsumer.ts +0 -255
- package/src/model/wires/EnergySource.ts +0 -337
- package/src/model/wires/ExternalNetworkInjection.ts +0 -276
- package/src/model/wires/Ground.ts +0 -40
- package/src/model/wires/GroundDisconnector.ts +0 -39
- package/src/model/wires/Jumper.ts +0 -8
- package/src/model/wires/Junction.ts +0 -57
- package/src/model/wires/Line.ts +0 -117
- package/src/model/wires/LoadBreakSwitch.ts +0 -107
- package/src/model/wires/PetersenCoilModeKind.ts +0 -5
- package/src/model/wires/Plant.ts +0 -12
- package/src/model/wires/PowerTransformer.ts +0 -231
- package/src/model/wires/PowerTransformerEnd.ts +0 -168
- package/src/model/wires/ProtectedSwitch.ts +0 -9
- package/src/model/wires/RatioTapChanger.ts +0 -96
- package/src/model/wires/RatioTapChangerTable.ts +0 -35
- package/src/model/wires/RatioTapChangerTablePoint.ts +0 -45
- package/src/model/wires/ReactiveCapabilityCurve.ts +0 -35
- package/src/model/wires/Recloser.ts +0 -32
- package/src/model/wires/RegulatingCondEq.ts +0 -67
- package/src/model/wires/RegulatingControl.ts +0 -217
- package/src/model/wires/RegulatingControlModeKind.ts +0 -11
- package/src/model/wires/RotatingMachine.ts +0 -172
- package/src/model/wires/SeriesCompensator.ts +0 -166
- package/src/model/wires/ShortCircuitRotorKind.ts +0 -6
- package/src/model/wires/Switch.ts +0 -230
- package/src/model/wires/SynchronousMachine.ts +0 -267
- package/src/model/wires/SynchronousMachineKind.ts +0 -9
- package/src/model/wires/SynchronousMachineOperatingMode.ts +0 -5
- package/src/model/wires/TapChanger.ts +0 -55
- package/src/model/wires/TapChangerControl.ts +0 -32
- package/src/model/wires/TapChangerTablePoint.ts +0 -41
- package/src/model/wires/TransformerControlMode.ts +0 -4
- package/src/model/wires/TransformerEnd.ts +0 -143
- package/src/model/wires/WindingConnection.ts +0 -9
- package/src/package.json +0 -16
- package/src/util/datatype-converter.ts +0 -48
- package/src/util/sparql/sparql-building-block.ts +0 -43
- package/src/util/sparql/sparql-utils.ts +0 -150
- package/src/util/util-create.ts +0 -148
- package/src/util/util-search.ts +0 -40
- package/src/util/util-topology.ts +0 -175
- package/src/util/utils.ts +0 -255
- package/src/util/xml/utils.parser.ts +0 -29
- package/src/util/xml/xml.parser.ts +0 -107
- package/src/util/xml/xml.serializer.ts +0 -245
- package/test/apache-jena-fuseki-interface/apache-jena-fuseki-neplan-1.tests.sp-ec.ts +0 -838
- package/test/apache-jena-fuseki-interface/apache-jena-fuseki-neplan-2.tests.sp-ec.ts +0 -216
- package/test/apache-jena-fuseki-interface/apache-jena-fuseki-neplan-katarina-ruhrau.tests.spec.ts +0 -223
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/LICENSE +0 -617
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/NOTICE +0 -216
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/README +0 -62
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-delete +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-get +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-head +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-post +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-put +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-query +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-update +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-update-form +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/soh +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki +0 -512
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki-backup +0 -34
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki-server +0 -95
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki-server.bat +0 -28
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki-server.jar +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki.service +0 -59
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki.war +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/config.ttl +0 -30
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/configuration/test.ttl +0 -50
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/shiro.ini +0 -38
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GOSP.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GOSP.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GPOS.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GPOS.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GSPO.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GSPO.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/OSP.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/OSP.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/OSPG.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/OSPG.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/POS.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/POS.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/POSG.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/POSG.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/SPO.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/SPO.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/SPOG.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/SPOG.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/journal.jrnl +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/node2id.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/node2id.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/nodes.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefix2id.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefix2id.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefixIdx.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefixIdx.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefixes.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/tdb.cfg +0 -32
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-mem +0 -27
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-service +0 -23
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb +0 -31
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb-dir +0 -30
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb-mem +0 -30
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb2 +0 -31
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb2-dir +0 -30
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb2-mem +0 -30
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/WEB-INF/web.xml +0 -332
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/admin-logs.html +0 -73
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap-select.min.css +0 -7
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap-theme.css.map +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap-theme.min.css +0 -7
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap.css.map +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap.min.css +0 -7
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/codemirror.css +0 -301
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/codemirror.min.css +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/font-awesome.min.css +0 -4
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/fui.css +0 -191
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.dataTables.css +0 -220
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.fileupload-noscript.css +0 -22
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.fileupload-ui-noscript.css +0 -17
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.fileupload-ui.css +0 -57
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.fileupload.css +0 -36
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/pivot.min.css +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/qonsole.css +0 -172
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/yasqe.min.css +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/yasr.min.css +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/dataset.html +0 -247
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/documentation.html +0 -83
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/FontAwesome.otf +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/fontawesome-webfont.eot +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/fontawesome-webfont.svg +0 -504
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/fontawesome-webfont.ttf +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/fontawesome-webfont.woff +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/glyphicons-halflings-regular.eot +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/glyphicons-halflings-regular.svg +0 -229
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/glyphicons-halflings-regular.woff +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/back_disabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/back_enabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/back_enabled_hover.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/favicon.ico +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/forward_disabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/forward_enabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/forward_enabled_hover.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/jena-logo-notext-small.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_asc.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_asc_disabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_both.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_desc.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_desc_disabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/wait30.gif +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/index.html +0 -101
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/dataset-controller.js +0 -69
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/index-controller.js +0 -50
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/manage-controller.js +0 -39
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/query-controller.js +0 -72
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/upload-controller.js +0 -42
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/validation-controller.js +0 -38
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/fui.js +0 -33
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/main.dataset.js +0 -31
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/main.index.js +0 -24
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/main.manage.js +0 -27
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/main.validation.js +0 -24
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/dataset-stats.js +0 -102
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/dataset.js +0 -262
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/fuseki-server.js +0 -180
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/task.js +0 -105
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/validation-options.js +0 -85
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/qonsole-config.js +0 -27
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/services/ping-service.js +0 -54
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/services/validation-service.js +0 -98
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-edit.tpl +0 -58
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-info.tpl +0 -40
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-management.tpl +0 -62
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-selection-list.tpl +0 -22
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-selector.tpl +0 -15
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-simple-create.tpl +0 -85
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-stats.tpl +0 -14
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/file-upload.tpl +0 -46
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/uploadable-file.tpl +0 -23
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/util/page-utils.js +0 -33
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-edit.js +0 -205
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-info.js +0 -76
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-management.js +0 -173
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-selection-list.js +0 -58
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-selector.js +0 -84
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-simple-create.js +0 -102
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-stats.js +0 -41
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/datasets-dropdown-list.js +0 -43
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/file-upload.js +0 -225
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/tabbed-view-manager.js +0 -63
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/uploadable-file.js +0 -39
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/validation-options.js +0 -54
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/common-config.js +0 -94
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/brace-fold.js +0 -105
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/comment-fold.js +0 -57
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/foldcode.js +0 -145
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/foldgutter.js +0 -134
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/xml-fold.js +0 -181
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/backbone-min.js +0 -2
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/backbone.js +0 -1581
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/backbone.marionette.js +0 -2385
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/bootstrap-select.min.js +0 -8
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/bootstrap.min.js +0 -6
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/html5shiv.js +0 -8
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery-1.10.2.js +0 -9789
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery-1.10.2.min.js +0 -6
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery-ui.min.js +0 -7
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.dataTables.min.js +0 -157
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.fileupload.js +0 -1426
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.fileupload.local.js +0 -1428
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.form.js +0 -1278
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.iframe-transport.js +0 -214
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.ui.widget.js +0 -530
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.xdomainrequest.js +0 -90
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/lib/codemirror.js +0 -7638
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/mode/javascript/javascript.js +0 -683
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/mode/sparql/sparql.js +0 -160
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/mode/turtle/turtle.js +0 -160
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/mode/xml/xml.js +0 -384
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/pivot.js +0 -1363
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/pivot.min.js +0 -2
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/pivot.min.js.map +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/plugins/text.js +0 -386
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/qonsole.js +0 -577
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/refresh.sh +0 -21
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/require.js +0 -2076
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/require.min.js +0 -36
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/respond.min.js +0 -6
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/sprintf-0.7-beta1.js +0 -183
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/underscore.js +0 -1276
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/yasqe.min.js +0 -9
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/yasqe.min.js.map +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/yasr.min.js +0 -8
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/yasr.min.js.map +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/manage.html +0 -110
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/services.html +0 -76
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/test/test-fuseki-config.ttl +0 -27
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/validate.html +0 -147
- package/test/apache-jena-fuseki-interface/data/json/PersistData.json +0 -111
- package/test/apache-jena-fuseki-interface/data/xml/AssetHealthEvent.xml +0 -45
- package/test/apache-jena-fuseki-interface/data/xml/AssetOwner.xml +0 -11
- package/test/apache-jena-fuseki-interface/data/xml/Outages.xml +0 -69
- package/test/apache-jena-fuseki-interface/data/xml/PsrType.xml +0 -80
- package/test/apache-jena-fuseki-interface/data/xml/finnentrop/Finnentrop_Rootnet_Area 1_EQ_V1.xml +0 -20867
- package/test/apache-jena-fuseki-interface/data/xml/finnentrop/Finnentrop_Rootnet_Area 1_SSH_V1.xml +0 -3784
- package/test/apache-jena-fuseki-interface/data/xml/neplan-eslohe/Eslohe_Rootnet_Area_1_EQ_V1.xml +0 -15755
- package/test/apache-jena-fuseki-interface/data/xml/neplan-eslohe/Eslohe_Rootnet_Area_1_EQ_V1_feeder_ext.xml +0 -54
- package/test/apache-jena-fuseki-interface/data/xml/neplan-eslohe/Eslohe_Rootnet_Area_1_SSH_V1.xml +0 -2796
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_EQ_V1.xml +0 -42569
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_SSH_V1.xml +0 -10108
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_SV_V1.xml +0 -6234
- package/test/apache-jena-fuseki-interface/data/xml-rdf-data.xml +0 -84
- package/test/cim-xml-rdf-parser/cim-xml-rdf-parser.tests.spec.ts +0 -23
- package/test/cim-xml-rdf-parser/data/rdfxml_serialisation.xml +0 -192
- package/test/integral7-converter/integral7-converter.tests.spec.ts +0 -195
- package/test/power-system-data-model-converter/data/fixed_feed_in_input.csv +0 -72
- package/test/power-system-data-model-converter/data/line_input.csv +0 -1910
- package/test/power-system-data-model-converter/data/line_type_input.csv +0 -5
- package/test/power-system-data-model-converter/data/load_input.csv +0 -1829
- package/test/power-system-data-model-converter/data/node_input.csv +0 -2835
- package/test/power-system-data-model-converter/data/time_series_mapping.csv +0 -878
- package/test/power-system-data-model-converter/data/transformer_2_w_input.csv +0 -1047
- package/test/power-system-data-model-converter/data/transformer_2_w_type_input.csv +0 -5
- package/test/power-system-data-model-converter/power-system-data-model-converter.tests.spec.ts +0 -310
- package/tsconfig.json +0 -24
- package/webpack.config.js +0 -24
|
@@ -1,725 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# -*- coding: utf-8 -*-
|
|
3
|
-
|
|
4
|
-
# Licensed to the Apache Software Foundation (ASF) under one
|
|
5
|
-
# or more contributor license agreements. See the NOTICE file
|
|
6
|
-
# distributed with this work for additional information
|
|
7
|
-
# regarding copyright ownership. The ASF licenses this file
|
|
8
|
-
# to you under the Apache License, Version 2.0 (the
|
|
9
|
-
# "License"); you may not use this file except in compliance
|
|
10
|
-
# with the License. You may obtain a copy of the License at
|
|
11
|
-
#
|
|
12
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
#
|
|
14
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
# See the License for the specific language governing permissions and
|
|
18
|
-
# limitations under the License.
|
|
19
|
-
|
|
20
|
-
# SPARQL HTTP Update, client.
|
|
21
|
-
|
|
22
|
-
require 'optparse'
|
|
23
|
-
require 'net/http'
|
|
24
|
-
require 'openssl'
|
|
25
|
-
require 'uri'
|
|
26
|
-
require 'cgi'
|
|
27
|
-
require 'pp'
|
|
28
|
-
require 'ostruct'
|
|
29
|
-
|
|
30
|
-
# ToDo
|
|
31
|
-
# Allow a choice of media type for GET
|
|
32
|
-
# --accept "content-type" (and abbreviations)
|
|
33
|
-
# --header "Add:this"
|
|
34
|
-
# --user, --password
|
|
35
|
-
# Basic authentication: request.basic_auth("username", "password")
|
|
36
|
-
# Follow redirects => 301: puts response["location"] # All headers are lowercase?
|
|
37
|
-
|
|
38
|
-
SOH_NAME="SOH"
|
|
39
|
-
SOH_VERSION="1.0.0"
|
|
40
|
-
|
|
41
|
-
$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new
|
|
42
|
-
|
|
43
|
-
# What about direct naming?
|
|
44
|
-
|
|
45
|
-
# Names
|
|
46
|
-
$mtTurtle = 'text/turtle;charset=utf-8'
|
|
47
|
-
$mtRDF = 'application/rdf+xml'
|
|
48
|
-
$mtText = 'text/plain'
|
|
49
|
-
$mtNTriples = 'application/n-triples'
|
|
50
|
-
$mtNQuads = 'application/n-quads'
|
|
51
|
-
$mtJSONLD = 'application/ld+json'
|
|
52
|
-
$mtTriG = 'application/trig'
|
|
53
|
-
$mtSparqlResultsX = 'application/sparql-results+xml'
|
|
54
|
-
$mtSparqlResultsJ = 'application/sparql-results+json'
|
|
55
|
-
$mtAppJSON = 'application/json'
|
|
56
|
-
$mtAppXML = 'application/xml'
|
|
57
|
-
$mtSparqlResultsTSV = 'application/sparql-results+tsv'
|
|
58
|
-
$mtSparqlResultsCSV = 'application/sparql-results+csv'
|
|
59
|
-
$mtSparqlUpdate = 'application/sparql-update'
|
|
60
|
-
$mtWWWForm = 'application/x-www-form-urlencoded'
|
|
61
|
-
$mtSparqlQuery = "application/sparql-query" ;
|
|
62
|
-
|
|
63
|
-
# Global media type table.
|
|
64
|
-
$fileMediaTypes = {}
|
|
65
|
-
$fileMediaTypes['ttl'] = $mtTurtle
|
|
66
|
-
$fileMediaTypes['n3'] = 'text/n3; charset=utf-8'
|
|
67
|
-
$fileMediaTypes['nt'] = $mtText
|
|
68
|
-
$fileMediaTypes['rdf'] = $mtRDF
|
|
69
|
-
$fileMediaTypes['owl'] = $mtRDF
|
|
70
|
-
$fileMediaTypes['nq'] = $mtNQuads
|
|
71
|
-
$fileMediaTypes['trig'] = $mtTriG
|
|
72
|
-
$fileMediaTypes['json-ld'] = $mtJSONLD
|
|
73
|
-
$fileMediaTypes['jsonld'] = $mtJSONLD
|
|
74
|
-
|
|
75
|
-
# Global charset : no entry means "don't set"
|
|
76
|
-
$charsetUTF8 = 'utf-8'
|
|
77
|
-
$charset = {}
|
|
78
|
-
$charset[$mtTurtle] = 'utf-8'
|
|
79
|
-
$charset[$mtText] = 'ascii'
|
|
80
|
-
$charset[$mtTriG] = 'utf-8'
|
|
81
|
-
$charset[$mtNQuads] = 'utf-8'
|
|
82
|
-
|
|
83
|
-
# Headers
|
|
84
|
-
|
|
85
|
-
$hContentType = 'Content-Type'
|
|
86
|
-
# $hContentEncoding = 'Content-Encoding'
|
|
87
|
-
$hContentLength = 'Content-Length'
|
|
88
|
-
# $hContentLocation = 'Content-Location'
|
|
89
|
-
# $hContentRange = 'Content-Range'
|
|
90
|
-
|
|
91
|
-
$hAccept = 'Accept'
|
|
92
|
-
$hAcceptCharset = 'Accept-Charset'
|
|
93
|
-
$hAcceptEncoding = 'Accept-Encoding'
|
|
94
|
-
$hAcceptRanges = 'Accept-Ranges'
|
|
95
|
-
|
|
96
|
-
$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
|
|
97
|
-
$print_http = false
|
|
98
|
-
|
|
99
|
-
# Default for GET
|
|
100
|
-
# At least allow anything (and hope!)
|
|
101
|
-
$accept_rdf="#{$mtTurtle} , #{$mtNTriples};q=0.9 , #{$mtRDF};q=0.8 , #{$mtJSONLD};q=0.5"
|
|
102
|
-
# Datasets
|
|
103
|
-
$accept_ds="#{$mtTrig} , #{$mtNQuads};q=0.9 , #{$mtJSONLD};q=0.5"
|
|
104
|
-
# For SPARQL query
|
|
105
|
-
$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
|
|
106
|
-
|
|
107
|
-
# Accept any in case of trouble.
|
|
108
|
-
$accept_rdf="#{$accept_rdf} , */*;q=0.1"
|
|
109
|
-
$accept_results="#{$accept_results} , */*;q=0.1"
|
|
110
|
-
|
|
111
|
-
# The media type usually forces the charset.
|
|
112
|
-
$accept_charset=nil
|
|
113
|
-
|
|
114
|
-
## Who we are.
|
|
115
|
-
## Two styles:
|
|
116
|
-
## s-query .....
|
|
117
|
-
## soh query .....
|
|
118
|
-
|
|
119
|
-
$cmd = File.basename($0)
|
|
120
|
-
if $cmd == 'soh'
|
|
121
|
-
then
|
|
122
|
-
$cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
if ! $cmd.start_with?('s-') && $cmd != 'soh'
|
|
126
|
-
$cmd = 's-'+$cmd
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
## --------
|
|
130
|
-
|
|
131
|
-
def GET(dataset, graph)
|
|
132
|
-
print "GET #{dataset} #{graph}\n" if $verbose
|
|
133
|
-
requestURI = target(dataset, graph)
|
|
134
|
-
headers = {}
|
|
135
|
-
headers.merge!($headers)
|
|
136
|
-
headers[$hAccept] = $accept_rdf
|
|
137
|
-
headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
|
|
138
|
-
get_worker(requestURI, headers)
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
def get_worker(requestURI, headers)
|
|
142
|
-
uri = URI.parse(requestURI)
|
|
143
|
-
request = Net::HTTP::Get.new(uri.request_uri)
|
|
144
|
-
request.initialize_http_header(headers)
|
|
145
|
-
print_http_request(uri, request)
|
|
146
|
-
response_print_body(uri, request)
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
def HEAD(dataset, graph)
|
|
150
|
-
print "HEAD #{dataset} #{graph}\n" if $verbose
|
|
151
|
-
requestURI = target(dataset, graph)
|
|
152
|
-
headers = {}
|
|
153
|
-
headers.merge!($headers)
|
|
154
|
-
headers[$hAccept] = $accept_rdf
|
|
155
|
-
headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
|
|
156
|
-
uri = URI.parse(requestURI)
|
|
157
|
-
request = Net::HTTP::Head.new(uri.request_uri)
|
|
158
|
-
request.initialize_http_header(headers)
|
|
159
|
-
print_http_request(uri, request)
|
|
160
|
-
response_no_body(uri, request)
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
def PUT(dataset, graph, file)
|
|
164
|
-
print "PUT #{dataset} #{graph} #{file}\n" if $verbose
|
|
165
|
-
send_body(dataset, graph, file, Net::HTTP::Put)
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
def POST(dataset, graph, file)
|
|
169
|
-
print "POST #{dataset} #{graph} #{file}\n" if $verbose
|
|
170
|
-
send_body(dataset, graph, file, Net::HTTP::Post)
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
def DELETE(dataset, graph)
|
|
174
|
-
print "DELETE #{dataset} #{graph}\n" if $verbose
|
|
175
|
-
requestURI = target(dataset, graph)
|
|
176
|
-
uri = URI.parse(requestURI)
|
|
177
|
-
request = Net::HTTP::Delete.new(uri.request_uri)
|
|
178
|
-
headers = {}
|
|
179
|
-
headers.merge!($headers)
|
|
180
|
-
request.initialize_http_header(headers)
|
|
181
|
-
print_http_request(uri, request)
|
|
182
|
-
response_no_body(uri, request)
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
def uri_escape(string)
|
|
186
|
-
CGI.escape(string)
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
def target(dataset, graph)
|
|
190
|
-
return dataset+"?default" if graph == "default"
|
|
191
|
-
return dataset+"?graph="+uri_escape(graph)
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
def send_body(dataset, graph, file, method)
|
|
195
|
-
mt = content_type(file)
|
|
196
|
-
if mt.nil?
|
|
197
|
-
warn_exit "Can't identify the content type of '#{file}'", 9
|
|
198
|
-
end
|
|
199
|
-
headers = {}
|
|
200
|
-
headers.merge!($headers)
|
|
201
|
-
headers[$hContentType] = mt
|
|
202
|
-
headers[$hContentLength] = File.size(file).to_s
|
|
203
|
-
## p headers
|
|
204
|
-
|
|
205
|
-
requestURI = target(dataset, graph)
|
|
206
|
-
uri = URI.parse(requestURI)
|
|
207
|
-
|
|
208
|
-
request = method.new(uri.request_uri)
|
|
209
|
-
request.initialize_http_header(headers)
|
|
210
|
-
print_http_request(uri, request)
|
|
211
|
-
request.body_stream = File.open(file)
|
|
212
|
-
response_no_body(uri, request)
|
|
213
|
-
end
|
|
214
|
-
|
|
215
|
-
def response_no_body(uri, request)
|
|
216
|
-
http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
|
|
217
|
-
http.read_timeout = nil
|
|
218
|
-
if uri.scheme == 'https'
|
|
219
|
-
http.use_ssl = uri.scheme == 'https'
|
|
220
|
-
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
|
221
|
-
end
|
|
222
|
-
|
|
223
|
-
begin http.start do |http|
|
|
224
|
-
response = http.request(request)
|
|
225
|
-
print_http_response(response)
|
|
226
|
-
case response
|
|
227
|
-
when Net::HTTPSuccess, Net::HTTPRedirection
|
|
228
|
-
# OK
|
|
229
|
-
when Net::HTTPNotFound
|
|
230
|
-
warn_exit "404 Not found: #{uri}", 9
|
|
231
|
-
#print response.body
|
|
232
|
-
else
|
|
233
|
-
warn_exit "#{response.code} #{response.message} #{uri}", 9
|
|
234
|
-
# Unreachable
|
|
235
|
-
response.error!
|
|
236
|
-
end
|
|
237
|
-
end
|
|
238
|
-
rescue Exception => e
|
|
239
|
-
# puts e.message
|
|
240
|
-
#puts e.backtrace.inspect
|
|
241
|
-
warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
|
|
242
|
-
end
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
def response_print_body(uri, request)
|
|
246
|
-
http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
|
|
247
|
-
if uri.scheme == 'https'
|
|
248
|
-
http.use_ssl = uri.scheme == 'https'
|
|
249
|
-
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
|
250
|
-
end
|
|
251
|
-
begin http.start do |http|
|
|
252
|
-
|
|
253
|
-
# Add a blank line if headers were output.
|
|
254
|
-
print "\n" if $http_print ;
|
|
255
|
-
|
|
256
|
-
response = http.request(request) { |res|
|
|
257
|
-
print_http_response(res)
|
|
258
|
-
#puts res.code
|
|
259
|
-
res.read_body do |segment|
|
|
260
|
-
print segment
|
|
261
|
-
end
|
|
262
|
-
}
|
|
263
|
-
case response
|
|
264
|
-
when Net::HTTPSuccess, Net::HTTPRedirection
|
|
265
|
-
# OK
|
|
266
|
-
when Net::HTTPNotFound
|
|
267
|
-
warn_exit "404 Not found: #{uri}", 9
|
|
268
|
-
#print response.body
|
|
269
|
-
else
|
|
270
|
-
warn_exit "#{response.code}: #{uri}", 9
|
|
271
|
-
# Unreachable
|
|
272
|
-
response.error!
|
|
273
|
-
end
|
|
274
|
-
end
|
|
275
|
-
rescue Exception => e
|
|
276
|
-
warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
|
|
277
|
-
end
|
|
278
|
-
end
|
|
279
|
-
|
|
280
|
-
def print_http_request(uri, request)
|
|
281
|
-
return unless $print_http
|
|
282
|
-
#print "Request\n"
|
|
283
|
-
print request.method," ",uri, "\n"
|
|
284
|
-
print_headers(" ",request)
|
|
285
|
-
end
|
|
286
|
-
|
|
287
|
-
def print_http_response(response)
|
|
288
|
-
return unless $print_http
|
|
289
|
-
#print "Response\n"
|
|
290
|
-
print response.code, " ", response.message, "\n"
|
|
291
|
-
print_headers(" ",response)
|
|
292
|
-
end
|
|
293
|
-
|
|
294
|
-
def print_headers(marker, headers)
|
|
295
|
-
headers.each do |k,v|
|
|
296
|
-
k = k.split('-').map{|w| w.capitalize}.join('-')+':'
|
|
297
|
-
printf "%s%-20s %s\n",marker,k,v
|
|
298
|
-
end
|
|
299
|
-
end
|
|
300
|
-
|
|
301
|
-
def content_type(file)
|
|
302
|
-
file =~ /\.([^.]*)$/
|
|
303
|
-
ext = $1
|
|
304
|
-
mt = $fileMediaTypes[ext]
|
|
305
|
-
cs = $charset[mt]
|
|
306
|
-
mt = mt+';charset='+cs if ! cs.nil?
|
|
307
|
-
return mt
|
|
308
|
-
end
|
|
309
|
-
|
|
310
|
-
def charset(content_type)
|
|
311
|
-
return $charset[content_type]
|
|
312
|
-
end
|
|
313
|
-
|
|
314
|
-
def warn_exit(msg, rc)
|
|
315
|
-
warn msg
|
|
316
|
-
exit rc ;
|
|
317
|
-
end
|
|
318
|
-
|
|
319
|
-
def parseURI(uri_string)
|
|
320
|
-
begin
|
|
321
|
-
return URI.parse(uri_string).to_s
|
|
322
|
-
rescue URI::InvalidURIError => err
|
|
323
|
-
warn_exit "Bad URI: <#{uri_string}>", 2
|
|
324
|
-
end
|
|
325
|
-
end
|
|
326
|
-
|
|
327
|
-
## ---- Command
|
|
328
|
-
|
|
329
|
-
def cmd_soh(command=nil)
|
|
330
|
-
## Command line
|
|
331
|
-
options = {}
|
|
332
|
-
optparse = OptionParser.new do |opts|
|
|
333
|
-
# Set a banner, displayed at the top
|
|
334
|
-
# of the help screen.
|
|
335
|
-
case $cmd
|
|
336
|
-
when "s-http", "sparql-http", "soh"
|
|
337
|
-
banner="$cmd [get|post|put|delete] datasetURI graph [file]"
|
|
338
|
-
when "s-get", "s-head", "s-delete"
|
|
339
|
-
banner="$cmd datasetURI graph"
|
|
340
|
-
end
|
|
341
|
-
|
|
342
|
-
opts.banner = $banner
|
|
343
|
-
# Define the options, and what they do
|
|
344
|
-
|
|
345
|
-
options[:verbose] = false
|
|
346
|
-
opts.on( '-v', '--verbose', 'Verbose' ) do
|
|
347
|
-
options[:verbose] = true
|
|
348
|
-
end
|
|
349
|
-
|
|
350
|
-
options[:version] = false
|
|
351
|
-
opts.on( '--version', 'Print version and exit' ) do
|
|
352
|
-
print "#{SOH_NAME} #{SOH_VERSION}\n"
|
|
353
|
-
exit
|
|
354
|
-
end
|
|
355
|
-
|
|
356
|
-
# This displays the help screen, all programs are
|
|
357
|
-
# assumed to have this option.
|
|
358
|
-
opts.on( '-h', '--help', 'Display this screen and exit' ) do
|
|
359
|
-
puts opts
|
|
360
|
-
exit
|
|
361
|
-
end
|
|
362
|
-
end
|
|
363
|
-
|
|
364
|
-
begin optparse.parse!
|
|
365
|
-
rescue OptionParser::InvalidArgument => e
|
|
366
|
-
warn e
|
|
367
|
-
exit
|
|
368
|
-
end
|
|
369
|
-
|
|
370
|
-
$verbose = options[:verbose]
|
|
371
|
-
$print_http = $verbose
|
|
372
|
-
|
|
373
|
-
if command.nil?
|
|
374
|
-
if ARGV.size == 0
|
|
375
|
-
warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
|
|
376
|
-
exit 1
|
|
377
|
-
end
|
|
378
|
-
cmdPrint=ARGV.shift
|
|
379
|
-
command=cmdPrint.upcase
|
|
380
|
-
else
|
|
381
|
-
cmdPrint=command
|
|
382
|
-
end
|
|
383
|
-
|
|
384
|
-
case command
|
|
385
|
-
when "HEAD", "GET", "DELETE"
|
|
386
|
-
requiredFile=false
|
|
387
|
-
when "PUT", "POST"
|
|
388
|
-
requiredFile=true
|
|
389
|
-
when "QUERY"
|
|
390
|
-
cmd_sparql_query
|
|
391
|
-
when "UPDATE"
|
|
392
|
-
cmd_sparql_update
|
|
393
|
-
else
|
|
394
|
-
warn_exit "Unknown command: #{command}", 2
|
|
395
|
-
end
|
|
396
|
-
|
|
397
|
-
if requiredFile
|
|
398
|
-
then
|
|
399
|
-
if ARGV.size != 3
|
|
400
|
-
warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1
|
|
401
|
-
end
|
|
402
|
-
else
|
|
403
|
-
if ARGV.size != 2
|
|
404
|
-
warn_exit "Required: dataset URI and graph URI (or 'default')", 1
|
|
405
|
-
end
|
|
406
|
-
end
|
|
407
|
-
|
|
408
|
-
dataset=parseURI(ARGV.shift)
|
|
409
|
-
# Relative URI?
|
|
410
|
-
graph=parseURI(ARGV.shift)
|
|
411
|
-
file=""
|
|
412
|
-
if requiredFile
|
|
413
|
-
then
|
|
414
|
-
file = ARGV.shift if requiredFile
|
|
415
|
-
if ! File.exist?(file)
|
|
416
|
-
warn_exit "No such file: "+file, 3
|
|
417
|
-
end
|
|
418
|
-
if File.directory?(file)
|
|
419
|
-
warn_exit "File is a directory: "+file, 3
|
|
420
|
-
end
|
|
421
|
-
end
|
|
422
|
-
|
|
423
|
-
case command
|
|
424
|
-
when "GET"
|
|
425
|
-
GET(dataset, graph)
|
|
426
|
-
when "HEAD"
|
|
427
|
-
HEAD(dataset, graph)
|
|
428
|
-
when "PUT"
|
|
429
|
-
PUT(dataset, graph, file)
|
|
430
|
-
when "DELETE"
|
|
431
|
-
DELETE(dataset, graph)
|
|
432
|
-
when "POST"
|
|
433
|
-
POST(dataset, graph, file)
|
|
434
|
-
else
|
|
435
|
-
warn_exit "Internal error: Unknown command: #{cmd}", 2
|
|
436
|
-
end
|
|
437
|
-
exit 0
|
|
438
|
-
end
|
|
439
|
-
|
|
440
|
-
## --------
|
|
441
|
-
def string_or_file(arg)
|
|
442
|
-
return arg if ! arg.match(/^@/)
|
|
443
|
-
a=(arg[1..-1])
|
|
444
|
-
open(a, 'rb'){|f| f.read}
|
|
445
|
-
end
|
|
446
|
-
|
|
447
|
-
## -------- SPARQL Query
|
|
448
|
-
|
|
449
|
-
## Choose method
|
|
450
|
-
def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
|
|
451
|
-
if ! query_file.nil?
|
|
452
|
-
query = open(query_file, 'rb'){|f| f.read}
|
|
453
|
-
end
|
|
454
|
-
if forcePOST || query.length >= 2*1024
|
|
455
|
-
SPARQL_query_POST(service, query, args2)
|
|
456
|
-
else
|
|
457
|
-
SPARQL_query_GET(service, query, args2)
|
|
458
|
-
end
|
|
459
|
-
end
|
|
460
|
-
|
|
461
|
-
## By GET
|
|
462
|
-
|
|
463
|
-
def SPARQL_query_GET(service, query, args2)
|
|
464
|
-
args = { "query" => query }
|
|
465
|
-
args.merge!(args2)
|
|
466
|
-
qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
|
|
467
|
-
|
|
468
|
-
if service.include? "?"
|
|
469
|
-
then
|
|
470
|
-
action="#{service}&#{qs}"
|
|
471
|
-
else
|
|
472
|
-
action="#{service}?#{qs}"
|
|
473
|
-
end
|
|
474
|
-
|
|
475
|
-
headers={}
|
|
476
|
-
headers.merge!($headers)
|
|
477
|
-
headers[$hAccept]=$accept_results
|
|
478
|
-
get_worker(action, headers)
|
|
479
|
-
end
|
|
480
|
-
|
|
481
|
-
## By POST
|
|
482
|
-
|
|
483
|
-
def SPARQL_query_POST(service, query, args2)
|
|
484
|
-
# DRY - body/no body for each of request and response.
|
|
485
|
-
post_params={ "query" => query }
|
|
486
|
-
post_params.merge!(args2)
|
|
487
|
-
uri = URI.parse(service)
|
|
488
|
-
headers={}
|
|
489
|
-
headers.merge!($headers)
|
|
490
|
-
headers[$hAccept]=$accept_results
|
|
491
|
-
execute_post_form_body(uri, headers, post_params)
|
|
492
|
-
end
|
|
493
|
-
|
|
494
|
-
def execute_post_form_body(uri, headers, post_params)
|
|
495
|
-
request = Net::HTTP::Post.new(uri.request_uri)
|
|
496
|
-
qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
|
|
497
|
-
headers[$hContentType] = $mtWWWForm
|
|
498
|
-
headers[$hContentLength] = qs.length.to_s
|
|
499
|
-
request.initialize_http_header(headers)
|
|
500
|
-
request.body = qs
|
|
501
|
-
print_http_request(uri, request)
|
|
502
|
-
response_print_body(uri, request)
|
|
503
|
-
end
|
|
504
|
-
|
|
505
|
-
# Usage: -v --help --file= --query=
|
|
506
|
-
def cmd_sparql_query
|
|
507
|
-
options={}
|
|
508
|
-
optparse = OptionParser.new do |opts|
|
|
509
|
-
opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
|
|
510
|
-
opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
|
|
511
|
-
options[:service]=uri
|
|
512
|
-
end
|
|
513
|
-
opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
|
|
514
|
-
options[:file]=file
|
|
515
|
-
end
|
|
516
|
-
opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
|
|
517
|
-
'Set the output argument') do |type|
|
|
518
|
-
options[:output]=type
|
|
519
|
-
end
|
|
520
|
-
opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv],
|
|
521
|
-
'Set the accept header type') do |type|
|
|
522
|
-
options[:accept]=type
|
|
523
|
-
end
|
|
524
|
-
options[:verbose] = false
|
|
525
|
-
opts.on( '--post', 'Force use of POST' ) do
|
|
526
|
-
options[:post] = true
|
|
527
|
-
end
|
|
528
|
-
opts.on( '-v', '--verbose', 'Verbose' ) do
|
|
529
|
-
options[:verbose] = true
|
|
530
|
-
end
|
|
531
|
-
opts.on( '--version', 'Print version and exit' ) do
|
|
532
|
-
print "#{SOH_NAME} #{SOH_VERSION}\n"
|
|
533
|
-
exit
|
|
534
|
-
end
|
|
535
|
-
opts.on( '-h', '--help', 'Display this screen and exit' ) do
|
|
536
|
-
puts opts
|
|
537
|
-
exit
|
|
538
|
-
end
|
|
539
|
-
end
|
|
540
|
-
|
|
541
|
-
begin optparse.parse!
|
|
542
|
-
rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
|
|
543
|
-
warn e
|
|
544
|
-
exit 1
|
|
545
|
-
end
|
|
546
|
-
|
|
547
|
-
$verbose = options[:verbose]
|
|
548
|
-
$print_http = $verbose
|
|
549
|
-
usePOST = options[:post]
|
|
550
|
-
|
|
551
|
-
service = options[:service]
|
|
552
|
-
warn_exit 'No service specified. Required --service=URI',1 if service.nil?
|
|
553
|
-
|
|
554
|
-
# Query
|
|
555
|
-
query=nil
|
|
556
|
-
query_file=options[:file]
|
|
557
|
-
if query_file.nil? && ARGV.size == 0
|
|
558
|
-
then
|
|
559
|
-
warn_exit 'No query specified.',1
|
|
560
|
-
end
|
|
561
|
-
if query_file.nil?
|
|
562
|
-
query = ARGV.shift
|
|
563
|
-
if query.match(/^@/)
|
|
564
|
-
query_file = query[1..-1]
|
|
565
|
-
query = nil
|
|
566
|
-
end
|
|
567
|
-
end
|
|
568
|
-
|
|
569
|
-
# --output ==> output= (non-standard)
|
|
570
|
-
args={}
|
|
571
|
-
case options[:output]
|
|
572
|
-
when nil
|
|
573
|
-
when "json","xml","text","csv","tsv"
|
|
574
|
-
args['output'] = options[:output]
|
|
575
|
-
when :json,:xml,:text,:csv,:tsv
|
|
576
|
-
args['output'] = options[:output].to_s
|
|
577
|
-
else
|
|
578
|
-
warn_exit "Unrecognized output type: "+options[:output],2
|
|
579
|
-
end
|
|
580
|
-
|
|
581
|
-
# --accept
|
|
582
|
-
# options[:accept]
|
|
583
|
-
|
|
584
|
-
print "SPARQL #{service}\n" if $verbose
|
|
585
|
-
#args={"output"=>"text"}
|
|
586
|
-
SPARQL_query(service, query, query_file, usePOST, args)
|
|
587
|
-
exit(0)
|
|
588
|
-
end
|
|
589
|
-
|
|
590
|
-
## -------- SPARQL Update
|
|
591
|
-
|
|
592
|
-
# Update sent as a WWW form.
|
|
593
|
-
def SPARQL_update_by_form(service, update, args2={})
|
|
594
|
-
args = {}
|
|
595
|
-
args.merge!(args2)
|
|
596
|
-
headers={}
|
|
597
|
-
headers.merge!($headers)
|
|
598
|
-
# args? encode?
|
|
599
|
-
body="update="+uri_escape(update)
|
|
600
|
-
headers[$hContentType] = $mtWWWForm
|
|
601
|
-
headers[$hContentLength] = body.length.to_s
|
|
602
|
-
uri = URI.parse(service)
|
|
603
|
-
execute_post_form(uri, headers, body)
|
|
604
|
-
end
|
|
605
|
-
|
|
606
|
-
# DRY - query form.
|
|
607
|
-
def execute_post_form(uri, headers, body)
|
|
608
|
-
request = Net::HTTP::Post.new(uri.request_uri)
|
|
609
|
-
request.initialize_http_header(headers)
|
|
610
|
-
request.body = body
|
|
611
|
-
print_http_request(uri, request)
|
|
612
|
-
response_no_body(uri, request)
|
|
613
|
-
end
|
|
614
|
-
|
|
615
|
-
def SPARQL_update(service, update, args2={})
|
|
616
|
-
args = {}
|
|
617
|
-
args.merge!(args2)
|
|
618
|
-
headers={}
|
|
619
|
-
headers.merge!($headers)
|
|
620
|
-
headers[$hContentType] = $mtSparqlUpdate
|
|
621
|
-
uri = URI.parse(service)
|
|
622
|
-
request = Net::HTTP::Post.new(uri.request_uri)
|
|
623
|
-
request.initialize_http_header(headers)
|
|
624
|
-
request.body = update
|
|
625
|
-
print_http_request(uri, request)
|
|
626
|
-
response_no_body(uri, request)
|
|
627
|
-
end
|
|
628
|
-
|
|
629
|
-
def cmd_sparql_update(by_raw_post=true)
|
|
630
|
-
# Share with cmd_sparql_query
|
|
631
|
-
options={}
|
|
632
|
-
optparse = OptionParser.new do |opts|
|
|
633
|
-
opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
|
|
634
|
-
opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
|
|
635
|
-
options[:service]=uri
|
|
636
|
-
end
|
|
637
|
-
opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
|
|
638
|
-
options[:file]=file
|
|
639
|
-
end
|
|
640
|
-
options[:verbose] = false
|
|
641
|
-
opts.on( '-v', '--verbose', 'Verbose' ) do
|
|
642
|
-
options[:verbose] = true
|
|
643
|
-
end
|
|
644
|
-
opts.on( '--version', 'Print version and exit' ) do
|
|
645
|
-
print "#{SOH_NAME} #{SOH_VERSION}\n"
|
|
646
|
-
exit
|
|
647
|
-
end
|
|
648
|
-
opts.on( '-h', '--help', 'Display this screen and exit' ) do
|
|
649
|
-
puts opts
|
|
650
|
-
exit
|
|
651
|
-
end
|
|
652
|
-
end
|
|
653
|
-
|
|
654
|
-
begin optparse.parse!
|
|
655
|
-
rescue OptionParser::InvalidArgument => e
|
|
656
|
-
warn e
|
|
657
|
-
exit
|
|
658
|
-
end
|
|
659
|
-
|
|
660
|
-
$verbose = options[:verbose]
|
|
661
|
-
$print_http = $verbose
|
|
662
|
-
|
|
663
|
-
service = options[:service]
|
|
664
|
-
warn_exit 'No service specified. Required --service=URI',1 if service.nil?
|
|
665
|
-
|
|
666
|
-
update=nil
|
|
667
|
-
update_file=options[:file]
|
|
668
|
-
|
|
669
|
-
if update_file.nil? && ARGV.size == 0
|
|
670
|
-
then
|
|
671
|
-
warn_exit 'No update specified.',1
|
|
672
|
-
end
|
|
673
|
-
if update_file.nil?
|
|
674
|
-
update = ARGV.shift
|
|
675
|
-
if update.match(/^@/)
|
|
676
|
-
update_file = update[1..-1]
|
|
677
|
-
update = nil
|
|
678
|
-
end
|
|
679
|
-
end
|
|
680
|
-
|
|
681
|
-
print "SPARQL-Update #{service}\n" if $verbose
|
|
682
|
-
args={}
|
|
683
|
-
|
|
684
|
-
# Reads in the file :-(
|
|
685
|
-
if update.nil?
|
|
686
|
-
then
|
|
687
|
-
update = open(update_file, 'rb'){|f| f.read}
|
|
688
|
-
else
|
|
689
|
-
update = string_or_file(update)
|
|
690
|
-
end
|
|
691
|
-
|
|
692
|
-
if by_raw_post
|
|
693
|
-
SPARQL_update(service, update, args)
|
|
694
|
-
else
|
|
695
|
-
SPARQL_update_by_form(service, update, args)
|
|
696
|
-
end
|
|
697
|
-
exit(0)
|
|
698
|
-
end
|
|
699
|
-
|
|
700
|
-
## -------
|
|
701
|
-
|
|
702
|
-
case $cmd
|
|
703
|
-
when "s-http", "sparql-http", "soh"
|
|
704
|
-
$banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
|
|
705
|
-
cmd_soh
|
|
706
|
-
when "s-get", "s-head", "s-put", "s-delete", "s-post"
|
|
707
|
-
|
|
708
|
-
case $cmd
|
|
709
|
-
when "s-get", "s-head", "s-delete"
|
|
710
|
-
$banner="#{$cmd} datasetURI graph"
|
|
711
|
-
when "s-put", "s-post"
|
|
712
|
-
$banner="#{$cmd} datasetURI graph file"
|
|
713
|
-
end
|
|
714
|
-
cmd2 = $cmd.sub(/^s-/, '').upcase
|
|
715
|
-
cmd_soh cmd2
|
|
716
|
-
|
|
717
|
-
when "s-query", "sparql-query"
|
|
718
|
-
cmd_sparql_query
|
|
719
|
-
when "s-update", "sparql-update"
|
|
720
|
-
cmd_sparql_update true
|
|
721
|
-
when "s-update-form", "sparql-update-form"
|
|
722
|
-
cmd_sparql_update false
|
|
723
|
-
else
|
|
724
|
-
warn_exit "Unknown: "+$cmd, 1
|
|
725
|
-
end
|