*
*/
seeker.setNamespaceContext(OdtEPUBlisher.XPATH_ODT_NS_CTX);
SMapImpl attrs = new SMapImpl();
// AUTHOR
MetaUserDefinedElement metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='"
+ JotexConstants.META_AUTHOR_KEY + "']", odtMeta, XPathConstants.NODE);
if (metaInfo == null) {
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='w2e_"
+ JotexConstants.META_AUTHOR_KEY + "']", odtMeta, XPathConstants.NODE);
}
// opf:role="aut"
if (metaInfo != null) {
attrs.put(OPFResource.opfns, "role", "aut");
epub.addDCMetadata("creator", metaInfo.getTextContent(), attrs);
}
// TITLE
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='"
+ JotexConstants.META_TILTE_KEY + "']", odtMeta, XPathConstants.NODE);
if (metaInfo == null) {
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='w2e_"
+ JotexConstants.META_TILTE_KEY + "']", odtMeta, XPathConstants.NODE);
}
if (metaInfo != null) {
epub.addDCMetadata("title", metaInfo.getTextContent(), null);
}
// LANGUAGE
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='"
+ JotexConstants.META_LANGUAGE_KEY + "']", odtMeta, XPathConstants.NODE);
if (metaInfo == null) {
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='w2e_"
+ JotexConstants.META_LANGUAGE_KEY + "']", odtMeta, XPathConstants.NODE);
}
if (metaInfo != null) {
epub.addDCMetadata("language", metaInfo.getTextContent(), null);
}
// PUBLISHER
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='"
+ JotexConstants.META_PUBLISHER_KEY + "']", odtMeta, XPathConstants.NODE);
if (metaInfo == null) {
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='w2e_"
+ JotexConstants.META_PUBLISHER_KEY + "']", odtMeta, XPathConstants.NODE);
}
if (metaInfo != null) {
epub.addDCMetadata("publisher", metaInfo.getTextContent(), null);
}
// PUBISHING DATE
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='"
+ JotexConstants.META_PUBLISHING_DATE_KEY + "']", odtMeta, XPathConstants.NODE);
if (metaInfo == null) {
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='w2e_"
+ JotexConstants.META_PUBLISHING_DATE_KEY + "']", odtMeta, XPathConstants.NODE);
}
if (metaInfo != null) {
attrs = new SMapImpl();
attrs.put(OPFResource.opfns, "event", "publication");
epub.addDCMetadata("date", metaInfo.getTextContent(), attrs);
}
// DESCRIPTION
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='"
+ JotexConstants.META_DESCRITPION_KEY + "']", odtMeta, XPathConstants.NODE);
if (metaInfo == null) {
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='w2e_"
+ JotexConstants.META_DESCRITPION_KEY + "']", odtMeta, XPathConstants.NODE);
}
if (metaInfo != null) {
epub.addDCMetadata("description", "<![CDATA[" + metaInfo.getTextContent() + "]]>", null);
}
// ISBN
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='"
+ JotexConstants.META_ISBN_KEY + "']", odtMeta, XPathConstants.NODE);
if (metaInfo == null) {
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='w2e_"
+ JotexConstants.META_ISBN_KEY + "']", odtMeta, XPathConstants.NODE);
}
if (metaInfo != null) {
attrs = new SMapImpl();
attrs.put(OPFResource.opfns, "scheme", "ISBN");
epub.addDCMetadata("identifier", metaInfo.getTextContent(), attrs);
}
// ORIGINAL TITLE
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='"
+ JotexConstants.META_ORIGINAL_TITLE_KEY + "']", odtMeta, XPathConstants.NODE);
if (metaInfo == null) {
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='w2e_"
+ JotexConstants.META_ORIGINAL_TITLE_KEY + "']", odtMeta, XPathConstants.NODE);
}
if (metaInfo != null) {
epub.addDCMetadata("source", metaInfo.getTextContent(), null);
}
// TAGS
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='"
+ JotexConstants.META_TAGS_KEY + "']", odtMeta, XPathConstants.NODE);
if (metaInfo == null) {
metaInfo = (MetaUserDefinedElement) seeker.evaluate("//meta:user-defined[@meta:name='w2e_"
+ JotexConstants.META_TAGS_KEY + "']", odtMeta, XPathConstants.NODE);
}
if (metaInfo != null) {
epub.addDCMetadata("subject", metaInfo.getTextContent(), null);
}
}