Changeset 6148
- Timestamp:
- 06/02/07 22:49:53 (1 year ago)
- Files:
-
- trunk/midcom/fi.mik.lentopaikkakisa/config/mgdschema.xml (modified) (2 diffs)
- trunk/midcom/fi.mik.lentopaikkakisa/flight.php (modified) (1 diff)
- trunk/midcom/org.routamc.positioning/aerodrome.php (modified) (1 diff)
- trunk/midcom/org.routamc.positioning/city.php (modified) (1 diff)
- trunk/midcom/org.routamc.positioning/config/mgdschema.xml (modified) (7 diffs)
- trunk/midcom/org.routamc.positioning/log.php (modified) (1 diff)
- trunk/midcom/org.routamc.statusmessage/message.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/fi.mik.lentopaikkakisa/config/mgdschema.xml
r5650 r6148 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <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"> 4 4 <property name="id" type="integer" primaryfield="id"/> 5 5 … … 16 16 17 17 <!-- 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"/> 19 19 20 20 <!-- In some cases it is important to know who operated the flight --> trunk/midcom/fi.mik.lentopaikkakisa/flight.php
r5568 r6148 15 15 return null; 16 16 } 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 } 17 34 } 18 35 ?> trunk/midcom/org.routamc.positioning/aerodrome.php
r3630 r6148 19 19 return parent::__org_routamc_positioning_aerodrome_dba($id); 20 20 } 21 22 /** 23 * Human-readable label for cases like Asgard navigation 24 */ 25 function get_label() 26 { 27 return $this->icao; 28 } 21 29 } 22 30 ?> trunk/midcom/org.routamc.positioning/city.php
r4795 r6148 19 19 return parent::__org_routamc_positioning_city_dba($id); 20 20 } 21 21 22 /** 23 * Human-readable label for cases like Asgard navigation 24 */ 25 function get_label() 26 { 27 return $this->city; 28 } 29 22 30 /** 23 31 * Don't save city if another city is in same place trunk/midcom/org.routamc.positioning/config/mgdschema.xml
r5935 r6148 5 5 <type name="org_routamc_positioning_city" table="org_routamc_positioning_city"> 6 6 <property name="id" type="integer" primaryfield="id"/> 7 <property name="city" type=" text"/>7 <property name="city" type="string"/> 8 8 <!-- 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"/> 11 11 <!-- TODO: Alternate names should probably be a MultiLang table --> 12 <property name="alternatenames" type=" text"/>12 <property name="alternatenames" type="string"/> 13 13 <property name="population" type="integer"/> 14 14 <!-- Coordinates in decimal format --> … … 16 16 <property name="longitude" type="double"/> 17 17 <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 -->26 18 </type> 27 19 … … 29 21 <type name="org_routamc_positioning_aerodrome" table="org_routamc_positioning_aerodrome" parent="org_routamc_positioning_city" parentfield="city"> 30 22 <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"/> 34 26 <property name="city" link="org_routamc_positioning_city:id" reverse="no" type="integer" parentfield="city"/> 35 27 <!-- Coordinates in decimal format --> … … 39 31 <!-- Runway altitude in meters --> 40 32 <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 -->49 33 </type> 50 34 … … 63 47 objectlocation: Location acquired through an object's location 64 48 --> 65 <property name="importer" type=" text"/>49 <property name="importer" type="string"/> 66 50 67 51 <!-- … … 82 66 <!-- Bearing in degrees --> 83 67 <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 -->92 68 </type> 93 69 94 70 <!-- 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"> 96 72 <property name="id" type="integer" primaryfield="id"/> 97 73 98 74 <!-- Parent object GUID --> 99 <property name="parent" type=" text"/>75 <property name="parent" type="string"/> 100 76 <!-- Parent object class --> 101 <property name="parentclass" type=" text"/>77 <property name="parentclass" type="string"/> 102 78 <!-- Parent component --> 103 <property name="parentcomponent" type=" text"/>79 <property name="parentcomponent" type="string"/> 104 80 105 81 <!-- 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"/> 107 83 <property name="date" type="integer"/> 108 84 … … 121 97 <!-- Altitude in meters --> 122 98 <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 -->131 99 </type> 132 100 </Schema> trunk/midcom/org.routamc.positioning/log.php
r4906 r6148 42 42 43 43 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); 44 52 } 45 53 trunk/midcom/org.routamc.statusmessage/message.php
r5233 r6148 32 32 } 33 33 } 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 } 34 42 } 35 43 ?>
