...
Functionally it does not provide much more that 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 provided 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.
...
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 |
Sub-tags
Name
Type
Cardinality
acl
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 |
0..1
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 entity entities with a label
Code Block | ||||
---|---|---|---|---|
| ||||
<entity:entity id="suburbsuburbs"> <label>Suburb</label> </entity:entity> label="Suburbs"/> <entity:entity id="roads" label="Roads"/> |
An entity that's only visible to users who are members of the 'publicinternal' ACL
Code Block | ||||
---|---|---|---|---|
| ||||
<entity:entity id="roadincidents"> <label>Road</label> <acl>public</acl> </entity:entity> label="Incidents" acl="internal"/> |
A entity with an ACL defined in-line, rather than referenced like the previous example
Code Block | ||||
---|---|---|---|---|
| ||||
<entity:entity id="incidents" label="propertyIncidents"> <label>Property</label> <acl:acl> <entry type="denyallow">anonymous<>internal</entry> <entry type="allowdeny">*</entry> </acl:acl> </entity:entity> |
Some grouped entities with custom icons and a maximum scale
Code Block | ||
---|---|---|
| ||
<entity:entity id="sewer_pipes" label="Sewer Pipes" group="Infrastructure" iconCls="icon-sewer_pipe" maxScale="25000"/> <entity:entity id="water_pipes" label="Water Pipes" group="Infrastructure" iconCls="icon-water_pipe" maxScale="25000/> |
Setting the default search and data for an entity
Code Block | ||
---|---|---|
| ||
<entity:entity id="property" label="Properties" iconCls="icon-house" maxScale="30000">
<defaults>
<default type="search">property.by_address</default> <!-- assumes a search with the id property.by_address is defined elsewhere -->
<default type="data">property.all_details</default> <!-- assumes a data with the id property.all_details is defined elsewhere -->
</defaults>
</entity:entity> |