The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DatatypeParser - An module for obtaining datatypes from the RDF Namespace ontology

SYNOPSIS

        use MOBY::RDF::Parsers::DatatypeParser;
        use Data::Dumper;

        # construct a parser for datatypes
        my $parser = MOBY::RDF::Parsers::DatatypeParser->new();

        # get all datatypes from a URL
        my $namespace_href = $parser->getDatatypes('http://biomoby.org/RESOURCES/MOBY-S/Objects');

        # print out details regarding 'BasicGFFSequenceFeature'
        print Dumper( $datatype_href->{'BasicGFFSequenceFeature'} );

DESCRIPTION

This module contains the methods required to download and parse Namespace RDF into individual datatypes

AUTHORS

 Edward Kawas (edward.kawas [at] gmail [dot] com)

SUBROUTINES

new

Contructs a new DatatypeParser.

Input: none.

Example:

        MOBY::RDF::Parsers::DatatypeParser->new()

getDatatypes

Downloads RDF from $url, parses it and returns a hashref of hashes.

The key into the hashref is a datatype name and the hash value contains information on that datatype.

The keys for the inner hash are:

   objectLSID => "urn:lsid:..."
   description => "a human-readable description of the object"
   contactEmail => "your@email.address"
   authURI => "URI of the registrar of this object"
   Relationships => {
        relationshipType1 => [
                {
                        object      => Object1,
                        articleName => ArticleName1, 
                        lsid        => lsid1
                },
                {
                        object      => Object2,
                        articleName => ArticleName2,
                        lsid        => lsid2
                }
        ],
            relationshipType2 => [
                {
                        object      => Object3,
                        articleName => ArticleName3, 
                        lsid        => lsid3
                }
            ]
    }

The returned hashref is the same structure as the one returned by MOBY::Client::Central->retrieveObjectDefinition

Input: a scalar URL

Example:

        my $parser = MOBY::RDF::Parsers::DatatypeParser->new();
        my $datatype_href = $parser->getDatatypes('http://biomoby.org/RESOURCES/MOBY-S/Objects');