public class CARDGeomReader extends AbstractGeomReader
GeomReader
for reading and writing vehicle geometry from/to an APAS II
(Airplane Preliminary Analysis System) CARD formatted geometry file.
Modified by: Joseph A. Huwaldt
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXTENSION |
MAYBE, NO, YES
Constructor and Description |
---|
CARDGeomReader() |
Modifier and Type | Method and Description |
---|---|
int |
canReadData(java.io.File inputFile)
Method that determines if this reader can read geometry from the specified input
file.
|
boolean |
canWriteData()
Returns true.
|
java.lang.String |
getExtension()
Returns the preferred file extension (not including the ".") for files of this
GeomReader's type.
|
boolean |
isUnitAware()
Returns true if this reader is unit aware and false if it is not.
|
PointVehicle |
read(java.io.File inputFile)
Reads in an APAS CARD formatted geometry file from the specified input file and
returns a
PointVehicle object that contains the geometry from the file. |
java.lang.String |
toString()
Returns a string representation of the object.
|
void |
write(java.io.File outputFile,
GeometryList geometry)
Writes out an APAS CARD geometry file for the geometry contained in the supplied
PointVehicle object. |
compareTo, getWarnings, setFileUnits
public static final java.lang.String EXTENSION
public CARDGeomReader()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getExtension()
public int canReadData(java.io.File inputFile) throws java.io.IOException
canReadData
in interface GeomReader
canReadData
in class AbstractGeomReader
inputFile
- The input file containing the geometry to be read in. May not be
null.java.io.IOException
- if there is a problem reading from the specified filepublic boolean canWriteData()
canWriteData
in interface GeomReader
canWriteData
in class AbstractGeomReader
public PointVehicle read(java.io.File inputFile) throws java.io.IOException
PointVehicle
object that contains the geometry from the file.read
in interface GeomReader
read
in class AbstractGeomReader
inputFile
- The input file containing the geometry to be read in. May not be
null.PointVehicle
object containing the geometry read in from the
file. If the file has no geometry in it, then this list will have no
components in it (will have a size() of zero).java.io.IOException
- If there is a problem reading the specified file.AbstractGeomReader.setFileUnits(javax.measure.unit.Unit)
public void write(java.io.File outputFile, GeometryList geometry) throws java.io.IOException
PointVehicle
object.write
in interface GeomReader
write
in class AbstractGeomReader
outputFile
- The output File to which the geometry is to be written. May not
be null.geometry
- The PointVehicle
object to be written out. May not be
null.java.io.IOException
- If there is a problem writing to the specified file.public boolean isUnitAware()
GeomReader.setFileUnits(javax.measure.unit.Unit)