|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.vpf.file.VPFFile
public class VPFFile
This class encapsulates VPF files. By implementing the FeatureType
interface,
it serves as a factory for VPFColumns. Instances of this class should
be created by VPFFileFactory.
Field Summary |
---|
Constructor Summary | |
---|---|
VPFFile(java.lang.String cPathName)
Constructor. |
Method Summary | |
---|---|
void |
close()
Close the input stream pointed to by the object |
int |
getAttributeCount()
|
java.util.List<org.opengis.feature.type.AttributeDescriptor> |
getAttributeDescriptors()
|
java.lang.Class |
getBinding()
|
char |
getByteOrder()
Gets the value of byteOrder variable. |
org.opengis.referencing.crs.CoordinateReferenceSystem |
getCoordinateReferenceSystem()
|
org.opengis.util.InternationalString |
getDescription()
|
org.opengis.feature.type.AttributeDescriptor |
getDescriptor(int index)
|
org.opengis.feature.type.AttributeDescriptor |
getDescriptor(org.opengis.feature.type.Name name)
|
org.opengis.feature.type.AttributeDescriptor |
getDescriptor(java.lang.String name)
|
java.util.Collection |
getDescriptors()
|
java.lang.String |
getDirectoryName()
Returns the directory name for this file by chopping off the file name and the separator. |
java.lang.String |
getFileName()
Returns the file name (without path) for the file |
org.opengis.feature.type.GeometryDescriptor |
getGeometryDescriptor()
|
org.opengis.feature.type.Name |
getName()
|
java.lang.String |
getNarrativeTable()
Gets the value of narrativeTable variable file name. |
java.lang.String |
getPathName()
Gets the full path name for this file |
protected int |
getRecordSize()
Method is used to return size in
bytes of records stored in this table. |
java.util.List |
getRestrictions()
|
org.opengis.feature.simple.SimpleFeature |
getRowFromId(java.lang.String idName,
int id)
Returns a row with a matching value for the provided column |
org.opengis.feature.type.AttributeType |
getSuper()
|
org.opengis.feature.type.AttributeType |
getType(int index)
|
org.opengis.feature.type.AttributeType |
getType(org.opengis.feature.type.Name name)
|
org.opengis.feature.type.AttributeType |
getType(java.lang.String name)
|
java.lang.String |
getTypeName()
|
java.util.List |
getTypes()
|
java.util.Map<java.lang.Object,java.lang.Object> |
getUserData()
|
boolean |
hasNext()
Determines if the stream contains storage for another object. |
int |
indexOf(org.opengis.feature.type.Name name)
|
int |
indexOf(java.lang.String name)
|
boolean |
isAbstract()
|
boolean |
isIdentified()
|
boolean |
isInline()
|
java.util.AbstractList |
readAllRows()
Generates a list containing all of the features in the file |
protected char |
readChar()
Reads a single byte as a character value |
protected double |
readDouble()
Retrieves a double from the file |
org.opengis.feature.simple.SimpleFeature |
readFeature()
Retrieves a feature from the file |
protected java.lang.Object |
readFixedSizeData(char dataType,
int instancesCount)
Retrieves a fixed amount of data from the file |
protected float |
readFloat()
Retrieves a floating point number from the file. |
protected java.lang.Object |
readGeometry(int instancesCount,
int dimensionality,
boolean readDoubles)
Constructs an object which is an instance of Geometry by reading values from the file. |
protected void |
readHeader()
Retrieves a number of attributes from the file header |
protected int |
readInteger()
Retrieves an integer value from the file |
protected byte[] |
readNumber(int cnt)
Reads some byte data from the file |
protected short |
readShort()
Retrieves a short value from the file |
protected java.lang.String |
readString(java.lang.String terminators)
Reads a string value from the file |
protected TripletId |
readTripletId()
Retrieves a triplet object from the file |
protected java.lang.Object |
readVariableSizeData(char dataType)
Retrieves variable sized data from the file by first reading an integer which indicates how many instances of the data type to retrieve |
void |
reset()
Resets the file stream by setting its pointer to the first position after the header. |
protected void |
setPosition(long pos)
Sets the position in the stream |
java.lang.String |
toString()
|
protected void |
unread(long bytes)
Back up a specified number of bytes in the file stream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opengis.feature.type.PropertyType |
---|
equals, hashCode |
Constructor Detail |
---|
public VPFFile(java.lang.String cPathName) throws java.io.IOException, SchemaException
cPathName
- The path to this file
java.io.IOException
- if the path or the file are invalid
SchemaException
- if the contained feature type can not be
constructedMethod Detail |
---|
public int getAttributeCount()
getAttributeCount
in interface org.opengis.feature.simple.SimpleFeatureType
public char getByteOrder()
public java.lang.String getDirectoryName()
public java.lang.String getFileName()
public java.lang.String getNarrativeTable()
public java.lang.String getPathName()
protected int getRecordSize()
getRecordSize
is used to return size in
bytes of records stored in this table. If table keeps variable length
records -1
should be returned.
int
valuepublic org.opengis.feature.simple.SimpleFeature getRowFromId(java.lang.String idName, int id) throws IllegalAttributeException
idName
- The name of the column to look for, such as "id"id
- An identifier for the requested row
IllegalAttributeException
- The feature can not be created due to
illegal attributes in the source filepublic java.lang.String getTypeName()
getTypeName
in interface org.opengis.feature.simple.SimpleFeatureType
public boolean hasNext()
boolean
public boolean isAbstract()
isAbstract
in interface org.opengis.feature.type.PropertyType
public java.util.AbstractList readAllRows() throws java.io.IOException
List
value containing Feature objects
java.io.IOException
- if an error occursprotected char readChar() throws java.io.IOException
char
value
java.io.IOException
- if an error occursprotected java.lang.Object readGeometry(int instancesCount, int dimensionality, boolean readDoubles) throws java.io.IOException
instancesCount
- number of coordinates to readdimensionality
- either 2 or 3readDoubles
- true: read a double value; false: read a float value
java.io.IOException
- on any file IO errorsprotected double readDouble() throws java.io.IOException
double
value
java.io.IOException
- if an error occurspublic org.opengis.feature.simple.SimpleFeature readFeature() throws java.io.IOException, IllegalAttributeException
java.io.IOException
- on any file IO errors
IllegalAttributeException
- if any of the attributes retrieved are
illegalprotected java.lang.Object readFixedSizeData(char dataType, int instancesCount) throws java.io.IOException
dataType
- a char
value indicating the data typeinstancesCount
- an int
value indicating the number
of instances to retrieve.
Object
value
java.io.IOException
- if an error occursprotected float readFloat() throws java.io.IOException
float
value
java.io.IOException
- if an error occursprotected void readHeader() throws VPFHeaderFormatException, java.io.IOException
VPFHeaderFormatException
- if an error occurs
java.io.IOException
- if an error occursprotected int readInteger() throws java.io.IOException
int
value
java.io.IOException
- if an error occursprotected byte[] readNumber(int cnt) throws java.io.IOException
cnt
- an int
value indicating the number of bytes to retrieve
byte[]
value
java.io.IOException
- if an error occursprotected short readShort() throws java.io.IOException
short
value
java.io.IOException
- if an error occursprotected java.lang.String readString(java.lang.String terminators) throws java.io.IOException
terminators
- a String
value indicating the terminators to look for
String
value
java.io.IOException
- if an error occursprotected TripletId readTripletId() throws java.io.IOException
TripletId
value
java.io.IOException
- on any IO errorsprotected java.lang.Object readVariableSizeData(char dataType) throws java.io.IOException
dataType
- a char
value indicating the data type
Object
value
java.io.IOException
- if an error occurspublic void reset()
public void close() throws java.io.IOException
java.io.IOException
- in some unlikely situationprotected void setPosition(long pos) throws java.io.IOException
pos
- A 1-indexed position
java.io.IOException
- on any IO failurespublic java.lang.String toString()
toString
in class java.lang.Object
protected void unread(long bytes) throws java.io.IOException
bytes
- a long
value
java.io.IOException
- if an error occurspublic java.util.List<org.opengis.feature.type.AttributeDescriptor> getAttributeDescriptors()
getAttributeDescriptors
in interface org.opengis.feature.simple.SimpleFeatureType
public org.opengis.feature.type.AttributeDescriptor getDescriptor(java.lang.String name)
getDescriptor
in interface org.opengis.feature.simple.SimpleFeatureType
getDescriptor
in interface org.opengis.feature.type.ComplexType
public org.opengis.feature.type.AttributeDescriptor getDescriptor(org.opengis.feature.type.Name name)
getDescriptor
in interface org.opengis.feature.simple.SimpleFeatureType
getDescriptor
in interface org.opengis.feature.type.ComplexType
public org.opengis.feature.type.AttributeDescriptor getDescriptor(int index)
getDescriptor
in interface org.opengis.feature.simple.SimpleFeatureType
public org.opengis.feature.type.AttributeType getType(org.opengis.feature.type.Name name)
getType
in interface org.opengis.feature.simple.SimpleFeatureType
public org.opengis.feature.type.AttributeType getType(java.lang.String name)
getType
in interface org.opengis.feature.simple.SimpleFeatureType
public org.opengis.feature.type.AttributeType getType(int index)
getType
in interface org.opengis.feature.simple.SimpleFeatureType
public java.util.List getTypes()
getTypes
in interface org.opengis.feature.simple.SimpleFeatureType
public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
getCoordinateReferenceSystem
in interface org.opengis.feature.type.FeatureType
public org.opengis.feature.type.GeometryDescriptor getGeometryDescriptor()
getGeometryDescriptor
in interface org.opengis.feature.type.FeatureType
public java.lang.Class getBinding()
getBinding
in interface org.opengis.feature.type.ComplexType
getBinding
in interface org.opengis.feature.type.PropertyType
public java.util.Collection getDescriptors()
getDescriptors
in interface org.opengis.feature.type.ComplexType
public boolean isInline()
isInline
in interface org.opengis.feature.type.ComplexType
public java.util.List getRestrictions()
getRestrictions
in interface org.opengis.feature.type.PropertyType
public org.opengis.feature.type.AttributeType getSuper()
getSuper
in interface org.opengis.feature.type.AttributeType
getSuper
in interface org.opengis.feature.type.PropertyType
public boolean isIdentified()
isIdentified
in interface org.opengis.feature.type.AttributeType
isIdentified
in interface org.opengis.feature.type.FeatureType
public org.opengis.util.InternationalString getDescription()
getDescription
in interface org.opengis.feature.type.PropertyType
public org.opengis.feature.type.Name getName()
getName
in interface org.opengis.feature.type.PropertyType
public int indexOf(java.lang.String name)
indexOf
in interface org.opengis.feature.simple.SimpleFeatureType
public int indexOf(org.opengis.feature.type.Name name)
indexOf
in interface org.opengis.feature.simple.SimpleFeatureType
public java.util.Map<java.lang.Object,java.lang.Object> getUserData()
getUserData
in interface org.opengis.feature.type.PropertyType
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |