SADI::Data::OWL::DatatypeProperty - SADI::Data::OWL::DatatypeProperty documentation


SADI documentation Contained in the SADI distribution.

Index


Code Index:

NAME

Top

SADI::Data::OWL::DatatypeProperty

SYNOPSIS

Top

 use SADI::Data::OWL::DatatypeProperty;

 # create a sadi owl DatatypeProperty
 my $data = SADI::Data::OWL::DatatypeProperty->new ();




DESCRIPTION

Top

An object representing an OWL DatatypeProperty

AUTHORS

Top

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

ACCESSIBLE ATTRIBUTES

Top

Details are in SADI::Base. Here just a list of them:

value - the value that this datatype property assumes
range - the range of this datatype property
domain - the domain for this datatype property
uri - the uri of this datatype property

subroutines

Top

SUBROUTINES

Top


SADI documentation Contained in the SADI distribution.
#-----------------------------------------------------------------
# SADI::Data::OWL::DatatypeProperty
# Author: Edward Kawas <edward.kawas@gmail.com>,
# For copyright and disclaimer see below.
#
# $Id: DatatypeProperty.pm,v 1.5 2009-11-12 21:11:30 ubuntu Exp $
#-----------------------------------------------------------------
package SADI::Data::OWL::DatatypeProperty;
use base ("SADI::Base");
use strict;

# imports
use RDF::Core::Resource;
use RDF::Core::Statement;
use RDF::Core::Literal;
use RDF::Core::NodeFactory;

use SADI::RDF::Predicates::DC_PROTEGE;
use SADI::RDF::Predicates::FETA;
use SADI::RDF::Predicates::OMG_LSID;
use SADI::RDF::Predicates::OWL;
use SADI::RDF::Predicates::RDF;
use SADI::RDF::Predicates::RDFS;

# add versioning to this module
use vars qw /$VERSION/;
$VERSION = sprintf "%d.%02d", q$Revision: 1.5 $ =~ /: (\d+)\.(\d+)/;

#-----------------------------------------------------------------
# A list of allowed attribute names. See SADI::Base for details.
#-----------------------------------------------------------------

{
	my %_allowed = (
		value  => { 
			type => SADI::Base->STRING,
		},
		range   => { type => SADI::Base->STRING },
		domain  => { type => SADI::Base->STRING },
		uri     => { type => SADI::Base->STRING },
	);

	sub _accessible {
		my ( $self, $attr ) = @_;
		exists $_allowed{$attr} or $self->SUPER::_accessible($attr);
	}

	sub _attr_prop {
		my ( $self, $attr_name, $prop_name ) = @_;
		my $attr = $_allowed{$attr_name};
		return ref($attr) ? $attr->{$prop_name} : $attr if $attr;
		return $self->SUPER::_attr_prop( $attr_name, $prop_name );
	}
}

#-----------------------------------------------------------------

#-----------------------------------------------------------------
# init
#-----------------------------------------------------------------
sub init {
	my ($self) = shift;
	$self->SUPER::init();
}

1;
__END__