NAME

LS::RDF::MetadataDocument -

SYNOPSIS

DESCRIPTION

CONSTRUCTORS

The following method is used to construct a new LS::RDF::MetadataDocument object:

METHODS

get_types ( )

Queries the resource's metadata service for the types of the resource, and returns the results as a reference to an array of strings, or undef if an error occurs. Error messages can be checked by calling the errorString method.

Examples:

 $types = $resource->get_types;

 if (defined $types) {
	print "Types:", join(', ', @$types), "\n";
 }
 else {
	print "Error getting types: ", $resource->errorString, "\n";
 }
get_format ( )

Queries the resource's metadata service for the format of the resource, and returns the result as an LSID string, or undef if an error occurs. A resource will have a format if its type is urn:lsid:i3c.org:types:content. Error messages can be checked by calling the errorString method.

Examples:

 $format = $resource->get_format;

 if (defined $format) {
	print "Format: $format\n";
 }
 else {
	print "Error getting format: ", $resource->errorString, "\n";
 }
get_instances ( )

Queries the resource's metadata service for the concrete instances of the resource. The return value is a reference to an array, or undef if an error occurs. Each element of the array is a reference to a two-element array. The first element is an LSID string identifying the concrete instance. The second element is an LSID string identifying the format of the concrete instance. A resource of type urn:lsid:i3c.org:types:content will have no concrete instances. Error messages can be checked by calling the errorString method.

Examples:

 $instances = $resource->get_instances;

 if ($instances) {
	print "Instances:\n";

	foreach $resource (@$instances) {
		$lsid = $resource->[0];
		$format = $resource->[1];

		print "\t$lsid\n";
	}
 }
 else {
	print "Error getting instances: ", $resource->errorString, "\n";
 }
get_instances_in_format ( $format )

Queries the resource's metadata service for the concrete instances of the resource in the specified format. $format is the LSID which identifies the format, and may either be a string or an object of class LS::ID. The return value is a reference to an array of LSID strings, or undef if an error occurs. A resource of type urn:lsid:i3c.org:types:content will have no concrete instances. Error messages can be checked by calling the errorString method.

Examples:

 $instances = $resource->get_instances_in_format('URN:LSID:i3c.org:formats:jpg:');

 if ($instances) {
	print "Instances:\n";

	foreach $lsid (@$instances) {
		print "\t$lsid\n";
	}
 }
 else {
	print "Error getting jpg instances: ", $resource->errorString, "\n";
 }
get_abstract ( )

Queries the resource's metadata service for the abstract resource of this resource. A resource of type urn:lsid:i3c.org:types:content will have an abstract resource. The return value is an LSID string, or undef if an error occurs. Error messages can be checked by calling the errorString method.

Examples:

 $abstract = $resource->get_abstract;

 if ($abstract) {
	print "Abstract: $abstract\n";
 }
 else {
	print "Error getting abstract: ", $resource->errorString, "\n";
 }
data_locations ( )

Deprecated. Use get_data_locations instead.

data_location ( $protocol, [ $method ] )

Deprecated. Use get_data_location instead.

COPYRIGHT

Copyright (c) 2002,2003 IBM Corporation. All rights reserved. This program and the accompanying materials are made available under the terms of the Common Public License v1.0 which accompanies this distribution, and is available at http://www.opensource.org/licenses/cpl.php

1 POD Error

The following errors were encountered while parsing the POD:

Around line 327:

You forgot a '=back' before '=head1'