Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For example, given the following search definition

Example search configuration
Code Block
xml
languagexml
titleExample search configuration
<search:attribute id="property.pid">
	<entity>property</entity>
	<label>By PID</label>
	<datasource>datasource</datasource>
	<table>PROPERTY</table>
	<key>PID</key>
	<parameter id="property_id">
		<promptText>Property ID</promptText>
		<column>PID</column>
	</parameter>
</search:attribute>

The following URL will open the Weave client (using the client configured with the id 'main') and execute the property.pid search to locate the property with a PID of 1234

...

Example URL
Code Block
http://server:8080/weave/main.html?search=property.pid&property_id=1234

...

Note that if the search had more parameters defined then the URL could contain more parameters. The search would be executed by Weave in exactly the same way as if they user entered (or didn't enter) a value for each corresponding parameter when clicking New.

Additionally, you can include a minScale parameter, to ensure that the client does not zoom in past the minimum scale you specify as the parameter.

...

You can set the initial map extent, either by specifying an x and y location and a scale, or by specifying minx, miny, maxx and maxy values.
Additionally, by specifying a crs parameter these values can be in a different coordinate system from the default projection of the client.
Also, it's possible with the x and y version to set a parameter, marker=true, to specify that a marker should be placed at the x, y location.
Finally, with the minx, miny, maxx and maxy version you can also specify a minScale to ensure that the map extent is not zoomed in too far.

...

Example x, y URL
title
Code Block
languagenone
http://server:8080/weave/main.html?x=339690&y=5818946&scale=5000&marker=true
Code Block
nonenone


Example extent URL
Code Block
http://server:8080/weave/main.html?minx=339680&maxx=339700&miny=5818936&maxy=5818956&minScale=5000


Note

The mapping URL parameters are only available in Weave 2.5 and later

...

Some of the application integration modules allow the translation of identifiers being sent between Weave and the third party application , this is which can be done by setting up a "filter" and then directing the application integration module to use that filter when sending or receiving a list of identifiers (see the documentation for the application integration module for details on how to link the filter).

To define a new filter you need to add the com.cohga.selection.filter namespace to your config file, e.g.

Adding the filter namespace
Code Block
languagexmltitleAdding the filter namespace
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:com.cohga.server.config#1.0" xmlns:filter="urn:com.cohga.selection.filter#1.0">
   ...
</config>

Then you can create a filter that will convert id's from one value to another. e.g.

Example database filter
Code Block
languagexmltitleExample database filter
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:com.cohga.server.config#1.0" xmlns:filter="urn:com.cohga.selection.filter#1.0">
  <filter:db id="property.filter">
    <datasource>main</datasource>
    <table>GEMS_LINK</table>
    <keycolumn>PID</keycolumn> <!-- column used in spatial database -->
    <idcolumn>PRUPI</idcolumn> <!-- column required for third party application -->
  </filter:db>
</config>

When configured to use the above filter Weave will translate PID values to PRUPI when sending to the third part party application and will do the reverse, translate PRUPI values to PID, when coming from the third party application into Weave.

...

In addition to a db (database) filter you can also create a format filter or a chain filter. A format filter can alter the formatting of the id's, for example, if they need to be padded with spaces, and the chain filter can combine other db and format filters, since you can only specify a single filter and you may want to translate and format the id's.

Format filter
Code Block
languagexmltitleFormat filter
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:com.cohga.server.config#1.0" xmlns:filter="urn:com.cohga.selection.filter#1.0">
  <filter:format id="property.format">
		<idtrimin>true</idtrimin>
		<keylpadout>8</keylpadout>
  </filter:format>
</config>

...

e.g. <idlpadout>20</idlpadout>, <keyrpadin>5</keyrpadin>, <keytrimin>true</keytrimin>

Chain filter
Code Block
languagexmltitleChain filter
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:com.cohga.server.config#1.0" xmlns:filter="urn:com.cohga.selection.filter#1.0">
  <filter:chain id="property.chain">
		<filter>property.filter</filter>
		<filter>property.format</filter>
  </filter:chain>
</config>

...