221 lines
31 KiB
HTML
221 lines
31 KiB
HTML
<!DOCTYPE html PUBLIC ""
|
|
"">
|
|
<html><head><meta charset="UTF-8" /><title>adl.validator documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Adl</span> <span class="project-version">1.4.6-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>adl</span></div></div></li><li class="depth-2 branch"><a href="adl.main.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>main</span></div></a></li><li class="depth-2 branch"><a href="adl.to-hugsql-queries.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-hugsql-queries</span></div></a></li><li class="depth-2 branch"><a href="adl.to-json-routes.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-json-routes</span></div></a></li><li class="depth-2 branch"><a href="adl.to-psql.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-psql</span></div></a></li><li class="depth-2 branch"><a href="adl.to-reframe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-reframe</span></div></a></li><li class="depth-2 branch"><a href="adl.to-selmer-routes.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-selmer-routes</span></div></a></li><li class="depth-2 branch"><a href="adl.to-selmer-templates.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-selmer-templates</span></div></a></li><li class="depth-2 branch"><a href="adl.to-swagger.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-swagger</span></div></a></li><li class="depth-2 current"><a href="adl.validator.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validator</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="adl.validator.html#var-all-data-types"><div class="inner"><span>all-data-types</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-application-validations"><div class="inner"><span>application-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-auxlist-validations"><div class="inner"><span>auxlist-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-cascade-actions"><div class="inner"><span>cascade-actions</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-complex-data-types"><div class="inner"><span>complex-data-types</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-content"><div class="inner"><span>content</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-content-validations"><div class="inner"><span>content-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-defineable-data-types"><div class="inner"><span>defineable-data-types</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-disjunct-valid.3F"><div class="inner"><span>disjunct-valid?</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-documentation-validations"><div class="inner"><span>documentation-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-entity-validations"><div class="inner"><span>entity-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-field-stuff"><div class="inner"><span>field-stuff</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-field-validations"><div class="inner"><span>field-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-fieldgroup-validations"><div class="inner"><span>fieldgroup-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-foot-validations"><div class="inner"><span>foot-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-form-validations"><div class="inner"><span>form-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-generator-actions"><div class="inner"><span>generator-actions</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-generator-validations"><div class="inner"><span>generator-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-group-validations"><div class="inner"><span>group-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-head-validations"><div class="inner"><span>head-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-help-validations"><div class="inner"><span>help-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-ifmissing-validations"><div class="inner"><span>ifmissing-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-in-implementation-validations"><div class="inner"><span>in-implementation-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-key-validations"><div class="inner"><span>key-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-list-validations"><div class="inner"><span>list-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-option-validations"><div class="inner"><span>option-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-order-validations"><div class="inner"><span>order-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-page-content"><div class="inner"><span>page-content</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-page-stuff"><div class="inner"><span>page-stuff</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-page-validations"><div class="inner"><span>page-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-param-validations"><div class="inner"><span>param-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-permission-validations"><div class="inner"><span>permission-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-permissions"><div class="inner"><span>permissions</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-pragma-validations"><div class="inner"><span>pragma-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-prompt-validations"><div class="inner"><span>prompt-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-property-validations"><div class="inner"><span>property-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-reference-validations"><div class="inner"><span>reference-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-sequences"><div class="inner"><span>sequences</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-simple-data-types"><div class="inner"><span>simple-data-types</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-special-data-types"><div class="inner"><span>special-data-types</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-specification-validations"><div class="inner"><span>specification-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-top-validations"><div class="inner"><span>top-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-try-validate"><div class="inner"><span>try-validate</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-typedef-validations"><div class="inner"><span>typedef-validations</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-valid-adl.3F"><div class="inner"><span>valid-adl?</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-validate-adl"><div class="inner"><span>validate-adl</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-validate-adl-file"><div class="inner"><span>validate-adl-file</span></div></a></li><li class="depth-1"><a href="adl.validator.html#var-verb-validations"><div class="inner"><span>verb-validations</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">adl.validator</h1><div class="doc"><pre class="plaintext">Application Description Language: validator for ADL structure.
|
|
TODO: this is at present largely a failed experiment.</pre></div><div class="public anchor" id="var-all-data-types"><h3>all-data-types</h3><div class="usage"></div><div class="doc"><pre class="plaintext">FIXME: write docs</pre></div></div><div class="public anchor" id="var-application-validations"><h3>application-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">FIXME: write docs</pre></div></div><div class="public anchor" id="var-auxlist-validations"><h3>auxlist-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">a subsidiary list, on which entities related to primary
|
|
entities in the enclosing page or list are listed
|
|
|
|
* `property`: the property of the enclosing entity that this
|
|
list displays (obviously, must be of type='list')
|
|
* `onselect`: the form or page of the listed entity to call
|
|
when an item from the list is selected
|
|
* `canadd`: true if the user should be able to add records
|
|
to this list</pre></div></div><div class="public anchor" id="var-cascade-actions"><h3>cascade-actions</h3><div class="usage"></div><div class="doc"><pre class="plaintext">actions which should be cascaded to dependent objects. All these values except
|
|
'manual' are taken from Hibernate and should be passed through the adl2hibernate
|
|
mapping transparently. Relevent only for properties with type='entity', type='link'
|
|
and type='list'
|
|
|
|
* `all`: cascade delete, save and update
|
|
* `all-delete-orphan`: see hibernate documentation; relates to transient objects only
|
|
* `delete`: cascade delete actions, but not save and update
|
|
* `manual`: cascading will be handled in manually managed code, code to
|
|
handle cascading should not be generated
|
|
* `save-update`: cascade save and update actions, but not delete.</pre></div></div><div class="public anchor" id="var-complex-data-types"><h3>complex-data-types</h3><div class="usage"></div><div class="doc"><pre class="plaintext">data types which are more complex than SimpleDataTypes...
|
|
* `entity` : a foreign key link to another entity (i.e. the 'many' end of a
|
|
one-to-many link);
|
|
* `list` : a list of some other entity that links to me (i.e. the 'one' end of
|
|
a one-to-many link);
|
|
* `link` : a many to many link (via a link table);
|
|
* `defined` : a type defined by a typedef.</pre></div></div><div class="public anchor" id="var-content"><h3>content</h3><div class="usage"></div><div class="doc"><pre class="plaintext">content, for things like pages (i.e. forms, lists, pages)
|
|
</pre></div></div><div class="public anchor" id="var-content-validations"><h3>content-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">FIXME: write docs</pre></div></div><div class="public anchor" id="var-defineable-data-types"><h3>defineable-data-types</h3><div class="usage"></div><div class="doc"><pre class="plaintext">data types which can be used in a typedef to provide validation -
|
|
e.g. a string can be used with a regexp or a scalar can be used with
|
|
min and max values
|
|
* `string`: varchar java.sql.Types.VARCHAR
|
|
* `integer`: int java.sql.Types.INTEGER
|
|
* `real`: double java.sql.Types.DOUBLE
|
|
* `money`: money java.sql.Types.INTEGER
|
|
* `date`: date java.sql.Types.DATE
|
|
* `time`: time java.sql.Types.TIME
|
|
* `timestamp`: timestamp java.sql.Types.TIMESTAMP
|
|
* `uploadable`: varchar java.sql.Types.VARCHAR
|
|
* `image`: varchar java.sql.Types.VARCHAR
|
|
|
|
uploadable is as string but points to an uploaded file; image is as
|
|
uploadable but points to an uploadable graphical image file.</pre></div></div><div class="public anchor" id="var-disjunct-valid.3F"><h3>disjunct-valid?</h3><h4 class="type">macro</h4><div class="usage"><code>(disjunct-valid? o & validations)</code></div><div class="doc"><pre class="plaintext">Yes, this is a horrible hack. I should be returning the error structure
|
|
not printing it. But I can't see how to make that work with `bouncer`.
|
|
OK, so: most of the validators will (usually) fail, and that's OK. How
|
|
do we identify the one which ought not to have failed?</pre></div></div><div class="public anchor" id="var-documentation-validations"><h3>documentation-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">contains documentation on the element which immediately contains it. TODO:
|
|
should HTML markup within a documentation element be allowed? If so, are
|
|
there restrictions?</pre></div></div><div class="public anchor" id="var-entity-validations"><h3>entity-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">an entity which has properties and relationships; maps onto a database
|
|
table or a Java serialisable class - or, of course, various other things
|
|
|
|
* `name`: obviously, the name of this entity
|
|
* `natural-key`: if present, the name of a property of this entity which forms
|
|
a natural primary key [NOTE: Only partly implemented. NOTE: much of
|
|
the present implementation assumes all primary keys will be
|
|
integers. This needs to be fixed!] DEPRECATED: remove; replace with the
|
|
'key' element, below.
|
|
* `table`: the name of the table in which this entity is stored. Defaults to same
|
|
as name of entity. Strongly recommend this is not used unless it needs
|
|
to be different from the name of the entity
|
|
* `foreign`: this entity is part of some other system; no code will be generated
|
|
for it, although code which links to it will be generated</pre></div></div><div class="public anchor" id="var-field-stuff"><h3>field-stuff</h3><div class="usage"></div><div class="doc"><pre class="plaintext">FIXME: write docs</pre></div></div><div class="public anchor" id="var-field-validations"><h3>field-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">a field in a form or page
|
|
|
|
* `property`: the property which this field displays/edits.</pre></div></div><div class="public anchor" id="var-fieldgroup-validations"><h3>fieldgroup-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">a group of fields and other controls within a form or list, which the
|
|
renderer might render as a single pane in a tabbed display, for example.</pre></div></div><div class="public anchor" id="var-foot-validations"><h3>foot-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">content to place in the bottom of the body of the generated document;
|
|
this is any HTML block or inline level element.</pre></div></div><div class="public anchor" id="var-form-validations"><h3>form-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">a form through which an entity may be added or edited
|
|
</pre></div></div><div class="public anchor" id="var-generator-actions"><h3>generator-actions</h3><div class="usage"></div><div class="doc"><pre class="plaintext">FIXME: write docs</pre></div></div><div class="public anchor" id="var-generator-validations"><h3>generator-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">marks a property which is auto-generated by some part of the system.
|
|
This is based on the Hibernate construct, except that the Hibernate
|
|
implementation folds both its internal generators and custom generators
|
|
onto the same attribute. This separates them onto two attributes so we
|
|
can police values for Hibernate's 'builtin' generators.
|
|
|
|
* `action`: one of the supported Hibernate builtin generators, or
|
|
'manual'. 'native' is strongly recommended in most instances
|
|
* `class`: if action is 'manual', the name of a manually maintained
|
|
class conforming to the Hibernate IdentifierGenerator
|
|
interface, or its equivalent in other languages.</pre></div></div><div class="public anchor" id="var-group-validations"><h3>group-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">a group of people with similar permissions to one another
|
|
|
|
* `name`: the name of this group
|
|
* `parent`: the name of a group of which this group is subset</pre></div></div><div class="public anchor" id="var-head-validations"><h3>head-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">content to place in the head of the generated document; normally HTML.
|
|
</pre></div></div><div class="public anchor" id="var-help-validations"><h3>help-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">helptext about a property of an entity, or a field of a page, form or
|
|
list, or a typedef. Typically there will be only one of these per property
|
|
per locale; if there are more than one all those matching the locale may
|
|
be concatenated, or just one may be used.
|
|
|
|
* `locale`: the locale in which to prefer this prompt</pre></div></div><div class="public anchor" id="var-ifmissing-validations"><h3>ifmissing-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">helpful text to be shown if a property value is missing, typically when
|
|
a form is submitted. Typically there will be only one of these per property
|
|
per locale; if there are more than one all those matching the locale may
|
|
be concatenated, or just one may be used. Later there may be more sophisticated
|
|
behaviour here.
|
|
|
|
* `locale`: the locale in which to prefer this prompt</pre></div></div><div class="public anchor" id="var-in-implementation-validations"><h3>in-implementation-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">information about how to translate a type into types known to different target
|
|
languages. TODO: Once again I'm not wholly comfortable with the name; I'm not
|
|
really comfortable that this belongs in ADL at all.
|
|
|
|
* `target`: the target language
|
|
* `value`: the type to use in that target language
|
|
* `kind`: OK, I confess I don't understand this, but Andrew needs it... </pre></div></div><div class="public anchor" id="var-key-validations"><h3>key-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">FIXME: write docs</pre></div></div><div class="public anchor" id="var-list-validations"><h3>list-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">a list on which entities of a given type are listed
|
|
|
|
* `onselect`: name of form/page/list to go to when
|
|
a selection is made from the list</pre></div></div><div class="public anchor" id="var-option-validations"><h3>option-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">one of an explicit list of optional values a property may have
|
|
NOTE: whether options get encoded at application layer or at database layer
|
|
is UNDEFINED; either behaviour is correct. If at database layer it's also
|
|
UNDEFINED whether they're encoded as a single reference data table or as
|
|
separate reference data tables for each property.
|
|
|
|
* `value`: the value of this option.</pre></div></div><div class="public anchor" id="var-order-validations"><h3>order-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">an ordering or records in a list
|
|
* `property`: the property on which to order
|
|
* `sequence`: the sequence in which to order</pre></div></div><div class="public anchor" id="var-page-content"><h3>page-content</h3><div class="usage"></div><div class="doc"><pre class="plaintext">FIXME: write docs</pre></div></div><div class="public anchor" id="var-page-stuff"><h3>page-stuff</h3><div class="usage"></div><div class="doc"><pre class="plaintext">FIXME: write docs</pre></div></div><div class="public anchor" id="var-page-validations"><h3>page-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">a page on which an entity may be displayed
|
|
</pre></div></div><div class="public anchor" id="var-param-validations"><h3>param-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">A parameter passed to the generator. Again, based on the Hibernate
|
|
implementation.
|
|
|
|
* `name`: the name of this parameter.</pre></div></div><div class="public anchor" id="var-permission-validations"><h3>permission-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">permissions policy on an entity, a page, form, list or field
|
|
|
|
* `group`: the group to which permission is granted
|
|
* `permission`: the permission which is granted to that group</pre></div></div><div class="public anchor" id="var-permissions"><h3>permissions</h3><div class="usage"></div><div class="doc"><pre class="plaintext">permissions a group may have on an entity, list, page, form or field
|
|
permissions are deemed to increase as you go right. A group cannot
|
|
have greater permission on a field than on the form it is in, or
|
|
greater permission on form than the entity it belongs to
|
|
|
|
* `none`: none
|
|
* `read`: select
|
|
* `insert`: insert
|
|
* `noedit`: select, insert
|
|
* `edit`: select, insert, update
|
|
* `all`: select, insert, update, delete</pre></div></div><div class="public anchor" id="var-pragma-validations"><h3>pragma-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">pragmatic advice to generators of lists and forms, in the form of
|
|
name/value pairs which may contain anything. Over time some pragmas
|
|
will become 'well known', but the whole point of having a pragma
|
|
architecture is that it is extensible.</pre></div></div><div class="public anchor" id="var-prompt-validations"><h3>prompt-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">a prompt for a property or field; used as the prompt text for a widget
|
|
which edits it. Typically there will be only one of these per property
|
|
per locale; if there are more than one all those matching the locale may
|
|
be concatenated, or just one may be used.
|
|
|
|
* `prompt`: the prompt to use
|
|
* `locale`: the locale in which to prefer this prompt.</pre></div></div><div class="public anchor" id="var-property-validations"><h3>property-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">a property (field) of an entity (table)
|
|
|
|
* `name`: the name of this property.
|
|
* `type`: the type of this property.
|
|
* `default`: the default value of this property. There will probably be
|
|
magic values of this!
|
|
* `typedef`: name of the typedef to use, it type = 'defined'.
|
|
* `distinct`: distinct='system' required that every value in the system
|
|
will be distinct (i.e. natural primary key);
|
|
distinct='user' implies that the value may be used by users
|
|
in distinguishing entities even if values are not formally
|
|
unique;
|
|
distinct='all' implies that the values are formally unique
|
|
/and/ are user friendly (NOTE: not implemented).
|
|
* `entity`: if type='entity', the name of the entity this property is
|
|
a foreign key link to.
|
|
if type='list', the name of the entity that has a foreign
|
|
key link to this entity
|
|
* `farkey`: if type='list', the name of farside key in the listed
|
|
entity; if type='entity' and the farside field to join to
|
|
is not the farside primary key, then the name of that
|
|
farside field
|
|
* `required`: whether this propery is required (i.e. 'not null').
|
|
* `immutable`: if true, once a value has been set it cannot be changed.
|
|
* `size`: fieldwidth of the property if specified.
|
|
* `concrete`: if set to 'false', this property is not stored in the
|
|
database but must be computed (manually written code must
|
|
be provided to support this)
|
|
* `cascade`: what action(s) on the parent entity should be cascaded to
|
|
entitie(s) linked on this property. Valid only if type='entity',
|
|
type='link' or type='list'.
|
|
* `column`: name of the column in a SQL database table in which this property
|
|
is stored. TODO: Think about this.
|
|
* `unsaved-value`:
|
|
of a property whose persistent value is set on first being
|
|
committed to persistent store, the value which it holds before
|
|
it has been committed</pre></div></div><div class="public anchor" id="var-reference-validations"><h3>reference-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">The 'specification' and 'reference' elements are for documentation only,
|
|
and do not contribute to the engineering of the application described.
|
|
|
|
A reference element is a reference to a specifying document.
|
|
|
|
* `abbr`: The abbreviated name of the specification to which this
|
|
reference refers
|
|
* `section`: The 'anchor part' (part following a hash character) which,
|
|
when appended to the URL, will locate the exact section
|
|
referenced.
|
|
* `entity`: A reference to another entity within this ADL document
|
|
* `property`: A reference to another property within this ADL document;
|
|
if entity is also specified then of that entity, else of
|
|
the ancestor entity if any</pre></div></div><div class="public anchor" id="var-sequences"><h3>sequences</h3><div class="usage"></div><div class="doc"><pre class="plaintext">FIXME: write docs</pre></div></div><div class="public anchor" id="var-simple-data-types"><h3>simple-data-types</h3><div class="usage"></div><div class="doc"><pre class="plaintext">data types which are fairly straightforward translations of JDBC data types
|
|
* `boolean`: boolean java.sql.Types.BIT or char(1) java.sql.Types.CHAR
|
|
* `text`: text or java.sql.Types.LONGVARCHAR
|
|
memo java.sql.Types.CLOB</pre></div></div><div class="public anchor" id="var-special-data-types"><h3>special-data-types</h3><div class="usage"></div><div class="doc"><pre class="plaintext">data types which require special handling - which don't simply map onto
|
|
common SQL data types
|
|
* `geopos` : a latitude/longitude pair (experimental and not yet implemented)
|
|
* `image` : a raster image file, in jpeg, gif, or png format (experimental, not yet implemented)
|
|
* `message` : an internationalised message, having different translations for different locales</pre></div></div><div class="public anchor" id="var-specification-validations"><h3>specification-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">The 'specification' and 'reference' elements are for documentation only,
|
|
and do not contribute to the engineering of the application described.
|
|
|
|
A specification element is intended chiefly to declare the reference
|
|
documents which may be used in documentation elements later in the
|
|
document.
|
|
|
|
* `url`: The URL from which the document referenced can be retrieved
|
|
* `name`: The full name (title) given to this document
|
|
* `abbr`: A convenient abbreviated name.</pre></div></div><div class="public anchor" id="var-top-validations"><h3>top-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">content to place in the top of the body of the generated document;
|
|
this is any HTML block or inline level element.</pre></div></div><div class="public anchor" id="var-try-validate"><h3>try-validate</h3><div class="usage"><code>(try-validate o validation)</code></div><div class="doc"><pre class="plaintext">Pass this `validation` and the object `o` to bouncer
|
|
</pre></div></div><div class="public anchor" id="var-typedef-validations"><h3>typedef-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">the definition of a defined type. At this stage a defined type is either
|
|
* a string in which case it must have size and pattern, or
|
|
* a scalar in which case it must have minimum and/or maximum
|
|
pattern must be a regular expression as interpreted by org.apache.regexp.RE
|
|
minimum and maximum must be of appropriate format for the datatype specified.
|
|
Validation may be done client-side and/or server-side at application layer
|
|
and/or server side at database layer.
|
|
|
|
* `name`: the name of this typedef
|
|
* `type`: the simple type on which this defined type is based; must be
|
|
present unless in-implementation children are supplied
|
|
* `size`: the data size of this defined type
|
|
* `pattern`: a regular expression which values for this type must match
|
|
* `minimum`: the minimum value for this type (if base type is scalar)
|
|
* `maximum`: the maximum value for this type (if base type is scalar)</pre></div></div><div class="public anchor" id="var-valid-adl.3F"><h3>valid-adl?</h3><div class="usage"><code>(valid-adl? src)</code></div><div class="doc"><pre class="plaintext">Return `true` if `src` is syntactically valid ADL.
|
|
</pre></div></div><div class="public anchor" id="var-validate-adl"><h3>validate-adl</h3><div class="usage"><code>(validate-adl src)</code></div><div class="doc"><pre class="plaintext">FIXME: write docs</pre></div></div><div class="public anchor" id="var-validate-adl-file"><h3>validate-adl-file</h3><div class="usage"><code>(validate-adl-file filepath)</code></div><div class="doc"><pre class="plaintext">FIXME: write docs</pre></div></div><div class="public anchor" id="var-verb-validations"><h3>verb-validations</h3><div class="usage"></div><div class="doc"><pre class="plaintext">a verb is something that may be done through a form. Probably the verbs 'store'
|
|
and 'delete' are implied, but maybe they need to be explicitly declared. The 'verb'
|
|
attribute of the verb is what gets returned to the controller
|
|
|
|
* `verb` what gets returned to the controller when this verb is selected
|
|
* `dangerous` true if this verb causes a destructive change.</pre></div></div></div></body></html> |