|
|
|
@ -97,7 +97,7 @@ void UBMetadataDcSubsetAdaptor::persist(UBDocumentProxy* proxy) |
|
|
|
|
|
|
|
|
|
// introduced in UB 4.2
|
|
|
|
|
xmlWriter.writeTextElement(nsDc, "identifier", proxy->metaData(UBSettings::documentIdentifer).toString()); |
|
|
|
|
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri, "version", UBSettings::currentFileVersion); |
|
|
|
|
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri, "version", UBSettings::currentFileVersion); |
|
|
|
|
QString width = QString::number(proxy->defaultDocumentSize().width()); |
|
|
|
|
QString height = QString::number(proxy->defaultDocumentSize().height()); |
|
|
|
|
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri, "size", QString("%1x%2").arg(width).arg(height)); |
|
|
|
@ -105,6 +105,11 @@ void UBMetadataDcSubsetAdaptor::persist(UBDocumentProxy* proxy) |
|
|
|
|
// introduced in UB 4.4
|
|
|
|
|
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri, "updated-at", proxy->metaData(UBSettings::documentUpdatedAt).toString()); |
|
|
|
|
|
|
|
|
|
// introduced in OpenSankore 1.40.00
|
|
|
|
|
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionTitle,proxy->metaData(UBSettings::sessionTitle).toString()); |
|
|
|
|
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionTarget,proxy->metaData(UBSettings::sessionTarget).toString()); |
|
|
|
|
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionLicence,proxy->metaData(UBSettings::sessionLicence).toString()); |
|
|
|
|
|
|
|
|
|
xmlWriter.writeEndElement(); //dc:Description
|
|
|
|
|
xmlWriter.writeEndElement(); //RDF
|
|
|
|
|
|
|
|
|
@ -204,7 +209,21 @@ QMap<QString, QVariant> UBMetadataDcSubsetAdaptor::load(QString pPath) |
|
|
|
|
metadata.insert(UBSettings::documentUpdatedAt, xml.readElementText()); |
|
|
|
|
updatedAtFound = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
else if (xml.name() == UBSettings::sessionTitle // introduced in OpenSankore 1.40.00
|
|
|
|
|
&& xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) |
|
|
|
|
{ |
|
|
|
|
metadata.insert(UBSettings::sessionTitle, xml.readElementText()); |
|
|
|
|
} |
|
|
|
|
else if (xml.name() == UBSettings::sessionTarget // introduced in OpenSankore 1.40.00
|
|
|
|
|
&& xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) |
|
|
|
|
{ |
|
|
|
|
metadata.insert(UBSettings::sessionTarget, xml.readElementText()); |
|
|
|
|
} |
|
|
|
|
else if (xml.name() == UBSettings::sessionLicence // introduced in OpenSankore 1.40.00
|
|
|
|
|
&& xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) |
|
|
|
|
{ |
|
|
|
|
metadata.insert(UBSettings::sessionLicence, xml.readElementText()); |
|
|
|
|
} |
|
|
|
|
metadata.insert(UBSettings::documentVersion, docVersion); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|