[geotk] CSW client : marshalling issue
Damiano ALBANI
damiano.albani at univ-nantes.fr
Tue May 17 10:47:12 EDT 2011
Hello,
This time, I have a marshalling issue, related to dates.
Given a Citation object with this getDates() getter:
@Override
public Collection<? extends CitationDate> getDates() {
List<CitationDate> dates = new ArrayList<CitationDate>();
dates.add(new CitationDate() {
@Override
public DateType getDateType() {
return DateType.PUBLICATION;
}
@Override
public Date getDate() {
return new Date();
}
});
dates.add(new CitationDate() {
@Override
public DateType getDateType() {
return DateType.CREATION;
}
@Override
public Date getDate() {
return new Date();
}
});
return dates;
}
GeoToolkit generates some XML which only contains half the information:
<gmd:identificationInfo>
<gmd:MD_DataIdentification>
<gmd:citation>
<gmd:CI_Citation>
[...]
<gmd:date>
<gmd:CI_Date>
<gmd:dateType>
<gmd:CI_DateTypeCode codeSpace="eng" codeListValue="publication"
codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode">Publication</gmd:CI_DateTypeCode>
</gmd:dateType>
</gmd:CI_Date>
</gmd:date>
<gmd:date>
<gmd:CI_Date>
<gmd:dateType>
<gmd:CI_DateTypeCode codeSpace="eng" codeListValue="creation"
codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode">Creation</gmd:CI_DateTypeCode>
</gmd:dateType>
</gmd:CI_Date>
</gmd:date>
[...]
</gmd:CI_Citation>
</gmd:citation>
See, the actual date value is missing, only the type of date is shown.
I am using Geotoolkit 3.x-SNAPSHOT.
Furthermore, I saw that the value returned by Citation.getEditionDate()
is not serialized at all. Don't know if it's done on purpose.
Thanks,
--
Damiano ALBANI
More information about the Geotoolkit
mailing list