Hello Emmanuel

We do not yet have a mechanism computing automatically the ID (or at
least not every where). This is something for which I was hopping to
have more though. However gml:id can be explicitly set. Most SIS
metadata objects implement this interface:

    http://sis.apache.org/apidocs/org/apache/sis/xml/IdentifiedObject.html

So in many case, you should be able to write the following:

    ((IdentifiedObject) 
metadata).getIdentifierMap().putSpecialized(IdentifierSpace.ID, *"PXA320"*)

We can also set the UUID and XLink in the same way.

However in the particular case of <gml:TimePeriod>, I'm not sure if the
TemporalPrimitive implements the above-cited IdentifiedObject interface.
If you get a ClassCastException, please let us know - we will propose a
workaround.

As a side note, if you choose to use UUID or XLink, there is a mechanism
for resolving those identifiers (for example by using the UUID for
searching the associated metadata in some internal database):

    http://sis.apache.org/apidocs/org/apache/sis/xml/ReferenceResolver.html

You can implement this interface, then give your implementation to the
properties map in a way similar to what we did in the previous email for
configuring <gco:CharacterString>.

    Martin



Le 12/02/15 20:16, Emmanuel Blondel a écrit :
> Hello,
>
> Moving now from geotoolkit metadata to apache SIS.
>
> This is what i had with geotoolkit:
>
>             <gmd:EX_TemporalExtent>
>                 <gmd:extent>
>                   <gml:TimePeriod *gml:id="PXA32O"*>
>                     <gml:beginPosition>2006-12-31</gml:beginPosition>
>                     <gml:endPosition>2015-12-30</gml:endPosition>
>                   </gml:TimePeriod>
>                 </gmd:extent>
>               </gmd:EX_TemporalExtent>
>
> Now moving to Apache SIS, i don't have any gml id for the TimePeriod.
>
> I'm publishing metadata in Geonetwork, and the absence of this
> TimePeriod id causes a misinterpretation of the metadata.
>
> Can you explain why this identifier is missing in Apache SIS? Is it
> related to the comment given here:
> https://github.com/apache/sis/blob/5b8a836588ab5e94a3cc164f7e6b3b202774407a/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TimePeriod.java#L44
>
> Thanks in advance for your advice,
> Emmanuel

Reply via email to