Client Actions Bookmarks - Standard Bookmark Action

Bookmark is used to store the state of a Weave map. The following map properties are stored as part of the map state : map extent, visible layers, active entity, existing redlines and selected features (from version 2.5 29). When a bookmark is created, the user gives the bookmark a name and nominates the map properties that are to be stored with the bookmark :

Once created, the bookmark is added to the set of bookmarks listed in the Bookmarks Menu, and is therefore able to be returned to via subsequent nomination from the menu:

Bookmarks are therefore a useful way of storing previous map analysis, and they are useful for making specific extents and data on the map, readily accessible.

Including the Standard Bookmark tool in a Weave client adds the Bookmarks Menu control to the client interface, thus providing the Create, Publish, Share and Manage Bookmarks menu options. The Standard Bookmark tool is declared with the XML :
<item action="weave.bookmark" />

Bookmarks are either private to the user who created them, or they may be published, which will thus make them available to all users of the subject Weave client.

When a user selects the Create Bookmark menu option, a private bookmark is created.

The Publish Bookmark menu option allows a nominated bookmark to be published.
Published bookmarks may be optionally organised using Categories and Groups; Categories and Groups effectively allow published bookmarks to be organised in to a hierarchical structure within the Bookmarks menu.

The Share Bookmark menu option is used to create a URL representing a bookmark. The created URL will open Weave and display the saved properties of the bookmark (map extent, layers, active entity, selection and redlines).This option is useful for sharing a Weave analysis outside the Weave environment. For example, via an email.
The ability to share a bookmark was introduced to Weave in version 2.5.29.

The Manage Bookmarks menu option opens a form that is used to modify the properties of existing PrivatePublished and Shared bookmarks.

As a minimum, bookmarks and their properties are stored within a browser’s profile settings, for a subject user. Bookmarks created and managed by logged in Weave users, however, will be stored on the Weave Server, see Persistent storage, below . 

A user interface guide to using the Create Bookmark menu option is available here : https://cohgawiki.atlassian.net/wiki/spaces/WUG/pages/3248145/Create+Bookmark

ID

weave.bookmark

Sub-tags

Name

Type

Cardinality

Default

Description

extent

boolean

0..1

true

Should the current extent be includable in the bookmark?

layersboolean0..1trueShould the current ToC content be includable in the bookmark?
redlinesboolean0..1trueShould the current redlines be includable in the bookmark?
entityboolean0..1trueShould the current active entity be includable in the bookmark?
selectionboolean0..1trueShould the selection for the active entity be includable in the bookmark?





categoriesboolean0..1true

Disable the use of categories. You only need to set this attribute (to false) if you have configured the bookmarks to include categories but you want to include one of the bookmark tools in a client without the categories.

If you have not configured a data definition for the categories in the bookmark config then this flag will not do anything, regardless of it being set to true or false.

groupsboolean0..1true

Disable the use of groups, you only need to set this attribute (to false) if you have configured the bookmarks to include groups but you want to include one of the bookmark tools in a client without the groups.

If you have not configured a data definition for the groups in the bookmark config then this flag will not do anything, regardless of it being set to true or false.






baseUrlURL0..1
Overwrite base URL when generating a shared bookmark. It will use the URL used to start the client if not specified.





createboolean0..1trueShould the "Create Bookmark" option be included in the menu?
publishboolean0..1

true - if the user is logged in
false - if the user is anonymous

Should the "Publish Bookmark" option be included in the menu?
Note that this also determines if the publishing functions are included in the Bookmark Manager unless the publisher flag is used to override it.
publisherboolean0..1

taken from publish

Should the publishing functionality be included in the Bookmark Manager?
publishedboolean0..1trueShould the published bookmarks themselves be included in the menu?
shareboolean0..1true - if the user is logged in
false - if the user is anonymous
Should the "Share Bookmark" option be included in the menu?
manageboolean0..1true - if the user has persistent storage available
false - if the user does not have persistent storage available
Should the "Manage Bookmarks" option be included in the menu?





warningboolean0..1trueShould delete actions be verified?
groupedboolean0..1false

Changes the way groups are displayed

This pre-dates the addition of the groups and categories properties (added in 2.5.29) and switches between grouping bookmarks based on the user id or just including the user id in the text.

  • Persistent storage - If the user is logged in they will have persistent storage available. The information is sent to the server for storage against their user id, and so their bookmarks will be available from any browser the user logs in from. If, however, the user is not logged in, they may still have persistent storage available if their web browser supports it, which these days is more than likely. But it means that their bookmarks will only be available if they use the same browser that they created the bookmark in.

Examples

Grouping published bookmarks

To group published bookmarks under sub-menus you need to create one or two data definitions, depending upon how many levels you're after, that contain the list of groups that should be available. And then create a bookmark:config item to tell Weave that it should use those data definitions when handing the categories and/or groups.

Categories are the top level groupings and the groups are the second level.

The following is an example of two inline data definitions that will contain the data definition used for the bookmark samples following it. They do not have to be inline data definitions, any data definition type will work, but their use here makes it easier to follow this example.

Bookmark grouping data definitions

The following example configuration file shows an entire file containing all the parts required to setup the bookmark category and grouping configuration which will the be used by any of the bookmark tools you add to the client. Note that this example is assuming that you'll be using both categories and groups, if you're only using one you only need to define one data definition and include that in the bookmarks:config (either the categories or groups tag).

<?xml version="1.0" encoding="UTF-8"?>

<config xmlns="urn:com.cohga.server.config#1.0" 
		xmlns:bookmarks="urn:com.cohga.weave.client.bookmarks#1.0"
		xmlns:data="urn:com.cohga.server.data.database#1.0"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
		xmlns:xsd="http://www.w3.org/2001/XMLSchema">

	<bookmarks:config>
		<categories>bookmark_categories</categories>
		<groups>bookmark_groups</groups>
	</bookmarks:config>

	<data:datadefinition id="bookmark_categories">
		<inlinedataconnection>
			<parameter type="string" name="label" label="Label"/>
			<row>
				<cell>Corporate</cell>
			</row>
			<row>
				<cell>Environment</cell>
			</row>
			<row>
				<cell>Front Desk</cell>
			</row>
			<row>
				<cell>Projects</cell>
			</row>
		</inlinedataconnection>
	</data:datadefinition>

	<data:datadefinition id="bookmark_groups">
		<inlinedataconnection>
			<parameter type="string" name="label" label="Label"/>
			<row>
				<cell>Assets</cell>
			</row>
			<row>
				<cell>External</cell>
			</row>
			<row>
				<cell>Finance</cell>
			</row>
			<row>
				<cell>Internal</cell>
			</row>
			<row>
				<cell>Property</cell>
			</row>
			<row>
				<cell>Works</cell>
			</row>
		</inlinedataconnection>
	</data:datadefinition>
</config>

Bookmark action examples

These example are just snippets showing what would need to be added to a client config to include the bookmark tool in a client toolbar. The category and grouping information is provided by the configuration example above, but the tools can also be configured using the attributes defined in the table above.

Default bookmark tool (if the bookmark config contains settings for categories and/or group they will be used, if it doesn't then they won't be used)
<item action="weave.bookmark"/>
Disable the use of categories in the tool (only of use if you've configured a data definition for categories in the bookmark config but don't want to use it)
<item action="weave.bookmark" categories="false"/>
Disable any folders in bookmarks (only of use if you've defined data definition for categories and groups in the bookmark config but don't want to use them)
<item action="weave.bookmark" categories="false" groups="false"/>