ILMSinfo / RBIS: XML

From ILMS-Wiki
Revision as of 15:31, 23 February 2015 by Franzi (Talk | contribs)
Jump to: navigation, search

Contents

General structure

The XML definition will be used to automatically create all views on the dataset (overview, detailed view, search view, edit/new view) and all SQL queries in the background. All attribute elements with given position (group and order) will be displayed except of no-matching cond-condition attributes.


Detailed description

view

  • basedir: set to : ".."
  • name: not in use
  • title: not in use (Headline in old Layout)
  • template (true|false): Enable function to save content as template
  • parent: Parent XML-file (will be used to manipulate log entries)

Example:

<view basedir=".." name="variable" title="c_person_headline" parent="c_person_org" template="true">

rights

Controls the actions executed on the XML-file

  • read (true|false): view activities
  • write (true|false): write activities
  • delete (true|false): delete activities
<rights read="true" write="true" delete="true"/>

id

  • name: Identifier of the dataset. "md_metadata_id" should be used if available.
<id name="geodata.md_metadata_id"/>

group

  • name: Internal name of the group (g + number). The number defines also the order of display.
  • title: Group name (headline of group) replaced by translation id.
<group name="g0" title="geodata_g0"/>
<group name="g1" title="geodata_g1"/>
<group name="g2" title="geodata_g2"/>

map

  • id: Identification ID (should be equal to view -> id)
  • layer_type (station|map): type of given geometry (station = point; map = bounding box)

<layer id="dsstation.md_metadata_id" link_type="station"/><nowiki> ==edit== *'''title''': Headline (e.g. Edit dataset:) *'''ref_id''': Identifier (e.g. metadata.md_metadata_id) *'''''change''''' (true|false): Display link *'''''change_view''''' : Reference view for action. *'''''change_ov''''' (true|false): Display link in overview *'''''change_title''''': Title replaced by translation id (e.g. Edit). *'''''delete''''' (true|false): Display link *'''''delete_view''''' : Reference view for action. *'''''delete_ov''''' (true|false): Display link in overview *'''''delete_title''''': Title replaced by translation id (e.g. Delete). *'''''add''''' (true|false): Display link *'''''add_view''''' : Reference view for action. *'''''add_ov''''' (true|false): Display link in overview *'''''add_title''''': Title replaced by translation id (e.g. Add). '''Example 1:''' <nowiki><edit title="c_person_edit_title" ref_id="respparty.ci_respparty_id" change="true" change_ov="false" change_title="c_person_edit_change_title" delete="true" delete_ov="false" delete_title="c_person_edit_delete_title"/>

Example 2 (with "add" & reference view):

<edit title="adm_select_dropdown_edit_title"
ref_id="app_view_dropdown_ids.app_view_dropdown_ids_id" 
change="true" 
change_ov="false" 
change_title="adm_select_dropdown_edit_change_title" 
change_view="adm_select_dropdown_edit" 
delete="true" 
delete_ov="false" 
delete_title="adm_select_dropdown_edit_delete_title"
delete_view="adm_select_dropdown_edit" 
add="true" 
add_ov="false" 
add_title="adm_select_dropdown_edit_add_title"/>

document

  • title:
  • ref_id:
  • ref_view_name:

association

  • edit:
  • overview:

table

  • name: table name in the database
<table name="metadata">
  • cond: name of condition (if the name is not set in the config.php, the table will be ignored. The cond-attribute must be also set in the attribute and join element.)
config.php: $conditions["workgroup"] = 1;
<table name="fp_featpar_all2" cond="workgroup">

Example:

<table name="metadata">
</table>

attribute

  • cond: name of condition (if the name is not set in the config.php, the attribute will be ignored. The cond-attribute can/must be also set in the table and join element.)
<attribute cond="workgroup" name="featpar" title="geo.... />
  • pk
  • type
  • default:
  • dateformat:
  • check:
  • link_id: Specifies the ID used for the link
  • link_view: Specifies the target view
  • link_target: Define the target php-file. The default target is view.php
  • size:
  • sort:
  • depend_on:
  • depend_on_rule_table:
  • required:
  • update:
  • filter: true -> display selection list on overview column
  • group:
  • order:
  • overview:

example: Primaray key

example: Selection list

example: Date

example: Link

link_id="int_method_set.int_method_set_id" link_view="int_method_set_list" link_target="overview.php"

example: Dependency

<attribute name="unit" title="ts_timeseriesfeature_uomunits_all_unit" default="" type="text" size="measured_group" group="g0" order="3" update="dropdown" required="mandatory" overview="3" depend_on="fp_featpar_all.featpar" depend_on_rule_table="app_depend_featpar_uom"/>

join

  • cond: name of condition (if the name is not set in the config.php, the table will be ignored. The cond-attribute must be also set in the table and attribute element.)
<join cond="workgroup" from_table="geodata" ... />
Personal tools