Uploaded image for project: 'OODT (Retired)'
  1. OODT (Retired)
  2. OODT-147

Completely refactor TypeHandling code

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 0.1-incubating, 0.2
    • 1.1
    • file manager
    • indep. of env.

    Description

      The o.a.oodt.cas.filemgr.structs.type.* package contains code originally intended to strongly type Metadata elements within CAS file manager. IOW, it was originally conceived to make declaring a type for an Element easy. Consider the un-typed CAS file manager policy below:

      <element id="urn:oodt:ProductReceivedTime" name="ProductReceivedTime">
      ..
      </element>
      

      which currently doesn't specify its type as a

      Date

      when it clearly is a

      Date

      element.

      Type handling was supposed to take care of this. As it stands, there are a number of fundamental disconnects with type handling:

      1. There are absolutely 0 examples of how to use it. The existing example is not tailored for the general audience and does little to inform a user of what Type handling is supposed to do.
      2. Type handlers are attached to Product Type (repo manager) policy when instead they really should be a part of the Validation layer policy (i.e., elements.xml)
      3. Type handlers aren't configurable.
      4. There is no way to map a TypeHandler alias or name (e.g.., instead of having to declare the FQCN o.a.oodt.cas.filemgr.structs.type.DateTypeHandler, we should be able to specify DateType).
      5. The TypeHandler interface is dependent on a ProductType.

      In order to address the above concerns I'm going to attach a patch that does the following:

      1. Moves type handler declarations to Validation layer policy (elements.xml).
      2. Refactors the TypeHandler interface to be configurable.
      3. Refactors the TypeHandler interface to be independent of ProductType.
      4. Allows for easy aliasing of TypeHandlers.
      5. By default assigns all default CAS elements that ship with the CAS file manager a default type.
      6. Adds a bunch more documentation.
      7. Adds unit tests.

      Attachments

        Activity

          People

            chrismattmann Chris A. Mattmann
            chrismattmann Chris A. Mattmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: