Search in sources :

Example 1 with BibtexString

use of bibtex.dom.BibtexString in project mycore by MyCoRe-Org.

the class MCRPagesTransformer method buildField.

void buildField(BibtexAbstractValue value, Element parent) {
    String pages = ((BibtexString) value).getContent();
    pages = normalizeValue(pages);
    Element part = buildElement(xPath, null, parent);
    part.addContent(MCRMODSPagesHelper.buildExtentPages(pages));
}
Also used : Element(org.jdom2.Element) BibtexString(bibtex.dom.BibtexString) BibtexString(bibtex.dom.BibtexString)

Example 2 with BibtexString

use of bibtex.dom.BibtexString in project mycore by MyCoRe-Org.

the class MCRField2XPathTransformer method buildField.

void buildField(BibtexAbstractValue value, Element parent) {
    String content = ((BibtexString) value).getContent();
    content = normalizeValue(content);
    buildElement(xPath, content, parent);
}
Also used : BibtexString(bibtex.dom.BibtexString) BibtexString(bibtex.dom.BibtexString)

Example 3 with BibtexString

use of bibtex.dom.BibtexString in project mycore by MyCoRe-Org.

the class MCRUnsupportedFieldTransformer method buildField.

void buildField(BibtexAbstractValue value, Element parent) {
    MCRMessageLogger.logMessage("Field " + field + " is unsupported: " + value.toString().replaceAll("\\s+", " "));
    String xPath = "mods:extension/field[@name='" + field + "']" + MCRFieldTransformer.AS_NEW_ELEMENT;
    String content = ((BibtexString) value).getContent();
    content = normalizeValue(content);
    buildElement(xPath, content, parent);
}
Also used : BibtexString(bibtex.dom.BibtexString) BibtexString(bibtex.dom.BibtexString)

Example 4 with BibtexString

use of bibtex.dom.BibtexString in project mycore by MyCoRe-Org.

the class MCRYearTransformer method buildField.

void buildField(BibtexAbstractValue value, Element parent) {
    String content = ((BibtexString) value).getContent();
    content = normalizeValue(content);
    String year = getFourDigitYear(content);
    if (year != null) {
        buildElement(xPath, year, parent);
    } else {
        MCRMessageLogger.logMessage("Field year: No 4-digit year found: " + content, parent);
    }
}
Also used : BibtexString(bibtex.dom.BibtexString) BibtexString(bibtex.dom.BibtexString)

Aggregations

BibtexString (bibtex.dom.BibtexString)4 Element (org.jdom2.Element)1