public class DataSet
extends java.lang.Object
A dataset is a container for a data collection with an internal pointer pointing to a specific item in the collection. There are move methods that can be used to set the position of this internal pointer.
When the dataset is created, its internal pointer points to a sentinel location before the first item of the collection. So, in order to retrieve data from this collection one of the move methods must be called before.
Each item of the dataset is composed by any number of properties. You have special methods to query the property information (name, data type, constraints).
The individual value of a property of an item in the collection, can be retrieved by an appropriated get method. These methods retrieve the value by an integer index identifying the property position or by a string with the property name.
When the dataset is the result of a query involving several datasets, you can find out the dataset that gave the original dataset name of a specific property.
A dataset can be connected or disconnected. A connected dataset, after its creation through the data source transactor, continues to depend on the connection given by its associated data source. Differently, a disconnected dataset, after its creation, no more depends of the connection given by the data source, and it continues to live after the connection has been released to the data source.
Note that a geometric or raster property is represented just like any other data type. Our design also allows a dataset to have multiple geometric or raster properties.
DataSource| Modifier and Type | Field and Description |
|---|---|
protected boolean |
swigCMemOwn |
| Modifier | Constructor and Description |
|---|---|
protected |
DataSet(long cPtr,
boolean cMemoryOwn) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete() |
protected void |
finalize() |
AccessPolicy |
getAccessPolicy()
It returns the read and write permission associated to the dataset.
|
java.lang.String |
getAsString(long i)
Method for retrieving a data value as a string plain representation.
|
java.lang.String |
getAsString(long i,
int precision)
Method for retrieving a data value as a string plain representation.
|
java.lang.String |
getAsString(java.lang.String name)
Method for retrieving a data value as a string plain representation.
|
java.lang.String |
getAsString(java.lang.String name,
int precision)
Method for retrieving a data value as a string plain representation.
|
boolean |
getBool(long i)
Method for retrieving a boolean attribute value.
|
boolean |
getBool(java.lang.String name)
Method for retrieving a boolean attribute value.
|
char |
getChar(long i)
Method for retrieving a signed character attribute value (1 byte long).
|
char |
getChar(java.lang.String name)
Method for retrieving a signed character attribute value (1 byte long).
|
protected static long |
getCPtr(DataSet obj) |
java.lang.String |
getDatasetNameOfProperty(long i)
It returns the underlying dataset name of the property at position pos.
|
double |
getDouble(long i)
Method for retrieving a double attribute value.
|
double |
getDouble(java.lang.String name)
Method for retrieving a double attribute value.
|
float |
getFloat(long i)
Method for retrieving a float attribute value.
|
float |
getFloat(java.lang.String name)
Method for retrieving a float attribute value.
|
java.lang.String |
getNumeric(long i)
Method for retrieving a numeric attribute value.
|
java.lang.String |
getNumeric(java.lang.String name)
Method for retrieving a numeric attribute value.
|
long |
getNumProperties()
It returns the number of properties that composes an item of the dataset.
|
ObjectId |
getObjectId(StrVector colsNames)
Returns, defined by colsNames, the ObjectId of the current feature.
|
ObjectIdVector |
getObjectIds(StrVector colsNames)
Returns a vector of ObjectId, defined by colsNames, of each row of the DataSet.
|
java.awt.geom.GeneralPath |
getPath()
Returns the geometry of the current feature.
|
int |
getPropertyDataType(long i)
It returns the underlying data type of the property at position pos.
|
java.lang.String |
getPropertyName(long i)
It returns the property name at position pos.
|
java.lang.String |
getString(long i)
Method for retrieving a string value attribute.
|
java.lang.String |
getString(java.lang.String name)
Method for retrieving a string attribute value.
|
TraverseType |
getTraverseType()
Returns the traverse type supported by the DataSet.
|
short |
getUChar(long i)
Method for retrieving an unsigned character attribute value (1 byte long).
|
short |
getUChar(java.lang.String name)
Method for retrieving an unsigned character attribute value (1 byte long).
|
java.awt.geom.Rectangle2D.Double |
getWindow()
Returns the bounding rectangle of the DataSet.
|
boolean |
isAfterEnd()
It tells if the dataset internal pointer is on the sentinel position after the last element of the collection or not.
|
boolean |
isAtBegin()
It tells if the dataset internal pointer is on the first element of the collection or not.
|
boolean |
isAtEnd()
It tells if the dataset internal pointer is on the last element of the collection.
|
boolean |
isBeforeBegin()
It tells if the dataset internal pointer is in a position before the first element of the collection or not.
|
boolean |
isConnected()
It returns true if the dataset is connected and false if it is disconnected.
|
boolean |
isEmpty()
It returns true if the collection is empty.
|
boolean |
isNull(long i)
It checks if the attribute value is null.
|
boolean |
isNull(java.lang.String name)
It checks if the attribute value is null.
|
boolean |
isPositionValid() |
boolean |
move(long i)
It moves the dataset internal pointer to a given position.
|
boolean |
moveBeforeFirst()
It moves the internal pointer to a position before the first item in the collection.
|
boolean |
moveFirst()
It moves the internal pointer to the first item in the collection.
|
boolean |
moveLast()
It sets the dataset internal pointer to the last item in the collection.
|
boolean |
moveNext()
It moves the internal pointer to the next item of the collection.
|
boolean |
movePrevious()
It moves the internal pointer to the previous item of the collection.
|
long |
size()
It returns the collection size, if it is known.
|
protected static long getCPtr(DataSet obj)
protected void finalize()
finalize in class java.lang.Objectpublic void delete()
public TraverseType getTraverseType()
TraverseTypepublic AccessPolicy getAccessPolicy()
AccessPolicypublic long getNumProperties()
public int getPropertyDataType(long i)
i - The property position of interest.public java.lang.String getPropertyName(long i)
i - The property name at the position of interest.public java.lang.String getDatasetNameOfProperty(long i)
i - The property position of interest.public boolean isEmpty()
public boolean isConnected()
public long size()
public boolean moveNext()
public boolean movePrevious()
public boolean moveBeforeFirst()
public boolean moveFirst()
public boolean moveLast()
public boolean move(long i)
i - The position the dataset internal pointer must be set up.public boolean isAtBegin()
public boolean isBeforeBegin()
public boolean isAtEnd()
public boolean isAfterEnd()
public boolean isPositionValid()
public char getChar(long i)
i - The attribute index.public char getChar(java.lang.String name)
name - The attribute name.public short getUChar(long i)
i - The attribute index.public short getUChar(java.lang.String name)
name - The attribute name.public boolean getBool(long i)
i - The attribute index.public boolean getBool(java.lang.String name)
name - The attribute name.public float getFloat(long i)
i - The attribute index.public float getFloat(java.lang.String name)
name - The attribute name.public double getDouble(long i)
i - The attribute index.public double getDouble(java.lang.String name)
name - The attribute name.public java.lang.String getNumeric(long i)
i - The attribute index.public java.lang.String getNumeric(java.lang.String name)
name - The attribute name.public java.lang.String getString(long i)
i - The attribute index.public java.lang.String getString(java.lang.String name)
name - The attribute name.public java.lang.String getAsString(long i,
int precision)
i - The attribute index.precision - The precision in the conversion.public java.lang.String getAsString(long i)
i - The attribute index.public java.lang.String getAsString(java.lang.String name,
int precision)
name - The attribute name.precision - The precision in the conversion.public java.lang.String getAsString(java.lang.String name)
name - The attribute name.public boolean isNull(long i)
i - The attribute index.public boolean isNull(java.lang.String name)
name - The attribute name.public java.awt.geom.Rectangle2D.Double getWindow()
public java.awt.geom.GeneralPath getPath()
public ObjectId getObjectId(StrVector colsNames)
colsNames - Names of columns that compose the ObjectId.ObjectIdpublic ObjectIdVector getObjectIds(StrVector colsNames)
colsNames - Names of the columns that compose the ObjectId.ObjectId