NAME

MooseX::Semantic - Adding RDF semantics to the Moose framework

DESCRIPTION

MooseX::Semantic is a set of modules that adds a semantic layer to Moose-powered objects. Moose classes that consume the various roles MooseX::Semantic offers are interoperable with the RDF::Trine RDF framework.

DOCUMENTATION OVERVIEW

MooseX::Semantic can be used on multiple levels of integration into RDF.

Basic semantics

For basic semantic additions, the following roles are necessary:

MooseX::Semantic::Meta::Attribute::Trait

Add URIs, datatype and language to your attributes, turning them into RDF properties.

MooseX::Semantic::Role::WithRdfType

Adds a class attribute rdf_type representing the RDF is-a relationship.

MooseX::Semantic::Role::Resource

Adds an 'rdf_about' attribute to Moose objects turning them into RDF resources.

From Moose to RDF and back

The following classes make round-tripping to/from RDF/Moose possible:

MooseX::Semantic::Role::RdfExport

Role for exporting a Moose object to RDF, including serialization and exporting to SPARQL/U endpoints.

MooseX::Semantic::Role::RdfImport

Creating instances of MooseX::Semantic-flavored Moose classes from RDF data.

MooseX::Semantic::Role::RdfImportAll

Bulk import of multiple RDF resources.

Persistence

These modules make MooseX::Semantic-enabled classes storable in a RDF::Trine::Store and handle statement obsolescence.

MooseX::Semantic::Role::RdfBackend

Assignment a RDF::Trine::Store object to a class, so objects of the class can be stored and re-imported from that store.

MooseX::Semantic::Role::RdfObsolescence

Role that keeps track of changes within an object's set of statements and helps keeping the statements accurate.

Schema introspection

MooseX::Semantic::Util::SchemaExport

Extract the schema/ontology that a MooseX::Semantic class represents.

MooseX::Semantic::Util::SchemaImport

Dynamically adding MooseX::Semantic::Meta::Attribute::Trait-enabled attributes to existing classes or creating MooseX::Semantic classes directly from a schema such as FOAF.

Utility Modules

MooseX::Semantic::Types

Defines subtypes and coercions for various RDF-related data structures

MooseX::Semantic::Util::TypeConstraintWalker

Convenient way to loop through the attributes of a Moose class with regards to their RDF semantics.

TODO BUGS

Documentation is lacking, the tests would be a good starting point right now.

Context isn't properly handled right now.

Performance hasn't been considered yet.

Schema introspection without at least RDFS reasoning can only get you so far.

Recursive import is buggy.

AUTHOR

Konstantin Baierer (<kba@cpan.org>)
Toby Inkster (<tobyink@cpan.org>)

SEE ALSO

RDF::Trine

LICENSE

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perldoc perlartistic.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.