| Utility class to help DataStoreFactories for
s register the views provided
in a java.util.Map in the call to the factory's
createDataStore(Map) method.
Due to the non hierarchical nature of a Map, it is no so easy to provide a
variable number of arguments on it for the same keyword, since they're
usually read from a .properties file.
This class helps to minimize the work needed to provide such a mapping of
various SQL views to an in-process feature type by defining the following
structure for a Map<String,String> passed to createDataStore. Example
.properties file:
dbtype=...
<usual datastore's parameters>...
sqlView.1.typeName = ViewType1
sqlView.1.sqlQuery = select gid, the_geom, table2.someField \
from table1, table2 \
where table1.gid = table2.table1_id
sqlView.2.typeName = ViewType2
sqlView.2.sqlQuery = select ...
This way, this class' utility method
will receive a
and the Map of datastore
factory parameters and call
for each pair of sqlView.N.typeName, sqlView.N.sqlQuery
author: Gabriel Roldan, Axios Engineering |