NAME
FAIR::Profile::Parser - Parser that reads FAIR Profile RDF and creates a FAIR::Profile object
VERSION
version 0.20
SYNOPSIS
use FAIR::Profile::Parser;
my $parser = FAIR::Profile::Parser->new(filename => "./ProfileSchema.rdf");
my $DatasetSchema = $parser->parse;
my $schema = $DatasetSchema->serialize;
open(OUT, ">ProfileSchema2.rdf")
print OUT $schema;
close OUT;
DESCRIPTION
FAIR Profiles describe the metadata elements, and constrained values, that should be associated with a given information entity. They ARE NOT containers for this metadata, they only describe what that metadata should look like (meta-meta-data :-) )
This module will parse an RDF file containing a FAIR Profile into objects that can be used to construct a metadata capture interface. The objects will tell you what fields are required/optional, and what possible values they are allowed to contain.
NAME
FAIR::Profile::Parser - a module for reading FAIR Profile RDF files
AUTHORS
Mark Wilkinson (markw at illuminae dot com)
METHODS
new
Title : new
Usage : my $ProfileParser = FAIR::Profile::Parser->new();
Function: Builds a new FAIR::Profile::Parser
Returns : FAIR::Profile::Parser
Args : filename => $filename
model => $model (an existing RDF::Trine::Model -
if you don't supply this it will be created for you)
parse
Title : parse
Usage : my $ProfileObject = $ProfileParser->parse();
Function: parse the file associated with the Parser
Returns : FAIR::Profile
Args : none
filename
Title : filename
Usage : $ProfileParser->filename($filename);
Function: associate a file with the parser
Returns : null
Args : full or relative path to the file to be parsed
data
Title : data
Usage : $ProfileParser->data($rdfdata);
Function: associate a data string with the parser
Returns : null
Args : string of RDF in the format specified in $Parser->data_format
data_format
Title : data_format
Usage : $ProfileParser->data_format($format);
Function: the format of the RDF data in ->data (if any)
Returns : null
Args : rdfxml | turtle | ntriples | nquads (or any type acceptable to RDF::Trine)
model
Title : model
Usage : $ProfileParser->model($RDFTrineModel);
Function: associate an RDF::Trine::Model with the parser
Returns : null
Args : RDF::Trine::Model (this will be created for you, if not supplied)
profile
Title : profile
Usage : $Profile = $ProfileParser->profile;
Function: retrieve the profile after a parse. Must parse first!
Returns : FAIR::Profile
Args : none
AUTHOR
Mark Denis Wilkinson (markw [at] illuiminae [dot] com)
COPYRIGHT AND LICENSE
This software is Copyright (c) 2015 by Mark Denis Wilkinson.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004