1RDF::TrineX::Parser::PrUestedrslC(o3n)tributed Perl DocuRmDeFn:t:aTtriionneX::Parser::Pretdsl(3)
2
3
4
6 RDF::TrineX::Parser::Pretdsl - the Perl RDF Extended Turtle
7 Domain-Specific Language
8
10 Pretdsl is a domain-specific language for describing Perl projects (in
11 particular CPAN releases) in RDF triples. It can be seen as an enhanced
12 version of Turtle/N3, or an application of ShorthandRDF.
13
14 About Pretdsl
15 Pretdsl is Notation 3, plus...
16
17 Predefined prefixes
18
19 The following prefixes are pre-declared (though you can explicitly
20 declare them, or redeclare them to be something else if you prefer...)
21
22 # RDFa 1.1 prefixes
23 @prefix grddl: <http://www.w3.org/2003/g/data-view#> .
24 @prefix ma: <http://www.w3.org/ns/ma-ont#> .
25 @prefix owl: <http://www.w3.org/2002/07/owl#> .
26 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
27 @prefix rdfa: <http://www.w3.org/ns/rdfa#> .
28 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
29 @prefix rif: <http://www.w3.org/2007/rif#> .
30 @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
31 @prefix skosxl: <http://www.w3.org/2008/05/skos-xl#> .
32 @prefix wdr: <http://www.w3.org/2007/05/powder#> .
33 @prefix void: <http://rdfs.org/ns/void#> .
34 @prefix wdrs: <http://www.w3.org/2007/05/powder-s#> .
35 @prefix xhv: <http://www.w3.org/1999/xhtml/vocab#> .
36 @prefix xml: <http://www.w3.org/XML/1998/namespace> .
37 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
38 @prefix cc: <http://creativecommons.org/ns#> .
39 @prefix ctag: <http://commontag.org/ns#> .
40 @prefix dc: <http://purl.org/dc/terms/> .
41 @prefix dcterms: <http://purl.org/dc/terms/> .
42 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
43 @prefix gr: <http://purl.org/goodrelations/v1#> .
44 @prefix ical: <http://www.w3.org/2002/12/cal/icaltzd#> .
45 @prefix og: <http://ogp.me/ns#> .
46 @prefix rev: <http://purl.org/stuff/rev#> .
47 @prefix sioc: <http://rdfs.org/sioc/ns#> .
48 @prefix v: <http://rdf.data-vocabulary.org/#> .
49 @prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
50 @prefix schema: <http://schema.org/> .
51
52 # Additional useful vocabularies
53 @prefix cpant: <http://purl.org/NET/cpan-uri/terms#>.
54 @prefix dbug: <http://ontologi.es/doap-bugs#> .
55 @prefix dcs: <http://ontologi.es/doap-changeset#> .
56 @prefix deps: <http://ontologi.es/doap-deps#> .
57 @prefix doap: <http://usefulinc.com/ns/doap#> .
58 @prefix earl: <http://www.w3.org/ns/earl#> .
59 @prefix nfo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#> .
60 @prefix pretdsl: <http://ontologi.es/pretdsl#> .
61 @prefix pretdsl-dt: <http://ontologi.es/pretdsl#dt/> .
62
63 Predefined terms
64
65 Like how Turtle defines "a" as a term that expands to rdf:type, Pretdsl
66 defines some terms:
67
68 # Generally useful predicates
69 @term label rdfs:label .
70 @term comment rdfs:comment .
71 @term seealso rdfs:seeAlso .
72
73 # Makefile predicates
74 @term abstract_from cpant:abstract_from .
75 @term author_from cpant:author_from .
76 @term license_from cpant:license_from .
77 @term requires_from cpant:requires_from .
78 @term perl_version_from cpant:perl_version_from .
79 @term version_from cpant:version_from .
80 @term readme_from cpant:readme_from .
81 @term no_index cpant:no_index .
82 @term install_script cpant:install_script .
83 @term requires cpant:requires .
84 @term requires_external_bin cpant:requires_external_bin .
85 @term recommends cpant:recommends .
86 @term test_requires cpant:test_requires .
87 @term configure_requires cpant:configure_requires .
88 @term build_requires cpant:build_requires .
89 @term provides cpant:provides .
90
91 # Changelog predicates
92 @term issued dc:issued .
93 @term changeset dcs:changeset .
94 @term item dcs:item .
95 @term versus dcs:versus .
96
97 # Changelog datatypes
98 @term Addition pretdsl-dt:Addition .
99 @term BackCompat pretdsl-dt:BackCompat .
100 @term Bugfix pretdsl-dt:Bugfix .
101 @term Change pretdsl-dt:Change .
102 @term Documentation pretdsl-dt:Documentation .
103 @term Packaging pretdsl-dt:Packaging .
104 @term Regresion pretdsl-dt:Regression .
105 @term Removal pretdsl-dt:Removal .
106 @term SecurityFix pretdsl-dt:SecurityFix .
107 @term SecurityRegression pretdsl-dt:SecurityRegression .
108 @term Tests pretdsl-dt:Tests .
109 @term Update pretdsl-dt:Update .
110
111 XSD datatype shorthands
112
113 Like how Turtle has shorthands for literals of type xsd:integer,
114 xsd:double and xsd:boolean, such that they don't need quoting or an
115 explicit datatype, Pretdsl defines shorthands for xsd:date and
116 xsd:dateTime.
117
118 For xsd:date, just use YYYY-MM-DD format. For xsd:dateTime, use
119 YYYY-MM-DDThh:mm:ss.sss+zzzz (seconds must be included, but fractions
120 of seconds are optional; timezones are optional, and 'Z' is supported
121 for UTC).
122
123 Perl-specific datatype shorthands
124
125 Pretdsl defines a special quoting style for Perl-specific resources. A
126 quoted resource starts and ends with a backtick (`). The first backtick
127 may also be preceded by a single letter which is used for
128 disambiguation.
129
130 Distributions:
131
132 `HTML-HTML5-Parser`
133 d`HTML-HTML5-Parser`
134
135 Releases:
136
137 `HTML-HTML5-Parser 0.200`
138 `HTML-HTML5-Parser 0.200 cpan:TOBYINK`
139 r`HTML-HTML5-Parser 0.200`
140 r`HTML-HTML5-Parser 0.200 cpan:TOBYINK`
141
142 Files:
143
144 `./README` # needs to contain a slash to disambiguate
145 `xt/test.pod` # with distributions
146 f`README` # or use explicit disambiguating letter
147
148 # Files may be qualified with a release...
149 f`README HTML-HTML5-Parser 0.200 cpan:TOBYINK`
150
151 Modules:
152
153 `HTML::HTML5::Parser`
154
155 # The following are semantically identical
156 m`HTML::HTML5::Parser`
157 f`lib/HTML/HTML5/Parser.pm`
158
159 # And so this is fine too...
160 m`HTML::HTML5::Parser HTML-HTML5-Parser 0.200 cpan:TOBYINK`
161
162 # Trailing "::" can disambiguate
163 `JSON::`
164
165 Packages:
166
167 # Always need the disambiguation letter to avoid confusion
168 # with modules
169 p`HTML::HTML5::Parser`
170
171 The line between packages and modules is a little blurred. Future
172 versions of Pretdsl may also provide datatype shorthands for classes
173 and roles (in the Moose/Mouse sense).
174
175 CPAN IDs:
176
177 # It looks like a qname, but it's not. It's a case-insensitive
178 # literal shorthand
179 cpan:TOBYINK
180 cpan:tobyink
181
182 RT Bugs:
183
184 # No the hash below doesn't start a comment.
185 RT#12345
186
187 The Switch-a-Roo
188
189 All the Perl-specific datatypes, plus the changelog datatypes mentioned
190 above are intercepted during the parse, and being added to the model as
191 literals, they are replaced with blank nodes and URIs, and enriched
192 with additional triples.
193
194 So the following Pretdsl which appears to have a literal subject:
195
196 `Example-Distribution 0.001 cpan:TOBYINK`
197 issued 2012-06-18 .
198
199 May be equivalent to the following Turtle:
200
201 <http://purl.org/NET/cpan-uri/dist/Example-Distribution/v_0-001>
202 a doap:Version ;
203 dcterms:identifier "Example-Distribution-0.001"^^xsd:string ;
204 doap:revision "0.001"^^xsd:string ;
205 dcs:released-by cpan:tobyink ;
206 doap:file-release <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/Example-Distribution-0.001.tar.gz> ;
207 dcterms:issued "2012-06-18"^^xsd:date .
208
209 <http://purl.org/NET/cpan-uri/dist/Example-Distribution/project>
210 doap:release <http://purl.org/NET/cpan-uri/dist/Example-Distribution/v_0-001> .
211
212 About the Parser
213 The parser provides the same API as RDF::Trine::Parser::Notation3.
214
216 Please report any bugs to
217 <http://rt.cpan.org/Dist/Display.html?Queue=RDF-TriN3>.
218
220 RDF::Trine::Parser::NTriples, RDF::Trine::Parser::Turtle,
221 RDF::Trine::Parser::Notation3, RDF::Trine::Parser::ShorthandRDF.
222
223 Module::Install::RDF, Module::Install::DOAP,
224 Module::Install::DOAPChangeSets, Module::Package::RDF.
225
227 Toby Inkster <tobyink@cpan.org>.
228
230 This software is copyright (c) 2012 by Toby Inkster.
231
232 This is free software; you can redistribute it and/or modify it under
233 the same terms as the Perl 5 programming language system itself.
234
236 THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
237 WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
238 MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
239
240
241
242perl v5.30.0 2019-07-26 RDF::TrineX::Parser::Pretdsl(3)