diff --git a/.gitignore b/.gitignore index 5b384b8f..66b894cf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .idea/ *__pycache__ .DS_Store +venv diff --git a/ontology/documentation/ontology.jsonld b/ontology/documentation/ontology.jsonld index 3c69b994..78a2eaf6 100644 --- a/ontology/documentation/ontology.jsonld +++ b/ontology/documentation/ontology.jsonld @@ -8,24 +8,6 @@ "@id" : "http://w3id.org/rml/SubjectMap" } ] } ] -}, { - "@id" : "_:genid10", - "@type" : [ "http://www.w3.org/2002/07/owl#Class" ], - "http://www.w3.org/2002/07/owl#unionOf" : [ { - "@list" : [ { - "@id" : "http://w3id.org/rml/BlankNode" - }, { - "@id" : "http://w3id.org/rml/IRI" - }, { - "@id" : "http://w3id.org/rml/Literal" - }, { - "@id" : "http://w3id.org/rml/URI" - }, { - "@id" : "http://w3id.org/rml/UnsafeIRI" - }, { - "@id" : "http://w3id.org/rml/UnsafeURI" - } ] - } ] }, { "@id" : "_:genid4", "@type" : [ "http://www.w3.org/2002/07/owl#Class" ], @@ -41,9 +23,17 @@ "@type" : [ "http://www.w3.org/2002/07/owl#Class" ], "http://www.w3.org/2002/07/owl#unionOf" : [ { "@list" : [ { - "@id" : "http://w3id.org/rml/LanguageMap" + "@id" : "http://w3id.org/rml/BlankNode" + }, { + "@id" : "http://w3id.org/rml/IRI" + }, { + "@id" : "http://w3id.org/rml/Literal" + }, { + "@id" : "http://w3id.org/rml/URI" }, { - "@id" : "http://w3id.org/rml/TermMap" + "@id" : "http://w3id.org/rml/UnsafeIRI" + }, { + "@id" : "http://w3id.org/rml/UnsafeURI" } ] } ] }, { @@ -85,6 +75,22 @@ }, { "@id" : "http://purl.org/vocab/vann/preferredNamespaceUri", "@type" : [ "http://www.w3.org/2002/07/owl#AnnotationProperty" ] +}, { + "@id" : "http://w3id.org/rml/AbstractLogicalSource", + "@type" : [ "http://www.w3.org/2002/07/owl#Class" ], + "http://www.w3.org/2000/01/rdf-schema#comment" : [ { + "@language" : "en", + "@value" : "An iterable that can be associated with a triples map such that a data source can be mapped to RDF triples." + } ], + "http://www.w3.org/2000/01/rdf-schema#isDefinedBy" : [ { + "@id" : "http://w3id.org/rml/core/" + } ], + "http://www.w3.org/2000/01/rdf-schema#label" : [ { + "@value" : "Abstract Logical Source" + } ], + "http://www.w3.org/2000/01/rdf-schema#subClassOf" : [ { + "@id" : "http://w3id.org/rml/Iterable" + } ] }, { "@id" : "http://w3id.org/rml/BlankNode", "@type" : [ "http://www.w3.org/2002/07/owl#Class" ], @@ -172,6 +178,19 @@ "http://www.w3.org/2000/01/rdf-schema#label" : [ { "@value" : "IRI" } ] +}, { + "@id" : "http://w3id.org/rml/Iterable", + "@type" : [ "http://www.w3.org/2002/07/owl#Class" ], + "http://www.w3.org/2000/01/rdf-schema#comment" : [ { + "@language" : "en", + "@value" : "An abstract construct to describe data access and iteration for a data source." + } ], + "http://www.w3.org/2000/01/rdf-schema#isDefinedBy" : [ { + "@id" : "http://w3id.org/rml/core/" + } ], + "http://www.w3.org/2000/01/rdf-schema#label" : [ { + "@value" : "Iterable" + } ] }, { "@id" : "http://w3id.org/rml/Join", "@type" : [ "http://www.w3.org/2002/07/owl#Class" ], @@ -213,12 +232,6 @@ "http://www.w3.org/2000/01/rdf-schema#label" : [ { "@value" : "Literal" } ] -}, { - "@id" : "http://w3id.org/rml/LogicalSource", - "@type" : [ "http://www.w3.org/2002/07/owl#Class" ] -}, { - "@id" : "http://w3id.org/rml/LogicalTarget", - "@type" : [ "http://www.w3.org/2002/07/owl#Class" ] }, { "@id" : "http://w3id.org/rml/ObjectMap", "@type" : [ "http://www.w3.org/2002/07/owl#Class" ], @@ -293,6 +306,19 @@ "http://www.w3.org/2000/01/rdf-schema#label" : [ { "@value" : "Reference Object Map" } ] +}, { + "@id" : "http://w3id.org/rml/ReferenceFormulation", + "@type" : [ "http://www.w3.org/2002/07/owl#Class" ], + "http://www.w3.org/2000/01/rdf-schema#comment" : [ { + "@language" : "en", + "@value" : "Denotes a Reference Formulation." + } ], + "http://www.w3.org/2000/01/rdf-schema#isDefinedBy" : [ { + "@id" : "http://w3id.org/rml/core/" + } ], + "http://www.w3.org/2000/01/rdf-schema#label" : [ { + "@value" : "Reference Formulation" + } ] }, { "@id" : "http://w3id.org/rml/SubjectMap", "@type" : [ "http://www.w3.org/2002/07/owl#Class" ], @@ -594,6 +620,25 @@ "http://www.w3.org/2000/01/rdf-schema#range" : [ { "@id" : "http://w3id.org/rml/GraphMap" } ] +}, { + "@id" : "http://w3id.org/rml/iterator", + "@type" : [ "http://www.w3.org/2002/07/owl#DatatypeProperty" ], + "http://www.w3.org/2000/01/rdf-schema#comment" : [ { + "@language" : "en", + "@value" : "An expression qualified according to the reference formulation that defines a sequence of logical iterations on the data source." + } ], + "http://www.w3.org/2000/01/rdf-schema#domain" : [ { + "@id" : "http://w3id.org/rml/Iterable" + } ], + "http://www.w3.org/2000/01/rdf-schema#isDefinedBy" : [ { + "@id" : "http://w3id.org/rml/core/" + } ], + "http://www.w3.org/2000/01/rdf-schema#label" : [ { + "@value" : "iterator" + } ], + "http://www.w3.org/2000/01/rdf-schema#range" : [ { + "@id" : "http://www.w3.org/2001/XMLSchema#string" + } ] }, { "@id" : "http://w3id.org/rml/joinCondition", "@type" : [ "http://www.w3.org/2002/07/owl#ObjectProperty" ], @@ -665,25 +710,7 @@ "@value" : "logical source" } ], "http://www.w3.org/2000/01/rdf-schema#range" : [ { - "@id" : "http://w3id.org/rml/LogicalSource" - } ] -}, { - "@id" : "http://w3id.org/rml/logicalTarget", - "@type" : [ "http://www.w3.org/2002/07/owl#ObjectProperty" ], - "http://www.w3.org/2000/01/rdf-schema#comment" : [ { - "@value" : "Represents the logical target to where triples are exported to." - } ], - "http://www.w3.org/2000/01/rdf-schema#domain" : [ { - "@id" : "_:genid7" - } ], - "http://www.w3.org/2000/01/rdf-schema#isDefinedBy" : [ { - "@id" : "http://w3id.org/rml/core/" - } ], - "http://www.w3.org/2000/01/rdf-schema#label" : [ { - "@value" : "logical target" - } ], - "http://www.w3.org/2000/01/rdf-schema#range" : [ { - "@id" : "http://w3id.org/rml/LogicalTarget" + "@id" : "http://w3id.org/rml/AbstractLogicalSource" } ] }, { "@id" : "http://w3id.org/rml/object", @@ -700,9 +727,6 @@ } ], "http://www.w3.org/2000/01/rdf-schema#label" : [ { "@value" : "object" - } ], - "http://www.w3.org/2000/01/rdf-schema#range" : [ { - "@id" : "http://www.w3.org/2000/01/rdf-schema#Resource" } ] }, { "@id" : "http://w3id.org/rml/objectMap", @@ -849,6 +873,25 @@ "http://www.w3.org/2000/01/rdf-schema#range" : [ { "@id" : "http://www.w3.org/2001/XMLSchema#string" } ] +}, { + "@id" : "http://w3id.org/rml/referenceFormulation", + "@type" : [ "http://www.w3.org/2002/07/owl#ObjectProperty" ], + "http://www.w3.org/2000/01/rdf-schema#comment" : [ { + "@language" : "en", + "@value" : "The reference formulation used to refer to extracts of the source data. " + } ], + "http://www.w3.org/2000/01/rdf-schema#domain" : [ { + "@id" : "http://w3id.org/rml/Iterable" + } ], + "http://www.w3.org/2000/01/rdf-schema#isDefinedBy" : [ { + "@id" : "http://w3id.org/rml/core/" + } ], + "http://www.w3.org/2000/01/rdf-schema#label" : [ { + "@value" : "reference formulation" + } ], + "http://www.w3.org/2000/01/rdf-schema#range" : [ { + "@id" : "http://w3id.org/rml/ReferenceFormulation" + } ] }, { "@id" : "http://w3id.org/rml/subject", "@type" : [ "http://www.w3.org/2002/07/owl#ObjectProperty" ], @@ -920,7 +963,7 @@ "@value" : "term type" } ], "http://www.w3.org/2000/01/rdf-schema#range" : [ { - "@id" : "_:genid10" + "@id" : "_:genid7" } ] }, { "@id" : "http://www.linkedmodel.org/schema/vaem#acronym", @@ -928,9 +971,6 @@ }, { "@id" : "http://www.w3.org/2000/01/rdf-schema#Class", "@type" : [ "http://www.w3.org/2002/07/owl#Class" ] -}, { - "@id" : "http://www.w3.org/2000/01/rdf-schema#Resource", - "@type" : [ "http://www.w3.org/2002/07/owl#Class" ] }, { "@id" : "http://xmlns.com/foaf/0.1/name", "@type" : [ "http://www.w3.org/2002/07/owl#AnnotationProperty" ] diff --git a/ontology/documentation/ontology.nt b/ontology/documentation/ontology.nt index d8a41486..e3e35669 100644 --- a/ontology/documentation/ontology.nt +++ b/ontology/documentation/ontology.nt @@ -68,10 +68,10 @@ . # # http://w3id.org/rml/constant + . "A property for indicating whether a expression map is a constant-valued expression map."@en . . "constant" . - . . # # http://www.linkedmodel.org/schema/vaem#acronym @@ -177,34 +177,14 @@ _:genid4 . . - . - . + . "Represents the logical source to be mapped."@en . . "logical source" . # -# http://w3id.org/rml/logicalTarget - . - _:genid7 . -_:genid7 _:genid9 . -_:genid9 _:genid8 . -_:genid8 . -_:genid8 . -_:genid8 . -_:genid9 . -_:genid9 . -_:genid7 . - . - . - "Represents the logical target to where triples are exported to." . - . - "logical target" . -# # http://w3id.org/rml/object . . - . - . "Specifies the object for the generated triple from the logical source record."@en . . "object" . @@ -255,6 +235,14 @@ _:genid7 . "predicate object map" . # +# http://w3id.org/rml/referenceFormulation + . + . + . + "The reference formulation used to refer to extracts of the source data. "@en . + . + "reference formulation" . +# # http://w3id.org/rml/subject . . @@ -273,27 +261,27 @@ _:genid7 . . - _:genid10 . -_:genid10 _:genid16 . -_:genid16 _:genid15 . -_:genid15 _:genid14 . -_:genid14 _:genid13 . + _:genid7 . +_:genid7 _:genid13 . _:genid13 _:genid12 . _:genid12 _:genid11 . -_:genid11 . -_:genid11 . +_:genid11 _:genid10 . +_:genid10 _:genid9 . +_:genid9 _:genid8 . +_:genid8 . +_:genid8 . +_:genid8 . +_:genid9 . +_:genid9 . +_:genid10 . +_:genid10 . +_:genid11 . _:genid11 . -_:genid12 . +_:genid12 . _:genid12 . -_:genid13 . +_:genid13 . _:genid13 . -_:genid14 . -_:genid14 . -_:genid15 . -_:genid15 . -_:genid16 . -_:genid16 . -_:genid10 . +_:genid7 . "A string indicating whether subject or object generated using the value from a source record name specified should be an IRI/URI (safe or unsafe) reference, blank node, or a literal."@en . . "term type" . @@ -315,6 +303,14 @@ _:genid10 . "child" . # +# http://w3id.org/rml/iterator + . + . + . + "An expression qualified according to the reference formulation that defines a sequence of logical iterations on the data source."@en . + . + "iterator" . +# # http://w3id.org/rml/language . . @@ -356,6 +352,13 @@ _:genid10 . + . + "An iterable that can be associated with a triples map such that a data source can be mapped to RDF triples."@en . + . + "Abstract Logical Source" . +# # http://w3id.org/rml/BlankNode . "Denotes a blank node, used with termType"@en . @@ -395,6 +398,12 @@ _:genid10 . "IRI" . # +# http://w3id.org/rml/Iterable + . + "An abstract construct to describe data access and iteration for a data source."@en . + . + "Iterable" . +# # http://w3id.org/rml/Join . "Represents a join condition."@en . @@ -414,10 +423,6 @@ _:genid10 . "Literal" . # -# http://w3id.org/rml/LogicalSource -# -# http://w3id.org/rml/LogicalTarget -# # http://w3id.org/rml/ObjectMap . . @@ -451,6 +456,12 @@ _:genid10 . "Reference Object Map" . # +# http://w3id.org/rml/ReferenceFormulation + . + "Denotes a Reference Formulation."@en . + . + "Reference Formulation" . +# # http://w3id.org/rml/SubjectMap . . @@ -491,6 +502,4 @@ _:genid10 + + + + Ana Iglesias Molina + Anastasia Dimou + Ben de Meester + Christophe Debruyne + David Chaves Fraga + Dylan Van Assche + Franck Michel + Pano Maria + Samaneh Jozashoori + 2023-03-14 + Generic Mapping Language for RDF (RDB/CSV/TSV/XML/JSON/... to RDF) - Vocabulary description + + 2023-06-15 + + RML: Generic Mapping Language for RDF + draft + rml + http://w3id.org/rml/ + 0.1.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A property for indicating whether a expression map is a constant-valued expression map. + + constant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates the base IRI of the RDF graph to be created with a triples map. + + base IRI + + + + + + + + + + + Names a child map in the child source of a join. + + child map + + + + + + + + + + + The subject value generated for a logical source record will be asserted as an instance of this RDFS class. + + class + + + + + + + + + + Specifies the datatype of the object component for the generated triple. + + datatype + + + + + + + + + + + A DatatypetMap element to generate the datatype component of the object component from a logical source record. + + datatype map + + + + + + + + + + + + + + + + + An IRI reference for use as the graph name of all triples generated with the SubjectMap or PredicateObjectMap. + + graph + + + + + + + + + + + + + + + + + + Specifies a GraphMap. When used with a SubjectMap element, all the RDF triples generated from a logical row will be stored in the specified named graph. Otherwise, the RDF triple generated using the (predicate, object) pair will be stored in the specified named graph. + + graph map + + + + + + + + + + Specifies the join condition for joining the child logical source with the parent logical source of the foreign key constraint. + + join condition + + + + + + + + + + + A LanguagetMap element to generate the language tag of the object component from a logical source record. + + language map + + + + + + + + + + + Represents the logical source to be mapped. + + logical source + + + + + + + + + + Specifies the object for the generated triple from the logical source record. + + object + + + + + + + + + + An ObjectMap element to generate the object component of the (predicate, object) pair from a logical source record. + + object map + + + + + + + + + + + Names a parent map in the parent source of a join. + + parent map + + + + + + + + + + + Specifies the TriplesMap element corresponding to the parent logical source of the foreign key constraint. + + parent triples map + + + + + + + + + + Specifies the predicate for the generated triple from the logical source record. + + predicate + + + + + + + + + + + A PredicateMap element to generate the predicate component of the (predicate, object) pair from a logical source record. + + predicate map + + + + + + + + + + + A PredicateObjectMap element to generate (predicate, object) pair from a logical source record. + + predicate object map + + + + + + + + + + + The reference formulation used to refer to extracts of the source data. + + reference formulation + + + + + + + + + + An IRI reference for use as subject for all the RDF triples generated from a logical source record. + + subject + + + + + + + + + + + A SubjectMap element to generate a subject from a logical source record. + + subject map + + + + + + + + + + + + + + + + + + + + + + A string indicating whether subject or object generated using the value from a source record name specified should be an IRI/URI (safe or unsafe) reference, blank node, or a literal. + + term type + + + + + + + + + + + + + + + + + Names a source record in the child source of a join. + + child + + + + + + + + + + + An expression qualified according to the reference formulation that defines a sequence of logical iterations on the data source. + + iterator + + + + + + + + + + + Specified the language for the object component for the generated triple. + + language + + + + + + + + + + + Names a source record in the parent source of a join. + + parent + + + + + + + + + + + A valid expression that selects values from the source data. The reference should conform to the syntax rules/grammar of the specified Reference Formulation. + + reference + + + + + + + + + + + A template (format string) to specify how to generate a value for a expression map, using one or more records from a logical source record. + + template + + + + + + + + + + + + + + + + An iterable that can be associated with a triples map such that a data source can be mapped to RDF triples. + + Abstract Logical Source + + + + + + + + + Denotes a blank node, used with termType + + Blank Node + + + + + + + + + + Represents a child map + + Child Map + + + + + + + + + + Represents a datatype map + + Datatype Map + + + + + + + + + Represents an expression map + + Expression Map + + + + + + + + + + Represents a graph map. + + Graph Map + + + + + + + + + Denotes an IRI, used with termType. + + IRI + + + + + + + + + An abstract construct to describe data access and iteration for a data source. + + Iterable + + + + + + + + + Represents a join condition. + + Join + + + + + + + + + + Represents a language map + + Language Map + + + + + + + + + Denotes a Literal, used with termType. + + Literal + + + + + + + + + + Represents an object map. + + Object Map + + + + + + + + + + Represents a parent map + + Parent Map + + + + + + + + + + Represents a predicate map. + + Predicate Map + + + + + + + + + Represents a predicate-object map. + + Predicate Object Map + + + + + + + + + Denotes a reference to an object map. + + Reference Object Map + + + + + + + + + Denotes a Reference Formulation. + + Reference Formulation + + + + + + + + + + Represents a subject map. + + Subject Map + + + + + + + + + + A function that generates any number of RDF terms from a logical source record. + + Term Map + + + + + + + + + Represents a triples map. + + Triples Map + + + + + + + + + Denotes a URI, used with termType. + + URI + + + + + + + + + Denotes an unsafe IRI, used with termType. + + Unsafe IRI + + + + + + + + + Denotes an unsafe URI, used with termType. + + Unsafe URI + + + + + + + + + + + + + + + diff --git a/ontology/documentation/ontology.ttl b/ontology/documentation/ontology.ttl index 05ea653b..a5343caf 100644 --- a/ontology/documentation/ontology.ttl +++ b/ontology/documentation/ontology.ttl @@ -85,10 +85,10 @@ ### http://w3id.org/rml/constant - rdfs:comment "A property for indicating whether a expression map is a constant-valued expression map."@en ; + rdf:type owl:AnnotationProperty ; + rdfs:comment "A property for indicating whether a expression map is a constant-valued expression map."@en ; rdfs:isDefinedBy ; rdfs:label "constant" ; - rdf:type owl:AnnotationProperty ; rdfs:domain . @@ -192,29 +192,15 @@ ### http://w3id.org/rml/logicalSource rdf:type owl:ObjectProperty ; rdfs:domain ; - rdfs:range ; + rdfs:range ; rdfs:comment "Represents the logical source to be mapped."@en ; rdfs:isDefinedBy ; rdfs:label "logical source" . -### http://w3id.org/rml/logicalTarget - rdf:type owl:ObjectProperty ; - rdfs:domain [ rdf:type owl:Class ; - owl:unionOf ( - - ) - ] ; - rdfs:range ; - rdfs:comment "Represents the logical target to where triples are exported to." ; - rdfs:isDefinedBy ; - rdfs:label "logical target" . - - ### http://w3id.org/rml/object rdf:type owl:ObjectProperty ; rdfs:domain ; - rdfs:range rdfs:Resource ; rdfs:comment "Specifies the object for the generated triple from the logical source record."@en ; rdfs:isDefinedBy ; rdfs:label "object" . @@ -272,6 +258,15 @@ rdfs:label "predicate object map" . +### http://w3id.org/rml/referenceFormulation + rdf:type owl:ObjectProperty ; + rdfs:domain ; + rdfs:range ; + rdfs:comment "The reference formulation used to refer to extracts of the source data. "@en ; + rdfs:isDefinedBy ; + rdfs:label "reference formulation" . + + ### http://w3id.org/rml/subject rdf:type owl:ObjectProperty ; rdfs:domain ; @@ -319,6 +314,15 @@ rdfs:label "child" . +### http://w3id.org/rml/iterator + rdf:type owl:DatatypeProperty ; + rdfs:domain ; + rdfs:range xsd:string ; + rdfs:comment "An expression qualified according to the reference formulation that defines a sequence of logical iterations on the data source."@en ; + rdfs:isDefinedBy ; + rdfs:label "iterator" . + + ### http://w3id.org/rml/language rdf:type owl:DatatypeProperty ; rdfs:domain ; @@ -359,6 +363,14 @@ # Classes ################################################################# +### http://w3id.org/rml/AbstractLogicalSource + rdf:type owl:Class ; + rdfs:subClassOf ; + rdfs:comment "An iterable that can be associated with a triples map such that a data source can be mapped to RDF triples."@en ; + rdfs:isDefinedBy ; + rdfs:label "Abstract Logical Source" . + + ### http://w3id.org/rml/BlankNode rdf:type owl:Class ; rdfs:comment "Denotes a blank node, used with termType"@en ; @@ -404,6 +416,13 @@ rdfs:label "IRI" . +### http://w3id.org/rml/Iterable + rdf:type owl:Class ; + rdfs:comment "An abstract construct to describe data access and iteration for a data source."@en ; + rdfs:isDefinedBy ; + rdfs:label "Iterable" . + + ### http://w3id.org/rml/Join rdf:type owl:Class ; rdfs:comment "Represents a join condition."@en ; @@ -426,14 +445,6 @@ rdfs:label "Literal" . -### http://w3id.org/rml/LogicalSource - rdf:type owl:Class . - - -### http://w3id.org/rml/LogicalTarget - rdf:type owl:Class . - - ### http://w3id.org/rml/ObjectMap rdf:type owl:Class ; rdfs:subClassOf ; @@ -472,6 +483,13 @@ rdfs:label "Reference Object Map" . +### http://w3id.org/rml/ReferenceFormulation + rdf:type owl:Class ; + rdfs:comment "Denotes a Reference Formulation."@en ; + rdfs:isDefinedBy ; + rdfs:label "Reference Formulation" . + + ### http://w3id.org/rml/SubjectMap rdf:type owl:Class ; rdfs:subClassOf ; @@ -520,8 +538,4 @@ rdfs:Class rdf:type owl:Class . -### http://www.w3.org/2000/01/rdf-schema#Resource -rdfs:Resource rdf:type owl:Class . - - ### Generated by the OWL API (version 5.1.18) https://github.com/owlcs/owlapi/ diff --git a/ontology/documentation/resources/dark-mode-toggle.mjs b/ontology/documentation/resources/dark-mode-toggle.mjs new file mode 100644 index 00000000..e6fda594 --- /dev/null +++ b/ontology/documentation/resources/dark-mode-toggle.mjs @@ -0,0 +1,372 @@ +/** + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// @license © 2019 Google LLC. Licensed under the Apache License, Version 2.0. +const doc = document; +let store = {}; +try { + store = localStorage; +} catch (err) { + // Do nothing. The user probably blocks cookies. +} +const PREFERS_COLOR_SCHEME = 'prefers-color-scheme'; +const MEDIA = 'media'; +const LIGHT = 'light'; +const DARK = 'dark'; +const MQ_DARK = `(${PREFERS_COLOR_SCHEME}:${DARK})`; +const MQ_LIGHT = `(${PREFERS_COLOR_SCHEME}:${LIGHT})`; +const LINK_REL_STYLESHEET = 'link[rel=stylesheet]'; +const REMEMBER = 'remember'; +const LEGEND = 'legend'; +const TOGGLE = 'toggle'; +const SWITCH = 'switch'; +const APPEARANCE = 'appearance'; +const PERMANENT = 'permanent'; +const MODE = 'mode'; +const COLOR_SCHEME_CHANGE = 'colorschemechange'; +const PERMANENT_COLOR_SCHEME = 'permanentcolorscheme'; +const ALL = 'all'; +const NOT_ALL = 'not all'; +const NAME = 'dark-mode-toggle'; +const DEFAULT_URL = 'https://googlechromelabs.github.io/dark-mode-toggle/demo/'; + +// See https://html.spec.whatwg.org/multipage/common-dom-interfaces.html ↵ +// #reflecting-content-attributes-in-idl-attributes. +const installStringReflection = (obj, attrName, propName = attrName) => { + Object.defineProperty(obj, propName, { + enumerable: true, + get() { + const value = this.getAttribute(attrName); + return value === null ? '' : value; + }, + set(v) { + this.setAttribute(attrName, v); + }, + }); +}; + +const installBoolReflection = (obj, attrName, propName = attrName) => { + Object.defineProperty(obj, propName, { + enumerable: true, + get() { + return this.hasAttribute(attrName); + }, + set(v) { + if (v) { + this.setAttribute(attrName, ''); + } else { + this.removeAttribute(attrName); + } + }, + }); +}; + +const template = doc.createElement('template'); +// ⚠️ Note: this is a minified version of `src/template-contents.tpl`. +// Compress the CSS with https://cssminifier.com/, then paste it here. +// eslint-disable-next-line max-len +template.innerHTML = `
`; + +export class DarkModeToggle extends HTMLElement { + static get observedAttributes() { + return [MODE, APPEARANCE, PERMANENT, LEGEND, LIGHT, DARK, REMEMBER]; + } + + constructor() { + super(); + + installStringReflection(this, MODE); + installStringReflection(this, APPEARANCE); + installStringReflection(this, LEGEND); + installStringReflection(this, LIGHT); + installStringReflection(this, DARK); + installStringReflection(this, REMEMBER); + + installBoolReflection(this, PERMANENT); + + this._darkCSS = null; + this._lightCSS = null; + + doc.addEventListener(COLOR_SCHEME_CHANGE, (event) => { + this.mode = event.detail.colorScheme; + this._updateRadios(); + this._updateCheckbox(); + }); + + doc.addEventListener(PERMANENT_COLOR_SCHEME, (event) => { + this.permanent = event.detail.permanent; + this._permanentCheckbox.checked = this.permanent; + }); + + this._initializeDOM(); + } + + _initializeDOM() { + const shadowRoot = this.attachShadow({mode: 'open'}); + shadowRoot.append(template.content.cloneNode(true)); + + // We need to support `media="(prefers-color-scheme: dark)"` (with space) + // and `media="(prefers-color-scheme:dark)"` (without space) + this._darkCSS = doc.querySelectorAll( + `${LINK_REL_STYLESHEET}[${MEDIA}*=${PREFERS_COLOR_SCHEME}][${MEDIA}*="${DARK}"]`, + ); + this._lightCSS = doc.querySelectorAll( + `${LINK_REL_STYLESHEET}[${MEDIA}*=${PREFERS_COLOR_SCHEME}][${MEDIA}*="${LIGHT}"]`, + ); + + // Get DOM references. + this._lightRadio = shadowRoot.querySelector('[part=lightRadio]'); + this._lightLabel = shadowRoot.querySelector('[part=lightLabel]'); + this._darkRadio = shadowRoot.querySelector('[part=darkRadio]'); + this._darkLabel = shadowRoot.querySelector('[part=darkLabel]'); + this._darkCheckbox = shadowRoot.querySelector('[part=toggleCheckbox]'); + this._checkboxLabel = shadowRoot.querySelector('[part=toggleLabel]'); + this._legendLabel = shadowRoot.querySelector('legend'); + this._permanentAside = shadowRoot.querySelector('aside'); + this._permanentCheckbox = shadowRoot.querySelector( + '[part=permanentCheckbox]', + ); + this._permanentLabel = shadowRoot.querySelector('[part=permanentLabel]'); + } + + connectedCallback() { + // Does the browser support native `prefers-color-scheme`? + const hasNativePrefersColorScheme = matchMedia(MQ_DARK).media !== NOT_ALL; + // Listen to `prefers-color-scheme` changes. + if (hasNativePrefersColorScheme) { + matchMedia(MQ_DARK).addListener(({matches}) => { + if (this.permanent) { + return; + } + this.mode = matches ? DARK : LIGHT; + this._dispatchEvent(COLOR_SCHEME_CHANGE, {colorScheme: this.mode}); + }); + } + // Set initial state, giving preference to a remembered value, then the + // native value (if supported), and eventually defaulting to a light + // experience. + let rememberedValue = false; + try { + rememberedValue = store.getItem(NAME); + } catch (err) { + // Do nothing. The user probably blocks cookies. + } + if (rememberedValue && [DARK, LIGHT].includes(rememberedValue)) { + this.mode = rememberedValue; + this._permanentCheckbox.checked = true; + this.permanent = true; + } else if (hasNativePrefersColorScheme) { + this.mode = matchMedia(MQ_LIGHT).matches ? LIGHT : DARK; + } + if (!this.mode) { + this.mode = LIGHT; + } + if (this.permanent && !rememberedValue) { + try { + store.setItem(NAME, this.mode); + } catch (err) { + // Do nothing. The user probably blocks cookies. + } + } + + // Default to toggle appearance. + if (!this.appearance) { + this.appearance = TOGGLE; + } + + // Update the appearance to either of toggle or switch. + this._updateAppearance(); + + // Update the radios + this._updateRadios(); + + // Make the checkbox reflect the state of the radios + this._updateCheckbox(); + + // Synchronize the behavior of the radio and the checkbox. + [this._lightRadio, this._darkRadio].forEach((input) => { + input.addEventListener('change', () => { + this.mode = this._lightRadio.checked ? LIGHT : DARK; + this._updateCheckbox(); + this._dispatchEvent(COLOR_SCHEME_CHANGE, {colorScheme: this.mode}); + }); + }); + this._darkCheckbox.addEventListener('change', () => { + this.mode = this._darkCheckbox.checked ? DARK : LIGHT; + this._updateRadios(); + this._dispatchEvent(COLOR_SCHEME_CHANGE, {colorScheme: this.mode}); + }); + + // Make remembering the last mode optional + this._permanentCheckbox.addEventListener('change', () => { + this.permanent = this._permanentCheckbox.checked; + this._dispatchEvent(PERMANENT_COLOR_SCHEME, { + permanent: this.permanent, + }); + }); + + // Finally update the mode and let the world know what's going on + this._updateMode(); + this._dispatchEvent(COLOR_SCHEME_CHANGE, {colorScheme: this.mode}); + this._dispatchEvent(PERMANENT_COLOR_SCHEME, { + permanent: this.permanent, + }); + } + + attributeChangedCallback(name, oldValue, newValue) { + if (name === MODE) { + if (![LIGHT, DARK].includes(newValue)) { + throw new RangeError(`Allowed values: "${LIGHT}" and "${DARK}".`); + } + // Only show the dialog programmatically on devices not capable of hover + // and only if there is a label + if (matchMedia('(hover:none)').matches && this.remember) { + this._showPermanentAside(); + } + if (this.permanent) { + try { + store.setItem(NAME, this.mode); + } catch (err) { + // Do nothing. The user probably blocks cookies. + } + } + this._updateRadios(); + this._updateCheckbox(); + this._updateMode(); + } else if (name === APPEARANCE) { + if (![TOGGLE, SWITCH].includes(newValue)) { + throw new RangeError(`Allowed values: "${TOGGLE}" and "${SWITCH}".`); + } + this._updateAppearance(); + } else if (name === PERMANENT) { + if (this.permanent) { + if (this.mode) { + try { + store.setItem(NAME, this.mode); + } catch (err) { + // Do nothing. The user probably blocks cookies. + } + } + } else { + try { + store.removeItem(NAME); + } catch (err) { + // Do nothing. The user probably blocks cookies. + } + } + this._permanentCheckbox.checked = this.permanent; + } else if (name === LEGEND) { + this._legendLabel.textContent = newValue; + } else if (name === REMEMBER) { + this._permanentLabel.textContent = newValue; + } else if (name === LIGHT) { + this._lightLabel.textContent = newValue; + if (this.mode === LIGHT) { + this._checkboxLabel.textContent = newValue; + } + } else if (name === DARK) { + this._darkLabel.textContent = newValue; + if (this.mode === DARK) { + this._checkboxLabel.textContent = newValue; + } + } + } + + _dispatchEvent(type, value) { + this.dispatchEvent( + new CustomEvent(type, { + bubbles: true, + composed: true, + detail: value, + }), + ); + } + + _updateAppearance() { + // Hide or show the light-related affordances dependent on the appearance, + // which can be "switch" or "toggle". + const appearAsToggle = this.appearance === TOGGLE; + this._lightRadio.hidden = appearAsToggle; + this._lightLabel.hidden = appearAsToggle; + this._darkRadio.hidden = appearAsToggle; + this._darkLabel.hidden = appearAsToggle; + this._darkCheckbox.hidden = !appearAsToggle; + this._checkboxLabel.hidden = !appearAsToggle; + } + + _updateRadios() { + if (this.mode === LIGHT) { + this._lightRadio.checked = true; + } else { + this._darkRadio.checked = true; + } + } + + _updateCheckbox() { + if (this.mode === LIGHT) { + this._checkboxLabel.style.setProperty( + `--${NAME}-checkbox-icon`, + `var(--${NAME}-light-icon,url("${DEFAULT_URL}moon.png"))`, + ); + this._checkboxLabel.textContent = this.light; + if (!this.light) { + this._checkboxLabel.ariaLabel = DARK; + } + this._darkCheckbox.checked = false; + } else { + this._checkboxLabel.style.setProperty( + `--${NAME}-checkbox-icon`, + `var(--${NAME}-dark-icon,url("${DEFAULT_URL}sun.png"))`, + ); + this._checkboxLabel.textContent = this.dark; + if (!this.dark) { + this._checkboxLabel.ariaLabel = LIGHT; + } + this._darkCheckbox.checked = true; + } + } + + _updateMode() { + if (this.mode === LIGHT) { + this._lightCSS.forEach((link) => { + link.media = ALL; + link.disabled = false; + }); + this._darkCSS.forEach((link) => { + link.media = NOT_ALL; + link.disabled = true; + }); + } else { + this._darkCSS.forEach((link) => { + link.media = ALL; + link.disabled = false; + }); + this._lightCSS.forEach((link) => { + link.media = NOT_ALL; + link.disabled = true; + }); + } + } + + _showPermanentAside() { + this._permanentAside.style.visibility = 'visible'; + setTimeout(() => { + this._permanentAside.style.visibility = 'hidden'; + }, 3000); + } +} + +customElements.define(NAME, DarkModeToggle); diff --git a/ontology/documentation/resources/dark.css b/ontology/documentation/resources/dark.css new file mode 100644 index 00000000..3a9bba6c --- /dev/null +++ b/ontology/documentation/resources/dark.css @@ -0,0 +1,25 @@ +:root { + color-scheme: dark; + --bg-status-box: rgb(0, 90, 156); + --background-color: #3e3e42; + --border: white; + --htag-text: #83E9F0; + --bg-backlink: #6e6e67; + --text-backlink: white; + --text-color: rgb(240 240 240); + --shadow-color: rgb(240 240 240 / 50%); + --accent-color: rgb(0 0 240 / 50%); + --owl-bg-pre: rgb(15 15 15); + --link: #DDC1F2; + --link-visited: #BD7DEE; + --link-active: blue; + --href-hover: gray; + --bg-hlist: #67676E; + --bg-description: #535358; + --literal:#49C00D; + --type-ap: #EB4A4A; + --type-op: #75E1FC; + --type-dp: #75FA32; + --type-ni: #f3cdcd; +} + diff --git a/ontology/documentation/resources/extra.css b/ontology/documentation/resources/extra.css index 16689d3f..8d3fd795 100644 --- a/ontology/documentation/resources/extra.css +++ b/ontology/documentation/resources/extra.css @@ -3,13 +3,13 @@ body { } h1 { - line-height: 110%; + line-height: 110%; } .hlist { - border: 1px solid navy; + border: 1px solid var(--border); padding:5px; - background-color: #F4FFFF; + background-color: var(--bg-hlist); } .hlist li { @@ -21,7 +21,7 @@ h1 { } .entity { - border: 1px solid navy; + border: 1px solid var(--border); margin:5px 0px 5px 0px; padding: 5px; } @@ -33,22 +33,32 @@ h1 { .type-op { cursor:help; - color:navy; + color:var(--type-op); } .type-dp { cursor:help; - color:green; + color:var(--type-dp); +} + +.type-ep { + cursor:help; + color:mediumpurple; +} + +.type-ep { + cursor:help; + color:mediumpurple; } .type-ap { cursor:help; - color:maroon; + color:var(--type-ap); } .type-ni { cursor:help; - color:brown; + color:var(--type-ni); } .logic { @@ -59,7 +69,7 @@ h1 { h3 { margin-top: 3px; padding-bottom: 5px; - border-bottom: 1px solid navy; + border-bottom: 1px solid var(--border); } h2 { @@ -77,13 +87,13 @@ dt { .description { border-top: 1px dashed gray; border-bottom: 1px dashed gray; - background-color: rgb(242, 243, 244); + background-color: var(--bg-description); margin-top:5px; padding-bottom:5px; } .description dl { - background-color: rgb(242, 243, 244); + background-color: var(--bg-description); } .description ul { @@ -98,7 +108,8 @@ dt { color:black; padding: 2px; border: 1px dotted navy; - background-color: #F4FFFF; + background-color: var(--bg-backlink); + color: var(--text-backlink); } .imageblock { @@ -119,6 +130,6 @@ dt { } .literal { - color:green; + color:var(--literal); font-style:italic; } \ No newline at end of file diff --git a/ontology/documentation/resources/light.css b/ontology/documentation/resources/light.css new file mode 100644 index 00000000..f4a54957 --- /dev/null +++ b/ontology/documentation/resources/light.css @@ -0,0 +1,24 @@ +:root { + color-scheme: light; + --bg-status-box: rgb(0, 90, 156); + --background-color: white; + --border: navy; + --htag-text: #005A9C; + --bg-backlink: #F4FFFF; + --text-backlink: black; + --text-color: rgb(15 15 15); + --shadow-color: rgb(15 15 15 / 50%); + --accent-color: rgb(240 0 0 / 50%); + --owl-bg: #F9F9F9; + --link: #00c; + --link-visited: #609; + --link-active: #c00; + --href-hover: #ffa; + --bg-hlist: #F4FFFF; + --bg-description:rgb(242, 243, 244); + --literal:green; + --type-ap: maroon; + --type-op: navy; + --type-dp: green; + --type-ni: brown; +} diff --git a/ontology/documentation/resources/marked.min.js b/ontology/documentation/resources/marked.min.js index 17021ae9..50954cbb 100644 --- a/ontology/documentation/resources/marked.min.js +++ b/ontology/documentation/resources/marked.min.js @@ -1,6 +1,6 @@ /** * marked - a markdown parser - * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) - * https://github.com/chjj/marked + * Copyright (c) 2011-2022, Christopher Jeffrey. (MIT Licensed) + * https://github.com/markedjs/marked */ -(function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:cap[1]==="pre"||cap[1]==="script"||cap[1]==="style",text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=escape(this.smartypants(cap[0]));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/--/g,"").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1").replace(/'/g,"").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1").replace(/"/g,"").replace(/\.{3}/g,"")};InlineLexer.prototype.mangle=function(text){var out="",l=text.length,i=0,ch;for(;i.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"
"+(escaped?code:escape(code,true))+"\n
"}return'
'+(escaped?code:escape(code,true))+"\n
\n"};Renderer.prototype.blockquote=function(quote){return"
\n"+quote+"
\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"'+text+"\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+"\n"};Renderer.prototype.listitem=function(text){return"
  • "+text+"
  • \n"};Renderer.prototype.paragraph=function(text){return"

    "+text+"

    \n"};Renderer.prototype.table=function(header,body){return"\n"+"\n"+header+"\n"+"\n"+body+"\n"+"
    \n"};Renderer.prototype.tablerow=function(content){return"\n"+content+"\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+"\n"};Renderer.prototype.strong=function(text){return""+text+""};Renderer.prototype.em=function(text){return""+text+""};Renderer.prototype.codespan=function(text){return""+text+""};Renderer.prototype.br=function(){return this.options.xhtml?"
    ":"
    "};Renderer.prototype.del=function(text){return""+text+""};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0){return""}}var out='
    ";return out};Renderer.prototype.image=function(href,title,text){var out=''+text+'":">";return out};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;iAn error occured:

    "+escape(e.message+"",true)+"
    "}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}()); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).marked={})}(this,function(r){"use strict";function i(e,t){for(var u=0;ue.length)&&(t=e.length);for(var u=0,n=new Array(t);u=e.length?{done:!0}:{done:!1,value:e[u++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function e(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}r.defaults=e();function u(e){return t[e]}var n=/[&<>"']/,l=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,t={"&":"&","<":"<",">":">",'"':""","'":"'"};function D(e,t){if(t){if(n.test(e))return e.replace(l,u)}else if(a.test(e))return e.replace(o,u);return e}var c=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function x(e){return e.replace(c,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}var h=/(^|[^\[])\^/g;function p(u,e){u="string"==typeof u?u:u.source,e=e||"";var n={replace:function(e,t){return t=(t=t.source||t).replace(h,"$1"),u=u.replace(e,t),n},getRegex:function(){return new RegExp(u,e)}};return n}var f=/[^\w:]/g,Z=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function g(e,t,u){if(e){try{n=decodeURIComponent(x(u)).replace(f,"").toLowerCase()}catch(e){return null}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return null}var n;t&&!Z.test(u)&&(e=u,F[" "+(n=t)]||(O.test(n)?F[" "+n]=n+"/":F[" "+n]=k(n,"/",!0)),t=-1===(n=F[" "+n]).indexOf(":"),u="//"===e.substring(0,2)?t?e:n.replace(q,"$1")+e:"/"===e.charAt(0)?t?e:n.replace(L,"$1")+e:n+e);try{u=encodeURI(u).replace(/%25/g,"%")}catch(e){return null}return u}var F={},O=/^[^:]+:\/*[^/]*$/,q=/^([^:]+:)[\s\S]*$/,L=/^([^:]+:\/*[^/]*)[\s\S]*$/;var A={exec:function(){}};function d(e){for(var t,u,n=1;nt)u.splice(t);else for(;u.length>=1,e+=e;return u+e}function b(e,t,u,n){var r=t.href,t=t.title?D(t.title):null,i=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?(n.state.inLink=!0,e={type:"link",raw:u,href:r,title:t,text:i,tokens:n.inlineTokens(i,[])},n.state.inLink=!1,e):{type:"image",raw:u,href:r,title:t,text:D(i)}}var w=function(){function e(e){this.options=e||r.defaults}var t=e.prototype;return t.space=function(e){e=this.rules.block.newline.exec(e);if(e&&0=u.length?e.slice(u.length):e}).join("\n")}(t=e[0],e[3]||""),{type:"code",raw:t,lang:e[2]&&e[2].trim(),text:u}},t.heading=function(e){var t,u,e=this.rules.block.heading.exec(e);if(e)return t=e[2].trim(),/#$/.test(t)&&(u=k(t,"#"),!this.options.pedantic&&u&&!/ $/.test(u)||(t=u.trim())),u={type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:[]},this.lexer.inline(u.text,u.tokens),u},t.hr=function(e){e=this.rules.block.hr.exec(e);if(e)return{type:"hr",raw:e[0]}},t.blockquote=function(e){var t,e=this.rules.block.blockquote.exec(e);if(e)return t=e[0].replace(/^ *>[ \t]?/gm,""),{type:"blockquote",raw:e[0],tokens:this.lexer.blockTokens(t,[]),text:t}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var u,n,r,i,s,l,a,o,D,c,h,p=1<(g=t[1].trim()).length,f={type:"list",raw:"",ordered:p,start:p?+g.slice(0,-1):"",loose:!1,items:[]},g=p?"\\d{1,9}\\"+g.slice(-1):"\\"+g;this.options.pedantic&&(g=p?g:"[*+-]");for(var F=new RegExp("^( {0,3}"+g+")((?:[\t ][^\\n]*)?(?:\\n|$))");e&&(h=!1,t=F.exec(e))&&!this.rules.block.hr.test(e);){if(u=t[0],e=e.substring(u.length),a=t[2].split("\n",1)[0],o=e.split("\n",1)[0],this.options.pedantic?(i=2,c=a.trimLeft()):(i=t[2].search(/[^ ]/),c=a.slice(i=4=i||!a.trim())c+="\n"+a.slice(i);else{if(s)break;c+="\n"+a}s||a.trim()||(s=!0),u+=D+"\n",e=e.substring(D.length+1)}f.loose||(l?f.loose=!0:/\n *\n *$/.test(u)&&(l=!0)),this.options.gfm&&(n=/^\[[ xX]\] /.exec(c))&&(r="[ ] "!==n[0],c=c.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:u,task:!!n,checked:r,loose:!1,text:c}),f.raw+=u}f.items[f.items.length-1].raw=u.trimRight(),f.items[f.items.length-1].text=c.trimRight(),f.raw=f.raw.trimRight();for(var E=f.items.length,x=0;x/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):D(e[0]):e[0]}},t.link=function(e){e=this.rules.inline.link.exec(e);if(e){var t=e[2].trim();if(!this.options.pedantic&&/^$/.test(t))return;var u=k(t.slice(0,-1),"\\");if((t.length-u.length)%2==0)return}else{u=function(e,t){if(-1!==e.indexOf(t[1]))for(var u=e.length,n=0,r=0;r$/.test(t)?u.slice(1):u.slice(1,-1):u)&&u.replace(this.rules.inline._escapes,"$1"),title:r&&r.replace(this.rules.inline._escapes,"$1")},e[0],this.lexer)}},t.reflink=function(e,t){var u;if((u=this.rules.inline.reflink.exec(e))||(u=this.rules.inline.nolink.exec(e)))return(e=t[(e=(u[2]||u[1]).replace(/\s+/g," ")).toLowerCase()])&&e.href?b(u,e,u[0],this.lexer):{type:"text",raw:t=u[0].charAt(0),text:t}},t.emStrong=function(e,t,u){void 0===u&&(u="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!u.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var r=n[1]||n[2]||"";if(!r||""===u||this.rules.inline.punctuation.exec(u)){var i=n[0].length-1,s=i,l=0,a="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+i);null!=(n=a.exec(t));)if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])if(o=o.length,n[3]||n[4])s+=o;else if((n[5]||n[6])&&i%3&&!((i+o)%3))l+=o;else if(!(0<(s-=o))){var o=Math.min(o,o+s+l);if(Math.min(i,o)%2)return D=e.slice(1,i+n.index+o),{type:"em",raw:e.slice(0,i+n.index+o+1),text:D,tokens:this.lexer.inlineTokens(D,[])};var D=e.slice(2,i+n.index+o-1);return{type:"strong",raw:e.slice(0,i+n.index+o+1),text:D,tokens:this.lexer.inlineTokens(D,[])}}}}},t.codespan=function(e){var t,u,n,e=this.rules.inline.code.exec(e);if(e)return n=e[2].replace(/\n/g," "),t=/[^ ]/.test(n),u=/^ /.test(n)&&/ $/.test(n),n=D(n=t&&u?n.substring(1,n.length-1):n,!0),{type:"codespan",raw:e[0],text:n}},t.br=function(e){e=this.rules.inline.br.exec(e);if(e)return{type:"br",raw:e[0]}},t.del=function(e){e=this.rules.inline.del.exec(e);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2],[])}},t.autolink=function(e,t){var u,e=this.rules.inline.autolink.exec(e);if(e)return t="@"===e[2]?"mailto:"+(u=D(this.options.mangle?t(e[1]):e[1])):u=D(e[1]),{type:"link",raw:e[0],text:u,href:t,tokens:[{type:"text",raw:u,text:u}]}},t.url=function(e,t){var u,n,r,i;if(u=this.rules.inline.url.exec(e)){if("@"===u[2])r="mailto:"+(n=D(this.options.mangle?t(u[0]):u[0]));else{for(;i=u[0],u[0]=this.rules.inline._backpedal.exec(u[0])[0],i!==u[0];);n=D(u[0]),r="www."===u[1]?"http://"+n:n}return{type:"link",raw:u[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},t.inlineText=function(e,t){e=this.rules.inline.text.exec(e);if(e)return t=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):D(e[0]):e[0]:D(this.options.smartypants?t(e[0]):e[0]),{type:"text",raw:e[0],text:t}},e}(),y={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:A,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/},v=(y.def=p(y.def).replace("label",y._label).replace("title",y._title).getRegex(),y.bullet=/(?:[*+-]|\d{1,9}[.)])/,y.listItemStart=p(/^( *)(bull) */).replace("bull",y.bullet).getRegex(),y.list=p(y.list).replace(/bull/g,y.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+y.def.source+")").getRegex(),y._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",y._comment=/|$)/,y.html=p(y.html,"i").replace("comment",y._comment).replace("tag",y._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),y.paragraph=p(y._paragraph).replace("hr",y.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",y._tag).getRegex(),y.blockquote=p(y.blockquote).replace("paragraph",y.paragraph).getRegex(),y.normal=d({},y),y.gfm=d({},y.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),y.gfm.table=p(y.gfm.table).replace("hr",y.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",y._tag).getRegex(),y.gfm.paragraph=p(y._paragraph).replace("hr",y.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",y.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",y._tag).getRegex(),y.pedantic=d({},y.normal,{html:p("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",y._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:A,paragraph:p(y.normal._paragraph).replace("hr",y.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",y.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()}),{escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:A,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:A,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",v.punctuation=p(v.punctuation).replace(/punctuation/g,v._punctuation).getRegex(),v.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,v.escapedEmSt=/\\\*|\\_/g,v._comment=p(y._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),v.emStrong.lDelim=p(v.emStrong.lDelim).replace(/punct/g,v._punctuation).getRegex(),v.emStrong.rDelimAst=p(v.emStrong.rDelimAst,"g").replace(/punct/g,v._punctuation).getRegex(),v.emStrong.rDelimUnd=p(v.emStrong.rDelimUnd,"g").replace(/punct/g,v._punctuation).getRegex(),v._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,v._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,v._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,v.autolink=p(v.autolink).replace("scheme",v._scheme).replace("email",v._email).getRegex(),v._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,v.tag=p(v.tag).replace("comment",v._comment).replace("attribute",v._attribute).getRegex(),v._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,v._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,v._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,v.link=p(v.link).replace("label",v._label).replace("href",v._href).replace("title",v._title).getRegex(),v.reflink=p(v.reflink).replace("label",v._label).replace("ref",y._label).getRegex(),v.nolink=p(v.nolink).replace("ref",y._label).getRegex(),v.reflinkSearch=p(v.reflinkSearch,"g").replace("reflink",v.reflink).replace("nolink",v.nolink).getRegex(),v.normal=d({},v),v.pedantic=d({},v.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",v._label).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",v._label).getRegex()}),v.gfm=d({},v.normal,{escape:p(v.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\'+(u?e:D(e,!0))+"\n":"
    "+(u?e:D(e,!0))+"
    \n"},t.blockquote=function(e){return"
    \n"+e+"
    \n"},t.html=function(e){return e},t.heading=function(e,t,u,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},t.list=function(e,t,u){var n=t?"ol":"ul";return"<"+n+(t&&1!==u?' start="'+u+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return"\n\n"+e+"\n"+(t=t&&""+t+"")+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var u=t.header?"th":"td";return(t.align?"<"+u+' align="'+t.align+'">':"<"+u+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,u){if(null===(e=g(this.options.sanitize,this.options.baseUrl,e)))return u;e='
    "},t.image=function(e,t,u){if(null===(e=g(this.options.sanitize,this.options.baseUrl,e)))return u;e=''+u+'":">"},t.text=function(e){return e},e}(),S=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,u){return""+u},t.image=function(e,t,u){return""+u},t.br=function(){return""},e}(),T=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var u=e,n=0;if(this.seen.hasOwnProperty(u))for(n=this.seen[e];u=e+"-"+ ++n,this.seen.hasOwnProperty(u););return t||(this.seen[e]=n,this.seen[u]=0),u},t.slug=function(e,t){void 0===t&&(t={});e=this.serialize(e);return this.getNextSafeSlug(e,t.dryrun)},e}(),R=function(){function u(e){this.options=e||r.defaults,this.options.renderer=this.options.renderer||new $,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new S,this.slugger=new T}u.parse=function(e,t){return new u(t).parse(e)},u.parseInline=function(e,t){return new u(t).parseInline(e)};var e=u.prototype;return e.parse=function(e,t){void 0===t&&(t=!0);for(var u,n,r,i,s,l,a,o,D,c,h,p,f,g,F,A,d="",C=e.length,k=0;kAn error occurred:

    "+D(e.message+"",!0)+"
    ";throw e}}I.options=I.setOptions=function(e){return d(I.defaults,e),e=I.defaults,r.defaults=e,I},I.getDefaults=e,I.defaults=r.defaults,I.use=function(){for(var e=arguments.length,t=new Array(e),u=0;uAn error occurred:

    "+D(e.message+"",!0)+"
    ";throw e}},I.Parser=R,I.parser=R.parse,I.Renderer=$,I.TextRenderer=S,I.Lexer=z,I.lexer=z.lex,I.Tokenizer=w,I.Slugger=T;var A=(I.parse=I).options,P=I.setOptions,Q=I.use,U=I.walkTokens,M=I.parseInline,N=I,X=R.parse,G=z.lex;r.Lexer=z,r.Parser=R,r.Renderer=$,r.Slugger=T,r.TextRenderer=S,r.Tokenizer=w,r.getDefaults=e,r.lexer=G,r.marked=I,r.options=A,r.parse=N,r.parseInline=M,r.parser=X,r.setOptions=P,r.use=Q,r.walkTokens=U,Object.defineProperty(r,"__esModule",{value:!0})}); diff --git a/ontology/documentation/resources/moon.svg b/ontology/documentation/resources/moon.svg new file mode 100644 index 00000000..fad89a4e --- /dev/null +++ b/ontology/documentation/resources/moon.svg @@ -0,0 +1,7 @@ + + + + moon + + + diff --git a/ontology/documentation/resources/owl.css b/ontology/documentation/resources/owl.css index 9c008760..c4d6f2c7 100644 --- a/ontology/documentation/resources/owl.css +++ b/ontology/documentation/resources/owl.css @@ -8,7 +8,7 @@ font-size: 95%; } #abstract br { - /* doesn't work right SOMETIMES + /* doesn't work right SOMETIMES margin-bottom: 1em; */ } .name { @@ -21,7 +21,7 @@ padding-right: 1ex; padding-top: 1ex; padding-bottom: 0.6ex; - border: 1px dotted black; + border: 1px dotted black; } .grammar { margin-top: 1ex; @@ -59,7 +59,7 @@ background-color: #FFA; } .atrisknotehead { - font-style: italic; + font-style: italic; } /* Stying the examples. */ @@ -87,15 +87,15 @@ /* Styling the parts in the functional-style syntax. */ div.fss { - margin-top: 10px; - margin-bottom: 10px; - margin-left: 20px; - margin-right: 20px; + margin-top: 10px; + margin-bottom: 10px; + margin-left: 20px; + margin-right: 20px; font-family: monospace; } table.fss { - margin: 0px 0px 0px 0px; - padding: 0px 0px 0px 0px; + margin: 0px 0px 0px 0px; + padding: 0px 0px 0px 0px; width: 100%; } table.fss caption.fss { @@ -111,8 +111,8 @@ table.fss td:first-child { width: 60%; } table{ - background-color: #f4ffff; - border: 1px solid navy; + background-color: var(--bg-hlist); + border: 1px solid var(--border); margin: 20px; vertical-align: middle; } @@ -124,15 +124,15 @@ table td { /* Styling the parts in the RDF syntax. */ div.rdf{ - margin-top: 10px; - margin-bottom: 10px; - margin-left: 20px; - margin-right: 20px; + margin-top: 10px; + margin-bottom: 10px; + margin-left: 20px; + margin-right: 20px; font-family: monospace; } table.rdf { - margin: 0px 0px 0px 0px; - padding: 0px 0px 0px 0px; + margin: 0px 0px 0px 0px; + padding: 0px 0px 0px 0px; width: 100%; } table.rdf caption.rdf { @@ -151,17 +151,17 @@ table.rdf td:first-child { /* Styling the XML syntax. */ div.xmlsyn { - margin-top: 10px; - margin-bottom: 10px; - margin-left: 20px; - margin-right: 20px; + margin-top: 10px; + margin-bottom: 10px; + margin-left: 20px; + margin-right: 20px; font-family: monospace; } div.axioms { - margin-top: 10px; - margin-bottom: 10px; - margin-left: 20px; - margin-right: 20px; + margin-top: 10px; + margin-bottom: 10px; + margin-left: 20px; + margin-right: 20px; } /* Other styles. */ @@ -211,7 +211,7 @@ table.canonicalparsing td.two { /* override mediawiki's beautiful DL styling... */ dl { - background: white; + background: var(--background-color); width: 100%; border: none; margin-top: 0; @@ -225,7 +225,7 @@ div { margin-bottom: 0; } #fulltitle { - font-size: 140%; + font-size: 140%; font-weight: bold; } @@ -240,9 +240,9 @@ color: red /* just copying from wiki, so it stays through TR. Currently affects Primer, at least */ pre { - background-color:#F9F9F9; + background-color: var(--owl-bg); border:1px dashed #2F6FAB; - color:black; + color:var(--text-color); line-height:1.1em; padding:1em; } \ No newline at end of file diff --git a/ontology/documentation/resources/primer.css b/ontology/documentation/resources/primer.css index 3136dac0..5a73ae3a 100644 --- a/ontology/documentation/resources/primer.css +++ b/ontology/documentation/resources/primer.css @@ -84,7 +84,7 @@ div.fssyntax pre, div.rdfxml pre, div.owlxml pre, div.turtle pre, div.manchester /* The actual status box */ .status div { display: block; - background: rgb(0, 90, 156); + background: var(--bg-status-box); color: white; width: 24em; padding-top: 0.3em; diff --git a/ontology/documentation/resources/rdf.icon b/ontology/documentation/resources/rdf.icon new file mode 100644 index 00000000..d54310fe Binary files /dev/null and b/ontology/documentation/resources/rdf.icon differ diff --git a/ontology/documentation/resources/rec.css b/ontology/documentation/resources/rec.css index d8a1ff2d..0413b0c1 100644 --- a/ontology/documentation/resources/rec.css +++ b/ontology/documentation/resources/rec.css @@ -11,16 +11,27 @@ body { padding: 2em 1em 2em 70px; margin: 0; font-family: sans-serif; - color: black; - background: white; + color: var(--text-color); + background: var(--background-color); background-position: top left; background-attachment: fixed; background-repeat: no-repeat; counter-reset:section; } -:link { color: #00C; background: transparent } -:visited { color: #609; background: transparent } -a:active { color: #C00; background: transparent } +details:hover { + cursor: pointer; +} + +iframe { + margin:auto; + display:block; + width:100%; + height:500px; +} + +:link { color: var(--link); background: transparent } +:visited { color: var(--link-visited); background: transparent } +a:active { color: var(--link-active); background: transparent } a:link img, a:visited img { border-style: none } /* no border on img links */ @@ -41,7 +52,7 @@ h3.list:before{counter-increment:subsection;content: counter(section) "." counte h3.list{margin-top: 20px; border-bottom: 0px; } /* background should be transparent, but WebTV has a bug */ -h1, h2, h3 { color: #005A9C; background: white } +h1, h2, h3 { color: var(--htag-text); background: var(--background-color) } h1 { font: 170% sans-serif } h2 { font: 140% sans-serif } h3 { font: 120% sans-serif } @@ -59,7 +70,7 @@ p.copyright { font-size: small } p.copyright small { font-size: small } @media screen { /* hide from IE3 */ -a[href]:hover { background: #ffa } +a[href]:hover { background: var(--href-hover) } } pre { margin-left: 2em } diff --git a/ontology/documentation/resources/slider.css b/ontology/documentation/resources/slider.css new file mode 100644 index 00000000..a6aa55c9 --- /dev/null +++ b/ontology/documentation/resources/slider.css @@ -0,0 +1,78 @@ +.darkmode { + position: fixed; + left: 0px; + bottom: 0px; +} + +dark-mode-toggle.slider::part(toggleLabel) { + display: inline-block; + position: relative; + height: calc(var(--dark-mode-toggle-icon-size, 1rem) * 2); + width: calc(var(--dark-mode-toggle-icon-size, 1rem) * 3.5); + background-color: #b7bbbd; + border-radius: var(--dark-mode-toggle-icon-size, 1rem); + transition: 0.4s; +} + +dark-mode-toggle.slider[mode="dark"]::part(toggleLabel) { + background-color: #4e5255; +} + +dark-mode-toggle.slider::part(toggleLabel)::before { + display: flex; + align-items: center; + justify-content: center; + position: absolute; + top: calc(var(--dark-mode-toggle-icon-size, 1rem) * 0.25); + left: calc(var(--dark-mode-toggle-icon-size, 1rem) * 0.25); + height: calc(var(--dark-mode-toggle-icon-size, 1rem) * 1.5); + width: calc(var(--dark-mode-toggle-icon-size, 1rem) * 1.5); + border-radius: 100%; + box-shadow: 0 0.15em 0.3em rgb(0 0 0 / 15%), 0 0.2em 0.5em rgb(0 0 0 / 30%); + background-color: #fff; + color: #333; + transition: 0.4s; + content: ""; + background-position: center; + background-size: var(--dark-mode-toggle-icon-size, 1rem); + background-image: var(--dark-mode-toggle-light-icon, url("sun.svg")); + box-sizing: border-box; +} + +dark-mode-toggle.slider[mode="dark"]::part(toggleLabel)::before { + left: calc(100% - var(--dark-mode-toggle-icon-size, 1rem) * 1.75); + border-color: #000; + background-color: #ccc; + color: #000; + background-size: var(--dark-mode-toggle-icon-size, 1rem); + background-image: var(--dark-mode-toggle-dark-icon, url("moon.svg")); + filter: var(--dark-mode-toggle-icon-filter, invert(100%)); + box-shadow: 0 0.5px hsl(0deg 0% 100% / 16%); +} + +dark-mode-toggle.slider::part(toggleLabel)::after { + display: flex; + align-items: center; + justify-content: center; + position: absolute; + top: calc(var(--dark-mode-toggle-icon-size, 1rem) * 0.25); + left: calc(100% - var(--dark-mode-toggle-icon-size, 1rem) * 1.75); + height: calc(var(--dark-mode-toggle-icon-size, 1rem) * 1.5); + width: calc(var(--dark-mode-toggle-icon-size, 1rem) * 1.5); + border-radius: 100%; + color: #333; + content: ""; + background-position: center; + background-size: var(--dark-mode-toggle-icon-size, 1rem); + background-image: var(--dark-mode-toggle-dark-icon, url("moon.svg")); + background-repeat: no-repeat; + box-sizing: border-box; + opacity: 0.5; +} + +dark-mode-toggle.slider[mode="dark"]::part(toggleLabel)::after { + left: calc(var(--dark-mode-toggle-icon-size, 1rem) * 0.25); + background-image: var(--dark-mode-toggle-light-icon, url("sun.svg")); + filter: var(--dark-mode-toggle-icon-filter, invert(100%)); +} + diff --git a/ontology/documentation/resources/sun.svg b/ontology/documentation/resources/sun.svg new file mode 100644 index 00000000..0b18941c --- /dev/null +++ b/ontology/documentation/resources/sun.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ontology/documentation/sections/abstract-en.html b/ontology/documentation/sections/abstract-en.html deleted file mode 100644 index a0c8212a..00000000 --- a/ontology/documentation/sections/abstract-en.html +++ /dev/null @@ -1,4 +0,0 @@ -

    Abstract

    - This document defines the RML-Core module belonging to the [RML ontology network](https://w3id.org/rml/portal). - A detailed description of the use of this module can be found in the [RML-Core specification](https://w3id.org/rml/core/spec). - diff --git a/ontology/documentation/sections/crossref-en.html b/ontology/documentation/sections/crossref-en.html index 8bc3ea80..cf697917 100644 --- a/ontology/documentation/sections/crossref-en.html +++ b/ontology/documentation/sections/crossref-en.html @@ -3,12 +3,14 @@

    Cross-reference for RML: Generic Mapping La

    Classes

    +
    +

    Abstract Logical Sourcec back to ToC or Class ToC

    +

    IRI: http://w3id.org/rml/AbstractLogicalSource

    +
    + An iterable that can be associated with a triples map such that a data source can be mapped to RDF triples. +
    +
    +
    + Is defined by +
    +
    + http://w3id.org/rml/core/ +
    +
    +
    +
    + has super-classes +
    +
    + Iterable c +
    +
    + is in range of +
    +
    + logical source op +
    +
    +

    Blank Nodec back to ToC or Class ToC

    IRI: http://w3id.org/rml/BlankNode

    @@ -170,6 +202,35 @@

    IRIc back to

    +
    +

    Iterablec back to ToC or Class ToC

    +

    IRI: http://w3id.org/rml/Iterable

    +
    + An abstract construct to describe data access and iteration for a data source. +
    +
    +
    + Is defined by +
    +
    + http://w3id.org/rml/core/ +
    +
    +
    +
    + has sub-classes +
    +
    + Abstract Logical Source c +
    +
    + is in domain of +
    +
    + iterator dp, reference formulation op +
    +
    +

    Joinc back to ToC or Class ToC

    IRI: http://w3id.org/rml/Join

    @@ -220,12 +281,6 @@

    Language Mapc Expression Map c -
    - is in domain of -
    -
    - logical target op -
    is in range of
    @@ -365,6 +420,29 @@

    Predicate Object Mapc +

    Reference Formulationc back to ToC or Class ToC

    +

    IRI: http://w3id.org/rml/ReferenceFormulation

    +
    + Denotes a Reference Formulation. +
    +
    +
    + Is defined by +
    +
    + http://w3id.org/rml/core/ +
    +
    +
    +
    + is in range of +
    +
    + reference formulation op +
    +
    +

    Reference Object Mapc back to ToC or Class ToC

    IRI: http://w3id.org/rml/RefObjectMap

    @@ -454,7 +532,7 @@

    Term Mapc ba is in domain of
    - logical target op, term type op + term type op

    @@ -545,7 +623,6 @@

    Object Properties

  • join condition
  • language map
  • logical source
  • -
  • logical target
  • object
  • object map
  • parent map
  • @@ -553,6 +630,7 @@

    Object Properties

  • predicate
  • predicate map
  • predicate object map
  • +
  • reference formulation
  • subject
  • subject map
  • term type
  • @@ -838,38 +916,7 @@

    logical sourceop
    - Logical Source c -
    - -

    - -
    -

    logical targetop back to ToC or Object Property ToC

    -

    IRI: http://w3id.org/rml/logicalTarget

    -
    - Represents the logical target to where triples are exported to. -
    -
    -
    - Is defined by -
    -
    - http://w3id.org/rml/core/ -
    -
    -
    -
    -
    - has domain -
    -
    - Language Map c or Term Map c -
    -
    - has range -
    -
    - Logical Target c + Abstract Logical Source c
    @@ -896,12 +943,6 @@

    objectop Predicate Object Map c -
    - has range -
    -
    - Resource c -

    @@ -1079,6 +1120,37 @@

    predicate object mapop +
    +

    reference formulationop back to ToC or Object Property ToC

    +

    IRI: http://w3id.org/rml/referenceFormulation

    +
    + The reference formulation used to refer to extracts of the source data. +
    +
    +
    + Is defined by +
    +
    + http://w3id.org/rml/core/ +
    +
    +
    +
    +
    + has domain +
    +
    + Iterable c +
    +
    + has range +
    +
    + Reference Formulation c +
    +
    +
    +

    subjectop back to ToC or Object Property ToC

    IRI: http://w3id.org/rml/subject

    @@ -1170,6 +1242,7 @@

    term typeop Data Properties

    languagedp back to ToC or Data Property ToC

    IRI: http://w3id.org/rml/language

    diff --git a/ontology/documentation/sections/introduction-en.html b/ontology/documentation/sections/introduction-en.html deleted file mode 100644 index 50ab68e8..00000000 --- a/ontology/documentation/sections/introduction-en.html +++ /dev/null @@ -1,22 +0,0 @@ -
    -

    Namespace declarations

    -
    - - - - - - - - - - - - - - - - -
    Table 1: Namespaces used in the document
    [Ontology NS Prefix]<http://w3id.org/rml>
    cc<http://creativecommons.org/ns>
    vaem<http://www.linkedmodel.org/schema/vaem>
    owl<http://www.w3.org/2002/07/owl>
    rdf<http://www.w3.org/1999/02/22-rdf-syntax-ns>
    xml<http://www.w3.org/XML/1998/namespace>
    xsd<http://www.w3.org/2001/XMLSchema>
    rdfs<http://www.w3.org/2000/01/rdf-schema>
    vann<http://purl.org/vocab/vann>
    foaf<http://xmlns.com/foaf/0.1>
    dc<http://purl.org/dc/elements/1.1>
    -
    -
    diff --git a/ontology/documentation/sections/overview-en.html b/ontology/documentation/sections/overview-en.html index 60578922..17681c61 100644 --- a/ontology/documentation/sections/overview-en.html +++ b/ontology/documentation/sections/overview-en.html @@ -5,6 +5,9 @@

    Classes

      +
    • + Abstract Logical Source +
    • Blank Node
    • @@ -23,6 +26,9 @@

      Classes

    • IRI
    • +
    • + Iterable +
    • Join
    • @@ -44,6 +50,9 @@

      Classes

    • Predicate Object Map
    • +
    • + Reference Formulation +
    • Reference Object Map
    • @@ -98,9 +107,6 @@

      Classes

    • logical source
    • -
    • - logical target -
    • object
    • @@ -122,6 +128,9 @@

      Classes

    • predicate object map
    • +
    • + reference formulation +
    • subject
    • @@ -137,6 +146,9 @@

      Classes

    • child
    • +
    • + iterator +
    • language
    • diff --git a/ontology/documentation/sections/references-en.html b/ontology/documentation/sections/references-en.html deleted file mode 100644 index 2093dc4b..00000000 --- a/ontology/documentation/sections/references-en.html +++ /dev/null @@ -1,5 +0,0 @@ - -

      References back to ToC

      - -Add your references here. It is recommended to have them as a list. - diff --git a/ontology/rml-core.owl b/ontology/rml-core.owl index 5e32aa72..76290b44 100644 --- a/ontology/rml-core.owl +++ b/ontology/rml-core.owl @@ -5,34 +5,34 @@ @prefix rdf: . @prefix xml: . @prefix xsd: . +@prefix bibo: . @prefix foaf: . @prefix rdfs: . @prefix vaem: . @prefix vann: . -@prefix bibo: . @base . rdf:type owl:Ontology ; - dc:description "Generic Mapping Language for RDF (RDB/CSV/TSV/XML/JSON/... to RDF) - Vocabulary description"@en ; - dc:title "RML: Generic Mapping Language for RDF"@en ; - dc:contributor "Anastasia Dimou" ; - dc:contributor "Pano Maria" ; - dc:contributor "Ben de Meester" ; - dc:contributor "Franck Michel" ; - dc:contributor "David Chaves Fraga" ; - dc:contributor "Christophe Debruyne" ; - dc:contributor "Samaneh Jozashoori" ; - dc:contributor "Dylan Van Assche" ; - dc:contributor "Ana Iglesias Molina" ; - dc:license ; - vann:preferredNamespaceUri "http://w3id.org/rml/" ; - vann:preferredNamespacePrefix "rml" ; - dc:publisher ; - bibo:status "draft" ; - owl:versionIRI ; - owl:versionInfo "0.1.0" ; - dc:created "2023-03-14" ; - dc:modified "2023-06-15" . + owl:versionIRI ; + dc:contributor "Ana Iglesias Molina" , + "Anastasia Dimou" , + "Ben de Meester" , + "Christophe Debruyne" , + "David Chaves Fraga" , + "Dylan Van Assche" , + "Franck Michel" , + "Pano Maria" , + "Samaneh Jozashoori" ; + dc:created "2023-03-14" ; + dc:description "Generic Mapping Language for RDF (RDB/CSV/TSV/XML/JSON/... to RDF) - Vocabulary description"@en ; + dc:license ; + dc:modified "2023-06-15" ; + dc:publisher ; + dc:title "RML: Generic Mapping Language for RDF"@en ; + bibo:status "draft" ; + vann:preferredNamespacePrefix "rml" ; + vann:preferredNamespaceUri "http://w3id.org/rml/" ; + owl:versionInfo "0.1.0" . ################################################################# # Annotation properties @@ -46,6 +46,10 @@ cc:license rdf:type owl:AnnotationProperty . dc:contributor rdf:type owl:AnnotationProperty . +### http://purl.org/dc/terms/created +dc:created rdf:type owl:AnnotationProperty . + + ### http://purl.org/dc/terms/creator dc:creator rdf:type owl:AnnotationProperty . @@ -58,6 +62,10 @@ dc:description rdf:type owl:AnnotationProperty . dc:issued rdf:type owl:AnnotationProperty . +### http://purl.org/dc/terms/license +dc:license rdf:type owl:AnnotationProperty . + + ### http://purl.org/dc/terms/modified dc:modified rdf:type owl:AnnotationProperty . @@ -70,6 +78,10 @@ dc:publisher rdf:type owl:AnnotationProperty . dc:title rdf:type owl:AnnotationProperty . +### http://purl.org/ontology/bibo/status +bibo:status rdf:type owl:AnnotationProperty . + + ### http://purl.org/vocab/vann/preferredNamespacePrefix vann:preferredNamespacePrefix rdf:type owl:AnnotationProperty . @@ -78,6 +90,14 @@ vann:preferredNamespacePrefix rdf:type owl:AnnotationProperty . vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . +### http://w3id.org/rml/constant +:constant rdf:type owl:AnnotationProperty ; + rdfs:comment "A property for indicating whether a expression map is a constant-valued expression map."@en ; + rdfs:isDefinedBy ; + rdfs:label "constant" ; + rdfs:domain :ExpressionMap . + + ### http://www.linkedmodel.org/schema/vaem#acronym vaem:acronym rdf:type owl:AnnotationProperty . @@ -92,10 +112,19 @@ foaf:name rdf:type owl:AnnotationProperty . ### http://w3id.org/rml/baseIRI :baseIRI rdf:type owl:ObjectProperty ; - rdfs:domain :TriplesMap ; - rdfs:comment "Indicates the base IRI of the RDF graph to be created with a triples map."@en ; - rdfs:isDefinedBy ; - rdfs:label "base IRI" . + rdfs:domain :TriplesMap ; + rdfs:comment "Indicates the base IRI of the RDF graph to be created with a triples map."@en ; + rdfs:isDefinedBy ; + rdfs:label "base IRI" . + + +### http://w3id.org/rml/childMap +:childMap rdf:type owl:ObjectProperty ; + rdfs:domain :Join ; + rdfs:range :ChildMap ; + rdfs:comment "Names a child map in the child source of a join."@en ; + rdfs:isDefinedBy ; + rdfs:label "child map" . ### http://w3id.org/rml/class @@ -107,14 +136,6 @@ foaf:name rdf:type owl:AnnotationProperty . rdfs:label "class" . -### http://w3id.org/rml/constant -:constant rdf:type rdf:Property ; - rdfs:domain :ExpressionMap ; - rdfs:comment "A property for indicating whether a expression map is a constant-valued expression map."@en ; - rdfs:isDefinedBy ; - rdfs:label "constant" . - - ### http://w3id.org/rml/datatype :datatype rdf:type owl:ObjectProperty ; rdfs:domain :ObjectMap ; @@ -157,6 +178,15 @@ foaf:name rdf:type owl:AnnotationProperty . rdfs:label "graph map" . +### http://w3id.org/rml/iterator +:iterator rdf:type owl:DatatypeProperty ; + rdfs:domain :Iterable ; + rdfs:range xsd:string ; + rdfs:isDefinedBy ; + rdfs:comment "An expression qualified according to the reference formulation that defines a sequence of logical iterations on the data source."@en ; + rdfs:label "iterator" . + + ### http://w3id.org/rml/joinCondition :joinCondition rdf:type owl:ObjectProperty ; rdfs:range :Join ; @@ -177,29 +207,15 @@ foaf:name rdf:type owl:AnnotationProperty . ### http://w3id.org/rml/logicalSource :logicalSource rdf:type owl:ObjectProperty ; rdfs:domain :TriplesMap ; - rdfs:range :LogicalSource ; + rdfs:range :AbstractLogicalSource ; rdfs:comment "Represents the logical source to be mapped."@en ; rdfs:isDefinedBy ; rdfs:label "logical source" . -### http://w3id.org/rml/logicalTarget -:logicalTarget rdf:type owl:ObjectProperty ; - rdfs:domain [ rdf:type owl:Class ; - owl:unionOf ( :TermMap - :LanguageMap - ) - ] ; - rdfs:range :LogicalTarget ; - rdfs:comment "Represents the logical target to where triples are exported to." ; - rdfs:isDefinedBy ; - rdfs:label "logical target" . - - ### http://w3id.org/rml/object -:object rdf:type rdf:Property ; +:object rdf:type owl:ObjectProperty ; rdfs:domain :PredicateObjectMap ; - rdfs:range rdfs:Resource ; rdfs:comment "Specifies the object for the generated triple from the logical source record."@en ; rdfs:isDefinedBy ; rdfs:label "object" . @@ -213,6 +229,15 @@ foaf:name rdf:type owl:AnnotationProperty . rdfs:label "object map" . +### http://w3id.org/rml/parentMap +:parentMap rdf:type owl:ObjectProperty ; + rdfs:domain :Join ; + rdfs:range :ParentMap ; + rdfs:comment "Names a parent map in the parent source of a join."@en ; + rdfs:isDefinedBy ; + rdfs:label "parent map" . + + ### http://w3id.org/rml/parentTriplesMap :parentTriplesMap rdf:type owl:ObjectProperty ; rdfs:domain :RefObjectMap ; @@ -248,6 +273,15 @@ foaf:name rdf:type owl:AnnotationProperty . rdfs:label "predicate object map" . +### http://w3id.org/rml/referenceFormulation +:referenceFormulation rdf:type owl:ObjectProperty ; + rdfs:domain :Iterable ; + rdfs:range :ReferenceFormulation ; + rdfs:comment "The reference formulation used to refer to extracts of the source data. "@en ; + rdfs:isDefinedBy ; + rdfs:label "reference formulation" . + + ### http://w3id.org/rml/subject :subject rdf:type owl:ObjectProperty ; rdfs:domain :TriplesMap ; @@ -270,10 +304,10 @@ foaf:name rdf:type owl:AnnotationProperty . rdfs:domain :TermMap ; rdfs:range [ rdf:type owl:Class ; owl:unionOf ( :BlankNode - :Literal :IRI - :UnsafeIRI + :Literal :URI + :UnsafeIRI :UnsafeURI ) ] ; @@ -282,25 +316,6 @@ foaf:name rdf:type owl:AnnotationProperty . rdfs:label "term type" . -### http://w3id.org/rml/childMap -:childMap rdf:type owl:ObjectProperty ; - rdfs:domain :Join ; - rdfs:range :ChildMap ; - rdfs:comment "Names a child map in the child source of a join."@en ; - rdfs:isDefinedBy ; - rdfs:label "child map" . - - - -### http://w3id.org/rml/parentMap -:parentMap rdf:type owl:ObjectProperty ; - rdfs:domain :Join ; - rdfs:range :ParentMap ; - rdfs:comment "Names a parent map in the parent source of a join."@en ; - rdfs:isDefinedBy ; - rdfs:label "parent map" . - - ################################################################# # Data properties ################################################################# @@ -338,7 +353,7 @@ foaf:name rdf:type owl:AnnotationProperty . rdfs:range xsd:string ; rdfs:comment "A valid expression that selects values from the source data. The reference should conform to the syntax rules/grammar of the specified Reference Formulation." ; rdfs:isDefinedBy ; - rdfs:label "reference"^^xsd:string . + rdfs:label "reference" . ### http://w3id.org/rml/template @@ -354,6 +369,14 @@ foaf:name rdf:type owl:AnnotationProperty . # Classes ################################################################# +### http://w3id.org/rml/AbstractLogicalSource +:AbstractLogicalSource rdf:type owl:Class ; + rdfs:subClassOf :Iterable ; + rdfs:comment "An iterable that can be associated with a triples map such that a data source can be mapped to RDF triples."@en ; + rdfs:isDefinedBy ; + rdfs:label "Abstract Logical Source" . + + ### http://w3id.org/rml/BlankNode :BlankNode rdf:type owl:Class ; rdfs:comment "Denotes a blank node, used with termType"@en ; @@ -361,13 +384,6 @@ foaf:name rdf:type owl:AnnotationProperty . rdfs:label "Blank Node" . -### http://w3id.org/rml/DatatypeMap -:DatatypeMap rdf:type owl:Class ; - rdfs:subClassOf :TermMap ; - rdfs:comment "Represents a datatype map"@en ; - rdfs:isDefinedBy ; - rdfs:label "Datatype Map" . - ### http://w3id.org/rml/ChildMap :ChildMap rdf:type owl:Class ; rdfs:subClassOf :ExpressionMap ; @@ -376,10 +392,17 @@ foaf:name rdf:type owl:AnnotationProperty . rdfs:label "Child Map" . +### http://w3id.org/rml/DatatypeMap +:DatatypeMap rdf:type owl:Class ; + rdfs:subClassOf :TermMap ; + rdfs:comment "Represents a datatype map"@en ; + rdfs:isDefinedBy ; + rdfs:label "Datatype Map" . + ### http://w3id.org/rml/ExpressionMap :ExpressionMap rdf:type owl:Class ; - rdfs:comment "Represents an expression map"@en ; + rdfs:comment "Represents an expression map"@en ; rdfs:isDefinedBy ; rdfs:label "Expression Map" . @@ -399,6 +422,13 @@ foaf:name rdf:type owl:AnnotationProperty . rdfs:label "IRI" . +### http://w3id.org/rml/Iterable +:Iterable rdf:type owl:Class ; + rdfs:comment "An abstract construct to describe data access and iteration for a data source."@en ; + rdfs:isDefinedBy ; + rdfs:label "Iterable" . + + ### http://w3id.org/rml/Join :Join rdf:type owl:Class ; rdfs:comment "Represents a join condition."@en ; @@ -420,7 +450,6 @@ foaf:name rdf:type owl:AnnotationProperty . rdfs:isDefinedBy ; rdfs:label "Literal" . - ### http://w3id.org/rml/ObjectMap :ObjectMap rdf:type owl:Class ; rdfs:subClassOf :TermMap ; @@ -429,12 +458,12 @@ foaf:name rdf:type owl:AnnotationProperty . rdfs:label "Object Map" . -### http://w3id.org/rml/ChildMap +### http://w3id.org/rml/ParentMap :ParentMap rdf:type owl:Class ; - rdfs:subClassOf :ExpressionMap ; - rdfs:comment "Represents a parent map"@en ; - rdfs:isDefinedBy ; - rdfs:label "Parent Map" . + rdfs:subClassOf :ExpressionMap ; + rdfs:comment "Represents a parent map"@en ; + rdfs:isDefinedBy ; + rdfs:label "Parent Map" . ### http://w3id.org/rml/PredicateMap @@ -459,6 +488,13 @@ foaf:name rdf:type owl:AnnotationProperty . rdfs:label "Reference Object Map" . +### http://w3id.org/rml/ReferenceFormulation +:ReferenceFormulation rdf:type owl:Class ; + rdfs:comment "Denotes a Reference Formulation."@en ; + rdfs:isDefinedBy ; + rdfs:label "Reference Formulation" . + + ### http://w3id.org/rml/SubjectMap :SubjectMap rdf:type owl:Class ; rdfs:subClassOf :TermMap ; @@ -482,24 +518,25 @@ foaf:name rdf:type owl:AnnotationProperty . rdfs:label "Triples Map" . +### http://w3id.org/rml/URI +:URI rdf:type owl:Class ; + rdfs:comment "Denotes a URI, used with termType."@en ; + rdfs:isDefinedBy ; + rdfs:label "URI" . + + ### http://w3id.org/rml/UnsafeIRI :UnsafeIRI rdf:type owl:Class ; - rdfs:comment "Denotes an unsafe IRI, used with termType."@en ; - rdfs:isDefinedBy ; - rdfs:label "Unsafe IRI" . + rdfs:comment "Denotes an unsafe IRI, used with termType."@en ; + rdfs:isDefinedBy ; + rdfs:label "Unsafe IRI" . ### http://w3id.org/rml/UnsafeURI :UnsafeURI rdf:type owl:Class ; - rdfs:comment "Denotes an unsafe URI, used with termType."@en ; - rdfs:isDefinedBy ; - rdfs:label "Unsafe URI" . - + rdfs:comment "Denotes an unsafe URI, used with termType."@en ; + rdfs:isDefinedBy ; + rdfs:label "Unsafe URI" . -### http://w3id.org/rml/URI -:URI rdf:type owl:Class ; - rdfs:comment "Denotes a URI, used with termType."@en ; - rdfs:isDefinedBy ; - rdfs:label "URI" . -### Generated by the OWL API (version 4.5.9.2019-02-01T07:24:44Z) https://github.com/owlcs/owlapi +### Generated by the OWL API (version 4.5.29.2024-05-13T12:11:03Z) https://github.com/owlcs/owlapi diff --git a/shapes/core.ttl b/shapes/core.ttl index 02f1e410..7b2733f2 100644 --- a/shapes/core.ttl +++ b/shapes/core.ttl @@ -30,49 +30,50 @@ @prefix xsd: . a sh:NodeShape ; - sh:and ( [ ] ) ; + rdfs:label "ChildMap" ; rdfs:comment """ Represents a Child Map. """ ; + sh:and ( [ ] ) ; sh:message """ rml:ChildMap must specify a literal referencing data in the child data source. """ ; - rdfs:label "ChildMap" ; sh:targetClass ; sh:targetObjectsOf . a sh:NodeShape ; - sh:and ( [ ] ) ; + rdfs:label "DatatypeMap" ; rdfs:comment """ Represents a Datatype Map. """ ; + sh:and ( [ ] ) ; sh:message """ rml:DatatypeMap must specify an rml:template, rml:reference, or rml:constant with the IRI of the datatype. """ ; - rdfs:label "DatatypeMap" ; sh:targetClass rml:DatatypeMap ; sh:targetObjectsOf rml:datatypeMap . a sh:NodeShape ; + rdfs:label "GraphMap" ; + rdfs:comment """ + Represents a Graph Map. + """ ; sh:and ( [ sh:in ( rml:IRI rml:BlankNode ) ; sh:message """ rml:termType must be an IRI or blank node for a Graph Map. """ ; sh:path rml:termType ] ) ; - rdfs:comment """ - Represents a Graph Map. - """ ; sh:message """ rml:GraphMap must specify an rml:template, rml:reference or rml:constant with the IRI of the Named Graph. """ ; - rdfs:label "GraphMap" ; sh:targetClass rml:GraphMap ; sh:targetObjectsOf rml:graphMap . a sh:NodeShape ; + rdfs:label "Join" ; rdfs:comment """ Represents a Join. """ ; @@ -80,176 +81,176 @@ rml:Join must specify exactly one rml:parent/rml:parentMap and rml:child/rml:childMap. """ ; - rdfs:label "Join" ; - sh:property [ rdfs:comment """ + sh:property [ rdfs:label "parentMap/parent" ; + rdfs:comment """ rml:parent/rml:parentMap may only be provided once and not at the same time. """ ; sh:maxCount 1 ; sh:minCount 1 ; - rdfs:label "parentMap/parent" ; sh:path [ sh:alternativePath ( rml:parentMap rml:parent ) ] ], - [ rdfs:comment """ + [ rdfs:label "childMap" ; + rdfs:comment """ Specifies the child of the object component for joining. """ ; sh:message """ rml:childMap must point to a rml:ChildMap specifying the child of the Literal. """ ; - rdfs:label "childMap" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:childMap ; sh:targetSubjectsOf rml:childMap ], - [ rdfs:comment """ + [ rdfs:label "child" ; + rdfs:comment """ Specifies the child of the object component for joining. """ ; - rdfs:label "child" ; sh:nodeKind sh:Literal ; sh:path rml:child ; sh:targetSubjectsOf rml:child ], - [ rdfs:comment """ + [ rdfs:label "parentMap" ; + rdfs:comment """ Specifies the parent of the object component for joining. """ ; sh:message """ rml:parentMap must point to a rml:ParentMap specifying the parent tag of the string Literal. """ ; - rdfs:label "parentMap" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:parentMap ; sh:targetSubjectsOf rml:parentMap ], - [ rdfs:comment """ + [ rdfs:label "parent" ; + rdfs:comment """ Specifies the parent of the object component for joining. """ ; - rdfs:label "parent" ; sh:nodeKind sh:Literal ; sh:path rml:parent ; sh:targetSubjectsOf rml:parent ], - [ rdfs:comment """ + [ rdfs:label "childMap/child" ; + rdfs:comment """ rml:child/rml:childMap may only be provided once and not at the same time. """ ; sh:maxCount 1 ; sh:minCount 1 ; - rdfs:label "childMap/child" ; sh:path [ sh:alternativePath ( rml:childMap rml:child ) ] ] ; sh:targetClass rml:Join ; sh:targetObjectsOf rml:joinCondition . a sh:NodeShape ; - sh:and ( [ sh:path rml:constant ; - sh:pattern "^((?:(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?:([A-Za-z]{2,3}(-(?:[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4})(-(?:[A-Za-z]{4}))?(-(?:[A-Za-z]{2}|[0-9]{3}))?(-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?:[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?:x(-[A-Za-z0-9]{1,8})+))?)|(?:x(-[A-Za-z0-9]{1,8})+))$" ] ) ; + rdfs:label "LanguageMap" ; rdfs:comment """ Represents a Language Map. """ ; + sh:and ( [ sh:path rml:constant ; + sh:pattern "^((?:(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?:([A-Za-z]{2,3}(-(?:[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4})(-(?:[A-Za-z]{4}))?(-(?:[A-Za-z]{2}|[0-9]{3}))?(-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?:[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?:x(-[A-Za-z0-9]{1,8})+))?)|(?:x(-[A-Za-z0-9]{1,8})+))$" ] ) ; sh:message """ rml:LanguageMap must specify an rml:template, rml:reference, or rml:constant with the BCP47 name of the language as string. """ ; - rdfs:label "LanguageMap" ; sh:targetClass rml:LanguageMap ; sh:targetObjectsOf rml:languageMap . a sh:NodeShape ; - sh:and ( [ ] ) ; + rdfs:label "ParentMap" ; rdfs:comment """ Represents a Parent Map. """ ; + sh:and ( [ ] ) ; sh:message """ rml:ParentMap must specify a literal referencing data in the parent data source. """ ; - rdfs:label "ParentMap" ; sh:targetClass rml:ParentMap ; sh:targetObjectsOf rml:parentMap . a sh:NodeShape ; + rdfs:label "PredicateMap" ; + rdfs:comment """ + Represents a Predicate Map. + """ ; sh:and ( [ sh:in ( rml:IRI ) ; sh:message """ rml:termType for Predicate Map can only be a rml:IRI; """ ; sh:path rml:termType ] ) ; - rdfs:comment """ - Represents a Predicate Map. - """ ; sh:message """ Predicate Object Map must generate an IRI representing the predicate of an RDF triple. """ ; - rdfs:label "PredicateMap" ; sh:targetClass rml:PredicateMap ; sh:targetObjectsOf rml:predicateMap . a sh:NodeShape ; - sh:and ( [ rdfs:comment """ + rdfs:label "PredicateObjectMap" ; + rdfs:comment """ + Represents a Predicate Object Map. + """ ; + sh:and ( [ rdfs:label "predicate/predicateMap" ; + rdfs:comment """ At least one rml:predicate or rml:predicateMap must be provided. """ ; sh:message """ At least one rml:predicate or rml:predicateMap must be provided. """ ; sh:minCount 1 ; - rdfs:label "predicate/predicateMap" ; sh:path [ sh:alternativePath ( rml:predicate rml:predicateMap ) ] ; sh:targetSubjectsOf rml:predicate, - rml:predicateMap ] [ rdfs:comment """ + rml:predicateMap ] [ rdfs:label "predicateMap" ; + rdfs:comment """ A PredicateMap element to generate the predicate component of the (predicate, object) pair from a logical table row or iterator. """ ; sh:message """ rml:predicateMap must be an IRI or blank node and be provided once. """ ; - rdfs:label "predicateMap" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:predicateMap ; - sh:targetSubjectsOf rml:predicateMap ] [ rdfs:comment """ + sh:targetSubjectsOf rml:predicateMap ] [ rdfs:label "predicate" ; + rdfs:comment """ Specifies the predicate for the generated triple from the logical table row or iterator. """ ; sh:message """ rml:predicate must be an IRI and be provided once. """ ; - rdfs:label "predicate" ; sh:nodeKind sh:IRI ; sh:path rml:predicate ; - sh:targetSubjectsOf rml:predicate ] [ rdfs:comment """ + sh:targetSubjectsOf rml:predicate ] [ rdfs:label "object/objectMap/quotedTriplesMap" ; + rdfs:comment """ Either an rml:object, rml:objectMap, or rml:quotedTriplesMap must be provided, not multiple. """ ; sh:message """ Either an rml:object, rml:objectMap, or rml:quotedTriplesMap must be provided, not multiple """ ; sh:minCount 1 ; - rdfs:label "object/objectMap/quotedTriplesMap" ; sh:path [ sh:alternativePath ( rml:object rml:objectMap rml:quotedTriplesMap ) ] ; sh:targetSubjectsOf rml:object, rml:objectMap, - rml:quotedTriplesMap ] [ rdfs:comment """ + rml:quotedTriplesMap ] [ rdfs:label "objectMap" ; + rdfs:comment """ An ObjectMap element to generate the object component of the (predicate, object) pair from a logical table row or iterator. """ ; sh:message """ rml:objectMap must be an IRI or blank node and be provided once. """ ; - rdfs:label "objectMap" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:or ( [ sh:node ] [ sh:node ] [ sh:node ] ) ; sh:path rml:objectMap ; - sh:targetSubjectsOf rml:objectMap ] [ rdfs:comment """ + sh:targetSubjectsOf rml:objectMap ] [ rdfs:label "object" ; + rdfs:comment """ Specifies the object for the generated RDF triples. """ ; sh:message """ rml:object must be an IRI and be provided once. """ ; - rdfs:label "object" ; sh:path rml:object ; sh:targetSubjectsOf rml:object ] ) ; - rdfs:comment """ - Represents a Predicate Object Map. - """ ; - rdfs:label "PredicateObjectMap" ; sh:targetClass rml:PredicateObjectMap ; sh:targetObjectsOf rml:predicateObjectMap . a sh:NodeShape ; + rdfs:label "Strategy" ; rdfs:comment """ Strategy to follow when generating RDF triples. """ ; @@ -257,35 +258,35 @@ sh:message """ Strategy must be either rml:append or rml:cartesianProduct. """ ; - rdfs:label "Strategy" ; sh:targetObjectsOf rml:strategy . a sh:NodeShape ; - sh:and ( [ ] ) ; + rdfs:label "TriplesMap" ; rdfs:comment """ Represents a Triples Map. """ ; + sh:and ( [ ] ) ; sh:message """ Triples Map requires exactly one rml:subject or one rml:subjectMap and zero or more rml:predicateObjectMaps. """ ; - rdfs:label "TriplesMap" ; sh:targetClass rml:TriplesMap ; sh:targetObjectsOf rml:parentTriplesMap . a sh:NodeShape ; - sh:datatype xsd:string ; + rdfs:label "child" ; rdfs:comment """ A Literal reference to use as reference to the child data source. """ ; + sh:datatype xsd:string ; sh:message """ rml:child shortcut for rml:ChildMap must be a Literal. """ ; - rdfs:label "child" ; sh:nodeKind sh:Literal ; sh:targetObjectsOf . a sh:NodeShape ; + rdfs:label "datatype" ; rdfs:comment """ An IRI reference for use as the graph name of all triples generated with the datatype. @@ -293,11 +294,11 @@ sh:message """ rml:datatype must be an IRI. """ ; - rdfs:label "datatype" ; sh:nodeKind sh:IRI ; sh:targetObjectsOf rml:datatype . a sh:NodeShape ; + rdfs:label "graph" ; rdfs:comment """ An IRI reference for use as the graph name of all triples generated with the Graph Map. @@ -305,11 +306,11 @@ sh:message """ rml:graph must be an IRI or blank node. """ ; - rdfs:label "graph" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:targetObjectsOf rml:graph . a sh:NodeShape ; + rdfs:label "language" ; rdfs:comment """ Specified the language for the generated Literal. """ ; @@ -317,12 +318,12 @@ rml:language must be a valid language tag according to BCP47 and may only be provided once as string. """ ; - rdfs:label "language" ; sh:nodeKind sh:Literal ; sh:pattern "^((?:(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?:([A-Za-z]{2,3}(-(?:[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4})(-(?:[A-Za-z]{4}))?(-(?:[A-Za-z]{2}|[0-9]{3}))?(-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?:[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?:x(-[A-Za-z0-9]{1,8})+))?)|(?:x(-[A-Za-z0-9]{1,8})+))$" ; sh:targetObjectsOf rml:language . a sh:NodeShape ; + rdfs:label "object" ; rdfs:comment """ An IRI, Blank Node, or Literal to use as object for all the RDF triples. """ ; @@ -330,44 +331,92 @@ rml:object shortcut for rml:objectMap must be an IRI, Blank Node, or Literal. """ ; - rdfs:label "object" ; sh:targetObjectsOf rml:object . a sh:NodeShape ; - sh:datatype xsd:string ; + rdfs:label "parent" ; rdfs:comment """ A Literal reference to use as reference to the parent data source. """ ; + sh:datatype xsd:string ; sh:message """ rml:parent shortcut for rml:ParentMap must be a Literal. """ ; - rdfs:label "parent" ; sh:nodeKind sh:Literal ; sh:targetObjectsOf rml:parent . a sh:NodeShape ; + rdfs:label "predicate" ; rdfs:comment """ Specifies the predicate for the generated triple. """ ; sh:message """ rml:predicate must be an IRI. """ ; - rdfs:label "predicate" ; sh:nodeKind sh:IRI ; sh:targetObjectsOf rml:predicate . a sh:NodeShape ; + rdfs:label "subject" ; rdfs:comment """ An IRI reference to use as subject for all the RDF triples. """ ; sh:message """ rml:subject shortcut for rml:SubjectMap must be a IRI or BlankNode. """ ; - rdfs:label "subject" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:targetObjectsOf rml:subject . + a sh:NodeShape ; + rdfs:label "Abstract Logical Source" ; + rdfs:comment """ + A sub-class of iterable that can be associated with a triples map such that a data source can be mapped to RDF triples. + """ ; + sh:message """ + Abstract Logical Source must specify how to generate logical iterations on a data source for a triples map. + """ ; + sh:node ; + sh:targetClass rml:AbstractLogicalSource . + + a sh:NodeShape ; + rdfs:label "Iterable" ; + rdfs:comment """ + An abstract construct to describe data access and iteration for a data source. + """ ; + sh:message """ + Iterable must specify how to generate logical iterations on a data source. + """ ; + sh:property [ rdfs:label "rml:referenceFormulation" ; + rdfs:comment """ + The reference formulation (rml:referenceFormulation) defines how to + reference to elements of the data of the input source. + """ ; + sh:maxCount 1 ; + sh:message """ + rml:referenceFormulation must be a blank node or IRI specifying the + reference formulation on how to reference elements of a data source, + and may be provided at most once. + """ ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:path rml:referenceFormulation ], + [ rdfs:label "rml:iterator" ; + rdfs:comment """ + The logical iterator (rml:iterator) defines the iteration loop used to + map the data of the input source. Depends on the reference formulation + if an iterator is necessary. + """ ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:message """ + rml:iterator must be a Literal specifying the iterator to iterate over + the data source, and may be provided at most once. + """ ; + sh:nodeKind sh:Literal ; + sh:path rml:iterator ] ; + sh:targetClass rml:Iterable . + a sh:PropertyShape ; + rdfs:label "joinCondition" ; rdfs:comment """ Specifies the join condition for joining a child data source with a parent data source of the foreign key constraint. @@ -375,20 +424,24 @@ sh:message """ rml:joinCondition must specify an rml:parent and rml:child. """ ; - rdfs:label "joinCondition" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:joinCondition ; sh:targetSubjectsOf rml:joinCondition . a sh:NodeShape ; - sh:and ( [ rdfs:comment """ + rdfs:label "ObjectMap" ; + rdfs:comment """ + Represents an Object Map. + """ ; + sh:and ( [ rdfs:label "languageMap/datatypeMap/language/datatype" ; + rdfs:comment """ rml:language/rml:languageMap and rml:datatype/rml:datatypeMap may only be provided once and not at the same time. """ ; sh:maxCount 1 ; sh:minCount 0 ; - rdfs:label "languageMap/datatypeMap/language/datatype" ; - sh:path [ sh:alternativePath ( rml:languageMap rml:datatypeMap rml:language rml:datatype ) ] ] [ rdfs:comment """ + sh:path [ sh:alternativePath ( rml:languageMap rml:datatypeMap rml:language rml:datatype ) ] ] [ rdfs:label "languageMap" ; + rdfs:comment """ Specified the language map for the object component for the generated RDF triples. """ ; @@ -396,10 +449,10 @@ rml:languageMap must point to a rml:LanguageMap specifying the language tag of the string Literal. """ ; - rdfs:label "languageMap" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:languageMap ; - sh:targetSubjectsOf rml:languageMap ] [ rdfs:comment """ + sh:targetSubjectsOf rml:languageMap ] [ rdfs:label "datatypeMap" ; + rdfs:comment """ Specifies the datatype of the object component for the generated RDF triples. """ ; @@ -407,66 +460,65 @@ rml:datatypeMap must point to a rml:DatatypeMap specifying the datatype of the Literal. """ ; - rdfs:label "datatypeMap" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:datatypeMap ; - sh:targetSubjectsOf rml:datatypeMap ] [ rdfs:comment """ + sh:targetSubjectsOf rml:datatypeMap ] [ rdfs:label "language" ; + rdfs:comment """ Language tag for the object. """ ; - rdfs:label "language" ; sh:nodeKind sh:Literal ; - sh:path rml:language ] [ rdfs:comment """ + sh:path rml:language ] [ rdfs:label "datatype" ; + rdfs:comment """ Datatype for the object. """ ; - rdfs:label "datatype" ; sh:nodeKind sh:IRI ; sh:path rml:datatype ; sh:targetSubjectsOf rml:datatype ] ) ; - rdfs:comment """ - Represents an Object Map. - """ ; sh:message """ Object Map must generate a IRI, Blank Node, or Literal which has optionally a language tag or datatype. """ ; - rdfs:label "ObjectMap" ; sh:targetClass rml:ObjectMap . a sh:NodeShape ; - sh:and ( [ sh:class rml:TriplesMap ; + rdfs:label "RefObjectMap" ; + rdfs:comment """ + Represents a Reference Object Map. + """ ; + sh:and ( [ rdfs:label "parentTriplesMap" ; rdfs:comment """ Specifies the Triples Map element corresponding to the parent data source of the foreign key constraint. """ ; + sh:class rml:TriplesMap ; sh:maxCount 1 ; sh:message """ rml:parentTriplesMap may only be provided once and must be an IRI or Blank Node referring to a Triples Map. """ ; sh:minCount 1 ; - rdfs:label "parentTriplesMap" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:parentTriplesMap ; sh:targetSubjectsOf rml:parentTriplesMap ] ) ; - rdfs:comment """ - Represents a Reference Object Map. - """ ; sh:message """ rml:RefObjectMap must specify a rml:parentTriplesMap and zero or more rml:joinConditions. """ ; - rdfs:label "RefObjectMap" ; sh:targetClass rml:RefObjectMap . a sh:NodeShape ; - sh:and ( [ rdfs:comment """ + rdfs:label "SubjectMap" ; + rdfs:comment """ + Represents a Subject Map. + """ ; + sh:and ( [ rdfs:label "class" ; + rdfs:comment """ The subject value generated will be asserted as an instance of this RDFS class. """ ; sh:message """ rml:class must be an IRI and may be specified multiple times. """ ; - rdfs:label "class" ; sh:nodeKind sh:IRI ; sh:path rml:class ; sh:targetSubjectsOf rml:class ] [ sh:in ( rml:IRI rml:BlankNode ) ; @@ -474,18 +526,16 @@ rml:termType must be a rml:IRI or rml:BlankNode for Subject Map. """ ; sh:path rml:termType ] ) ; - rdfs:comment """ - Represents a Subject Map. - """ ; sh:message """ - Subject Map must generate an IRI representing the subject of an RDF triple. + Subject Map must generate a resource representing the subject of + an RDF triple. """ ; - rdfs:label "SubjectMap" ; sh:targetClass rml:SubjectMap ; sh:targetObjectsOf rml:subjectMap . a sh:NodeShape ; - sh:property [ rdfs:comment """ + sh:property [ rdfs:label "logicalSource" ; + rdfs:comment """ A logical source is any source that is mapped to RDF triples. """ ; sh:maxCount 1 ; @@ -493,32 +543,33 @@ Exactly one rml:logicalSource is required to access the data source. """ ; sh:minCount 1 ; - rdfs:label "logicalSource" ; + sh:node ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:logicalSource ; sh:targetSubjectsOf rml:logicalSource ], - [ rdfs:comment """ + [ rdfs:label "subject" ; + rdfs:comment """ An IRI reference for use as subject for all generated RDF triples. """ ; sh:message """ rml:subject must be an IRI or blank node. """ ; - rdfs:label "subject" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:subject ; sh:targetSubjectsOf rml:subject ], - [ rdfs:comment """ + [ rdfs:label "predicateObjectMap" ; + rdfs:comment """ A Predicate Object Map element to generate a (predicate, object) pair. """ ; sh:message """ rml:PredicateObjectMap must be an IRI or blank node. """ ; sh:minCount 0 ; - rdfs:label "predicateObjectMap" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:predicateObjectMap ; sh:targetSubjectsOf rml:predicateObjectMap ], - [ rdfs:comment """ + [ rdfs:label "subjectMap/subject/quotedTriplesMap" ; + rdfs:comment """ Either a rml:subject, rml:subjectMap or a rml:quotedTriplesMap is required, not multiple. """ ; sh:maxCount 1 ; @@ -526,18 +577,17 @@ Either a rml:subject, rml:subjectMap or a rml:quotedTriplesMap is required, not multiple. """ ; sh:minCount 1 ; - rdfs:label "subjectMap/subject/quotedTriplesMap" ; sh:path [ sh:alternativePath ( rml:subjectMap rml:subject rml:quotedTriplesMap ) ] ; sh:targetSubjectsOf rml:quotedTriplesMap, rml:subject, rml:subjectMap ], - [ rdfs:comment """ + [ rdfs:label "subjectMap" ; + rdfs:comment """ A Subject Map element to generate a subject for generated RDF triples. """ ; sh:message """ rml:SubjectMap must be an IRI or blank node. """ ; - rdfs:label "subjectMap" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:or ( [ sh:node ] [ sh:node ] ) ; sh:path rml:subjectMap ; @@ -546,7 +596,8 @@ rml:TriplesMap . a sh:NodeShape ; - sh:property [ rdfs:comment """ + sh:property [ rdfs:label "graph/graphMap" ; + rdfs:comment """ Either an rml:graph or rml:graphMap may be optionally be provided, but not both. """ ; @@ -556,9 +607,9 @@ but not both. """ ; sh:minCount 0 ; - rdfs:label "graph/graphMap" ; sh:path [ sh:alternativePath ( rml:graph rml:graphMap ) ] ], - [ rdfs:comment """ + [ rdfs:label "graphMap" ; + rdfs:comment """ Specifies a Graph Map. When used with a Subject Map element, all the RDF triples generated will be stored in the specified named graph. Otherwise, the RDF triple generated using the (predicate, object) @@ -567,16 +618,15 @@ sh:message """ rml:graphMap must be either an IRI or blank node. """ ; - rdfs:label "graphMap" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:graphMap ], - [ rdfs:comment """ + [ rdfs:label "graph" ; + rdfs:comment """ An IRI reference to use as the named graph of all generated triples. """ ; sh:message """ rml:graphMap must be an IRI. """ ; - rdfs:label "graph" ; sh:nodeKind sh:IRI ; sh:path rml:graph ] ; sh:targetSubjectsOf rml:graph, @@ -585,7 +635,12 @@ a sh:NodeShape . a sh:NodeShape ; - sh:and ( [ rdfs:comment """ + rdfs:label "TermMap" ; + rdfs:comment """ + Represents a Term Map. + """ ; + sh:and ( [ rdfs:label "termType" ; + rdfs:comment """ An IRI indicating whether a generated term should be an IRI, Blank Node, or a Literal. """ ; @@ -595,19 +650,15 @@ rml:termType must be either rml:IRI, rml:Literal, or rml:BlankNode for a Term Map. May only be provided once. """ ; - rdfs:label "termType" ; sh:nodeKind sh:IRI ; sh:path rml:termType ; sh:targetSubjectsOf rml:termType ] ) ; - rdfs:comment """ - Represents a Term Map. - """ ; sh:message """ Term Map is an Expression Map with optionally a term type specified. - """ ; - rdfs:label "TermMap" . + """ . a sh:NodeShape ; + rdfs:label "ExpressionMap" ; rdfs:comment """ Represents a Expression Map. """ ; @@ -615,8 +666,8 @@ Expression Map requires one rml:template or one rml:constant or one rml:reference. """ ; - rdfs:label "ExpressionMap" ; - sh:property [ rdfs:comment """ + sh:property [ rdfs:label "template/constant/reference/returnMap/functionExecution" ; + rdfs:comment """ Exactly one rml:template, one rml:constant, one rml:reference, one rml:returnMap, or one rml:functionExecution is required. """ ; @@ -626,14 +677,13 @@ one rml:returnMap, or one rml:functionExecution is required. """ ; sh:minCount 1 ; - rdfs:label "template/constant/reference/returnMap/functionExecution" ; sh:path [ sh:alternativePath ( rml:template rml:constant rml:reference rml:returnMap rml:functionExecution ) ] ; sh:targetSubjectsOf rml:constant, rml:functionExecution, rml:reference, rml:returnMap, rml:template ], - [ sh:datatype xsd:string ; + [ rdfs:label "reference" ; rdfs:comment """ A reference rml:reference is used to refer to a column in case of databases, a record in case of CSV or TSV data source, an element in @@ -644,14 +694,15 @@ an absolute path, or a path relative to the iterator specified at the logical source. """ ; + sh:datatype xsd:string ; sh:message """ rml:reference must be a string. """ ; - rdfs:label "reference" ; sh:nodeKind sh:Literal ; sh:path rml:reference ; sh:targetSubjectsOf rml:reference ], - [ rdfs:comment """ + [ rdfs:label "returnMap" ; + rdfs:comment """ A Return Map rml:returnMap is used to define the return values of a FnO function from the RML-FNML specification. RML Core only validates if the property is present and has the right node kind. The actual validation @@ -660,11 +711,11 @@ sh:message """ rml:returnMap must be an IRI; """ ; - rdfs:label "returnMap" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:returnMap ; sh:targetSubjectsOf rml:returnMap ], - [ rdfs:comment """ + [ rdfs:label "functionExecution" ; + rdfs:comment """ A Function Execution rml:functionExecution is used to define the FnO function to execute from the RML-FNML specification. RML Core only validates if the property is present and has the right node kind. @@ -673,44 +724,42 @@ sh:message """ rml:functionExecution must be an IRI; """ ; - rdfs:label "functionExecution" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:functionExecution ; sh:targetSubjectsOf rml:functionExecution ], - [ sh:datatype xsd:string ; + [ rdfs:label "template" ; rdfs:comment """ A template (format string) to specify how to generate a value for a subject, predicate, or object, using one or more columns from a logical table row or iterator. """ ; + sh:datatype xsd:string ; sh:message """ rml:template must be a string. """ ; - rdfs:label "template" ; sh:nodeKind sh:Literal ; sh:path rml:template ], - [ rdfs:comment """ + [ rdfs:label "constant" ; + rdfs:comment """ A property for indicating whether a term map is a constant-valued term map. """ ; sh:message """ rml:constant must be an IRI or Literal. """ ; - rdfs:label "constant" ; sh:path rml:constant ; sh:targetSubjectsOf rml:constant ] . a sh:PropertyShape ; + rdfs:label "logicalTarget" ; rdfs:comment """ A logical target is any target to where generated RDF triples are exported to. """ ; - sh:maxCount 1 ; sh:message """ - Zero or one rml:logicalTarget is required to export RDF triples. + Zero or more rml:logicalTarget is required to export RDF triples. """ ; sh:minCount 0 ; - rdfs:label "logicalTarget" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:logicalTarget ; sh:targetSubjectsOf rml:logicalTarget . diff --git a/shapes/iterable.ttl b/shapes/iterable.ttl new file mode 100644 index 00000000..c830aa0e --- /dev/null +++ b/shapes/iterable.ttl @@ -0,0 +1,66 @@ +@prefix sh: . +@prefix rdfs: . +@prefix : . +@prefix rdf: . +@prefix rml: . +@prefix xsd: . + +:RMLIterableShape + a sh:NodeShape ; + sh:targetClass rml:Iterable ; + rdfs:label "Iterable" ; + rdfs:comment """ + An abstract construct to describe data access and iteration for a data source. + """ ; + sh:message """ + Iterable must specify how to generate logical iterations on a data source. + """ ; + + # rml:referenceFormulation + sh:property [ + sh:path rml:referenceFormulation ; + rdfs:label "rml:referenceFormulation" ; + rdfs:comment """ + The reference formulation (rml:referenceFormulation) defines how to + reference to elements of the data of the input source. + """ ; + sh:message """ + rml:referenceFormulation must be a blank node or IRI specifying the + reference formulation on how to reference elements of a data source, + and may be provided at most once. + """ ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + ] ; + + # rml:iterator + sh:property [ + sh:path rml:iterator ; + rdfs:label "rml:iterator" ; + rdfs:comment """ + The logical iterator (rml:iterator) defines the iteration loop used to + map the data of the input source. Depends on the reference formulation + if an iterator is necessary. + """ ; + sh:message """ + rml:iterator must be a Literal specifying the iterator to iterate over + the data source, and may be provided at most once. + """ ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:datatype xsd:string ; + ] ; +. + +:RMLAbstractLogicalSourceShape + a sh:NodeShape ; + sh:targetClass rml:AbstractLogicalSource ; + rdfs:label "Abstract Logical Source" ; + rdfs:comment """ + A sub-class of iterable that can be associated with a triples map such that a data source can be mapped to RDF triples. + """ ; + sh:message """ + rml:AbstractLogicalSource must specify how to generate logical iterations on a data source for a triples map. + """ ; + sh:node :RMLIterableShape ; +. diff --git a/shapes/shared_properties.ttl b/shapes/shared_properties.ttl index 20246ea4..a3608e23 100644 --- a/shapes/shared_properties.ttl +++ b/shapes/shared_properties.ttl @@ -26,6 +26,7 @@ Exactly one rml:logicalSource is required to access the data source. """ ; sh:nodeKind sh:BlankNodeOrIRI ; + sh:node :RMLAbstractLogicalSourceShape ; sh:minCount 1 ; sh:maxCount 1 ; ] ; diff --git a/spec/docs/datatypeConversion.md b/spec/docs/datatypeConversion.md new file mode 100644 index 00000000..bb5f8f85 --- /dev/null +++ b/spec/docs/datatypeConversion.md @@ -0,0 +1,150 @@ +# Datatype conversions + +For each [=reference formulation=] there may be a set of defined natural RDF mappings that are applied to the [=expression evaluation results=] on the [=data source=]. These [=natural mappings=] are defined in the [[RML-IO-Registry]] and are used to convert the values of the [=expression evaluation result=] to the appropriate [=natural RDF literal=] corresponding with the [=reference formulation=]. + +## Natural mapping of source values + +The natural RDF literal is a [=literal=] obtained by applying a [=natural mapping=] on a value from a [=data source=], resulting in the most appropriate representation of that value in RDF. The [=natural RDF literal=] has a [=natural RDF lexical form=]. + +The natural RDF lexical form is the [=lexical form=] of the [=literal=] on which implementations SHOULD apply the [=XSD canonical mapping=], making it a [=canonical RDF lexical form=]. It is used in RML when non-string [=expression evaluation results=] are used in a string context, for example when a timestamp is used in an [=template-valued term map=] with [=term type=] [=IRI=]. + +The canonical RDF lexical form is the [=lexical form=] of the [=literal=] on which the [=XSD canonical mapping=] MUST be applied. + +Cast to string is an implementation-dependent function that maps values from [=expression evaluation results=] to equivalent Unicode strings. The specifics of [=cast to string=] per [=reference formulation=] are defined in the [[RML-IO-Registry]]. + +Additionally, the [=natural mapping=] determines the [=natural RDF datatype=] of the [=literal=]. + +The natural RDF datatype is the [=datatype=] corresponding to the [=natural RDF literal=] that is the result of the [=natural mapping=]. The [=natural RDF datatype=] is an [=IRI=] that represents the [=datatype=] of the value in RDF. + +## Datatype-override mapping of source values + +The datatype-override RDF literal corresponding to an [=expression evaluation result=] value `v` and a [=datatype IRI=] `dt`, is a [=literal=] whose [=lexical form=] is the [=natural RDF lexical form=] corresponding to `v`, and whose [=datatype IRI=] is `dt`. If the [=literal=] is [=ill-typed=], then a [=data error=] is raised. + +A [=literal=] is ill-typed in RML if its [=datatype IRI=] denotes a [=validatable RDF datatype=] and its [=lexical form=] is not in the [=lexical space=] of the [=RDF datatype=] identified by its [=datatype IRI=]. + +The set of validatable RDF datatypes includes all [=datatypes=] in the RDF datatype column of [[[#table-lexical-forms]]], as defined in [[XMLSCHEMA11-2]]. This set MAY include implementation-defined additional RDF datatypes. + +For example, `"X"^^xsd:boolean` is [=ill-typed=] because `xsd:boolean` is a validatable [=RDF datatype=] in RML, and `"X"` is not in the [=lexical space=] of `xsd:boolean` [[XMLSCHEMA11-2]]. + +
      +

      Summary of XSD Lexical Forms

      + +The [=natural mappings=] make reference to various [=XSD datatypes=] and require that values from [=expression evaluation results=] be converted to strings that are appropriate as [=lexical forms=] for these [=datatypes=]. This subsection gives examples of these [=lexical forms=] in order to aid implementers of the mappings. This subsection is non-normative; the normative definitions of the [=lexical spaces=] as well as the [=canonical mappings=] are found in [[XMLSCHEMA11-2]]. + +A general approach that may be used for implementing the natural mappings is as follows: + +1. Identify the source datatype of value of the [=expression evaluation result=] on the [=data source=]. +1. Look up its corresponding [=natural RDF datatype=] for the [=reference formulation=] in the [[RML-IO-Registry]]. +1. Apply [=cast to string=] to the value. +1. Ensure that the resulting string is in the [=lexical space=] of the target [=RDF datatype=]; that is, it must be in a form such as those listed in either column of [[[#table-lexical-forms]]] below. This may require some transformations of the string, in particular for `xsd:hexBinary`, `xsd:dateTime` and `xsd:boolean`. +1. If the goal is to obtain a [=canonical RDF lexical form=], then further string transformations may be required to obtain a form such as those listed in the Canonical lexical forms column of [[[#table-lexical-forms]]] below. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Table of canonical and non-canonical lexical forms for some XSD datatypes
      RDF datatypeNon-canonical lexical formsCanonical lexical formsComments
      xsd:hexBinary5232524d4c5232524D4CConvert from SQL by applying xsd:hexBinary lexical mapping.
      xsd:decimal.2240.224
      +0011
      42.042
      -5.9000-5.9
      xsd:integer-05-5
      +333333
      000
      xsd:double-5.90-5.9E0Also supports INF, -INF, NaN and -0.0E0,
      but these do not appear in standard SQL.
      +0.000147702150001.4770215E-4
      +01E+31.0E3
      100.01.0E2
      00.0E0
      xsd:boolean1trueMust be lowercase.
      0false
      xsd:date2011-08-23Dates in SQL don't have timezone offsets.
      They are optional in XSD.
      xsd:time22:17:34.885+00:0022:17:34.885ZMay or may not have timezone offset.
      22:17:34.00022:17:34
      22:17:34.1+01:0022:17:34.1+01:00
      xsd:dateTime2011-08-23T22:17:00.000+00:002011-08-23T22:17:00ZMay or may not have timezone offset.
      Convert from SQL by replacing space with "T".
      + +
      diff --git a/spec/docs/expressions.md b/spec/docs/expressions.md index 5d5dbd49..b3e419b4 100644 --- a/spec/docs/expressions.md +++ b/spec/docs/expressions.md @@ -1,6 +1,6 @@ # Generating values with expressions -Expressions are mapping constructs that can be evaluated on a [=logical iteration=], according to the specified reference formulation, to generate values during the mapping process. +Expressions are mapping constructs that can be evaluated on a [=logical iteration=], according to the specified [=reference formulation=], to generate values during the mapping process. ## Expression map (`rml:ExpressionMap`) @@ -10,17 +10,17 @@ An expression map (`rml:ExpressionMap`) is an abstract class, that is * 0 or 1 `rml:template`, or * another property, or properties, defined by a subclass of `rml:ExpressionMap`. -Each of these properties specifies an [=expression=] which, upon evaluation, results in an ordered list of values. +Each of these properties specifies an [=expression=] which, upon evaluation, results in an ordered list of values, called the expression evaluation result. The reference expression set of an [=expression map=] is the set of expressions which are evaluated on a [=logical iteration=]. ### Constant expression (`rml:constant`) -A constant-valued expression map is an [=expression map=] that always generates the same value. A constant-valued expression map is represented by a resource that has exactly one `rml:constant` property, the value of which is called a constant expression. +A constant-valued expression map is an [=expression map=] that always generates the same [=expression evaluation result=]. A constant-valued expression map is represented by a resource that has exactly one `rml:constant` property, the value of which is called a constant expression. The constant value is a singleton list containing the [=constant expression=]. -The [=reference expressions=] of a [constant-valued expression map=] is an empty list. +The [=reference expressions=] of a [=constant-valued expression map=] is an empty list. ### Reference (`rml:reference`) A reference-valued expression map is an [=expression map=] that is represented by a resource that has exactly one `rml:reference` property, the value of which is called a reference expression. @@ -29,8 +29,7 @@ The [=reference expression=] MUST be a valid [=expression=] according to the def The [=reference expression set=] of a [=reference-valued expression map=] is the singleton set containing the [=reference expression=]. -The reference value is an ordered list of values obtained by evaluating the [=reference expression=] against a given [=logical iteration=]. -For each value in the ordered list, an expression is created. +The reference value is the [=expression evaluation result=] obtained by evaluating the [=reference expression=] against a given [=logical iteration=]. ### Template (`rml:template`) A template-valued expression map is an [=expression map=] that is represented by a resource that has exactly one `rml:template` property, the value of which is called a template expression. The [=template expression=] MUST be a valid [=string template=]. diff --git a/spec/docs/index.html b/spec/docs/index.html index 303e624b..977df056 100644 --- a/spec/docs/index.html +++ b/spec/docs/index.html @@ -106,9 +106,13 @@
      +
      +
      -
      +
      + +
      diff --git a/spec/docs/logicalSource.md b/spec/docs/logicalSource.md index 3e387a63..9b68e5a4 100644 --- a/spec/docs/logicalSource.md +++ b/spec/docs/logicalSource.md @@ -1,15 +1,17 @@ -# Defining Logical Sources +# Defining Iterables and Logical Sources -A logical source is an abstract construct to describe data access and iteration for a [=data source=] such that it can be mapped to [=RDF triples=]. +An iterable is an abstract construct to describe data access and iteration for a [=data source=]. -A [=logical source=] (`rml:LogicalSource`) MUST have: -* exactly one `rml:referenceFormulation` property, whose value is a reference formulation which defines how the underlying [=data source=] is to be accessed, and which [=expressions=] can be evaluated on [=logical iterations=], +An [=iterable=] (`rml:Iterable`) MUST have: +* zero or one `rml:referenceFormulation` property, whose value is a reference formulation which defines how to reference parts of the underlying [=data source=], and which [=expressions=] can be evaluated on [=logical iterations=]. If no `rml:referenceFormulation` is provided, it MUST be inferred as defined for the specific type of [=Iterable=]. * zero or one `rml:iterator` property, whose value is a logical iterator that defines a sequence of [=logical iterations=] on the [=data source=]. If no [=iterator=] is provided, a default iterator MUST be associated with the [=reference formulation=]. -A logical iteration is an item in the sequence produced by the [=logical source=], on which [=expressions=] can be evaluated. +A logical iteration is an item in the sequence produced by the [=iterable=], on which [=expressions=] can be evaluated. -A data source is an abstract concept that represents a source of data that can be accessed via a [=logical source=]. A [=data source=] can be a file, a database, a web service, or any other source of data. +A data source is an abstract concept that represents a source of data that can be accessed via a [=iterable=]. A [=data source=] can be a file, a database, a web service, or any other source of data, depending on the type of [=iterable=]. + +An abstract logical source (`rml:AbstractLogicalSource`) is a sub-class of [=iterable=] that can be associated with a [=triples map=] such that a [=data source=] can be mapped to [=RDF triples=]. diff --git a/spec/docs/mapping.md b/spec/docs/mapping.md index c5d65a65..cdc98d4c 100644 --- a/spec/docs/mapping.md +++ b/spec/docs/mapping.md @@ -6,7 +6,7 @@ All [=RDF triples=] generated from one [=logical iteration=] in the [=logical so A [=triples map=] is represented by a [=resource=] that references the following other [=resources=]: -* It MUST have zero or one [=logical source=] (`rml:logicalSource`) property. +* It MUST have zero or one [=logical source=] (`rml:logicalSource`) property whose value MUST be an instance of a sub-class of an [=abstract logical source=] (`rml:AbstractLogicalSource`). * It MUST have exactly one [=subject map=] (`rml:SubjectMap`) that specifies how to generate a subject for each [=iteration=] of the [=logical source=]. It may be specified in two ways: 1. using the subject map `rml:subjectMap` property, whose value MUST be the [=subject map=], or @@ -15,7 +15,7 @@ It may be specified in two ways: They specify pairs of [=predicate maps=] and [=object maps=] that, together with the [=subjects=] generated by the [=subject map=], may form one or more [=RDF triples=] for each [=iteration=]. -## Typed Literals (`rml:datatypeMap` and `rml:datatype`) +## Datatypes of Literals (`rml:datatypeMap` and `rml:datatype`) A datatypeable term map is a [=term map=] with a [=term type=] of `rml:Literal` that does not have a [specified language map](#language-tags-rml-languagemap-and-rml-language). -[=Datatypeable term maps=] MUST generate zero or more [=literals=]. The [=datatype=] of these [=literals=] MAY be [automatically determined](#automatically-deriving-datatypes), or it MAY be explicitly specified using a [=datatype map=]. +[=Datatypeable term maps=] MUST generate zero or more [=literals=]. The [=datatype=] of these [=literals=] can be automatically determined with a [=natural mapping=] (producing a [=natural RDF literal=]), or it can be explicitly specified using a [=datatype map=] (producing a [=datatype-override RDF literal=]). A datatype map (`rml:DatatypeMap`) is an [=expression map=]. It specifies a rule for generating one or more [=datatypes=] of a [=datatypeable term map=]. A [=datatype map=] MUST generate a list of [=IRI=] values, in which the [=IRIs=] are the [=datatype IRIs=] of the [=datatypeable term map=]. @@ -363,16 +338,6 @@ and a term type of `rml:Literal` can be used. The following example shows an [=object map=] that explicitly specifies `xsd:positiveInteger` type. -A [datatype-override RDF literal] of that [=datatype=] will be generated. +A [=datatype-override RDF literal=] of that [=datatype=] will be generated. -### Automatically deriving datatypes - -The [=datatype=] of these [=literals=] can be automatically determined -based on the SQL datatype of the underlying logical table column -(producing a [natural RDF literal]()), -or it can be explicitly overridden using `rml:datatype` -(producing a [datatype-override RDF literal]()). - - + diff --git a/spec/docs/tooling.md b/spec/docs/tooling.md index 39433256..dba5f2b1 100644 --- a/spec/docs/tooling.md +++ b/spec/docs/tooling.md @@ -58,7 +58,7 @@ The following conditions give rise to data errors: 1. A [=term map=] with term type `rml:IRI` results in the generation of an invalid [=IRI=]. 2. A [=term map=] whose [=natural RDF datatype=] is overridden with a specified [=datatype=] -produces an [ill-typed literal]() (see [datatype-override RDF literal]()). +produces an [=ill-typed literal=] (see [datatype-override RDF literal]()). When providing access to the output dataset, an [RML processor]() MUST abort any operation diff --git a/spec/docs/xsdTerminology.md b/spec/docs/xsdTerminology.md new file mode 100644 index 00000000..f255a800 --- /dev/null +++ b/spec/docs/xsdTerminology.md @@ -0,0 +1,6 @@ +# XML Schema Definition Language (XSD) Terminology + +This section lists some terms normatively defined in [[XMLSCHEMA11-2]] and used in RML: + +- XSD Datatype +- Canonical mapping