3-40 Oracle Fusion Middleware Users Guide for Oracle MapViewer
For an example of using the jdbc_image_query element to specify an image theme, see
Example 3–6 in
Section 3.1.6 .
3.2.8 jdbc_network_query Element
The jdbc_network_query element, which is used to define a network theme, has the following definition:
ELEMENT jdbc_network_query PCDATA ATTLIST jdbc_network_query
asis TRUE|FALSE FALSE network_name CDATA REQUIRED
network_level CDATA IMPLIED link_style CDATA IMPLIED
direction_style CDATA IMPLIED bidirection_style CDATA IMPLIED
direction_position CDATA IMPLIED direction_markersize CDATA IMPLIED
direction_multimarker TRUE|FALSE FALSE link_labelstyle CDATA IMPLIED
link_labelcolumn CDATA IMPLIED node_style CDATA IMPLIED
node_markersize CDATA IMPLIED node_labelstyle CDATA IMPLIED
node_labelcolumn CDATA IMPLIED path_ids CDATA IMPLIED
path_styles CDATA IMPLIED path_labelstyle CDATA IMPLIED
path_labelcolumn CDATA IMPLIED analysis_algorithm CDATA IMPLIED
shortestpath_style CDATA IMPLIED shortestpath_startnode CDATA IMPLIED
shortestpath_endnode CDATA IMPLIED shortestpath_startstyle CDATA IMPLIED
shortestpath_endstyle CDATA IMPLIED withincost_startnode CDATA IMPLIED
withincost_style CDATA IMPLIED withincost_cost CDATA IMPLIED
withincost_startstyle CDATA IMPLIED datasource CDATA IMPLIED
jdbc_host CDATA IMPLIED jdbc_port CDATA IMPLIED
jdbc_sid CDATA IMPLIED jdbc_user CDATA IMPLIED
jdbc_password CDATA IMPLIED jdbc_srid CDATA IMPLIED
jdbc_mode thin|oci8 thin
For detailed usage and reference information about network themes, see Section 2.3.5
.
3.2.9 jdbc_query Element
The jdbc_query element is used to define a theme dynamically. This element and its associated hidden_info element have the following definitions:
ELEMENT jdbc_query PCDATA, hidden_info? ATTLIST jdbc_query
asis TRUE|FALSE FALSE spatial_column CDATA REQUIRED
MapViewer Map Request XML API 3-41
key_column CDATA IMPLIED label_column CDATA IMPLIED
label_style CDATA IMPLIED render_style CDATA IMPLIED
x_column CDATA IMPLIED y_column CDATA IMPLIED
datasource CDATA IMPLIED jdbc_host CDATA IMPLIED
jdbc_port CDATA IMPLIED jdbc_sid CDATA IMPLIED
jdbc_user CDATA IMPLIED jdbc_password CDATA IMPLIED
jdbc_srid CDATA IMPLIED jdbc_mode thin|oci8 thin
ELEMENT hidden_info field+ ELEMENT field PCDATA
ATTLIST field column CDATA REQUIRED
name CDATA IMPLIED
To define a theme dynamically, you must supply a valid SQL query as the content of the jdbc_query element. You must specify the spatial_column column of type
SDO_GEOMETRY and the JDBC connection information for a dynamically defined theme either datasource or the combination of jdbc_host, jdbc_port, jdbc_
sid, jdbc_user, and jdbc_password.
If the selectable_in_svg attribute value is TRUE in the theme element, you must use the key_column attribute in the jdbc_query element to specify the
name of a column that can uniquely identify each selected feature from the JDBC query. The specified column must also appear in the SELECT list in the JDBC query.
render_style and label_style are optional attributes. For render_style, for point features the default is a red cross rotated 45 degrees, for lines and curves it is a
black line 1 pixel wide, and for polygons it is a black border with a semitransparent dark gray interior.
x_column and y_column are optional attributes. If specified, they are used to define a point JDBC theme based on two columns in a table, so that MapViewer can render a
point theme based on values in these columns. For more information, see Section 2.3.2.1
. jdbc_srid is an optional attribute that specifies the coordinate system SDO_SRID
value of the data to be rendered. jdbc_mode identifies the Oracle JDBC driver thin or oci8 to use to connect to the
database. asis is an optional attribute. If it is set to TRUE, MapViewer does not attempt to
modify the supplied query string. If asis is FALSE the default, MapViewer embeds the SQL query as a subquery of its spatial filter query. For example, assume that you
want a map centered at -122, 37 with size 1, and the supplied query is:
SELECT geometry, sales FROM crm_sales WHERE sales 100000; If asis is FALSE, the actual query that MapViewer executes is similar to:
SELECT FROM SELECT geometry, sales FROM crm_sales WHERE sales 100000
WHERE sdo_filtergeometry, sdo_geometry. . . -122.5, 36.5, -123.5, 37.5. . . =TRUE;
3-42 Oracle Fusion Middleware Users Guide for Oracle MapViewer
In other words, the original query is further refined by a spatial filter query using the current map window. However, if asis is TRUE, MapViewer executes the query as
specified, namely:
SELECT geometry, sales FROM crm_sales WHERE sales 100000; The hidden_info element specifies the list of attributes from the base table to be
displayed when the user moves the mouse over the theme’s features. The attributes are specified by a list of field elements.
Each field element must have a column attribute, which specifies the name of the column from the base table, and it can have a name attribute, which specifies the
display name of the column. The name attribute is useful if you want a text string other than the column name to be displayed.
For examples of using the jdbc_query element to define a theme dynamically, see Example 3–2
in Section 3.1.2
and Example 3–4
in Section 3.1.4
.
3.2.10 jdbc_topology_query Element