MapViewer Concepts 2-71
Example 2–50 shows a dynamic theme that accesses the MVDEMO.BI_TEST network
and its link, node, path, and path-link tables. Specify the network name in schema-name.network-name format.
Example 2–50 Cross-Schema Access: Network Tables
SQL grant select on BI_TEST_LINK to SCOTT; SQL grant select on BI_TEST_NODE to SCOTT;
SQL grant select on BI_TEST_PATH to SCOTT; SQL grant select on BI_TEST_PLINK to SCOTT;
. . . themes
theme name=net_theme jdbc_network_query
network_name=MVDEMO.BI_TEST network_level=1
jdbc_srid=0 datasource=scottds
link_style=MVDEMO:C.RED node_style=MVDEMO:M.CIRCLE
node_markersize=5 asis=false
jdbc_network_query theme
themes
2.8 Workspace Manager Support in MapViewer
Workspace Manager is an Oracle Database feature that lets you version-enable one or more tables in the database. After a table is version-enabled, users in a workspace
automatically see the correct version of database rows in which they are interested. For detailed information about Workspace Manager, see Oracle Database Workspace Manager
Developers Guide.
You can request a map from a specific workspace, at a specific savepoint in a workspace, or at a point close to a specific date in a workspace. The following
attributes of the theme element are related to support for Workspace Manager:
■
workspace_name attribute: specifies the name of the workspace from which to get the map data.
■
workspace_savepoint attribute: specifies the name of the savepoint to go to in the specified workspace.
■
workspace_date attribute: specifies the date to go to that is, a point at or near the specified date in the specified workspace.
■
workspace_date_format attribute: specifies the date format. The default is mmddyyyyhh24miss. This attribute applies only if you specified the
workspace_date attribute.
■
workspace_date_nlsparam attribute: specifies globalization support options. The options and default are the same as for the nlsparam argument to the TO_
CHAR function for date conversion, which is described in Oracle Database SQL Language Reference.
■
workspace_date_tswtz attribute: specifies a Boolean value. TRUE means that the input date is in timestamp with time zone format; FALSE the default means
that the input date is a date string.
2-72 Oracle Fusion Middleware Users Guide for Oracle MapViewer
The workspace_name attribute is required for the use of Workspace Manager support in MapViewer.
If you specify neither the workspace_savepoint nor workspace_date attribute, MapViewer goes to the latest version of the workspace defined. If you specify both the
workspace_savepoint and workspace_date attributes, MapViewer uses the specified date instead of the savepoint name.
Example 2–51 shows the definition of a dynamic theme that uses attributes shown in
bold related to Workspace Manager support. In this example, MapViewer will render the data related to workspace wsp_1 at the savepoint sp1.
Example 2–51 Workspace Manager-Related Attributes in a Map Request
?xml version=1.0 standalone=yes? map_request
. . . themes
theme name=wmtheme user_clickable=false workspace_name=wsp_1 workspace_savepoint=sp1
jdbc_query spatial_column=GEOM
render_style=stylename jdbc_srid=8307
datasource=mvdemo asis=false select GEOM,ATTR from GEOM_TABLE
jdbc_query theme
themes . . .
map_request
The following considerations apply to MapViewer caching of predefined themes explained in
Section 2.3.1.5 and the use of Workspace Manager-related MapViewer
attributes:
■
The Workspace Manager-related attributes are ignored for predefined themes if the caching attribute is set to ALL in the styling_rules element for the
theme.
■
No caching data is considered if you specify the workspace_name attribute. For MapViewer administrative requests discussed in
Chapter 7 , the following
elements are related to Workspace Manager support:
■
list_workspace_name
■
list_workspace_session The list_workspace_name element returns the name of the current workspace,
as specified with the workspace_name attribute in the most recent map request. If no workspace has been specified that is, if the workspace_name attribute has not been
specified in a map request in the current MapViewer session, or if the LIVE workspace has been specified, the LIVE workspace is returned. If Workspace Manager
is not currently installed in Oracle Database, the request fails.
Example 2–52 uses the list_workspace_name element in an administrative
request.
Example 2–52 list_workspace_name Element in an Administrative Request
?xml version=1.0 standalone=yes?
MapViewer Concepts 2-73
non_map_request list_workspace_name data_source=mvdemo
non_map_request
If wsp_1 is the current workspace, the response for Example 2–52
will be: ?xml version=1.0 ?
non_map_response workspace_name succeed=true name=wsp_1
non_map_response
If no workspace has been specified or if the LIVE workspace has been specified, the response for
Example 2–52 will be:
?xml version=1.0 ? non_map_response
workspace_name succeed=true name=LIVE non_map_response
If Workspace Manager is not currently installed in Oracle Database, the response for Example 2–52
will be: ?xml version=1.0 ?
non_map_response workspace_name succeed=false
non_map_response
The list_workspace_session element returns the names of the current workspace and current context. If no workspace has been specified that is, if the
workspace_name attribute has not been specified in a map request in the current MapViewer session, or if the LIVE workspace has been specified, information for the
LIVE workspace is returned. If Workspace Manager is not currently installed in Oracle Database, the request fails.
Example 2–53 uses the list_workspace_session element in an administrative
request.
Example 2–53 list_workspace_session Element in an Administrative Request
?xml version=1.0 standalone=yes? non_map_request
list_workspace_session data_source=mvdemo non_map_request
If wsp_1 is the current workspace and if the context is LATEST, the response for Example 2–53
will be: ?xml version=1.0 ?
non_map_response workspace_session succeed=true name=wsp_1 context=LATEST
context_type=LATEST non_map_response
If no workspace has been specified or if the LIVE workspace has been specified, and if the context is LATEST, the response for
Example 2–53 will be:
?xml version=1.0 ? non_map_response
workspace_session succeed=true name=LIVE context=LATEST context_type=LATEST
non_map_response
2-74 Oracle Fusion Middleware Users Guide for Oracle MapViewer
If Workspace Manager is not currently installed in Oracle Database, the response for Example 2–53
will be: ?xml version=1.0 ?
non_map_response workspace_session succeed=false
non_map_response
2.9 MapViewer Metadata Views