SIOC::Space - SIOC Space class


SIOC documentation Contained in the SIOC distribution.

Index


Code Index:

NAME

Top

SIOC::Space -- SIOC Space class

VERSION

Top

This documentation refers to SIOC::Space version 1.0.0.

SYNOPSIS

Top

   use SIOC::Space;




DESCRIPTION

Top

A Space is defined as being a place where data resides. It can be the location for a set of Containers of content Items, e.g., on a Site, personal desktop, shared filespace, etc. Any data object that resides on a particular Space can be linked to it using the sioc:has_space property.

CLASS ATTRIBUTES

Top

parent

A data Space which this resource is a part of.

space_of

A resource which belongs to this data Space.

usergroups

Points to Usergroups that have certain access to this Space.

SUBROUTINES/METHODS

Top

TODO: document methods

DIAGNOSTICS

Top

For diagnostics information, see the SIOC base class.

CONFIGURATION AND ENVIRONMENT

Top

This module doesn't need configuration.

DEPENDENCIES

Top

This module depends on the following modules:

INCOMPATIBILITIES

Top

There are no known incompatibilities.

BUGS AND LIMITATIONS

Top

There are no known bugs in this module.

Please report problems via the bug tracking system on the perl-SIOC project website: http://developer.berlios.de/projects/perl-sioc/.

Patches are welcome.

AUTHOR

Top

Jochen Lillich <geewiz@cpan.org>

LICENSE AND COPYRIGHT

Top


SIOC documentation Contained in the SIOC distribution.

###########################################################
# SIOC::Space
# Space class for the SIOC ontology
###########################################################
#
# $Id: Space.pm 10 2008-03-01 21:38:39Z geewiz $
#
package SIOC::Space;

use strict;
use warnings;

our $VERSION = do { if (q$Revision: 10 $ =~ /Revision: (?:\d+)/mx) { sprintf "1.0-%03d", $1; }; };

use Moose;
use MooseX::AttributeHelpers;

extends 'SIOC';

### optional attributes

has 'parent' => (
    isa => 'SIOC::Space',
    is => 'rw',
);

has 'space_of' => (
    metaclass => 'Collection::Array',
    is => 'rw',
    isa => 'ArrayRef[SIOC]',
    default => sub { [] },
    provides => {
        'push' => 'make_space_of',
    },
);

has 'usergroups' => (
    isa => 'ArrayRef[SIOC::Usergroup]',
    metaclass => 'Collection::Array',
    is => 'rw',
    default => sub { [] },
    provides => {
        'push' => 'add_usergroup',
    },
);

### methods

after 'fill_template' => sub {
    my ($self) = @_;
    
    $self->set_template_var(parent => $self->parent);
    $self->set_template_var(usergroups => $self->usergroups);
    $self->set_template_var(space_of => $self->space_of);
};

1;
__END__