LibTracker::Client::MetaDataTypeDetails - Metadata type details for LT::C


LibTracker-Client documentation Contained in the LibTracker-Client distribution.

Index


Code Index:

NAME

Top

LibTracker::Client::MetaDataTypeDetails - Metadata type details for LT::C

SYNOPSIS

Top

  use LibTracker::Client qw(:all);
  use LibTracker::Client::MetaDataTypeDetails;

  my $tracker = LibTracker::Client->get_instance();

  my $mdtd = $tracker->get_metadata_type_details("Doc:Author");

  print "type         : ", $mdtd->type(), "\n";
  print "is_embedded  : ", $mdtd->is_embedded(), "\n";
  print "is_writeable : ", $mdtd->is_writeable(), "\n";

  undef $tracker;

DESCRIPTION

Top

This module implements the MetaDataTypeDetails data structure for LibTracker::Client.

INTERFACE

Top

STATIC METHODS

new()
  args:
    args(hashref)    : contains the type, is_embedded and
                       is_writeable keys with values.

Returns a reference blessed into LibTracker::Client::MetaDataTypeDetails on success. Dies on failure.

INSTANCE METHODS

type()
  args:
    type(string)[optional]     : the type

If passed an argument, sets the type field to the given value. Returns the type for the MetaDataTypeDetails object.

is_embedded()
  args:
    is_embedded(boolean)[optional] : the is_embedded flag

If passed an argument, sets the is_embedded field to the given value. Returns the is_embedded flag for the MetaDataTypeDetails object.

is_writeable()
  args:
    is_writeable(boolean)[optional] : the is_embedded flag

If passed an argument, sets the is_writeable field to the given value. Returns the is_writeable flag for the MetaDataTypeDetails object.

EXPORT

None by default.

Exportable constants

None.

SEE ALSO

Top

The tracker project home at http://www.gnome.org/projects/tracker/

LibTracker::Client specific communication with the author : ltcp@theoldmonk.net

LibTracker::Client homepage at http://www.theoldmonk.net/ltcp/

AUTHOR

Top

Devendra Gera, <gera@theoldmonk.net>

COPYRIGHT AND LICENSE

Top


LibTracker-Client documentation Contained in the LibTracker-Client distribution.

package LibTracker::Client::MetaDataTypeDetails;
use strict;

use Carp;

sub new
{
	my $class = shift;
	my $args = shift or croak "no args supplied";

	croak "no type!" unless defined $args->{type};
	croak "no is_embedded!" unless defined $args->{is_embedded};
	croak "no is_writeable!" unless defined $args->{is_writeable};

	my $self = {
		type		=> $args->{type},
		is_embedded	=> $args->{is_embedded},
		is_writeable	=> $args->{is_writeable},
	};

	return bless $self, $class;
}

sub type
{
	my $self = shift;
	if(@_) {
		$self->{type} = $_[0];
	}
	return $self->{type};
}

sub is_embedded
{
	my $self = shift;
	if(@_) {
		$self->{is_embedded} = $_[0];
	}
	return $self->{is_embedded};
}

sub is_writeable
{
	my $self = shift;
	if(@_) {
		$self->{is_writeable} = $_[0];
	}
	return $self->{is_writeable};
}

1;

__END__