Skip to content
Snippets Groups Projects

DO RELEASE

Merged Stefan E. Funk requested to merge develop into main
3 files
+ 68
37
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -274,6 +274,9 @@ public class TGCrudServiceAdaptorManager {
// NOTE We do omit all existing RDF relations here FOR IMAGES ONLY, because for images there is
// no need for using more RDF metadata at the moment. We may change this in the future!
//
// NOTE TWO: We MUST keep the TextGrid relations such as isDerivedFrom and
// isAlternativeFormatOf!
//
// --------------------------------------------------------------------------------------------
//
else if (TextGridMimetypes.IMAGE_SET.contains(format)) {
@@ -297,10 +300,14 @@ public class TGCrudServiceAdaptorManager {
model.setNsPrefix(EXIF_NAMESPACE_PREFIX, RELATION_EXIF_NAMESPACE);
model.setNsPrefix(DC_NAMESPACE_PREFIX, RELATION_DC_NAMESPACE);
// Add empty relation RDF part to metadata, omit old RDF metadata here!
// TODO All existing relations are deleted here! Do we really want that? Yes, for the time
// being and only for images!
theObject.getMetadata().getObject().setRelations(new RelationType());
// Add relation type to metadata, if not yet existing. All existing RDF relations are
// deleted here, because we see them as internal relations for TextGrid processing. Custom
// RDF data must be located elsewhere...
RelationType relations = theObject.getMetadata().getObject().getRelations();
if (relations == null) {
relations = new RelationType();
}
theObject.getMetadata().getObject().setRelations(relations);
CrudServiceUtilities.serviceLog(CrudService.INFO, METH,
"Omit existing RDF relations metadata, re-creating EXIT metadata");
@@ -325,10 +332,10 @@ public class TGCrudServiceAdaptorManager {
String rdfWriterString = rdfWriter.toString();
rdfWriter.close();
// Unmarshal and set RDFType again.
CrudServiceUtilities.serviceLog(CrudService.INFO, METH,
"Adding EXIF information to metadata");
// Unmarshal and (re-)set RDFType!
RdfType rdf = JAXB.unmarshal(new StringReader(rdfWriterString), RdfType.class);
theObject.getMetadata().getObject().getRelations().setRDF(rdf);
}
Loading