|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcds.astro.Otype
public class Otype
The Otype is a classification of the astronomical objects in a hierarchical structure.
| Field Summary | |
|---|---|
static boolean |
DEBUG
|
protected static int[] |
Nlev
|
protected static java.util.ArrayList |
otrees
|
protected int |
otype
|
protected static java.util.ArrayList |
otypes
|
static int |
UNKNOWN
|
| Constructor Summary | |
|---|---|
Otype()
Define the default Otype (object of unknown nature) |
|
Otype(int otype)
Define the Otype from an otype code (integer) |
|
Otype(Otype ot)
Copy constructor |
|
Otype(java.lang.String text)
Define the Otype from a String |
|
| Method Summary | |
|---|---|
boolean |
agrees(Otype ot1)
Check if the 2 Otypes are compatible |
java.lang.Object |
clone()
Copy values parameters |
void |
dump()
Dump contents to stdout |
protected static void |
edit(java.lang.StringBuffer buf,
int otype)
Edit the otype as xx.xx.xx.xx |
boolean |
equals(java.lang.Object o)
MOD-BB 21-01-04 Ajout de cette methode. |
java.lang.String |
get()
|
int |
getBinType()
Get the binary type |
java.util.ArrayList |
getCompatibleTypes()
For the current type, get all compatible types in other branches |
java.lang.String[] |
getList()
Gives all explanation string of otypes |
java.lang.String |
getName()
|
int |
getQueryMask()
|
int |
getQueryMask(int level)
|
int |
getQueryValue()
|
java.lang.String[] |
getShortList()
|
int |
getValue(int level)
Get the value of a particular level (0-3) |
int |
hashCode()
Compute the hashcode (overrides the Object method). |
boolean |
hasValue()
Check if this type has a value. |
static java.lang.String |
hexaToNumeric(java.lang.String strHex)
Methode qui transforme une chaine de caractere hexadecimale en otype sous forme numerique |
boolean |
implies(Otype t1)
Check if is a subtype (in same branch) |
static void |
init()
Initialisation |
static void |
init(java.lang.String filename)
Initialisation |
boolean |
isUnknown()
Check if the object type is unknown |
protected static int |
level(int otype)
Compute the level in the hierarchy |
java.util.Enumeration |
list()
List in an enumeration all Otypes belonging to a class. |
Otype |
merge(Otype ot1)
Choose the most accurate Otype: the deepest one ine the hierarchy. |
Otype |
mergepl(Otype ot2)
|
java.lang.String |
numericToHexa()
Methode qui permet de transformer un otype decimal en hexadecimal |
int |
parse(java.lang.String s)
Parse a string containing otype sting name |
int |
parse(java.lang.String s,
int offset)
Parse a string containing otype sting name |
void |
reset()
Reset this object type to its NODATA value. |
protected void |
set(int o)
Convert an integer into an Otype |
void |
set(java.lang.String text)
Convert a text into an object type |
java.lang.String |
toString()
Default Edition of the Otype value |
java.lang.String |
toString(char cc)
Edition with options |
java.lang.String |
toString(int choice)
Default Edition of the Otype value |
java.lang.String |
toString(java.lang.String opt)
Edition with options |
void |
truncate(int lev)
Truncate the otype to some upper level (e.g. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int otype
public static final int UNKNOWN
public static boolean DEBUG
protected static final int[] Nlev
protected static java.util.ArrayList otypes
protected static java.util.ArrayList otrees
| Constructor Detail |
|---|
public Otype()
public Otype(java.lang.String text)
throws java.text.ParseException
text - the Otype as a string
java.text.ParseException - when otype is not understandable
public Otype(int otype)
throws java.text.ParseException
otype - the Otype as a coded integer
java.text.ParseException - when otype is not understandablepublic Otype(Otype ot)
ot - Otype object to copy| Method Detail |
|---|
public boolean hasValue()
public void reset()
public final int getBinType()
public static void init()
public static void init(java.lang.String filename)
throws java.lang.Exception
filename - name of file with the list of Object Types
java.lang.Exception - e.g. IOException if file not existing, parsing...protected static final int level(int otype)
otype - an object type
protected static void edit(java.lang.StringBuffer buf,
int otype)
buf - the buffer to which the ascii equivalent of otype
is appended.otype - the object typepublic int getValue(int level)
level - from 0 (main level) to 3 (today lowest one)
public final void truncate(int lev)
lev - the level (between 1 and 4)public final boolean implies(Otype t1)
t1 - the other Otype
public final boolean agrees(Otype ot1)
ot1 - the other Otype
public java.util.ArrayList getCompatibleTypes()
public final Otype merge(Otype ot1)
ot1 - a second otype
public final Otype mergepl(Otype ot2)
throws java.text.ParseException
java.text.ParseException
protected final void set(int o)
throws java.text.ParseException
o - a number representing an otype
java.text.ParseException - when the text can' be interpreted.
public final void set(java.lang.String text)
throws java.text.ParseException
text - the text representing the otype, either in numeric,
or as one of the available abbreviations
java.text.ParseException - when the text can' be interpreted.public java.util.Enumeration list()
public final java.lang.String toString(int choice)
choice - 0=numeric, 1=standard, 2=verbose, 3=3-letter
public final java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(java.lang.String opt)
opt - Option string. It can contain:public java.lang.String toString(char cc)
cc - Option char. It can be:public final void dump()
public java.lang.String numericToHexa()
public static java.lang.String hexaToNumeric(java.lang.String strHex)
strHex - chaine representant un otype sous forme hexadecimale
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - Objet a comparer.
public boolean isUnknown()
public java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.String[] getList()
list()public java.lang.String[] getShortList()
cds.util.ValueList#getShortList()
public int parse(java.lang.String s)
throws java.text.ParseException
s - string to parse
java.text.ParseExceptionset(java.lang.String)
public int parse(java.lang.String s,
int offset)
throws java.text.ParseException
s - string to parseoffset - first char to parse in the string
java.text.ParseExceptionset(java.lang.String)public java.lang.String getName()
public java.lang.String get()
public int getQueryMask()
public int getQueryMask(int level)
public int getQueryValue()
public int hashCode()
hashCode in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||