Changes between Version 2 and Version 3 of ComponentVersioning


Ignore:
Timestamp:
04/10/12 11:46:34 (12 years ago)
Author:
twagoo
Comment:

design and implementation extended (xml examples)

Legend:

Unmodified
Added
Removed
Modified
  • ComponentVersioning

    v2 v3  
    1818The !ComponentRegistry web service (and as a result this will also apply to the Flex-based component browser) will not display deprecated components in any listing (e.g. [http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles /registry/profiles]). However, they will still be available by their ID (like [http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1297242111880 /registry/profiles/clarin.eu:cr1:p_1297242111880]).
    1919
    20 There will be a call to list all direct (and possibly also recursive) successors
     20There will be a call to list all direct (and possibly also recursive) successors of a specific component (see XML example below).
     21
     22Both the XML representation of a component and the XSD that results from the [source:/metadata/trunk/toolkit/xslt/comp2schema-v2/comp2schema.xsl comp2schema] transformation should contain deprecation and versioning information in some form (see below for a proposal).
    2123
    2224== Implementation ==
    2325
     26=== Storage / internal representation ===
     27
    2428The !ComponentRegistry web service has a PostgreSQL back-end in which it stores both the component specifications in their verbatim XML formatting and 'component metadata' (referred to as 'descriptions' to avoid ambiguity) containing fields such as 'creator' and 'group'. The 'deprecated' property can be added to this. To accommodate the successor relations, an additional table has to be added simply linking precursors and successors, and optionally storing a comment on each relation.
    2529
    26 {{{#!comment
     30=== Client information ===
    2731
    28 Store in database
    29 Reflect in XSD
     32Because most clients will consume the XSD transformation of components, the deprecation/versioning information will have to be represented in these profile schemata. It can be provided within an xs:appinfo element. This information can be taken from two proposed new ''optional'' header elements in the component specification: '''Deprecated''' and '''!SuccessorsList'''.
    3033
    31 Relations:
    32 Deprecated yes/no & 0..* successors
     34Example:
    3335
    34 Registry:
    35 Show only profiles/components that are not deprecated/replaced
     36{{{
     37#!xml
     38<CMD_ComponentSpec isProfile="true">
     39   <Header>
     40      <ID>clarin.eu:cr1:p_1289827960126</ID>
     41      <Name>LrtInventoryResource</Name>
     42      <Description>Resources as stored before in the CLARIN LRT inventory</Description>
     43      <Deprecated>true</Deprecated>
     44      <SuccessorsList>http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1289827960126/successors</SuccessorsList>
     45   </Header>
     46}}}
    3647
    37 Get current successor=>follow successors
     48in the XSD this would be transformed to:
     49
     50{{{
     51#!xml
     52<xs:schema xmlns:cmd="http://www.clarin.eu/cmd/"
     53      xmlns:xs="http://www.w3.org/2001/XMLSchema"
     54      xmlns:dcr="http://www.isocat.org/ns/dcr"
     55      xmlns:ann="http://www.clarin.eu"
     56      targetNamespace="http://www.clarin.eu/cmd/"
     57      elementFormDefault="qualified">
     58   <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
     59   <xs:annotation>
     60      <xs:appinfo>
     61         <cmd:Deprecated>true</cmd:Deprecated>
     62         <cmd:SuccessorsList>http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1289827960126/successors</cmd:SuccessorsList>
     63      </xs:appinfo>
     64   </xs:annotation>
    3865}}}
    3966
    4067== Discussion ==
    4168
    42 * Should we limit deprecation and versioning to published components?
     69* Should we limit deprecation and versioning to published components? (what does it mean for an unpublished component to get deprecated?)
     70* Should 'bi-directional' versioning information be provided or just successors? (should a successor component refer to its precursor?)
     71* What to do with many-to-many relations in versioning? (merging and branching of components)