wiki:Moles Atom Format

Version 2 (modified by cbyrom, 11 years ago) (diff)

--

Moles Atom Format

atom1.0.xsd

The Atom Syndication Format v1.0 is described fully here:  http://tools.ietf.org/html/rfc4287

The schema, which is available in the ndgUtils egg - in ndgUtils/xquery/atom1.0.xsd - is based on the schema from:  http://www.kbcafe.com/rss/atom.xsd.xml. NB, there is no officially released xsd schema - the ASF provides a Relax-NG schema, to provide a normative description of the atom syntax; this is, however, not expressive enough to capture some of the other validity requirements for atom feeds or entries. The above xsd has been generated using tools to convert the relax schema to xsd and seems to work well.

For the purposes of storing moles information, the schema has been extended using two further schemae:

moles2.0.xsd

This schema lifts elements from the previous moles2alpha format, to add data which doesn't naturally fit within the atom data structure. Specifically, it allows for the addition of the following data:

  • temporal range
    • responsible parties - with
      • name
      • role
      • uri
    • created date
    • metadata language
    • dataset language
    • abbreviation
    • providerID
  • NB, some of this data could, with the introduction of new vocab terms, be moved to the atom links elements.

molesAtom1.0.xsd

This scheme redefines the atom1.0.xsd schema, adding the moles2.0.xsd info as an 'entity' element and also adding a georss element to allow the specification of spatial data.

Schema access

The schemae are included in the ndgUtils egg and can be retrieved using the ndgXqueries module, via, e.g.:

ndgXqueries().getSchema(ndgXqueries.ATOM_SCHEMA)

Also, if the existDBClient class (from ndgUtils.models.existdbclient module) is instantiated with the keyword, 'setUpDB=True', the schema will be added to the related eXist DB in the '/db/atoms' collection.