Endpoint: bd4nrg_test

Edit Request log Unarchive Delete

Your specially constructed endpoint is right here.

Request URL: https://translate.lab.semantic-treehouse.nl/api/2

Format: xml

Output format: turtle

Response URL: https://httpbin.org/post

Headers: RML:
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix ns1: <http://ontology.tno.nl/interconnect/datapoint#> .
@prefix time: <http://www.w3.org/2006/time#> .

[]
  rml:logicalSource [
    rml:source "http://www.example.com/root" ;
    rml:referenceFormulation ql:XPath ;
    rml:iterator "/EnergyConsumptionTimeSeries"
  ] ;
  rr:subjectMap [
    rr:termType rr:BlankNode ;
    rr:class ns1:TimeSeries
  ] ;
  rr:predicateObjectMap [
    rr:predicate ns1:hasDataPoint ;
    rr:objectMap [
      rr:parentTriplesMap [
        rml:logicalSource [
          rml:source "http://www.example.com/root" ;
          rml:referenceFormulation ql:XPath ;
          rml:iterator "/EnergyConsumptionTimeSeries/hasDataPoint"
        ] ;
        rr:subjectMap [
          rr:termType rr:BlankNode ;
          rr:class ns1:DataPoint
        ] ;
        rr:predicateObjectMap [
          rr:predicate <http://www.ontology-of-units-of-measure.org/resource/om-2/hasQuantity> ;
          rr:objectMap [
            rr:parentTriplesMap [
              rml:logicalSource [
                rml:source "http://www.example.com/root" ;
                rml:referenceFormulation ql:XPath ;
                rml:iterator "/EnergyConsumptionTimeSeries/hasDataPoint/hasQuantity"
              ] ;
              rr:subjectMap [
                rr:termType rr:BlankNode ;
                rr:class <http://www.ontology-of-units-of-measure.org/resource/om-2/Quantity>
              ] ;
              rr:predicateObjectMap [
                rr:predicate <http://www.ontology-of-units-of-measure.org/resource/om-2/hasValue> ;
                rr:objectMap [ rml:reference "hasValue" ]
              ]
            ] ;
            rr:joinCondition [
              rr:child "." ;
              rr:parent ".."
            ]
          ]
        ], [
          rr:predicate ns1:hasCreationTime ;
          rr:objectMap [
            rr:parentTriplesMap [
              rml:logicalSource [
                rml:source "http://www.example.com/root" ;
                rml:referenceFormulation ql:XPath ;
                rml:iterator "/EnergyConsumptionTimeSeries/hasDataPoint/hasCreationTime"
              ] ;
              rr:subjectMap [
                rr:termType rr:BlankNode ;
                rr:class time:Instant
              ] ;
              rr:predicateObjectMap [
                rr:predicate time:inXSDDateTimeStamp ;
                rr:objectMap [ rml:reference "inXSDDateTimeStamp" ]
              ]
            ] ;
            rr:joinCondition [
              rr:child "." ;
              rr:parent ".."
            ]
          ]
        ]
      ] ;
      rr:joinCondition [
        rr:child "." ;
        rr:parent ".."
      ]
    ]
  ] .
XML Schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://ontology.tno.nl/interconnect/datapoint#" xmlns:sth="https://ns.semantic-treehouse.nl/message#" elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://ontology.tno.nl/interconnect/datapoint#" xmlns:ns0="https://saref.etsi.org/core" xmlns:ns1="http://ontology.tno.nl/interconnect/datapoint" xmlns:ns2="http://www.w3.org/2001/XMLSchema">
<!--===== Root element definitions =====-->
<xs:element name="EnergyConsumptionTimeSeries" type="TimeSeries"/>
<!--===== ComplexType definitions =====-->
<xs:complexType name="DataPoint">
  <xs:sequence>
    <xs:element name="hasQuantity" minOccurs="0" maxOccurs="unbounded" type="Quantity"/>
    <xs:element name="hasCreationTime" minOccurs="0" maxOccurs="unbounded" type="Instant">
      <xs:annotation>
        <xs:documentation>
          <sth:definition>The time instant that defines the creation time of a data point or quantity or forecast or similar entities. This is not the same as the time at which the quantity is in effect. For example, if a temperature is forecasted today at 12:30 (creation time of the forecast) for the following day at 14:45 (time when the temperature is expected to be in effect), the this instant should be 12:30 of today.

A creation time (instant). This is the point in time when the data point was created, which is not necessarily the time for which it is valid. In the case of soft-sensors or forecasters, a data point might have been created ahead of time, in the case of a direcet measurement a data point might created at its time of validity (or at the end of its validity time interval) and in the case of an archived value the data point might have been created after the fact.</sth:definition>
        </xs:documentation>
      </xs:annotation>
    </xs:element>
  </xs:sequence>
</xs:complexType>
<xs:complexType name="Quantity">
  <xs:sequence>
    <xs:element name="hasValue" minOccurs="0" maxOccurs="unbounded" type="ns2:decimal"/>
  </xs:sequence>
</xs:complexType>
<xs:complexType name="Instant">
  <xs:sequence>
    <xs:element name="inXSDDateTimeStamp" minOccurs="0" maxOccurs="unbounded" type="dateTimeStamp">
      <xs:annotation>
        <xs:documentation>
          <sth:definition>Position of an instant, expressed using xsd:dateTimeStamp</sth:definition>
          <sth:note>Posición de un instante, expresado utilizando xsd:dateTimeStamp.</sth:note>
        </xs:documentation>
      </xs:annotation>
    </xs:element>
  </xs:sequence>
</xs:complexType>
<xs:complexType name="TimeSeries">
  <xs:sequence>
    <xs:element name="hasDataPoint" minOccurs="0" maxOccurs="unbounded" type="DataPoint"/>
  </xs:sequence>
</xs:complexType>
<!--===== SimpleType definitions =====-->
 <xs:simpleType name="dateTimeStamp" id="dateTimeStamp">
    <xs:annotation>
      <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#dateTimeStamp">
        This datatype includes just those dateTime values Whose explicitTimezone
        is present.  They are totally ordered.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:dateTime">
      <xs:explicitTimezone fixed="true"
        id="dateTimeStamp.explicitTimezone" value="required"/>
     </xs:restriction>
  </xs:simpleType>
</xs:schema>
JSON Schema: