NAME
ODO::Ontology::RDFS - RDFS to Perl code generator frontend.
SYNOPSIS
use ODO::Node;
use ODO::Graph::Simple;
use ODO::Ontology::RDFS;
my $schema = ODO::Graph::Simple->Memory(name=> 'Schema Model');
my $source_data = ODO::Graph::Simple->Memory(name=> 'Source Data model');
my ($statements, $imports) = ODO::Parser::XML->parse_file('/path/to/a/file.xml');
$schema->add($statements);
print STDERR "Generating Perl schema\n";
my $SCHEMA = ODO::Ontology::RDFS->new(graph=> $source_data, schema_graph=> $schema);
# $SCHEMA is_a ODO::Ontology::RDFS::PerlEntity
my $resource = RDFS::Resource->new(ODO::Node::Resource->new('http://tempuri.org/someResource'), $source_data);
my $klass = RDFS::Class->new(ODO::Node::Resource->new('http://tempuri.org/someClassDefinition'), $source_data);
DESCRIPTION
CONSTRUCTOR
METHODS
- define_schema_objects( )
-
Get all class data:
1. Get all subjects with type Class - the name of the class is provided by the label - the comment is a description of the class - the definition is a URI where you can find the actual definition of the the object (definition and isDefinedBy should be methods) - record any explicit subclasses with the subClassOf triple 2. Get all properties with their domain being in the class from step 1 - Access them with a general property( $name, [ $value ] ) method ? 3. Build objects
- define_class_objects( )
- define_property_objects( )
- eval_schema_objects( )
- eval_object( )
- getObjectProperties( $objectURI )
-
Finding properties of a particular class means finding all triples that have the class's subject URI and the form <any, rdfs:domain> <subject URI>
- get_constructor_data( $uri )
- getSchemaData( $schemaObject, $property )
- get_class_data( $uri )
- get_property_data( $uri )
- get_rdfs_label( $uri )
- isPropertyURI( $uri )
- isClassURI( $uri )
- forward_declare_classes( $class_uri_list )
- foward_declare_properties( $property_list )
- get_class_uris( )
-
Finds all of the triples that fit the form: (subject, <rdf:type>, <rdfs:Class>) Semantically: all of the RDFS classes in the graph.
- get_property_uris( )
-
Finds all triples that fit the form: (<URI>, <rdf:type>, <rdf:Property>). Semantically: Find all of the rdf:Properties in this graph.
- getPropertiesInDomain( $graph, $owner_uri )
-
Finds all of the triples that fit the form: (<ownerSubjectURI>, <rdf:type>, <rdfs:domain>) Semantically: All subjects that have a domain restriction that is the owner class. These should be <rdf:Properties>
- __uri_to_perl_identifier($uri)
- uri_to_property_package_name( $uri )
- uri_to_package_name( $uri )
- print_perl( )
- bootstrap( )
COPYRIGHT
Copyright (c) 2005-2006 IBM Corporation.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html