Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use @base when present #38

Open
VladimirAlexiev opened this issue Sep 26, 2024 · 0 comments
Open

use @base when present #38

VladimirAlexiev opened this issue Sep 26, 2024 · 0 comments

Comments

@VladimirAlexiev
Copy link

The input rdfxml uses xml:base:

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
    xml:base="http://fullgrid.eu/CGMES/3.0"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:eu="http://iec.ch/TC57/CIM100-European#"
    xmlns:md="http://iec.ch/TC57/61970-552/ModelDescription/1#"
    xmlns:cim="http://iec.ch/TC57/CIM100#" > 

  <cim:Discrete rdf:ID="_13dacabf-aa4c-4a78-806e-c7c4c6949718">
    <cim:Measurement.unitSymbol rdf:resource="http://iec.ch/TC57/CIM100#UnitSymbol.none"/>
    <cim:IdentifiedObject.mRID>13dacabf-aa4c-4a78-806e-c7c4c6949718</cim:IdentifiedObject.mRID>
    <cim:Measurement.PowerSystemResource rdf:resource="#_0d76d781-5117-4e1c-af35-ca8849474b39"/>
    <cim:IdentifiedObject.description>DIS_1</cim:IdentifiedObject.description>
    <cim:Measurement.measurementType>SwitchPosition</cim:Measurement.measurementType>
    <cim:Discrete.ValueAliasSet rdf:resource="#_1a457323-2094-440f-8d30-dc93adf0cdb3"/>
    <cim:IdentifiedObject.name>DIS_1</cim:IdentifiedObject.name>
    <cim:Measurement.unitMultiplier rdf:resource="http://iec.ch/TC57/CIM100#UnitMultiplier.none"/>
    <cim:Measurement.phases rdf:resource="http://iec.ch/TC57/CIM100#PhaseCode.ABC"/>
  </cim:Discrete>

owl correctly interprets the base, but outputs Turtle that doesn't use base, making it significantly longer:

owl.bat write -i rdfxml FullGrid_OP-with-base.rdf
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix cim: <http://iec.ch/TC57/CIM100#> .
@prefix md: <http://iec.ch/TC57/61970-552/ModelDescription/1#> .

<http://fullgrid.eu/CGMES/3.0#_13dacabf-aa4c-4a78-806e-c7c4c6949718> a cim:Discrete ;
  cim:Discrete.ValueAliasSet <http://fullgrid.eu/CGMES/3.0#_1a457323-2094-440f-8d30-dc93adf0cdb3> ;
  cim:IdentifiedObject.description "DIS_1" ;
  cim:IdentifiedObject.mRID "13dacabf-aa4c-4a78-806e-c7c4c6949718" ;
  cim:IdentifiedObject.name "DIS_1" ;
  cim:Measurement.PowerSystemResource <http://fullgrid.eu/CGMES/3.0#_0d76d781-5117-4e1c-af35-ca8849474b39> ;
  cim:Measurement.measurementType "SwitchPosition" ;
  cim:Measurement.phases cim:PhaseCode.ABC ;
  cim:Measurement.unitMultiplier cim:UnitMultiplier.none ;
  cim:Measurement.unitSymbol cim:UnitSymbol.none .

Let me know if you want a test file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant