|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.jhu.htm.parsers.Htmio
This is inded to do the legacy text io for io of convexes etc. The new Parser class should be used to load files etc. An XMLParser shouls also be available to work with XML.
Current Version =============== ID: $Id: Htmio.java,v 1.2 2003/02/19 15:46:11 womullan Exp $ Revision: $Revision: 1.2 $ Date/time: $Date: 2003/02/19 15:46:11 $
Constructor Summary | |
Htmio()
|
Method Summary | |
static void |
read(java.io.Reader in,
Constraint c)
read from a stream as X Y Z D |
static void |
read(java.io.Reader in,
Convex rc)
|
static void |
read(java.io.Reader in,
Domain d)
Read in a domain from a Reader (input stream). |
static void |
read(java.io.Reader in,
Vector3d vec)
read from a stream as X Y Z |
static void |
readRaDec(java.io.Reader in,
Constraint c)
read from a stream as RA DEC D |
static void |
readRaDec(java.io.Reader in,
Convex rc)
|
static void |
readRaDec(java.io.Reader in,
Vector3d vec)
read from a stream as RA DEC |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Htmio()
Method Detail |
public static void read(java.io.Reader in, Constraint c) throws java.io.IOException
in
- takes a Reader (an input stream)
java.io.IOException
Reader
public static void readRaDec(java.io.Reader in, Constraint c) throws java.io.IOException
java.io.IOException
public static void read(java.io.Reader in, Convex rc) throws java.io.IOException
java.io.IOException
public static void readRaDec(java.io.Reader in, Convex rc) throws java.io.IOException
java.io.IOException
public static void read(java.io.Reader in, Vector3d vec) throws java.io.IOException
java.io.IOException
public static void readRaDec(java.io.Reader in, Vector3d vec) throws java.io.IOException
java.io.IOException
public static void read(java.io.Reader in, Domain d) throws java.io.IOException
A constraint is represented in the file as a set of 4 floatingpoint numbers x y z d where a=(x,y,z). Example:
1 0 0 0.5
A convex is the area defined by several constraints on the sphere that is common to all constraints. Of course such an area has to be convex.
A convex in the file is defined by a number (number of constraints in the convex) followed by as many convexes (each on one line.) Example:
4 0.5 0.707107 0.5 0.58077530122080200 0.5 0.707107 0.5 0.84077530122080200 -0.5 -0.907107 0.3 -0.87530122080200 0.2 -0.907107 0.3 -0.77530122080200
A domain is an accumulation of convexes. A domain in the domainfile is represented by a number (number of convexes) followed by that many convexes. A domainfile may only contain one domain. It may contain comment lines, starting with #.
The domain file accepts several special convex identifiers to read in special formats. These identifiers must come as a single comment line before the data, and no additional comments are allowed These are
#TRIANGLE - the next three lines are triangle corners #TRIANGLE_RADEC - same, given in ra/dec #RECTANGLE - the next four lines are rectangle corners #RECTANGLE_RADEC - same, given in ra/dec #CONVEX - read convex in default format #CONVEX_RADEC - read the convex in ra/dec format
#DOMAIN 1 #CONVEX 3 0.5 0.707107 0.5 0.58077530122080200 0.5 0.5 0.707107 0.63480775301220802 0.707107 -0.5 0.5 0.8480775301220802
Example 2:#DOMAIN 2 #CONVEX 4 0 0 1 0.3 -1 -3 -5 -0.97 5 -3 -10 -0.97 2 2 -5 -0.97 #CONVEX_RADEC 1 25.23 -55.9 0.99Example 3:#DOMAIN 1 #RECTANGLE_RADEC 54 29 54 30 55 29 55 30Example 4:#DOMAIN 1 #TRIANGLE 0 0 1 0 0.9 0.9 0.9 0 0.9
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |