public class RecordInfo
extends java.lang.Object
implements org.apache.hadoop.io.Writable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected static org.apache.hadoop.io.Text |
EMPTY_TEXT |
protected static byte |
F_FIELDS |
protected static byte |
F_GEOM |
protected static byte |
F_ID |
protected static byte |
F_LENGTH |
protected static byte |
F_OFFSET |
protected static byte |
F_PATH |
Constructor and Description |
---|
RecordInfo()
Creates a new empty instance
|
RecordInfo(RecordInfo recordInfo)
Creates a new instance from another instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all the information held by the current instance.
|
void |
clearFields()
Clears the extra fields (names and values)
|
java.lang.String |
getField(java.lang.String name)
Gets the value of an extra field
|
java.util.Collection<java.lang.String> |
getFieldNames()
Gets the names of all the extra fields contained
|
oracle.spatial.geometry.JGeometry |
getGeometry()
Gets the geometry associated to the source record
|
java.lang.String |
getId()
Gets the id used to identify the source record
|
long |
getLength()
Gets the length in bytes of the source record
|
int |
getNumberOfFields()
Gets the number of extra fields contained by this instance.
|
long |
getOffset()
Gets the position in file of the source record as an offset in bytes.
|
java.lang.String |
getPath()
Gets the path (as a String) to the file containing the source record
|
void |
readFields(java.io.DataInput in) |
java.lang.String |
removeField(java.lang.String name)
Removes the extra field with the given name
|
void |
set(RecordInfo recordInfo)
Copies the content from another RecordInfo instance
|
boolean |
setField(java.lang.String name, java.lang.String value)
Adds an extra field.
|
void |
setGeometry(oracle.spatial.geometry.JGeometry geometry)
Sets the geometry associated to the source record
|
void |
setId(java.lang.String id)
Sets the id used to identify the source record
|
void |
setLength(long length)
Sets the length in bytes of the source record
|
void |
setNumberOfFields(int numberOfFields)
Sets the number of extra fields that will be held by the instance.
|
void |
setOffset(long offset)
Sets the position in file of the source record as an offset in bytes.
|
void |
setPath(java.lang.String path)
Sets the path (as a String) to the file containing the source record
|
java.lang.String |
toString() |
void |
write(java.io.DataOutput out) |
protected static byte F_ID
protected static byte F_GEOM
protected static byte F_OFFSET
protected static byte F_LENGTH
protected static byte F_PATH
protected static byte F_FIELDS
protected static final org.apache.hadoop.io.Text EMPTY_TEXT
public RecordInfo()
public RecordInfo(RecordInfo recordInfo)
recordInfo
- a RecordInfo instancepublic void set(RecordInfo recordInfo)
recordInfo
- a RecordInfo instancepublic java.lang.String getId()
public void setId(java.lang.String id)
id
- the id of the record represented by the current instancepublic long getOffset()
public void setOffset(long offset)
offset
- the position of the source recordpublic long getLength()
public void setLength(long length)
length
- he source record's length in bytespublic java.lang.String getPath()
public void setPath(java.lang.String path)
path
- a string representation of a pathpublic oracle.spatial.geometry.JGeometry getGeometry()
public void setGeometry(oracle.spatial.geometry.JGeometry geometry)
geometry
- a JGeometry instancepublic int getNumberOfFields()
public java.util.Collection<java.lang.String> getFieldNames()
public void clear()
public void setNumberOfFields(int numberOfFields)
numberOfFields
- the number of extra fields contained by the instancepublic void clearFields()
public boolean setField(java.lang.String name, java.lang.String value)
name
- the field's namevalue
- the field's valuepublic java.lang.String getField(java.lang.String name)
name
- the extra field's namepublic java.lang.String removeField(java.lang.String name)
name
- the extra field's namepublic void readFields(java.io.DataInput in) throws java.io.IOException
readFields
in interface org.apache.hadoop.io.Writable
java.io.IOException
public void write(java.io.DataOutput out) throws java.io.IOException
write
in interface org.apache.hadoop.io.Writable
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object