Entity
An entity provides a basic reference to an item that will be searchable and reportable within the system.
Functionally it does not provide much more than access control and a label for display to the user, it is up to other items in the configuration to reference the entity to provide added functionality.
For example for an entity to be "spatially enabled" rather than adding spatial information to the entity you create a separate spatial mapper item that references the entity.
Namespace
urn:com.cohga.server.entity#1.0
Tags
entity
Properties
Name | Type | Required | Description |
id | string | yes | unique identifier for the entity |
label | string | yes | User presented label for the entity |
published | boolean | no | If set to "true" or not set at all the entity will be available for display entity to user, e.g. in the entity drop down list. If set to “false” the entity will not be visible to the user. The entity is still available on the client for Weave to work with, it’s just not visible as an entity for the user to select. You can also use “publish” as an alias for “published” |
acl | no | A reference to an ACL to attach to the entity. Access to the entity will be restricted to users that pass the ACL | |
group | string | no | The text that can be used to group entities. Components that support grouping when displaying entities can use this to separate entities into logical categories |
iconCls | string | no | A css icon class that can be applied to this entity when it is displayed. Note if you want to use an icon that is not part of the default set exposed by Weave, which is more than likely, contact Cohga for information on how you can created them and have them recognised by the client. |
minScale | number | no | A minimum scale that the entity should not be displayed below |
maxScale | number | no | A maximum scale that the entity should not be displayed above |
defaults | no | Provided the default search, data definition, etc, to be used for this entity. This was previously, and I still is for Weave 2.x, provided in the client config, but is now included in the entity itself to make it available to all client types. | |
context | string | no | What context/contexts this entity should belong to. |
Content
None
Notes
An ACL can either be defined in-line or referenced indirectly, but only one should be used (the in-line version will take priority)
defaults
Properties
Name | Type | Cardinailty | Description |
default | 1..n | A set of default entries that make up this defaults section |
Notes
This provides information about the default things that should be pre-selected for the user when this entity is the currently active entity, without this the first item available, alphabetically, would be shown to the user (unless it is a Weave 2.x client that has a defaults section that provides this information)
default
Properties
Name | Type | Cardinailty | Description |
type | ‘search’ or ‘data’ | 1..1 | The type of this default entry. At the moment only ‘search’ and ‘data’ |
Content
The id of the default item that this entry is associated with.
Notes
The defaults tag and each individual default sub-tag it contains is intended to associate another Weave configuration items with the entity as being the default that should be pre-selected for the user when the entity is the currently active entity. For example it will specify the default data to be displayed to the user when entities of this type are selected, or the default search that the user can perform.
Examples
A simple entities with a label
<entity:entity id="suburbs" label="Suburbs"/>
<entity:entity id="roads" label="Roads"/>
An entity that's only visible to users who are members of the 'internal' ACL
<entity:entity id="incidents" label="Incidents" acl="internal"/>
A entity with an ACL defined in-line, rather than referenced like the previous example
<entity:entity id="incidents" label="Incidents">
<acl:acl>
<entry type="allow">internal</entry>
<entry type="deny">*</entry>
</acl:acl>
</entity:entity>
Some grouped entities with custom icons and a maximum scale
Setting the default search and data for an entity