XRI::Descriptor::LocalAccess - Local access objects from an XRI Descriptor


XRI documentation Contained in the XRI distribution.

Index


Code Index:

NAME

Top

XRI::Descriptor::LocalAccess - Local access objects from an XRI Descriptor

SYNOPSIS

Top

  use XRI::Descriptor::LocalAccess;

  my $localAccess = XRI::Descriptor::LocalAccess->new;
  $localAccess->service('xri:$r.a/X2R');  # sets service

  $localAccess->addType('text/html');     # sets media types
  $localAccess->addType('image/jpeg');

  $localAccess->uris(['http://www.idcommons.net/',
                      'http://www.2idi.com/']);

DESCRIPTION

Top

XRI::Descriptor generates XRI::Descriptor::LocalAccess objects when parsing an XRIDescriptor XML file. These objects, described in the XML Schema for XRIDescriptor, have three fields:

  service -- optional.  Indicates the type of service.

  URI -- 1 or more.  Indicates URIs at which service can be requested.

  type -- 0 or more.  MIME types for media supported by service.

METHODS

Top

new()

Constructor. Creates an unpopulated object.

Accessors/Mutators

  service($service)
  uris(\@uris)
  types(\@types)

AUTHOR

Top

Eugene Eric Kim, <eekim@blueoxen.org>

SEE ALSO

Top

XRI::Descriptor


XRI documentation Contained in the XRI distribution.

# Copyright (C) 2004 Identity Commons.  All Rights Reserved.
# See LICENSE for licensing details

# Author: Eugene Eric Kim <eekim@blueoxen.org>

package XRI::Descriptor::LocalAccess;

our $VERSION = 0.1;

sub new {
    bless {}, shift;
}

### accessors/mutators

sub service {
    my $self = shift;
    $self->{service} = shift if (@_);
    return $self->{service};
}

sub uris {
    my $self = shift;
    $self->{uris} = shift if (@_);
    return $self->{uris};
}

sub types {
    my $self = shift;
    $self->{types} = shift if (@_);
    return $self->{types};
}

1;
__END__