| 1 |
NAME |
| 2 |
RDF::DOAP - an object-oriented interface for DOAP (Description of a |
| 3 |
Project) data |
| 4 |
|
| 5 |
SYNOPSIS |
| 6 |
use feature 'say'; |
| 7 |
use RDF::DOAP; |
| 8 |
|
| 9 |
my $url = 'http://api.metacpan.org/source/DOY/Moose-2.0604/doap.rdf'; |
| 10 |
my $doap = 'RDF::DOAP'->from_url($url); |
| 11 |
my $proj = $doap->project; |
| 12 |
|
| 13 |
say $proj->name; # "Moose" |
| 14 |
|
| 15 |
say $_->name |
| 16 |
for @{ $proj->maintainer }; |
| 17 |
|
| 18 |
DESCRIPTION |
| 19 |
A little sparsely documented right now. |
| 20 |
|
| 21 |
The RDF::DOAP class itself is mostly a wrapper for parsing RDF and |
| 22 |
building objects. Most of the interesting stuff is in the "Bundled |
| 23 |
Classes". |
| 24 |
|
| 25 |
Constructors |
| 26 |
`new(%attrs)` |
| 27 |
You don't want to use this. |
| 28 |
|
| 29 |
`from_url($url)` |
| 30 |
Parse the RDF at the given URL and construct an RDF::DOAP object. |
| 31 |
|
| 32 |
`from_file($fh, $base)` |
| 33 |
Parse a file handle or file name. A base URL may be provided for |
| 34 |
resolving relative URI references; if omitted the base is assumed to |
| 35 |
be `http://localhost/` which is almost certainly wrong. |
| 36 |
|
| 37 |
`from_model($model)` |
| 38 |
Read DOAP from an existing RDF::Trine::Model. |
| 39 |
|
| 40 |
Attributes |
| 41 |
`projects` |
| 42 |
An arrayref; the list of software projects found in the input data. |
| 43 |
This cannot be provided in the constructor. |
| 44 |
|
| 45 |
Methods |
| 46 |
`project` |
| 47 |
If `projects` contains only one project, returns it. |
| 48 |
|
| 49 |
Otherwise, tries to guess which of the projects the input data was |
| 50 |
mostly trying to describe. |
| 51 |
|
| 52 |
Bundled Classes |
| 53 |
Within each of these classes, the attributes correspond roughly to the |
| 54 |
properties defined for them in the DOAP schema; however hyphens in |
| 55 |
property URIs become underscores in attribute names. |
| 56 |
|
| 57 |
RDF::DOAP::Resource |
| 58 |
Correponds roughly to the *rdfs:Resource* class, excluding literals. |
| 59 |
|
| 60 |
RDF::DOAP::Project |
| 61 |
Correponds to *doap:Project*. |
| 62 |
|
| 63 |
RDF::DOAP::Repository |
| 64 |
Correponds to *doap:Repository*. |
| 65 |
|
| 66 |
RDF::DOAP::Person |
| 67 |
Correponds to *foaf:Person*. |
| 68 |
|
| 69 |
RDF::DOAP::Version |
| 70 |
Correponds to *doap:Version*. |
| 71 |
|
| 72 |
RDF::DOAP::ChangeSet |
| 73 |
Correponds to *dcs:ChangeSet*. |
| 74 |
|
| 75 |
RDF::DOAP::Change |
| 76 |
Correponds to *dcs:Change*. |
| 77 |
|
| 78 |
RDF::DOAP::Issue |
| 79 |
Correponds to *dbug:Issue*. |
| 80 |
|
| 81 |
BUGS |
| 82 |
Please report any bugs to <https://github.com/kjetilk/p5-rdf-doap/issues>. |
| 83 |
|
| 84 |
SEE ALSO |
| 85 |
* Edd Dumbill's series of articles on DOAP's design: part 1 |
| 86 |
<http://www.ibm.com/developerworks/xml/library/x-osproj/>, part 2 |
| 87 |
<http://www.ibm.com/developerworks/xml/library/x-osproj2/>, part 3 |
| 88 |
<http://www.ibm.com/developerworks/xml/library/x-osproj4/> and part 4 |
| 89 |
<http://www.ibm.com/developerworks/xml/library/x-osproj3/> |
| 90 |
|
| 91 |
* The DOAP Schema <http://usefulinc.com/ns/doap#>. |
| 92 |
|
| 93 |
* The DOAP Change Sets Schema <http://ontologi.es/doap-changeset#>. |
| 94 |
|
| 95 |
* The DOAP Bugs Schema <http://ontologi.es/doap-bugs#>. |
| 96 |
|
| 97 |
AUTHOR |
| 98 |
Toby Inkster <[email protected]>. Kjetil Kjernsmo <[email protected]>. |
| 99 |
|
| 100 |
COPYRIGHT AND LICENCE |
| 101 |
This software is copyright (c) 2013 by Toby Inkster, 2017 by Kjetil |
| 102 |
Kjernsmo. |
| 103 |
|
| 104 |
This is free software; you can redistribute it and/or modify it under the |
| 105 |
same terms as the Perl 5 programming language system itself. |
| 106 |
|
| 107 |
DISCLAIMER OF WARRANTIES |
| 108 |
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED |
| 109 |
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF |
| 110 |
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 111 |
|