sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Desruisseaux (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SIS-381) Handle legacy ISO 19139:2007 format using XSL instead than private methods
Date Wed, 27 Dec 2017 21:25:00 GMT

     [ https://issues.apache.org/jira/browse/SIS-381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Martin Desruisseaux updated SIS-381:
------------------------------------
    Description: 
Apache SIS 1.0 can read and write XML documents for both the legacy ISO 19115:2003 metadata
schema and the new ISO 19115:2014 schema. This is currently done by tricky code:

* {{FilteredStreamReader}} and {{FilteredStreamWriter}} replaces namespace URL on the fly.
Some replacements are complicated because not a one-to-one relationship.
* Attributes that are present in one version and not in the other, or attributes that have
been renamed between two different versions, are handled by private methods in metadata objects.
Those private methods delegate to the public methods only under some conditions (whether we
are marshalling or unmarshalling, and which version).

This is complicated. But doing the version conversions by Java code give more power than XSL.
However after a few years the new metadata schema may become widespread enough that it is
no longer worth to carry the weight of this complication. We should:

* Wait for GeoAPI 4.0 to be developed (we expect it to remove legacy ISO 19115:2003 methods)
and published by OGC.
* Remove the deprecated metadata methods from Apache SIS. This is the SIS-380 task.
* In every {{org.apache.sis.metadata.iso}} classes where we had to implement some switch depending
on whether we are marshalling the legacy or the new version, delete all that code and just
put unconditional JAXB annotations on the public methods instead.
* Remove the {{Since2014}} inner classes in code list adapters and property adapters. Make
the adapter classes final again.
* Remove the code performing metadata namespace replacement in {{FilteredStreamReader}} and
{{FilteredStreamWriter}}.
* Use the {{fromISO19139.xsl}} and {{toISO19139.xsl}} files instead.

XSL files are published at http://standards.iso.org/iso/19115/resources/transforms/ISO19139


  was:
Apache SIS 1.0 can read and write XML documents for both the legacy ISO 19115:2003 metadata
schema and the new ISO 19115:2014 schema. This is currently done by tricky code:

* {{FilteredStreamReader}} and {{FilteredStreamWriter}} replaces namespace URL on the fly.
Some replacements are complicated because not a one-to-one relationship.
* Attributes that are present in one version and not in the other, or attributes that have
been renamed between two different versions, are handled by private methods in metadata objects.
Those private methods delegate to the public methods only under some conditions (whether we
are marshalling or unmarshalling, and which version).

This is complicated. But doing the version conversions by Java code give more power than XSL.
However after a few years the new metadata schema may become widespread enough that it is
no longer worth to carry the weight of this complication. We should:

* Wait for GeoAPI 4.0 to be developed (we expect it to remove legacy ISO 19115:2003 methods)
and published by OGC.
* Remove the deprecated metadata methods from Apache SIS. This is the SIS-380 task.
* In every {{org.apache.sis.metadata.iso}} classes where we had to implement some switch depending
on whether we are marshalling the legacy or the new version, delete all that code and just
put unconditional JAXB annotations on the public methods instead.
* Remove the code performing metadata namespace replacement in {{FilteredStreamReader}} and
{{FilteredStreamWriter}}.
* Use the {{fromISO19139.xsl}} and {{toISO19139.xsl}} files instead.

XSL files are published at http://standards.iso.org/iso/19115/resources/transforms/ISO19139



> Handle legacy ISO 19139:2007 format using XSL instead than private methods
> --------------------------------------------------------------------------
>
>                 Key: SIS-381
>                 URL: https://issues.apache.org/jira/browse/SIS-381
>             Project: Spatial Information Systems
>          Issue Type: Task
>          Components: Metadata
>    Affects Versions: 1.0
>            Reporter: Martin Desruisseaux
>             Fix For: 2.0
>
>
> Apache SIS 1.0 can read and write XML documents for both the legacy ISO 19115:2003 metadata
schema and the new ISO 19115:2014 schema. This is currently done by tricky code:
> * {{FilteredStreamReader}} and {{FilteredStreamWriter}} replaces namespace URL on the
fly. Some replacements are complicated because not a one-to-one relationship.
> * Attributes that are present in one version and not in the other, or attributes that
have been renamed between two different versions, are handled by private methods in metadata
objects. Those private methods delegate to the public methods only under some conditions (whether
we are marshalling or unmarshalling, and which version).
> This is complicated. But doing the version conversions by Java code give more power than
XSL. However after a few years the new metadata schema may become widespread enough that it
is no longer worth to carry the weight of this complication. We should:
> * Wait for GeoAPI 4.0 to be developed (we expect it to remove legacy ISO 19115:2003 methods)
and published by OGC.
> * Remove the deprecated metadata methods from Apache SIS. This is the SIS-380 task.
> * In every {{org.apache.sis.metadata.iso}} classes where we had to implement some switch
depending on whether we are marshalling the legacy or the new version, delete all that code
and just put unconditional JAXB annotations on the public methods instead.
> * Remove the {{Since2014}} inner classes in code list adapters and property adapters.
Make the adapter classes final again.
> * Remove the code performing metadata namespace replacement in {{FilteredStreamReader}}
and {{FilteredStreamWriter}}.
> * Use the {{fromISO19139.xsl}} and {{toISO19139.xsl}} files instead.
> XSL files are published at http://standards.iso.org/iso/19115/resources/transforms/ISO19139



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message