org.astrogrid.store
Class Ivorn

java.lang.Object
  extended byorg.astrogrid.store.Ivorn

public class Ivorn
extends java.lang.Object

International Virtual Observatory Resource Name. Used to name specific IVO resources.

They act as keys to VO Registries; give the registry an IVORN and it will return the associated VOResource document

Ivorns are of the form:

 ivo://something/anything/athing/etc#somethingwithmeaningtothiscontext
 
For example:
 ivo://roe.ac.uk/storee#path/to/file.ext
 
might resolve to an FTP server, on which the path 'path/to/file.ext' would locate a document.

Ivorns are immutable - ie once created, they cannot be changed. You can make new ones out of old ones.

This is a badly named package. IVORNs can be used for things other than stores...

Author:
MCH, KMB, KTN, DM, ACD

Field Summary
static java.lang.String SCHEME
           
 
Constructor Summary
Ivorn(java.lang.String ivorn)
          Construct from given string
Ivorn(java.lang.String aPath, java.lang.String aFragment)
          Construct from 'path' and fragment; path consists of anAuthority and a key, eg 'roe.ac.uk/myspace'.
Ivorn(java.lang.String anAuthority, java.lang.String aKey, java.lang.String aFragment)
          Construct from given authority, key and fragment
 
Method Summary
 java.lang.String getFragment()
          Returns specific-to-service - ie fragment
 java.lang.String getPath()
          Returns ivo id without the scheme.
 java.lang.String getScheme()
          Returns identifier scheme
static boolean isIvorn(java.lang.String aString)
          Returns true if the given string is likely to be an ivorn - ie if it starts with ivo://
 java.lang.String toRegistryString()
          Representation to be used when submitting the IVORN to a registry to be resolved
 java.lang.String toString()
          String representation
 java.net.URI toUri()
          Returns the IVORN in URI form
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SCHEME

public static final java.lang.String SCHEME
See Also:
Constant Field Values
Constructor Detail

Ivorn

public Ivorn(java.lang.String ivorn)
      throws java.net.URISyntaxException
Construct from given string


Ivorn

public Ivorn(java.lang.String anAuthority,
             java.lang.String aKey,
             java.lang.String aFragment)
Construct from given authority, key and fragment


Ivorn

public Ivorn(java.lang.String aPath,
             java.lang.String aFragment)
Construct from 'path' and fragment; path consists of anAuthority and a key, eg 'roe.ac.uk/myspace'.

Method Detail

getScheme

public java.lang.String getScheme()
Returns identifier scheme


getPath

public java.lang.String getPath()
Returns ivo id without the scheme. eg 'ivo://roe.ac.uk/mch/myspace' returns 'roe.ac.uk/mch/myspace'


getFragment

public java.lang.String getFragment()
Returns specific-to-service - ie fragment


toString

public java.lang.String toString()
String representation


toUri

public java.net.URI toUri()
Returns the IVORN in URI form


toRegistryString

public java.lang.String toRegistryString()
Representation to be used when submitting the IVORN to a registry to be resolved


isIvorn

public static boolean isIvorn(java.lang.String aString)
Returns true if the given string is likely to be an ivorn - ie if it starts with ivo://



Copyright © 2002-2007 AstroGrid. All Rights Reserved.