PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX doap:    <http://usefulinc.com/ns/doap#>
PREFIX era:     <http://data.europa.eu/949/>
PREFIX foaf:    <http://xmlns.com/foaf/0.1/>
PREFIX hydra:   <http://www.w3.org/ns/hydra/core#>
PREFIX ldp:     <http://www.w3.org/ns/ldp#>
PREFIX prov:    <http://www.w3.org/ns/prov#>
PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sh:      <http://www.w3.org/ns/shacl#>
PREFIX skos:    <http://www.w3.org/2004/02/skos/core#>
PREFIX void:    <http://rdfs.org/ns/void#>
PREFIX xsd:     <http://www.w3.org/2001/XMLSchema#>

<#dataset>  a                 void:Dataset;
        rdfs:comment          "A live view of the European Union Agency for Railways' knowledge graph (repository rinf-plus, ERA ontology 3.1.x), not a copy: every ERA instance at the path of its ERA IRI, so that the IRIs can be followed, and a box search over the features that have a geometry."@en;
        dcterms:license       <http://data.europa.eu/eli/dec_impl/2017/863/oj>;
        dcterms:publisher     <https://www.era.europa.eu/>;
        dcterms:rights        "Register of Infrastructure (RINF) data from the European Union Agency for Railways, as published in its knowledge graph, under the European Union Public Licence v1.2. RINF is reported to ERA by each infrastructure manager, who remains responsible for its content."@en;
        dcterms:source        <https://graph.data.era.europa.eu/repositories/rinf-plus>;
        dcterms:title         "Linked Data view of the ERA Register of Infrastructure (RINF)"@en;
        void:classPartition   [ void:class     era:NetAreaReference;
                                void:entities  4320
                              ];
        void:classPartition   [ void:class     era:NetPointReference;
                                void:entities  178946
                              ];
        void:classPartition   [ void:class     era:NetBasicReference;
                                void:entities  258682
                              ];
        void:classPartition   [ void:class     era:Signal;
                                void:entities  6460
                              ];
        void:classPartition   [ void:class     era:SubsidiaryLocation;
                                void:entities  3845
                              ];
        void:classPartition   [ void:class     era:ReferenceBorderPoint;
                                void:entities  363
                              ];
        void:classPartition   [ void:class     era:OperationalPoint;
                                void:entities  7456
                              ];
        void:classPartition   [ void:class     era:LinearElement;
                                void:entities  13442
                              ];
        void:classPartition   [ void:class     era:Tunnel;
                                void:entities  1353
                              ];
        void:classPartition   [ void:class     era:NetLinearReference;
                                void:entities  95811
                              ];
        void:classPartition   [ void:class     era:Siding;
                                void:entities  12462
                              ];
        void:classPartition   [ void:class     era:Bridge;
                                void:entities  3736
                              ];
        void:classPartition   [ void:class     era:RunningTrack;
                                void:entities  23943
                              ];
        void:classPartition   [ void:class     era:KilometricPost;
                                void:entities  11735
                              ];
        void:classPartition   [ void:class     era:Track;
                                void:entities  30296
                              ];
        void:classPartition   [ void:class     era:LinearPositioningSystem;
                                void:entities  29
                              ];
        void:classPartition   [ void:class     era:LevelCrossing;
                                void:entities  4848
                              ];
        void:classPartition   [ void:class     era:PlatformEdge;
                                void:entities  8403
                              ];
        void:classPartition   [ void:class     era:PrimaryLocation;
                                void:entities  7838
                              ];
        void:classPartition   [ void:class     era:HABD;
                                void:entities  5
                              ];
        void:classPartition   [ void:class     era:Switch;
                                void:entities  16572
                              ];
        void:classPartition   [ void:class     era:SectionOfLine;
                                void:entities  3956
                              ];
        void:uriSpace         "http://data.europa.eu/949/";
        void:vocabulary       era:;
        prov:wasAttributedTo  <#erawrap>;
        foaf:page             <https://www.era.europa.eu/domains/registers/era-knowledge-graph> .

<intersects>  hydra:operation  [ a                     hydra:Operation;
                                 hydra:method          "GET";
                                 hydra:possibleStatus  [ a                 hydra:Status;
                                                         hydra:statusCode  503
                                                       ];
                                 hydra:possibleStatus  [ a                 hydra:Status;
                                                         hydra:statusCode  304
                                                       ];
                                 hydra:possibleStatus  [ a                 hydra:Status;
                                                         rdfs:comment      "ERA's endpoint failed, with its reason."@en;
                                                         hydra:statusCode  502
                                                       ];
                                 hydra:possibleStatus  [ a                 hydra:Status;
                                                         rdfs:comment      "No, a malformed or a too large box (one square degree or more); a malformed typenames or limit; an unknown parameter."@en;
                                                         hydra:statusCode  400
                                                       ];
                                 hydra:possibleStatus  [ a                 hydra:Status;
                                                         hydra:statusCode  429
                                                       ];
                                 hydra:possibleStatus  [ a                 hydra:Status;
                                                         hydra:statusCode  406
                                                       ];
                                 hydra:possibleStatus  [ a                 hydra:Status;
                                                         hydra:statusCode  200
                                                       ];
                                 hydra:possibleStatus  [ a                 hydra:Status;
                                                         rdfs:comment      "HTML without bbox: to the map at the default box."@en;
                                                         hydra:statusCode  302
                                                       ];
                                 hydra:returnsHeader   "Cache-Control" , "Link" , "Last-Modified" , "ETag"
                               ] .

<#erawrap>  a         doap:Project , prov:SoftwareAgent;
        rdfs:label    "Linked ERA (erawrap)";
        doap:release  [ a              doap:Version;
                        doap:revision  "1.0.0-SNAPSHOT+cd80244"
                      ];
        foaf:page     <.> .

<concepts/>  a        ldp:BasicContainer;
        rdfs:comment  "ERA's code lists: 130 SKOS concept schemes in 126 lists (operational point types, line categories, gauging profiles, ...), the values RINF's enumerated properties point at."@en .

<>      hydra:search  [ a                             hydra:IriTemplate;
                        rdfs:comment                  "The ERA features whose geometry intersects the box (GeoSPARQL sfIntersects, tested exactly on each geometry by ERA's endpoint): the query <intersects?…#it> has geo:hasBoundingBox the box and geo:sfIntersects each feature found. Only features ERA gives a geometry are found. Formats: .json is an RFC 9264 linkset of the features' .json documents, .geojson the features inline (a FeatureCollection), .ttl/.nt/.rdf/.jsonld the RDF, .html the map. Bounded by work: a box of one square degree or more is a 400; an untyped search takes about 8 s upstream, a typed one under 1 s."@en;
                        hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                        rdfs:comment    "Keep the first n features by IRI; the answer says when there were more. Without it, every feature is listed."@en;
                                                        hydra:property  hydra:limit;
                                                        hydra:required  false;
                                                        hydra:variable  "limit";
                                                        sh:pattern      "^[1-9][0-9]*$"
                                                      ];
                        hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                        rdfs:comment    "One ERA class, by local name (PrimaryLocation, OperationalPoint, SectionOfLine, PlatformEdge, ...): only features of that class. A class ERA does not have finds nothing."@en;
                                                        skos:example    "PrimaryLocation";
                                                        hydra:property  void:class;
                                                        hydra:required  false;
                                                        hydra:variable  "typenames";
                                                        sh:pattern      "^[A-Z][A-Za-z]{1,63}$"
                                                      ];
                        hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                        rdfs:comment    "The form; without it, content negotiation (application/linkset+json or application/json: the linkset; application/geo+json: the features)."@en;
                                                        skos:example    "geojson";
                                                        hydra:required  false;
                                                        hydra:variable  "format";
                                                        sh:pattern      "^(json|geojson|ttl|nt|rdf|jsonld|html)$"
                                                      ];
                        hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                        rdfs:comment    "West,south,east,north in WGS84 degrees (CRS84 axis order: longitude first), under one square degree. Not mapped to a property yet: the family has no term for the W,S,E,N string."@en;
                                                        skos:example    "16.36,48.17,16.4,48.2";
                                                        hydra:required  true;
                                                        hydra:variable  "bbox";
                                                        sh:pattern      "^-?[0-9.]+,-?[0-9.]+,-?[0-9.]+,-?[0-9.]+$"
                                                      ];
                        hydra:template                "intersects{.format}{?bbox,typenames,limit}";
                        hydra:variableRepresentation  hydra:BasicRepresentation
                      ];
        ldp:contains  <concepts/> .
