More work on ADL.

This commit is contained in:
Simon Brooke 2018-06-05 09:26:36 +01:00
parent 5b72ffac78
commit 79bf3ed7eb
2 changed files with 65 additions and 54 deletions

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- DOCTYPE application PUBLIC "-//JOURNEYMAN//DTD ADL 1.4//EN"
"http://www.journeyman.cc/adl/stable/adl/schemas/adl-1.4.dtd" -->
<!-- DOCTYPE application PUBLIC "-//JOURNEYMAN//DTD ADL 1.4.1//EN"
"http://www.journeyman.cc/adl/stable/adl/schemas/adl-1.4.1.dtd" -->
<application name="youyesyet" version="0.1.1"
xmlns="http://bowyer.journeyman.cc/adl/1.4/"
xmlns:adl="http://bowyer.journeyman.cc/adl/1.4/">
xmlns="http://bowyer.journeyman.cc/adl/1.4.1/"
xmlns:adl="http://bowyer.journeyman.cc/adl/1.4.1/">
<documentation>
A web-app intended to be used by canvassers campaigning for a 'Yes' vote in the second independence referendum.
@ -55,7 +55,7 @@
generally.</documentation>
</group>
<entity name="electors">
<entity name="electors" magnitude="6">
<key>
<property required="true" type="integer" name="id" column="id" immutable="true" distinct="system">
<prompt prompt="id" locale="en-GB"/>
@ -64,9 +64,8 @@
<property size="64" required="true" type="string" name="name" column="name" distinct="user">
<prompt prompt="name" locale="en-GB"/>
</property>
<property required="true" type="entity" name="address_id" column="address_id" entity="addresses"
farkey="id">
<prompt prompt="address_id" locale="en-GB"/>
<property required="true" type="entity" name="dwelling_id" column="dwelling_id" entity="dwelling" farkey="id">
<prompt prompt="Flat" locale="en-GB"/>
</property>
<property size="16" type="string" name="phone" column="phone" distinct="user">
<prompt prompt="phone" locale="en-GB"/>
@ -81,7 +80,7 @@
<list name="Electors" properties="all"/>
<form name="Elector" properties="all"/>
</entity>
<entity name="genders" natural-key="id">
<entity name="genders" natural-key="id" magnitude="1">
<key>
<property name="id" type="string" size="32" distinct="all">
<prompt prompt="gender" locale="en-GB"/>
@ -90,7 +89,18 @@
<list name="Genders" properties="all"/>
<form name="Gender" properties="all"/>
</entity>
<entity name="addresses">
<entity name="dwellings" magnitude="6">
<key>
<property required="true" type="integer" name="id" column="id" immutable="true" distinct="system">
<prompt prompt="id" locale="en-GB"/>
</property>
</key>
<property required="true" type="entity" name="address_id" column="address_id" entity="address" farkey="id">
<prompt prompt="Building Address" locale="en-GB"/>
</property>
<property required="false" type="string" size="32" name="sub-address"/>
</entity>
<entity name="addresses" magnitude="6">
<key>
<property required="true" type="integer" name="id" column="id" immutable="true" distinct="system">
<prompt prompt="id" locale="en-GB"/>
@ -120,7 +130,7 @@
<list name="Addresses" properties="all"/>
<form name="Address" properties="all"/>
</entity>
<entity name="visits">
<entity name="visits" magnitude="7">
<key>
<property required="true" type="integer" name="id" column="id" distinct="system">
<prompt prompt="id" locale="en-GB"/>
@ -140,14 +150,14 @@
<permission group="public" permission="read"/>
<permission group="canvassers" permission="insert"/>
</entity>
<entity name="authorities">
<entity name="authorities" magnitude="2">
<key>
<property required="true" type="string" name="id" column="id" size="32" distinct="all">
<prompt prompt="id" locale="en-GB"/>
</property>
</key>
</entity>
<entity name="issues">
<entity name="issues" magnitude="1">
<documentation>Issues believed to be of interest to electors, about which they may have questions.</documentation>
<key>
<property required="true" type="string" name="id" column="id" size="32" immutable="true" distinct="all">
@ -163,7 +173,7 @@
<list name="Issues" properties="all"/>
<form name="Issue" properties="all"/>
</entity>
<entity name="intentions">
<entity name="intentions" magnitude="6">
<documentation>Link table.</documentation>
<property required="true" type="entity" entity="visits" farkey="id" name="visit_id"
column="visit_id">
@ -178,7 +188,7 @@
<prompt prompt="option_id" locale="en-GB"/>
</property>
</entity>
<entity name="canvassers">
<entity name="canvassers" magnitude="5">
<documentation>Primary users of the system: those actually interviewing electors.</documentation>
<key>
<property type="integer" name="id" column="id" distinct="system" immutable="true">
@ -221,7 +231,7 @@
<documentation>All canvassers</documentation>
</permission>
</entity>
<entity name="followuprequests">
<entity name="followuprequests" magnitude="7">
<documentation>Requests for a followup with an issue expert</documentation>
<key>
<property required="true" type="integer" name="id" column="id" distinct="system">
@ -245,7 +255,7 @@
<prompt prompt="method_id" locale="en-GB"/>
</property>
</entity>
<entity name="rolememberships">
<entity name="rolememberships" magnitude="6">
<documentation>Link table</documentation>
<property required="true" type="entity" entity="roles" farkey="id" name="role_id"
column="role_id">
@ -256,7 +266,7 @@
<prompt prompt="canvasser_id" locale="en-GB"/>
</property>
</entity>
<entity name="roles">
<entity name="roles" magnitude="1">
<documentation>A role (essentially, the same as a group, but application layer rather than database layer) of which a user may be a member.</documentation>
<key>
<property type="integer" name="id" column="id" immutable="true" distinct="system">
@ -267,7 +277,7 @@
<prompt prompt="name" locale="en-GB"/>
</property>
</entity>
<entity name="teams">
<entity name="teams" magnitude="4">
<key>
<property type="integer" name="id" column="id" distinct="system" immutable="true">
<prompt prompt="id" locale="en-GB"/>
@ -294,7 +304,7 @@
<documentation>All groups</documentation>
</permission>
</entity>
<entity name="districts">
<entity name="districts" magnitude="4">
<documentation>Electoral districts</documentation>
<key>
<property required="true" type="integer" name="id" column="id" immutable="true" distinct="system">
@ -307,7 +317,7 @@
<permission group="public" permission="read"></permission>
<permission group="admin" permission="all"></permission>
</entity>
<entity name="teamorganiserships">
<entity name="teamorganiserships" magnitude="4">
<documentation>Link table</documentation>
<property required="true" type="entity" entity="teams" farkey="id" name="team_id"
column="team_id">
@ -318,7 +328,7 @@
<prompt prompt="canvasser_id" locale="en-GB"/>
</property>
</entity>
<entity name="followupactions">
<entity name="followupactions" magnitude="7">
<documentation>Actions taken on followup requests.</documentation>
<key>
<property required="true" type="integer" name="id" column="id" distinct="system">
@ -348,7 +358,7 @@
</permission>
<permission group="analysts" permission="read"/>
</entity>
<entity name="issueexpertise">
<entity name="issueexpertise" magnitude="5">
<documentation>Link table</documentation>
<property required="true" type="integer" name="canvasser_id" column="canvasser_id"
entity="canvassers" farkey="id">
@ -363,7 +373,7 @@
<prompt prompt="method_id" locale="en-GB"/>
</property>
</entity>
<entity name="options">
<entity name="options" magnitude="1">
<documentation>Options in the election or referendum being canvassed on</documentation>
<key>
<property required="true" type="string" name="id" column="id" size="32" immutable="true" distinct="all">
@ -371,7 +381,7 @@
</property>
</key>
</entity>
<entity name="teammemberships">
<entity name="teammemberships" magnitude="5">
<documentation>Link table</documentation>
<property required="true" type="entity" entity="teams" farkey="id" name="team_id"
column="team_id">
@ -382,7 +392,7 @@
<prompt prompt="canvasser_id" locale="en-GB"/>
</property>
</entity>
<entity name="followupmethods">
<entity name="followupmethods" magnitude="1">
<key>
<property required="true" type="string" size="32" name="id" column="id" immutable="true" distinct="all">
<prompt prompt="id" locale="en-GB"/>

View file

@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- DOCTYPE application PUBLIC "-//JOURNEYMAN//DTD ADL 1.4//EN"
"http://www.journeyman.cc/adl/stable/adl/schemas/adl-1.4.dtd" -->
<application xmlns="http://bowyer.journeyman.cc/adl/1.4/" xmlns:adl="http://bowyer.journeyman.cc/adl/1.4/" name="youyesyet" version="0.1.1">
<!-- DOCTYPE application PUBLIC "-//JOURNEYMAN//DTD ADL 1.4.1//EN"
"http://www.journeyman.cc/adl/stable/adl/schemas/adl-1.4.1.dtd" -->
<application xmlns="http://bowyer.journeyman.cc/adl/1.4.1/" xmlns:adl="http://bowyer.journeyman.cc/adl/1.4.1/" name="youyesyet" version="0.1.1">
<!--
***************************************************************************
*
* Application Description Language Framework
* ©2007 Cygnet Solutions Ltd
*
* THIS FILE IS AUTOMATICALLY GENERATED AND SHOULD NOT
* BE MANUALLY EDITED.
@ -67,7 +66,7 @@
<!--
entity electors already has a key - not generating one
-->
<entity name="electors">
<entity table="electors" name="electors" magnitude="6">
<key>
<property required="true" type="integer" name="id" column="id" immutable="true" distinct="system">
<prompt prompt="id" locale="en-GB"/>
@ -88,10 +87,10 @@
<property name="gender" type="entity" column="gender" entity="genders" farkey="id" default="Unknown">
<prompt prompt="gender" locale="en-GB"/>
</property>
<list properties="listed" name="Electors"><field property="id"/><field property="name"/><field property="address_id"/><field property="phone"/><field property="email"/><field property="gender"/></list>
<form properties="listed" name="Elector"><field property="id"/><field property="name"/><field property="address_id"/><field property="phone"/><field property="email"/><field property="gender"/></form>
<list properties="listed" name="Electors"><field property="id"/><field property="name"/><field property="dwelling_id"/><field property="phone"/><field property="email"/><field property="gender"/></list>
<form properties="listed" name="Elector"><field property="id"/><field property="name"/><field property="dwelling_id"/><field property="phone"/><field property="email"/><field property="gender"/></form>
</entity>
<entity name="genders" natural-key="id">
<entity table="genders" name="genders" natural-key="id" magnitude="1">
<key>
<property name="id" type="string" size="32" distinct="all">
<prompt prompt="gender" locale="en-GB"/>
@ -111,8 +110,10 @@
<field property="id"/>
</form>
</entity>
<entity name="dwellings">
<!--
entity dwellings already has a key - not generating one
-->
<entity table="dwellings" name="dwellings" magnitude="6">
<key>
<property required="true" type="integer" name="id" column="id" immutable="true" distinct="system">
<prompt prompt="id" locale="en-GB"/>
@ -126,7 +127,7 @@
<!--
entity addresses already has a key - not generating one
-->
<entity name="addresses">
<entity table="addresses" name="addresses" magnitude="6">
<key>
<property required="true" type="integer" name="id" column="id" immutable="true" distinct="system">
<prompt prompt="id" locale="en-GB"/>
@ -146,7 +147,7 @@
</property>
<property type="real" name="latitude" column="latitude">
<prompt prompt="latitude" locale="en-GB"/>
</property>dwe
</property>
<property type="real" name="longitude" column="longitude">
<prompt prompt="longitude" locale="en-GB"/>
</property>
@ -159,7 +160,7 @@
<!--
entity visits already has a key - not generating one
-->
<entity name="visits">
<entity table="visits" name="visits" magnitude="7">
<key>
<property required="true" type="integer" name="id" column="id" distinct="system">
<prompt prompt="id" locale="en-GB"/>
@ -180,7 +181,7 @@
<!--
entity authorities already has a key - not generating one
-->
<entity name="authorities">
<entity table="authorities" name="authorities" magnitude="2">
<key>
<property required="true" type="string" name="id" column="id" size="32" distinct="all">
<prompt prompt="id" locale="en-GB"/>
@ -190,7 +191,7 @@
<!--
entity issues already has a key - not generating one
-->
<entity name="issues">
<entity table="issues" name="issues" magnitude="1">
<documentation>Issues believed to be of interest to electors, about which they may have questions.</documentation>
<key>
<property required="true" type="string" name="id" column="id" size="32" immutable="true" distinct="all">
@ -209,7 +210,7 @@
<!--
entity intentions has no key - generating one
-->
<entity name="intentions" table="intentions">
<entity magnitude="6" table="intentions" name="intentions">
<documentation>Link table.</documentation>
<key>
<property type="integer" distinct="system" required="true" name="Id">
@ -239,7 +240,7 @@
<!--
entity canvassers already has a key - not generating one
-->
<entity name="canvassers">
<entity table="canvassers" name="canvassers" magnitude="5">
<documentation>Primary users of the system: those actually interviewing electors.</documentation>
<key>
<property type="integer" name="id" column="id" distinct="system" immutable="true">
@ -283,7 +284,7 @@
<!--
entity followuprequests already has a key - not generating one
-->
<entity name="followuprequests">
<entity table="followuprequests" name="followuprequests" magnitude="7">
<documentation>Requests for a followup with an issue expert</documentation>
<key>
<property required="true" type="integer" name="id" column="id" distinct="system">
@ -306,7 +307,7 @@
<!--
entity rolememberships has no key - generating one
-->
<entity name="rolememberships" table="rolememberships">
<entity table="rolememberships" name="rolememberships" magnitude="6">
<documentation>Link table</documentation>
<key>
<property type="integer" distinct="system" required="true" name="Id">
@ -333,7 +334,7 @@
<!--
entity roles already has a key - not generating one
-->
<entity name="roles">
<entity table="roles" name="roles" magnitude="1">
<documentation>A role (essentially, the same as a group, but application layer rather than database layer) of which a user may be a member.</documentation>
<key>
<property type="integer" name="id" column="id" immutable="true" distinct="system">
@ -347,7 +348,7 @@
<!--
entity teams already has a key - not generating one
-->
<entity name="teams">
<entity table="teams" name="teams" magnitude="4">
<key>
<property type="integer" name="id" column="id" distinct="system" immutable="true">
<prompt prompt="id" locale="en-GB"/>
@ -376,7 +377,7 @@
<!--
entity districts already has a key - not generating one
-->
<entity name="districts">
<entity table="districts" name="districts" magnitude="4">
<documentation>Electoral districts</documentation>
<key>
<property required="true" type="integer" name="id" column="id" immutable="true" distinct="system">
@ -392,7 +393,7 @@
<!--
entity teamorganiserships has no key - generating one
-->
<entity name="teamorganiserships" table="teamorganiserships">
<entity table="teamorganiserships" name="teamorganiserships" magnitude="4">
<documentation>Link table</documentation>
<key>
<property type="integer" distinct="system" required="true" name="Id">
@ -419,7 +420,7 @@
<!--
entity followupactions already has a key - not generating one
-->
<entity name="followupactions">
<entity table="followupactions" name="followupactions" magnitude="7">
<documentation>Actions taken on followup requests.</documentation>
<key>
<property required="true" type="integer" name="id" column="id" distinct="system">
@ -450,7 +451,7 @@
<!--
entity issueexpertise has no key - generating one
-->
<entity name="issueexpertise" table="issueexpertise">
<entity magnitude="6" table="issueexpertise" name="issueexpertise">
<documentation>Link table</documentation>
<key>
<property type="integer" distinct="system" required="true" name="Id">
@ -480,7 +481,7 @@
<!--
entity options already has a key - not generating one
-->
<entity name="options">
<entity table="options" name="options" magnitude="1">
<documentation>Options in the election or referendum being canvassed on</documentation>
<key>
<property required="true" type="string" name="id" column="id" size="32" immutable="true" distinct="all">
@ -491,7 +492,7 @@
<!--
entity teammemberships has no key - generating one
-->
<entity name="teammemberships" table="teammemberships">
<entity table="teammemberships" name="teammemberships" magnitude="5">
<documentation>Link table</documentation>
<key>
<property type="integer" distinct="system" required="true" name="Id">
@ -518,7 +519,7 @@
<!--
entity followupmethods already has a key - not generating one
-->
<entity name="followupmethods">
<entity table="followupmethods" name="followupmethods" magnitude="1">
<key>
<property required="true" type="string" size="32" name="id" column="id" immutable="true" distinct="all">
<prompt prompt="id" locale="en-GB"/>