org.coode.owlapi.obo.parser
Enum OBOIdType

java.lang.Object
  extended by java.lang.Enum<OBOIdType>
      extended by org.coode.owlapi.obo.parser.OBOIdType
All Implemented Interfaces:
Serializable, Comparable<OBOIdType>

public enum OBOIdType
extends Enum<OBOIdType>

Author: Matthew Horridge
Stanford University
Bio-Medical Informatics Research Group
Date: 19/04/2012

Describes the types of OBO IDs that can be found in OBO Files. Taken from Section 2.5 of the OBO Syntax and Semantics Specification.


Enum Constant Summary
CANONICAL_PREFIXED_ID
          Must contain a colon character in the ID.
NON_CANONICAL_PREFIXED_ID
          Must contain a colon character somewhere in the ID.
UNPREFIXED_ID
          Any unprefixed ID.
URL_AS_ID
          Any string with an http: or https: prefix.
 
Method Summary
static OBOIdType getIdType(String oboId)
          Gets the OBOIdType for a given OBO ID.
 org.semanticweb.owlapi.model.IRI getIRIFromOBOId(org.semanticweb.owlapi.model.OWLOntologyID ontologyID, IDSpaceManager idSpaceManager, String oboId)
           
 Pattern getPattern()
           
static OBOIdType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static OBOIdType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

URL_AS_ID

public static final OBOIdType URL_AS_ID
Any string with an http: or https: prefix.


UNPREFIXED_ID

public static final OBOIdType UNPREFIXED_ID
Any unprefixed ID. Does not contain a colon character. The spec implies the empty string matches this ID.


CANONICAL_PREFIXED_ID

public static final OBOIdType CANONICAL_PREFIXED_ID
Must contain a colon character in the ID. The idspace must only consist of Alpha-Chars and possibly an underscore. The local id must only consist of digits (possibly none).


NON_CANONICAL_PREFIXED_ID

public static final OBOIdType NON_CANONICAL_PREFIXED_ID
Must contain a colon character somewhere in the ID. Any kind of prefix plus a local Id. The prefix doesn't contain a colon character.

Method Detail

values

public static OBOIdType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (OBOIdType c : OBOIdType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static OBOIdType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getPattern

public Pattern getPattern()

getIRIFromOBOId

public org.semanticweb.owlapi.model.IRI getIRIFromOBOId(org.semanticweb.owlapi.model.OWLOntologyID ontologyID,
                                                        IDSpaceManager idSpaceManager,
                                                        String oboId)

getIdType

public static OBOIdType getIdType(String oboId)
Gets the OBOIdType for a given OBO ID.

Parameters:
oboId - The OBO ID. Must not be null.
Returns:
The OBOIdType for the specified oboId, or null if the specified oboId does not conform to any OBO Id type.


Copyright © 2012 The University of Manchester. All Rights Reserved.