Changeset 6148

Show
Ignore:
Timestamp:
06/02/07 22:49:53 (1 year ago)
Author:
bergie
Message:

More tree information for #46, removing legacy 1.7 metadata properties

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/fi.mik.lentopaikkakisa/config/mgdschema.xml

    r5650 r6148  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<Schema xmlns="http://www.midgard-project.org/repligard/1.4"> 
    3     <type name="fi_mik_flight" table="fi_mik_flight"
     3    <type name="fi_mik_flight" table="fi_mik_flight"  parentfield="pilot"
    44        <property name="id" type="integer" primaryfield="id"/> 
    55         
     
    1616         
    1717        <!-- Only a single pilot can be a PIC during a flight --> 
    18         <property name="pilot" link="midgard_person:id" reverse="no" type="integer"/> 
     18        <property name="pilot" parentfield="pilot" link="midgard_person:id" reverse="no" type="integer"/> 
    1919         
    2020        <!-- In some cases it is important to know who operated the flight --> 
  • trunk/midcom/fi.mik.lentopaikkakisa/flight.php

    r5568 r6148  
    1515        return null; 
    1616    } 
     17     
     18    /** 
     19     * Human-readable label for cases like Asgard navigation 
     20     */ 
     21    function get_label() 
     22    { 
     23        if ($this->origin) 
     24        { 
     25            $date = $this->start; 
     26            if ($date == 0) 
     27            { 
     28                $date = $this->end; 
     29            } 
     30            return sprintf($_MIDCOM->i18n->get_string('%s %s to %s', 'midcom'), strftime('%x', $date), $this->origin, $this->destination); 
     31        } 
     32        return "flight #{$this->id}"; 
     33    } 
    1734} 
    1835?> 
  • trunk/midcom/org.routamc.positioning/aerodrome.php

    r3630 r6148  
    1919        return parent::__org_routamc_positioning_aerodrome_dba($id); 
    2020    } 
     21 
     22    /** 
     23     * Human-readable label for cases like Asgard navigation 
     24     */ 
     25    function get_label() 
     26    { 
     27        return $this->icao; 
     28    } 
    2129} 
    2230?> 
  • trunk/midcom/org.routamc.positioning/city.php

    r4795 r6148  
    1919        return parent::__org_routamc_positioning_city_dba($id); 
    2020    } 
    21  
     21     
     22    /** 
     23     * Human-readable label for cases like Asgard navigation 
     24     */ 
     25    function get_label() 
     26    { 
     27        return $this->city; 
     28    } 
     29     
    2230    /** 
    2331     * Don't save city if another city is in same place 
  • trunk/midcom/org.routamc.positioning/config/mgdschema.xml

    r5935 r6148  
    55    <type name="org_routamc_positioning_city" table="org_routamc_positioning_city"> 
    66        <property name="id" type="integer" primaryfield="id"/> 
    7         <property name="city" type="text"/> 
     7        <property name="city" type="string"/> 
    88        <!-- Country in ISO 3166-1 alpha-2 two letter format --> 
    9         <property name="country" type="text"/> 
    10         <property name="region" type="text"/> 
     9        <property name="country" type="string"/> 
     10        <property name="region" type="string"/> 
    1111        <!-- TODO: Alternate names should probably be a MultiLang table --> 
    12         <property name="alternatenames" type="text"/> 
     12        <property name="alternatenames" type="string"/> 
    1313        <property name="population" type="integer"/> 
    1414        <!-- Coordinates in decimal format --> 
     
    1616        <property name="longitude" type="double"/> 
    1717        <property name="altitude" type="integer"/> 
    18  
    19         <!-- required metadata --> 
    20         <property name="revised" type="string"/> 
    21         <property name="revision" type="integer"/> 
    22         <property name="created" type="string"/> 
    23         <property name="creator" link="midgard_person:id" reverse="no" type="integer"/> 
    24         <property name="revisor" link="midgard_person:id" reverse="no" type="integer"/> 
    25         <!-- /required metadata --> 
    2618    </type> 
    2719 
     
    2921    <type name="org_routamc_positioning_aerodrome" table="org_routamc_positioning_aerodrome" parent="org_routamc_positioning_city" parentfield="city"> 
    3022        <property name="id" type="integer" primaryfield="id"/> 
    31         <property name="icao" type="text"/> 
    32         <property name="iata" type="text"/> 
    33         <property name="name" type="text"/> 
     23        <property name="icao" type="string"/> 
     24        <property name="iata" type="string"/> 
     25        <property name="name" type="string"/> 
    3426        <property name="city" link="org_routamc_positioning_city:id" reverse="no" type="integer" parentfield="city"/> 
    3527        <!-- Coordinates in decimal format --> 
     
    3931        <!-- Runway altitude in meters --> 
    4032        <property name="altitude" type="float"/> 
    41  
    42         <!-- required metadata --> 
    43         <property name="revised" type="string"/> 
    44         <property name="revision" type="integer"/> 
    45         <property name="created" type="string"/> 
    46         <property name="creator" link="midgard_person:id" reverse="no" type="integer"/> 
    47         <property name="revisor" link="midgard_person:id" reverse="no" type="integer"/> 
    48         <!-- /required metadata --> 
    4933    </type> 
    5034 
     
    6347            objectlocation: Location acquired through an object's location 
    6448        --> 
    65         <property name="importer" type="text"/> 
     49        <property name="importer" type="string"/> 
    6650 
    6751        <!-- 
     
    8266        <!-- Bearing in degrees --> 
    8367        <property name="bearing" type="integer"/> 
    84  
    85         <!-- required metadata --> 
    86         <property name="revised" type="string"/> 
    87         <property name="revision" type="integer"/> 
    88         <property name="created" type="string"/> 
    89         <property name="creator" link="midgard_person:id" reverse="no" type="integer"/> 
    90         <property name="revisor" link="midgard_person:id" reverse="no" type="integer"/> 
    91         <!-- /required metadata --> 
    9268    </type> 
    9369 
    9470    <!-- Locations are used for connecting any Midgard object into real-world positions --> 
    95     <type name="org_routamc_positioning_location" table="org_routamc_positioning_location"
     71    <type name="org_routamc_positioning_location" table="org_routamc_positioning_location" parentfield="log"
    9672        <property name="id" type="integer" primaryfield="id"/> 
    9773 
    9874        <!-- Parent object GUID --> 
    99         <property name="parent" type="text"/> 
     75        <property name="parent" type="string"/> 
    10076        <!-- Parent object class --> 
    101         <property name="parentclass" type="text"/> 
     77        <property name="parentclass" type="string"/> 
    10278        <!-- Parent component --> 
    103         <property name="parentcomponent" type="text"/> 
     79        <property name="parentcomponent" type="string"/> 
    10480 
    10581        <!-- Log entry this position information is based on if type is set to "10" --> 
    106         <property name="log" link="org_routamc_positioning_log:id" reverse="no" type="integer"/> 
     82        <property name="log" link="org_routamc_positioning_log:id" parentfield="log" reverse="no" type="integer"/> 
    10783        <property name="date" type="integer"/> 
    10884 
     
    12197        <!-- Altitude in meters --> 
    12298        <property name="altitude" type="float"/> 
    123  
    124         <!-- required metadata --> 
    125         <property name="revised" type="string"/> 
    126         <property name="revision" type="integer"/> 
    127         <property name="created" type="string"/> 
    128         <property name="creator" link="midgard_person:id" reverse="no" type="integer"/> 
    129         <property name="revisor" link="midgard_person:id" reverse="no" type="integer"/> 
    130         <!-- /required metadata --> 
    13199    </type> 
    132100</Schema> 
  • trunk/midcom/org.routamc.positioning/log.php

    r4906 r6148  
    4242 
    4343        return null; 
     44    } 
     45     
     46    /** 
     47     * Human-readable label for cases like Asgard navigation 
     48     */ 
     49    function get_label() 
     50    { 
     51        return strftime('%x', $this->date) . ' ' . org_routamc_positioning_utils::pretty_print_coordinates($this->latitude, $this->longitude); 
    4452    } 
    4553 
  • trunk/midcom/org.routamc.statusmessage/message.php

    r5233 r6148  
    3232        } 
    3333    } 
     34     
     35    /** 
     36     * Human-readable label for cases like Asgard navigation 
     37     */ 
     38    function get_label() 
     39    { 
     40        return strftime('%x', $this->metadata->published) . " {$this->status}"; 
     41    } 
    3442} 
    3543?>