idspace

Usage    - print $id->idspace() or $id->idspace($idspace)
Returns  - the idspace (string)
Args     - the idspace (string)
Function - gets/sets the idspace # TODO this is actually the LocalIDSpace

localID

Usage    - print $id->localID() or $id->localID($name)
Returns  - the localID (string)
Args     - the localID (string)
Function - gets/sets the localID

id_as_string

Usage    - print $id->id_as_string() or $id->id_as_string("XO:X0000001")
Returns  - the id as string (scalar)
Args     - the id as string
Function - gets/sets the id as string

equals

Usage    - print $id->equals($id)
Returns  - 1 (true) or 0 (false)
Args     - the other ID (OBO::XO::OBO_ID)
Function - tells if two IDs are equal

next_id

Usage    - $id->next_id()
Returns  - the next ID (OBO::XO::OBO_ID)
Args     - none
Function - returns the next ID, which is new

previous_id

Usage    - $id->previous_id()
Returns  - the previous ID (OBO::XO::OBO_ID)
Args     - none
Function - returns the previous ID, which is new

NAME

OBO::XO::OBO_ID - A module for describing identifiers of any OBO ontology (e.g. XO). Its IDSpace and LocalID are stored.

SYNOPSIS

use OBO::XO::OBO_ID;

$id = OBO_ID->new();

$id->idspace("XO");

$id->localID("0000001");

$idspace = $id->idspace();

$localID = $id->localID();

print $id->id_as_string();

$id->id_as_string("XO:1234567");

DESCRIPTION

The OBO::XO::OBO_ID class implements an identifier for any OBO ontology.

A XO ID holds: IDSPACE, and a LOCALID in the following form:

IDSPACE:LOCALID

For instance: XO:1234567

Identifiers (IDs) in OBO should be strings consisting of an IDSpace concatenated to a LocalID via a : (colon) character. The ID should not contain any whitespace. The IDSpace should not itself contain any colon characters, and should ideally be registered on the GO xrefs page or with OBO.

More info at:

http://www.obofoundry.org/id-policy.shtml

AUTHOR

Erick Antezana, <erick.antezana -@- gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2006-2011 by Erick Antezana

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.