com.mizar.trinidad.components
Class TrinidadSpatialTable

java.lang.Object
  extended by com.mizar.persistence.jpa.facade.JPAFacade
      extended by com.mizar.faces.jpa.facade.FacesCollection
          extended by com.mizar.trinidad.components.TrinidadCollection<RowInterface>
              extended by com.mizar.trinidad.components.TrinidadTable
                  extended by com.mizar.trinidad.components.TrinidadSpatialTable
Direct Known Subclasses:
BasemapSetTable, BasemapTable, BasemapTypeTable, Bg00Table, Cd106Table, Cd108Table, Cd110Table, CountyTable, EdgesTable, FacesTable, FeatureSearchCollection, LocationTable, NavteqPoiTable, RoutingTable, SdoCachedMapsTemplateTable, SdoDiminfoTemplateTable, SegmentSequenceTable, Sldl00Table, SldlTable, Sldu00Table, SlduTable, TabblockTable, Tract00Table, VtdTable, Zcta500Table

public class TrinidadSpatialTable
extends TrinidadTable


Nested Class Summary
 
Nested classes/interfaces inherited from class com.mizar.trinidad.components.TrinidadCollection
TrinidadCollection.UpdateListReasons
 
Field Summary
protected static org.apache.commons.logging.Log _Logger
           
protected  int dimensions
           
protected  oracle.spatial.geometry.JGeometry geocodeResult
           
protected  java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> hiliteItems
           
protected  int maxHiliteItems
           
protected  int srid
           
protected  java.lang.String wktShape
           
 
Fields inherited from class com.mizar.trinidad.components.TrinidadTable
detach, displayedRows, endRow, filterVisible, freeze, lastQueryDescription, model, panelCollectionFeaturesOff, selectionModel, startRow, whereClause, wrap
 
Fields inherited from class com.mizar.trinidad.components.TrinidadCollection
disclosedRowKeys, exceptionThrown, pkeyMask, selectedRowKeys
 
Fields inherited from class com.mizar.faces.jpa.facade.FacesCollection
currentRow, list, previousRow, selectionList
 
Fields inherited from class com.mizar.persistence.jpa.facade.JPAFacade
em, emf, persistenceUnitName, schemaName, sequencesValidated, silent, verbose
 
Constructor Summary
TrinidadSpatialTable()
           
 
Method Summary
 boolean addRow(RowInterface row)
          Calls addRowUniquely
 boolean addRowUniquely(GenericBean bean)
           
 boolean addRowUniquely(RowInterface row)
          This method differs from addRow(RowInterface) in that it will not add a second copy of the row
 oracle.sql.STRUCT convertJGeometry(oracle.spatial.geometry.JGeometry geom)
           
 void exportToShapeFile(javax.faces.event.ActionEvent event)
           
 RowInterface findIn(double[] xy, int srid, java.lang.String primaryFilter, java.lang.String alias, java.lang.Class beanClass, java.lang.String geomProperty, int count)
          THIS BELONGS IN JPAGeometryUtils as a static or should call a function there
 java.util.List<RowInterface> findNearest(double[] xy, int srid, java.lang.String primaryFilter, java.lang.String alias, java.lang.Class beanClass, java.lang.String geomProperty, int count)
          THIS BELONGS IN JPAGeometryUtils as a static or should call a function there
 java.util.List<RowInterface> findNearest(oracle.spatial.geometry.JGeometry geom, java.lang.String primaryFilter, java.lang.String alias, java.lang.Class beanClass, java.lang.String geomProperty, int count)
          THIS BELONGS IN JPAGeometryUtils as a static or should call a function there
 oracle.spatial.geometry.JGeometry getGeocodeResult()
           
 java.lang.String getGeocodeResultWKT()
           
 java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> getHiliteItems()
           
 void getHiliteItems(javax.faces.event.ActionEvent ignore)
          The method is a stop-gap while we find a work-around for the PhaseListener / addScript problem
 int getMaxHiliteItems()
           
 double getMaxSpatialQueryArea()
           
 oracle.spatial.geometry.JGeometry getSearchArea()
           
 double getSearchTolerance()
           
 int getSrid()
           
 double getSridPrecision()
           
 java.lang.String getWktShape()
           
 java.lang.String getWktShape(oracle.spatial.geometry.JGeometry anchorGeometry)
           
 java.util.List<java.util.HashMap<java.lang.String,java.lang.String>> getWktShapes()
           
 RowInterface removeRow(int index)
           
 boolean removeRow(RowInterface row)
           
 java.util.List<RowInterface> selectRowsExpression(org.eclipse.persistence.expressions.Expression expression, java.lang.String orderBy, java.lang.Class resultClass)
           
 java.util.List<RowInterface> selectRowsExpression(org.eclipse.persistence.expressions.Expression expression, java.lang.String orderBy, java.lang.Class resultClass, java.lang.String geoColumn)
           
 java.util.List<RowInterface> selectRowsJPQL(java.lang.String jpql, java.util.Map<java.lang.String,java.lang.Object> parameters)
          WARNING CURRENTLY DOES NOT SUPPORT SPATIAL SEARCH EXCEPT IN SMALL AREAS
 java.util.List<RowInterface> selectRowsJPQL(java.lang.String jpql, java.lang.Object[] parameters)
          WARNING CURRENTLY DOES NOT SUPPORT SPATIAL SEARCH EXCEPT IN SMALL AREAS
 java.util.List<RowInterface> selectRowsSQL(java.lang.String sql, java.lang.Class resultClass, java.util.Map<java.lang.String,java.lang.Object> parameters)
          Lightly tested
 java.util.List<RowInterface> selectRowsSQL(java.lang.String sql, java.lang.Class resultClass, java.lang.Object[] parameters)
          UNTESTED
 void setGeocodeResult(oracle.spatial.geometry.JGeometry newgeocodeResult)
           
 void setHiliteItems(java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> hiliteItems)
           
 void setList(java.util.List<RowInterface> list)
           
 void setMaxHiliteItems(int maxLocationItems)
           If maxHiliteItems is less than zero then no hiliteItems will be generated. If maxHiliteItems is equal to zero then all the rows in getList() will be added to the HashMap.
 void setMaxSpatialQueryArea(double maxSpatialQueryArea)
           
 void setSearchTolerance(double precision)
           
 void setSrid(int srid)
           
 void setSridPrecision(double sridPrecision)
           
 boolean spatialFilterInside(double[] referenceMbr, double[] testArea)
           
 java.util.List<RowInterface> spatialFilterInside(java.util.List<RowInterface> rows, oracle.spatial.geometry.JGeometry testArea)
           
 boolean spatialFilterInside(RowInterface row, oracle.spatial.geometry.JGeometry testArea)
           
 void zoomMap(javax.faces.event.ActionEvent ae)
           
 
Methods inherited from class com.mizar.trinidad.components.TrinidadTable
attributeChangeListener, buildEl, clearLastQueryDescription, clearList, decrementPosition, finalize, getDisplayedRows, getEndRow, getLastQueryDescription, getModel, getPanelCollectionFeaturesOff, getSelectedRow, getSelectionModel, getStartRow, getTable, getWhereClause, incrementPosition, isDetach, isEnableAllDetails, isFilterVisible, isFreeze, isInitialized, isPanelCollectionWanted, isShowOneOnly, isWrap, rangeChangeListener, redrawTable, redrawTable, refreshBean, refreshList, selectionListener, setCurrentRow, setDetach, setDisplayedRows, setEnableAllDetails, setEndRow, setFilterVisible, setFreeze, setLastQueryDescription, setLastQueryDescription, setList, setPanelCollectionFeaturesOff, setPanelCollectionFeaturesOff, setPanelCollectionWanted, setSelectedRow, setSelectedRow, setShowOneOnly, setStartRow, setTable, setWhereClause, setWrap, sortListener, toggleCollectionTools, toggleFilterVisibility
 
Methods inherited from class com.mizar.trinidad.components.TrinidadCollection
accept, addTrinidadCollectionListener, cancel, cancelEditing, clearList, dirtyDependentTables, downloadCSV, downloadPDF, downloadXLS, downloadXML, exportToDbaseFile, fireCurrentRowValueChanged, getDependentTables, getDisclosedRowKeys, getPersistenceUnitName, getPkeyMask, getPostUpdateListMethod, getRedrawComponentId, getSelectedRowKeys, getTableName, getUpdateListReason, isEditable, isExceptionThrown, isNewRowEditing, mergeBean, persistBean, persistBean, redrawCollection, removeBean, removeRow, resetGoToDashboard, resetGoToDashboard, setDisclosedRowKeys, setExceptionThrown, setList, setNewRowEditing, setPkeyMask, setPostUpdateListMethod, setPostUpdateListMethod, setRedrawComponentId, setSelectedRowKeys, setUpdateListReason, startEditing, startEditingNew
 
Methods inherited from class com.mizar.faces.jpa.facade.FacesCollection
closeEm, createNamedQuery, createNativeQuery, createNativeQuery, createNativeQuery, createQuery, decrementPosition, downloadFile, exportToExcel, find, getBean, getBeanClass, getBeanFromRow, getBeanList, getClassNameRoot, getCurrentMutableRow, getCurrentRow, getEm, getEmScope, getExportName, getGeom, getList, getListSize, getManagedBeanName, getMaxDownloadSize, getMaxResults, getReference, getResultList, getRowClass, getRowConstructor, getRowSQL, getSelectionList, getSingleResult, getTrackedQuery, getTruncatedList, getValue, incrementPosition, isDefaultRowConstructor, isFileDownloadable, isListDirty, isSelectionListDirty, maxResultsOff, maxResultsOff, maxResultsOn, newRow, newRow, refresh, resetCurrentRow, selectRows, selectRows, selectRowsExpression, selectRowsJPQL, selectRowsJPQL, selectRowsSQL, selectRowsSQL, selectRowsSQL, selectRowsSQL, setBeanClass, setCurrentRow, setCurrentRow, setCurrentRow, setDefaultRowConstructor, setEmScope, setExportName, setListDirty, setManagedBeanName, setMaxDownloadSize, setMaxResults, setRowClass, setRowConstructor, setSelectionList, setSelectionListDirty, setTrackedQuery
 
Methods inherited from class com.mizar.persistence.jpa.facade.JPAFacade
closeEm, closeEmf, executeDDL, executeNativeUpdate, executeNativeUpdate, executeUpdate, getClosableConnectionAccessor, getConnection, getConnection, getEm, getEmf, getEmf, getLogger, getPassword, getPassword, getSchemaName, getSequencesValidated, getSid, getSilent, getTableName, getToleratedErrorCodes, getUrl, getUser, getVerbose, mergeBean, persist, persistBean, printAnyBean, queryTester, queryTester, refreshBean, remove, removeBean, removeBean, setEmf, setPersistenceUnitName, setSilent, setToleratedErrorCodes, setVerbose, validateSequences
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_Logger

protected static org.apache.commons.logging.Log _Logger

geocodeResult

protected oracle.spatial.geometry.JGeometry geocodeResult

srid

protected int srid

wktShape

protected java.lang.String wktShape

dimensions

protected int dimensions

hiliteItems

protected java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> hiliteItems

maxHiliteItems

protected int maxHiliteItems
Constructor Detail

TrinidadSpatialTable

public TrinidadSpatialTable()
Method Detail

getSearchArea

public oracle.spatial.geometry.JGeometry getSearchArea()

getGeocodeResultWKT

public java.lang.String getGeocodeResultWKT()

setGeocodeResult

public void setGeocodeResult(oracle.spatial.geometry.JGeometry newgeocodeResult)

getGeocodeResult

public oracle.spatial.geometry.JGeometry getGeocodeResult()

setSearchTolerance

public void setSearchTolerance(double precision)

getSearchTolerance

public double getSearchTolerance()

setSridPrecision

public void setSridPrecision(double sridPrecision)

getSridPrecision

public double getSridPrecision()

setSrid

public void setSrid(int srid)

getSrid

public int getSrid()

zoomMap

public void zoomMap(javax.faces.event.ActionEvent ae)

findNearest

public java.util.List<RowInterface> findNearest(oracle.spatial.geometry.JGeometry geom,
                                                java.lang.String primaryFilter,
                                                java.lang.String alias,
                                                java.lang.Class beanClass,
                                                java.lang.String geomProperty,
                                                int count)
THIS BELONGS IN JPAGeometryUtils as a static or should call a function there

Parameters:
geom -
primaryFilter -
alias -
beanClass -
geomProperty -
count -
Returns:

findNearest

public java.util.List<RowInterface> findNearest(double[] xy,
                                                int srid,
                                                java.lang.String primaryFilter,
                                                java.lang.String alias,
                                                java.lang.Class beanClass,
                                                java.lang.String geomProperty,
                                                int count)
THIS BELONGS IN JPAGeometryUtils as a static or should call a function there

Parameters:
xy -
srid -
primaryFilter -
alias -
beanClass -
geomProperty -
count -
Returns:

findIn

public RowInterface findIn(double[] xy,
                           int srid,
                           java.lang.String primaryFilter,
                           java.lang.String alias,
                           java.lang.Class beanClass,
                           java.lang.String geomProperty,
                           int count)
THIS BELONGS IN JPAGeometryUtils as a static or should call a function there

Parameters:
xy -
srid -
primaryFilter -
alias -
beanClass -
geomProperty -
count -
Returns:

selectRowsJPQL

public java.util.List<RowInterface> selectRowsJPQL(java.lang.String jpql,
                                                   java.util.Map<java.lang.String,java.lang.Object> parameters)
WARNING CURRENTLY DOES NOT SUPPORT SPATIAL SEARCH EXCEPT IN SMALL AREAS

Overrides:
selectRowsJPQL in class FacesCollection
Parameters:
jpql -
parameters -
Returns:

selectRowsJPQL

public java.util.List<RowInterface> selectRowsJPQL(java.lang.String jpql,
                                                   java.lang.Object[] parameters)
WARNING CURRENTLY DOES NOT SUPPORT SPATIAL SEARCH EXCEPT IN SMALL AREAS

Overrides:
selectRowsJPQL in class FacesCollection
Parameters:
jpql -
parameters -
Returns:

selectRowsSQL

public java.util.List<RowInterface> selectRowsSQL(java.lang.String sql,
                                                  java.lang.Class resultClass,
                                                  java.util.Map<java.lang.String,java.lang.Object> parameters)
Lightly tested

Overrides:
selectRowsSQL in class FacesCollection
Parameters:
sql -
resultClass -
parameters -
Returns:

selectRowsSQL

public java.util.List<RowInterface> selectRowsSQL(java.lang.String sql,
                                                  java.lang.Class resultClass,
                                                  java.lang.Object[] parameters)
UNTESTED

Overrides:
selectRowsSQL in class FacesCollection
Parameters:
sql -
resultClass -
parameters -
Returns:

selectRowsExpression

public java.util.List<RowInterface> selectRowsExpression(org.eclipse.persistence.expressions.Expression expression,
                                                         java.lang.String orderBy,
                                                         java.lang.Class resultClass)
Overrides:
selectRowsExpression in class FacesCollection
Returns:

selectRowsExpression

public java.util.List<RowInterface> selectRowsExpression(org.eclipse.persistence.expressions.Expression expression,
                                                         java.lang.String orderBy,
                                                         java.lang.Class resultClass,
                                                         java.lang.String geoColumn)
Parameters:
expression -
orderBy -
resultClass -
Returns:
See Also:
FacesCollection.selectRowsExpression(Expression,String,Class)

spatialFilterInside

public java.util.List<RowInterface> spatialFilterInside(java.util.List<RowInterface> rows,
                                                        oracle.spatial.geometry.JGeometry testArea)
Parameters:
rows -
testArea -
Returns:

spatialFilterInside

public boolean spatialFilterInside(RowInterface row,
                                   oracle.spatial.geometry.JGeometry testArea)

spatialFilterInside

public boolean spatialFilterInside(double[] referenceMbr,
                                   double[] testArea)

getWktShape

public java.lang.String getWktShape()
Returns:
the aggragate range of all getGeom() in getList()

getWktShapes

public java.util.List<java.util.HashMap<java.lang.String,java.lang.String>> getWktShapes()

getWktShape

public java.lang.String getWktShape(oracle.spatial.geometry.JGeometry anchorGeometry)
Parameters:
anchorGeometry -
Returns:
the aggragate range of all getGeom() in getList() and anchorGeometry

setMaxSpatialQueryArea

public void setMaxSpatialQueryArea(double maxSpatialQueryArea)

getMaxSpatialQueryArea

public double getMaxSpatialQueryArea()

convertJGeometry

public oracle.sql.STRUCT convertJGeometry(oracle.spatial.geometry.JGeometry geom)
                                   throws java.sql.SQLException,
                                          java.lang.Exception
Throws:
java.sql.SQLException
java.lang.Exception

setList

public void setList(java.util.List<RowInterface> list)
Overrides:
setList in class TrinidadTable

addRow

public boolean addRow(RowInterface row)
Description copied from class: TrinidadTable
Calls addRowUniquely

Overrides:
addRow in class TrinidadTable
Returns:
true if row successfully added
See Also:
TrinidadTable.addRowUniquely(RowInterface)

addRowUniquely

public boolean addRowUniquely(GenericBean bean)
Overrides:
addRowUniquely in class TrinidadTable

addRowUniquely

public boolean addRowUniquely(RowInterface row)
Description copied from class: TrinidadTable
This method differs from addRow(RowInterface) in that it will not add a second copy of the row

Overrides:
addRowUniquely in class TrinidadTable
See Also:
TrinidadTable.addRow(RowInterface)

removeRow

public boolean removeRow(RowInterface row)
Overrides:
removeRow in class TrinidadTable

removeRow

public RowInterface removeRow(int index)
Overrides:
removeRow in class TrinidadTable

setHiliteItems

public void setHiliteItems(java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> hiliteItems)

getHiliteItems

public void getHiliteItems(javax.faces.event.ActionEvent ignore)
The method is a stop-gap while we find a work-around for the PhaseListener / addScript problem

Parameters:
ignore -

getHiliteItems

public java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> getHiliteItems()

setMaxHiliteItems

public void setMaxHiliteItems(int maxLocationItems)

Parameters:
maxLocationItems - the maximum number of property maps to put in hiliteItems
See Also:
FacesCollection.getList()

getMaxHiliteItems

public int getMaxHiliteItems()

exportToShapeFile

public void exportToShapeFile(javax.faces.event.ActionEvent event)