<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <dspl targetNamespace="http://www.google.com/publicdata/dataset/google/unit" xmlns="http://schemas.google.com/dspl/2010" xmlns:entity="http://www.google.com/publicdata/dataset/google/entity"> <import namespace="http://www.google.com/publicdata/dataset/google/entity"/> <info> <name> <value xml:lang="en">Unit concepts</value> </name> <description> <value xml:lang="en">Concepts for to representing units.</value> </description> <url> <value xml:lang="en">http://code.google.com/apis/publicdata/docs/canonical/unit.html</value> </url> </info> <provider> <name> <value xml:lang="en">Google Inc.</value> </name> <description> <value xml:lang="en">Google Inc.</value> </description> <url> <value xml:lang="en">http://www.google.com</value> </url> </provider> <concepts> <concept id="unit" extends="entity:entity"> <info> <name> <value xml:lang="en">Unit</value> </name> <description> <value xml:lang="en"> Specifies the unit associated with a metric concept. Example: <![CDATA[<concept id="area_unit" extends="unit:unit"> <info> <name> <value>Area in square kilometers</value> </name> </info> <table ref="area_unit_table"/> </concept>]]> The table contains a single row that contains the property values: symbol,symbol_position,unit_text km²,END,square kilometers One can then use this unit in defining a metric concept: <![CDATA[<concept id="country_area" extends="quantity:magnitude"> <info> <name> <value>Country area in square kilometers</value> </name> </info> <attribute id="unit" concept="area_unit"/> <table ref="country_area_table"/> </concept>]]> </value> </description> </info> <property id="symbol"> <info> <name> <value xml:lang="en">The symbol associated with a unit.</value> </name> </info> <type ref="string"/> </property> <property concept="symbol_position"/> <property id="unit_text"> <info> <name> <value xml:lang="en">Unit text</value> </name> <description> <value xml:lang="en"> Descriptive text that can be displayed next to a value.</value> </description> </info> <type ref="string"/> </property> </concept> <concept id="symbol_position"> <info> <name> <value xml:lang="en">Unit symbol position</value> </name> <description> <value xml:lang="en">Unit symbol position</value> </description> </info> <type ref="string"/> <defaultValue>END</defaultValue> <table ref="unit_symbol_position_table"/> </concept> <concept id="currency" extends="unit"> <info> <name> <value xml:lang="en">Currency unit</value> </name> <description> <value xml:lang="en"> Specifies the currency associated with a metric concept. Each currency is identified by its 3-letter currency code (ISO 4217). </value> </description> </info> <table ref="currency_table"/> </concept> </concepts> <tables> <table id="unit_symbol_position_table"> <column id="symbol_position" type="string"/> <data> <file format="csv" encoding="utf-8">unit_symbol_positions.csv</file> </data> </table> <table id="currency_table"> <column id="currency" type="string"/> <column id="unit_text" type="string"/> <column id="symbol" type="string"/> <column id="symbol_position" type="string"> <value>START</value> </column> <data> <file format="csv" encoding="utf-8">currencies.csv</file> </data> </table> </tables> </dspl>
unit.xml
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-26 UTC."],[[["\u003cp\u003eThis document defines concepts for representing units within a data structure, specifying how units are associated with metrics.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eunit\u003c/code\u003e concept details properties like \u003ccode\u003esymbol\u003c/code\u003e, \u003ccode\u003esymbol_position\u003c/code\u003e, and \u003ccode\u003eunit_text\u003c/code\u003e to describe a unit's representation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003esymbol_position\u003c/code\u003e concept determines where the unit symbol appears relative to the value, with "END" being the default position.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecurrency\u003c/code\u003e concept is a specialized \u003ccode\u003eunit\u003c/code\u003e concept used for monetary values, identified by a three-letter ISO 4217 code.\u003c/p\u003e\n"],["\u003cp\u003eTables \u003ccode\u003eunit_symbol_position_table\u003c/code\u003e and \u003ccode\u003ecurrency_table\u003c/code\u003e provide structured data for unit symbol positions and currency information respectively, in a csv format.\u003c/p\u003e\n"]]],["This document defines concepts for representing units within a dataset. The core concept, \"unit,\" specifies a metric's unit and includes properties like \"symbol,\" \"symbol_position,\" and \"unit_text.\" A specific \"area_unit\" example is provided, demonstrating how to define a unit, including its symbol (km²) and textual representation (square kilometers). The \"currency\" concept, a subtype of \"unit,\" identifies currencies using ISO 4217 codes and associated symbols. Tables are used to structure and store unit data.\n"],null,["```python\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?\u003e\n\u003cdspl targetNamespace=\"http://www.google.com/publicdata/dataset/google/unit\"\n xmlns=\"http://schemas.google.com/dspl/2010\"\n xmlns:entity=\"http://www.google.com/publicdata/dataset/google/entity\"\u003e\n\n \u003cimport namespace=\"http://www.google.com/publicdata/dataset/google/entity\"/\u003e\n\n \u003cinfo\u003e\n \u003cname\u003e\n \u003cvalue xml:lang=\"en\"\u003eUnit concepts\u003c/value\u003e\n \u003c/name\u003e\n \u003cdescription\u003e\n \u003cvalue xml:lang=\"en\"\u003eConcepts for to representing units.\u003c/value\u003e\n \u003c/description\u003e\n \u003curl\u003e\n \u003cvalue xml:lang=\"en\"\u003ehttp://code.google.com/apis/publicdata/docs/canonical/unit.html\u003c/value\u003e\n \u003c/url\u003e\n \u003c/info\u003e\n\n \u003cprovider\u003e\n \u003cname\u003e\n \u003cvalue xml:lang=\"en\"\u003eGoogle Inc.\u003c/value\u003e\n \u003c/name\u003e\n \u003cdescription\u003e\n \u003cvalue xml:lang=\"en\"\u003eGoogle Inc.\u003c/value\u003e\n \u003c/description\u003e\n \u003curl\u003e\n \u003cvalue xml:lang=\"en\"\u003ehttp://www.google.com\u003c/value\u003e\n \u003c/url\u003e\n \u003c/provider\u003e\n\n \u003cconcepts\u003e\n \u003cconcept id=\"unit\" extends=\"entity:entity\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\n \u003cvalue xml:lang=\"en\"\u003eUnit\u003c/value\u003e\n \u003c/name\u003e\n \u003cdescription\u003e\n \u003cvalue xml:lang=\"en\"\u003e\n Specifies the unit associated with a metric concept.\n\n Example:\n\n \u003c![CDATA[\u003cconcept id=\"area_unit\" extends=\"unit:unit\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\n \u003cvalue\u003eArea in square kilometers\u003c/value\u003e\n \u003c/name\u003e\n \u003c/info\u003e\n \u003ctable ref=\"area_unit_table\"/\u003e\n \u003c/concept\u003e]]\u003e\n\n The table contains a single row that contains the property values:\n\n symbol,symbol_position,unit_text\n km²,END,square kilometers\n\n One can then use this unit in defining a metric concept:\n\n \u003c![CDATA[\u003cconcept id=\"country_area\" extends=\"quantity:magnitude\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\n \u003cvalue\u003eCountry area in square kilometers\u003c/value\u003e\n \u003c/name\u003e\n \u003c/info\u003e\n \u003cattribute id=\"unit\" concept=\"area_unit\"/\u003e\n \u003ctable ref=\"country_area_table\"/\u003e\n \u003c/concept\u003e]]\u003e\n\n \u003c/value\u003e\n \u003c/description\u003e\n \u003c/info\u003e\n \u003cproperty id=\"symbol\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\n \u003cvalue xml:lang=\"en\"\u003eThe symbol associated with a unit.\u003c/value\u003e\n \u003c/name\u003e\n \u003c/info\u003e\n \u003ctype ref=\"string\"/\u003e\n \u003c/property\u003e\n \u003cproperty concept=\"symbol_position\"/\u003e\n \u003cproperty id=\"unit_text\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\n \u003cvalue xml:lang=\"en\"\u003eUnit text\u003c/value\u003e\n \u003c/name\u003e\n \u003cdescription\u003e\n \u003cvalue xml:lang=\"en\"\u003e\n Descriptive text that can be displayed next to a value.\u003c/value\u003e\n \u003c/description\u003e\n \u003c/info\u003e\n \u003ctype ref=\"string\"/\u003e\n \u003c/property\u003e\n \u003c/concept\u003e\n\n \u003cconcept id=\"symbol_position\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\n \u003cvalue xml:lang=\"en\"\u003eUnit symbol position\u003c/value\u003e\n \u003c/name\u003e\n \u003cdescription\u003e\n \u003cvalue xml:lang=\"en\"\u003eUnit symbol position\u003c/value\u003e\n \u003c/description\u003e\n \u003c/info\u003e\n \u003ctype ref=\"string\"/\u003e\n \u003cdefaultValue\u003eEND\u003c/defaultValue\u003e\n \u003ctable ref=\"unit_symbol_position_table\"/\u003e\n \u003c/concept\u003e\n\n \u003cconcept id=\"currency\" extends=\"unit\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\n \u003cvalue xml:lang=\"en\"\u003eCurrency unit\u003c/value\u003e\n \u003c/name\u003e\n \u003cdescription\u003e\n \u003cvalue xml:lang=\"en\"\u003e\n Specifies the currency associated with a metric concept.\n Each currency is identified by its 3-letter currency code (ISO 4217).\n \u003c/value\u003e\n \u003c/description\u003e\n \u003c/info\u003e\n \u003ctable ref=\"currency_table\"/\u003e\n \u003c/concept\u003e\n \u003c/concepts\u003e\n\n \u003ctables\u003e\n \u003ctable id=\"unit_symbol_position_table\"\u003e\n \u003ccolumn id=\"symbol_position\" type=\"string\"/\u003e\n \u003cdata\u003e\n \u003cfile format=\"csv\" encoding=\"utf-8\"\u003eunit_symbol_positions.csv\u003c/file\u003e\n \u003c/data\u003e\n \u003c/table\u003e\n\n \u003ctable id=\"currency_table\"\u003e\n \u003ccolumn id=\"currency\" type=\"string\"/\u003e\n \u003ccolumn id=\"unit_text\" type=\"string\"/\u003e\n \u003ccolumn id=\"symbol\" type=\"string\"/\u003e\n \u003ccolumn id=\"symbol_position\" type=\"string\"\u003e\n \u003cvalue\u003eSTART\u003c/value\u003e\n \u003c/column\u003e\n \u003cdata\u003e\n \u003cfile format=\"csv\" encoding=\"utf-8\"\u003ecurrencies.csv\u003c/file\u003e\n \u003c/data\u003e\n \u003c/table\u003e\n \u003c/tables\u003e\n\u003c/dspl\u003e\n```"]]