cds.simbad.ident
Class IdentifierException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycds.simbad.ident.IdentifierException
All Implemented Interfaces:
java.io.Serializable

public class IdentifierException
extends java.lang.Exception

Exception class for identifier normalization errors. The exception objects are created by factory methods.

See Also:
Serialized Form

Field Summary
private static int CATALOG_AMBIGUITY
           
private static int CATALOG_NOTFOUND
           
private  java.util.ArrayList catlist
           
private  java.lang.String catname
           
private  java.lang.String ident
           
private static int IDENTIFIER_SYNTAXERROR
           
private  int type
           
 
Fields inherited from class java.lang.Exception
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
private IdentifierException(int type, java.util.ArrayList catlist, java.lang.String identifier)
           
private IdentifierException(int type, java.lang.String identifier)
           
 
Method Summary
static IdentifierException catalogAmbiguity(java.util.ArrayList catlist, java.lang.String identifier)
          Factory method. returns an identifierException object for catalog ambiguity
static IdentifierException catalogNotFound(java.lang.String identifier)
          Factory method. returns an identifierException object for catalog not found error
 java.util.ArrayList getCatList()
           
 java.lang.String getCatName()
           
 java.lang.String getIdentifier()
           
 int getType()
           
static IdentifierException identifierSyntaxError(java.util.ArrayList catlist, java.lang.String identifier)
          Factory method. returns an identifierException object for identifier syntax error
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CATALOG_NOTFOUND

private static final int CATALOG_NOTFOUND
See Also:
Constant Field Values

IDENTIFIER_SYNTAXERROR

private static final int IDENTIFIER_SYNTAXERROR
See Also:
Constant Field Values

CATALOG_AMBIGUITY

private static final int CATALOG_AMBIGUITY
See Also:
Constant Field Values

type

private int type

ident

private java.lang.String ident

catname

private java.lang.String catname

catlist

private java.util.ArrayList catlist
Constructor Detail

IdentifierException

private IdentifierException(int type,
                            java.lang.String identifier)

IdentifierException

private IdentifierException(int type,
                            java.util.ArrayList catlist,
                            java.lang.String identifier)
Method Detail

catalogNotFound

public static IdentifierException catalogNotFound(java.lang.String identifier)
Factory method. returns an identifierException object for catalog not found error

Parameters:
identifier - the whole identifier
Returns:
an IdentifierException

identifierSyntaxError

public static IdentifierException identifierSyntaxError(java.util.ArrayList catlist,
                                                        java.lang.String identifier)
Factory method. returns an identifierException object for identifier syntax error

Parameters:
catlist - the list of possible catalogues, but wrong fields
identifier - the whole identifier that could not be recognized
Returns:
a new IdentifierException object

catalogAmbiguity

public static IdentifierException catalogAmbiguity(java.util.ArrayList catlist,
                                                   java.lang.String identifier)
Factory method. returns an identifierException object for catalog ambiguity

Parameters:
catlist - the array of possible catalog name candidates
identifier - the whole identifier
Returns:
an IdentifierException

getType

public int getType()

getCatName

public java.lang.String getCatName()

getIdentifier

public java.lang.String getIdentifier()

getCatList

public java.util.ArrayList getCatList()

toString

public java.lang.String toString()