com.moximedia.ows
Class Recordset

java.lang.Object
  extended bycom.moximedia.ows.Recordset
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class Recordset
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

See Also:
Serialized Form

Constructor Summary
Recordset()
          Creates a new Recordset object
 
Method Summary
 void addFieldAlias(java.lang.String fieldName, java.lang.String alias)
          Sets the alias for the field.
 void addIdentifyKeyField(java.lang.String fieldName)
          Sets a field used as a key field for non-default reports.
 void addIdentifyKeyFieldAlias(java.lang.String fieldName, java.lang.String alias)
          Sets the alias for the field in non-default reports.
 void addIdentifyLink(IdentifyLink link)
          Adds an identify link to the recordset for display on default reports.
 boolean addRecord(Feature record)
          Adds a record to the recordset.
 void addSelectKeyField(java.lang.String fieldName)
          Sets a field used as a key field for non-default reports.
 void addSelectKeyFieldAlias(java.lang.String fieldName, java.lang.String alias)
          Sets the alias for the field in non-default reports.
 boolean BOF()
          Returns true if the recordset is at the beginning (before the first record).
 boolean canSelectByAttribute()
          Returns an indicator of whether the recordset can be selected by attribute.
 void clear()
          Clears the recordset
 void clearSelectedSet()
          Clears the selected set.
 void clearSelectedSetSelection()
          Clears the temporary selected set selection used when records are selected when a selected set already contains records.
 java.lang.Object clone()
          Creates a clone of this object.
 boolean EOF()
          Returns true if the recordset is at the end (after the last record).
 java.lang.String format(java.lang.String fieldName, java.lang.String value, java.util.Locale locale)
          Formats a field value according to the specified format.
 java.lang.String getAlias(java.lang.String fieldName)
          Gets the alias for the specified field.
 boolean getCanIdentify(java.lang.String fieldName)
          Returns an indicator of whether the field should be shown on the default identify and drill identify reports.
 Recordset getCopy()
          Creates a copy of this object.
 Envelope getExtent()
          Gets the extent of the current record, or null if there is no geometry.
 Feature getFeature()
          Gets the feature of the current record.
 java.lang.String getFeatureId()
          Gets the feature id of the current record.
 java.lang.String[] getFieldNames()
          Gets an array of field names.
 Geometry getGeometry()
          Gets the geometry of the current record.
 Geometry getGeometry(java.lang.String fieldName)
          Returns the geometry of the specified field for the current record.
 Envelope getGlobalExtent()
          Gets the extent of the recordset, or null if there is no geometry.
 java.lang.String getHypertextMessage(java.lang.String fieldName)
          Gets the hypertext message for the specified field, if any.
 java.lang.String getIdentifyKeyFieldAlias(java.lang.String fieldName)
          Get the key field alias for the specified field.
 java.lang.String[] getIdentifyKeyFieldNames()
          Gets an array of key field names used in non-default reports.
 java.util.ArrayList getIdentifyLinks()
          Gets the identify links for this recordset, if any.
 int getMaximumResults()
          Returns the number of maximum results that can be returned by a query.
 java.lang.String getMetadata(java.lang.String fieldName)
          Gets the metadata for the specified field, if any.
 java.util.ArrayList getSelectByAttributeFieldNames()
          Returns an array of names of fields that can be selected by attributes.
 java.util.HashSet getSelectedSet()
          Gets the selected set.
 FilterFeatureId getSelectedSetFilter()
          Returns a filter to reselect the selected set records.
 java.util.HashSet getSelectedSetSelection()
          Gets the new selection set.
 java.util.HashSet getSelection()
          Gets the selection set.
 java.lang.String getSelectKeyFieldAlias(java.lang.String fieldName)
          Gets the alias used for non-default selection reports for the specified field.
 java.lang.String[] getSelectKeyFieldNames()
          Gets the field names used for non-default selection reports.
 java.lang.String getShortName(java.lang.String fieldName)
          Gets the alias label of the field, or the short SDE field name (the part after the last period.
 java.lang.String getValue(java.lang.String fieldName)
          Returns the value of the specified field for the current record.
 java.lang.String getWfsRequestString()
          Gets the most recent WFS request string.
 java.lang.String getWfsResponseString()
          Gets the most recent WFS response string.
 boolean moveFirst()
          Moves the recordset to the first record.
 boolean moveNext()
          Moves the recordset to the next record.
 boolean moveTo(int index)
          Moves the recordset to the specified record.
 void setDefaultFieldVisibility(boolean isVisible)
          Sets the default field visibility for the recordset.
 void setFieldAttribute(java.lang.String fieldName, java.lang.String name, java.lang.String value, java.lang.String frameworkPath, java.lang.String mapConfigPath)
          Sets the attribute for the field.
 void setMaximumResults(int maximumResults)
          Sets the maximum results that can be returned by a query.
 void setSelectedSet(java.util.HashSet selectedSet)
          Sets the selected set.
 void setSelectedSetSelection(java.util.HashSet selectedSet)
          Sets the current selection set.
 void setWfsRequestString(java.lang.String request)
          Sets the most recent WFS request string.
 void setWfsResponseString(java.lang.String response)
          Sets the most recent WFS response string.
 int size()
          Gets the number of records in the recordset.
 java.lang.String toString()
          Returns a printable string of this recordset's contents.
 boolean usesSelectedSet()
          Returns an indicator of whether selected sets are used for this recordset.
 void usesSelectedSet(boolean usesSelectedSet)
          Sets whether selected set is used.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Recordset

public Recordset()
Creates a new Recordset object

Method Detail

clone

public java.lang.Object clone()
Creates a clone of this object. Must be cast back to the correct object type before using. Consider using getCopy() instead.

Returns:
The clone of this object.

getCopy

public Recordset getCopy()
Creates a copy of this object.

Returns:
The copy of this object.

canSelectByAttribute

public boolean canSelectByAttribute()
Returns an indicator of whether the recordset can be selected by attribute.

Returns:
True if selecting by attribure is supported, otherwise false.

getSelectByAttributeFieldNames

public java.util.ArrayList getSelectByAttributeFieldNames()
Returns an array of names of fields that can be selected by attributes.

Returns:
The array of field names.

addFieldAlias

public void addFieldAlias(java.lang.String fieldName,
                          java.lang.String alias)
Sets the alias for the field.

Parameters:
fieldName - The field name.
alias - The field alias.

addIdentifyKeyField

public void addIdentifyKeyField(java.lang.String fieldName)
Sets a field used as a key field for non-default reports.

Parameters:
fieldName - The field name.

addIdentifyKeyFieldAlias

public void addIdentifyKeyFieldAlias(java.lang.String fieldName,
                                     java.lang.String alias)
Sets the alias for the field in non-default reports.

Parameters:
fieldName - The field name.
alias - The field alias.

addSelectKeyField

public void addSelectKeyField(java.lang.String fieldName)
Sets a field used as a key field for non-default reports.

Parameters:
fieldName - The field name.

addSelectKeyFieldAlias

public void addSelectKeyFieldAlias(java.lang.String fieldName,
                                   java.lang.String alias)
Sets the alias for the field in non-default reports.

Parameters:
fieldName - The field name.
alias - The field alias.

addIdentifyLink

public void addIdentifyLink(IdentifyLink link)
Adds an identify link to the recordset for display on default reports.

Parameters:
link - The identify link.

getIdentifyLinks

public java.util.ArrayList getIdentifyLinks()
Gets the identify links for this recordset, if any.

Returns:
An array of identify links, or null if there are not any.

addRecord

public boolean addRecord(Feature record)
Adds a record to the recordset.

Parameters:
record - The record.
Returns:
True if adding the record was successful, otherwise false.

BOF

public boolean BOF()
Returns true if the recordset is at the beginning (before the first record).

Returns:
True if the recorset is at the beginning.

clear

public void clear()
Clears the recordset


EOF

public boolean EOF()
Returns true if the recordset is at the end (after the last record).

Returns:
True if the recorset is at the end.

getCanIdentify

public boolean getCanIdentify(java.lang.String fieldName)
Returns an indicator of whether the field should be shown on the default identify and drill identify reports.

Parameters:
fieldName - The FULL field name.
Returns:
True if the field should be displayed, otherwise false.

getAlias

public java.lang.String getAlias(java.lang.String fieldName)
Gets the alias for the specified field. If there is no alias, the name is simply returned.

Parameters:
fieldName - The FULL field name.
Returns:
The alias, or the field name if there isn't an alias.

getHypertextMessage

public java.lang.String getHypertextMessage(java.lang.String fieldName)
Gets the hypertext message for the specified field, if any.

Parameters:
fieldName - The field name.
Returns:
The message, or null if there isn't one.

getSelection

public java.util.HashSet getSelection()
Gets the selection set.

Returns:
The selected set HashSet containing feature ids.

getSelectedSetFilter

public FilterFeatureId getSelectedSetFilter()
Returns a filter to reselect the selected set records.

Returns:
A filter to reselect the records.

clearSelectedSet

public void clearSelectedSet()
Clears the selected set.


clearSelectedSetSelection

public void clearSelectedSetSelection()
Clears the temporary selected set selection used when records are selected when a selected set already contains records.


getSelectedSet

public java.util.HashSet getSelectedSet()
Gets the selected set.

Returns:
The selected set, containing feature ids.

getSelectedSetSelection

public java.util.HashSet getSelectedSetSelection()
Gets the new selection set.

Returns:
The new selection set, containing feature ids.

usesSelectedSet

public boolean usesSelectedSet()
Returns an indicator of whether selected sets are used for this recordset.

Returns:
True if selected set is used, otherwise false.

setSelectedSet

public void setSelectedSet(java.util.HashSet selectedSet)
Sets the selected set.

Parameters:
selectedSet - The new selected set.

setSelectedSetSelection

public void setSelectedSetSelection(java.util.HashSet selectedSet)
Sets the current selection set.

Parameters:
selectedSet - The selection set.

usesSelectedSet

public void usesSelectedSet(boolean usesSelectedSet)
Sets whether selected set is used.

Parameters:
usesSelectedSet - True if selected sets are used, otherwise false.

getShortName

public java.lang.String getShortName(java.lang.String fieldName)
Gets the alias label of the field, or the short SDE field name (the part after the last period.

Parameters:
fieldName - The name of the field.
Returns:
The alias label of the field, or the short name if there is no alias.

getFieldNames

public java.lang.String[] getFieldNames()
Gets an array of field names.

Returns:
An array of Strings containing field names.

getGeometry

public Geometry getGeometry()
Gets the geometry of the current record.

Returns:
The geometry of the current record, or null if there is none.

getExtent

public Envelope getExtent()
Gets the extent of the current record, or null if there is no geometry.

Returns:
The extent of the current record, or null if there is no geometry.

getGlobalExtent

public Envelope getGlobalExtent()
Gets the extent of the recordset, or null if there is no geometry.

Returns:
The extent of the recordset, or null if there is no geometry.

getIdentifyKeyFieldAlias

public java.lang.String getIdentifyKeyFieldAlias(java.lang.String fieldName)
Get the key field alias for the specified field.

Parameters:
fieldName - The full name of the field.
Returns:
The alias, or the field name if there isn't an alias.

getIdentifyKeyFieldNames

public java.lang.String[] getIdentifyKeyFieldNames()
Gets an array of key field names used in non-default reports.

Returns:
An array of String objects containing field names.

getSelectKeyFieldAlias

public java.lang.String getSelectKeyFieldAlias(java.lang.String fieldName)
Gets the alias used for non-default selection reports for the specified field.

Parameters:
fieldName - The name of the field to search on.
Returns:
The alias, or the field name if there isn't an alias.

getSelectKeyFieldNames

public java.lang.String[] getSelectKeyFieldNames()
Gets the field names used for non-default selection reports.

Returns:
An array of field names.

getMaximumResults

public int getMaximumResults()
Returns the number of maximum results that can be returned by a query. When this result is reached, the EOF method returns true.

Returns:
The maximum records returned by a query.

getFeature

public Feature getFeature()
Gets the feature of the current record.

Returns:
The feature or null if there isn't one.

getFeatureId

public java.lang.String getFeatureId()
Gets the feature id of the current record.

Returns:
The feature id, or null if there isn't one.

getValue

public java.lang.String getValue(java.lang.String fieldName)
Returns the value of the specified field for the current record.

Parameters:
fieldName - The full name of the field.
Returns:
The field value, or an error message.

getGeometry

public Geometry getGeometry(java.lang.String fieldName)
Returns the geometry of the specified field for the current record.

Parameters:
fieldName - The full name of the field.
Returns:
The field geometry, or null.

getMetadata

public java.lang.String getMetadata(java.lang.String fieldName)
Gets the metadata for the specified field, if any.

Parameters:
fieldName - The full name of the field.
Returns:
The metadata URL, or null if there is no metadata URL set.

moveFirst

public boolean moveFirst()
Moves the recordset to the first record.

Returns:
True unless there are no records.

moveNext

public boolean moveNext()
Moves the recordset to the next record.

Returns:
True unless there are no more records.

moveTo

public boolean moveTo(int index)
Moves the recordset to the specified record.

Parameters:
index - The record's index number, zero based.
Returns:
True if successful, otherwise false.

setDefaultFieldVisibility

public void setDefaultFieldVisibility(boolean isVisible)
Sets the default field visibility for the recordset.

Parameters:
isVisible - True if fields should be visible by default, otherwise false.

setFieldAttribute

public void setFieldAttribute(java.lang.String fieldName,
                              java.lang.String name,
                              java.lang.String value,
                              java.lang.String frameworkPath,
                              java.lang.String mapConfigPath)
Sets the attribute for the field. This is usually done by the XML configuration process.

Parameters:
fieldName - The name of the field.
name - The XML attribute name in the FIELD element.
value - The XML value.
frameworkPath - The URL path to the IMF installation.
mapConfigPath - The URL path to the configuration file.

setMaximumResults

public void setMaximumResults(int maximumResults)
Sets the maximum results that can be returned by a query. When this result is reached, the EOF method returns true.

Parameters:
maximumResults - The maximum records to return.

size

public int size()
Gets the number of records in the recordset.

Returns:
The count of records in the recordset.

getWfsRequestString

public java.lang.String getWfsRequestString()
Gets the most recent WFS request string.

Returns:
The most recent request.

setWfsRequestString

public void setWfsRequestString(java.lang.String request)
Sets the most recent WFS request string.

Parameters:
request - The most recent request.

getWfsResponseString

public java.lang.String getWfsResponseString()
Gets the most recent WFS response string.

Returns:
The most recent response.

setWfsResponseString

public void setWfsResponseString(java.lang.String response)
Sets the most recent WFS response string.

Parameters:
response - The most response request.

toString

public java.lang.String toString()
Returns a printable string of this recordset's contents.

Returns:
The recordset dump.

format

public java.lang.String format(java.lang.String fieldName,
                               java.lang.String value,
                               java.util.Locale locale)
Formats a field value according to the specified format. The format is defined in FIELD elements in the map configuration file.

Parameters:
fieldName - The name of the field to format.
value - The field value to format.
locale - The locale to use for formatting.
Returns:
The formatted field value.


Internet Mapping Framework for OpenGIS Java Object Model API (v1.3.007)
Copyright © 2005 Moxi Media Inc. and Province of British Columbia. All Rights Reserved.