The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Catmandu::Importer::RDF - parse RDF data

SYNOPSIS

Command line client catmandu:

    catmandu convert RDF --url http://d-nb.info/gnd/4151473-7 to YAML
    catmandu convert RDF --file rdfdump.ttl to JSON

In Perl code:

    use Catmandu::Importer::RDF;
    my $url = "http://dx.doi.org/10.2474/trol.7.147";
    my $rdf = Catmandu::Importer::RDF->new( url => $url )->first;

DESCRIPTION

This Catmandu::Importer can be use to import RDF data from URLs, files or input streams. Importing from RDF stores or via SPARQL is not supported yet.

By default an RDF graph is imported as single item in aREF format (see RDF::aREF).

CONFIGURATION

url

URL to retrieve RDF from.

type

RDF serialization type (e.g. ttl for RDF/Turtle).

base

Base URL. By default derived from the URL or file name.

ns

Use default namespace prefixes as provided by RDF::NS to abbreviate predicate and datatype URIs. Set to 0 to disable abbreviating URIs. Set to a specific date to get stable namespace prefix mappings.

triples

Import each RDF triple as one aREF subject map (default) or predicate map (option predicate_map), if enabled.

predicate_map

Import RDF as aREF predicate map, if possible.

file
fh
encoding
fix

Default configuration options of Catmandu::Importer.

METHODS

See Catmandu::Importer.

SEE ALSO

RDF::Trine::Store, RDF::Trine::Parser