Address and Phone

From OpenOrg
Jump to: navigation, search

Addresses, phone numbers and so forth

TODO: Does this need changing in light of this public-lod thread?

The vCard namespace (usually shortened to the prefix 'v:') provides a general way to describe contact details, which can be applied to both organisations and places.

Namespaces

vcard

Addresses

You should use v:adr to associate an address with any of: a person, organisation, organisational unit, or a spatial thing such as a room, building or site.

Note that an organisation's address is where to direct post, whereas that of a place refers to its physical location. Thus, a unit and its primary site may quite legitimately have different addresses.

An address is composed of the following parts to be reconstructed in the given order:

  • vcard:extended-address (e.g. *The Example Building**)
  • vcard:street-address (e.g. **Old Kent Road**)
  • vcard:locality (e.g. **London**)
  • vcard:postal-code (e.g. **EX1 1EX**)
  • vcard:country-name (e.g. **United Kingdom**)

You can omit unwanted parts as necessary.

Address have the type vcard:Address and are related to their subject by the v:adr property:

<syntaxhighlight lang="xml"> <rdf:RDF …>

 <rdf:Description rdf:about="http://id.example.ac.uk/units/physics-department">
   <rdf:type rdf:resource="http://www.w3.org/ns/org#OrganizationalUnit" />
   <rdf:type rdf:resource="http://purl.org/vocab/aiiso/schema#Department" />
   <rdfs:label>Physics Department</rdfs:label>

   <vcard:adr>
     <rdf:Description rdf:about="http://id.example.ac.uk/units/physics-department#address">
       <rdf:type rdf:resource="http://www.w3.org/2006/vcard/ns#Address" />
       <vcard:extended-address>The Example Building</vcard:extended-address>
       <vcard:street-address>Old Kent Road</vcard:street-address>
       <vcard:locality>London</vcard:locality>
       <vcard:postal-code>EX1 1EX</vcard:postal-code>
       <vcard:country-name>United Kingdom</vcard:country-name>
     </rdf:Description>
   </vcard:adr>
 </rdf:Description>

</rdf:RDF> </syntaxhighlight>

(the above example has embedded the address inside the org description to make it easier to read. You could omit the rdf:about which ends with "#address" but in general it's tidy to give everything an identifier, and for people, places and organisations adding "#address" to the end of their URI is a reasonable way to create a URI for their address.

UK Postcode

In the UK it is strongly suggested that you provide a link to the postcode URI for buildings, the URIs for which are published and resolved by the Ordnance Survey.

<syntaxhighlight lang="xml"> <rdf:RDF

 …
 xmlns:ospc="http://data.ordnancesurvey.co.uk/ontology/postcode/"

>

 <rdf:Description rdf:about="http://id.example.ac.uk/building/23"> 
   …
   <ospc:postcode rdf:resource="http://data.ordnancesurvey.co.uk/id/postcodeunit/PO381NL" />
 </rdf:Description>
 …

</rdf:RDF> </syntaxhighlight>