|
||||||||
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 cds.astro.Otable |
otable
|
protected int |
otype
|
static int |
UNKNOWN
|
Constructor Summary | |
---|---|
Otype()
Define the default Otype (object of unknown nature) |
|
Otype(int ot)
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 |
static java.lang.String |
getDescription()
Get the description text to display in the web page |
int |
getLevel()
Compute the level of the curent object type in the hierarchy |
java.lang.String[] |
getList()
Gives all explanation string of otypes |
java.lang.String |
getName()
|
int |
getQueryMask()
Get the querymask corresponding to the level of the current otype |
int |
getQueryMask(int level)
Get the querymask of a given level |
int |
getQueryValue()
Get the query value (= the binary value of the current type) |
java.lang.String |
getQueryValueList()
Build the where part of an SQL query corresponding to a given type extended to its compatible types. |
java.lang.String[] |
getShortList()
|
int |
getValue(int level)
Get the value of a particular level (0-4) |
static java.lang.String |
getVersion()
Get the version information. it is the last .VERSION entry in the otype.def file |
static java.lang.String |
getVersionDate()
Get the version date. |
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(java.lang.String filepath)
Initialisation. |
boolean |
isUnknown()
Check if the object type is unknown |
static java.util.Iterator |
iterator()
Get an iterator on the object types |
static int |
level(int ot)
Compute the level of the submitted object type 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)
|
static int |
ntype(java.lang.String s)
Interpret the 4 numbers as an Otype class. |
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 |
static void |
reload()
Reload the otype description file |
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. |
void |
upperLevel()
Set the object type to one level higher. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int UNKNOWN
public static boolean DEBUG
protected static final int[] Nlev
protected static cds.astro.Otable otable
protected int otype
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 understandablepublic Otype(int ot) throws java.text.ParseException
ot
- the Otype as a coded integer
java.text.ParseException
- when otype is not understandablepublic Otype(Otype ot)
ot
- Otype object to copyMethod Detail |
---|
public boolean hasValue()
public void reset()
public final int getBinType()
public static void init(java.lang.String filepath) throws java.lang.Exception
filepath
- full path of the file describing the Object Types. It can be
a remote file (rfile:...)
java.lang.Exception
- e.g. IOException if file not existing, parsing...public static void reload() throws java.lang.Exception
java.lang.Exception
- in case of errorpublic int getLevel()
public static final int level(int ot)
ot
- 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 static final int ntype(java.lang.String s)
s
- the text to interpret
public int getValue(int level)
level
- from 1 (main level) to 4 (today lowest one), 0 => nodata and returns value 0
public final void truncate(int lev)
lev
- the level (between 1 and 4)public final void upperLevel()
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 static java.util.Iterator iterator()
public java.util.Enumeration list()
public final java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(char cc)
cc
- Option char. It can be:public final java.lang.String toString(int choice)
choice
- 0=numeric, 1=standard, 2=verbose, 3=3-letter
public java.lang.String toString(java.lang.String opt)
opt
- Option string. It can contain: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.Object
o
- Objet a comparer.
public boolean isUnknown()
public java.lang.Object clone()
clone
in class java.lang.Object
public 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.ParseException
set(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.ParseException
set(java.lang.String)
public java.lang.String getName()
public java.lang.String get()
public int getQueryMask()
public int getQueryMask(int level)
level
- level to use to build the mask
public int getQueryValue()
public java.lang.String getQueryValueList()
public int hashCode()
hashCode
in class java.lang.Object
public static java.lang.String getVersion()
public static java.lang.String getVersionDate()
public static java.lang.String getDescription()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |