You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@sis.apache.org by Emmanuel Blondel <em...@gmail.com> on 2015/09/16 19:44:24 UTC

Re: Question about TimePeriod & auto-generated id

Hi Martin,

I wanted to thank you for this helper, it works perfectly.
I'm wondering if it would be worth handling this in 
/TemporalUtilities.createPeriod(start,end)/, as the id for timePeriod 
seems to be mandatory in gml schemas.
Before applying this, i was getting a schema validation error by 
checking against the GML schemas.
But this would suppose that Apache SIS could generate period as ISO 8601 
string (which is expected as gml Id for the time period).

Thanks again,
Emmanuel

Le 12/02/2015 20:48, Martin Desruisseaux a écrit :
>
> 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
>

-- 
*Emmanuel Blondel*
International Consultant | CEO
/Geographic Information Systems in Agronomy, Environment, Fishery & 
Marine Sciences/
41, Avenue du Vacayrial
81370 Saint Sulpice la Pointe, France
Tel: +33 (0) 6 45 97 87 52
Email: emmanuel.blondel1@gmail.com <ma...@gmail.com>