Search in sources :

Example 76 with DataField

use of org.marc4j.marc.DataField in project RecordManager2 by moravianlibrary.

the class OsobnostiRegionuXmlStreamReader method addField856.

private void addField856(String url) {
    if (url.equals(URL_MAN) || url.equals(URL_WOMAN))
        return;
    DataField df = factory.newDataField("856", '4', ' ');
    newSubfield(df, 'u', url);
    record.addVariableField(df);
}
Also used : DataField(org.marc4j.marc.DataField)

Example 77 with DataField

use of org.marc4j.marc.DataField in project RecordManager2 by moravianlibrary.

the class OsobnostiRegionuXmlStreamReader method addField670.

private void addField670(String sources) {
    for (String source : sources.split(NEW_LINE)) {
        DataField df = factory.newDataField("670", ' ', ' ');
        newSubfield(df, 'a', source);
        record.addVariableField(df);
    }
}
Also used : DataField(org.marc4j.marc.DataField)

Example 78 with DataField

use of org.marc4j.marc.DataField in project RecordManager2 by moravianlibrary.

the class SfxJibXmlStreamReader method generateFields996.

private void generateFields996(Set<String> years, int volumeFirstYear) {
    years.forEach(y -> {
        DataField df = factory.newDataField("996", ' ', ' ', "y", y);
        if (volumeFirstYear > 0) {
            df.addSubfield(factory.newSubfield('v', String.valueOf(Integer.valueOf(y) - volumeFirstYear + 1)));
        }
        record.addVariableField(df);
    });
}
Also used : DataField(org.marc4j.marc.DataField)

Example 79 with DataField

use of org.marc4j.marc.DataField in project RecordManager2 by moravianlibrary.

the class ZakonyProLidiMetadataXmlStreamReader method addField6559.

private void addField6559(String textA, String text2) {
    DataField df = factory.newDataField("655", '9', ' ');
    newSubfield(df, 'a', textA);
    newSubfield(df, '2', text2);
    record.addVariableField(df);
}
Also used : DataField(org.marc4j.marc.DataField)

Example 80 with DataField

use of org.marc4j.marc.DataField in project RecordManager2 by moravianlibrary.

the class ZakonyProLidiMetadataXmlStreamReader method addField110.

private void addField110() {
    DataField df = factory.newDataField("110", '1', ' ');
    newSubfield(df, 'a', TEXT_110A);
    newSubfield(df, '7', TEXT_1107);
    record.addVariableField(df);
}
Also used : DataField(org.marc4j.marc.DataField)

Aggregations

DataField (org.marc4j.marc.DataField)82 ArrayList (java.util.ArrayList)18 Subfield (org.marc4j.marc.Subfield)17 MarcRecord (cz.mzk.recordmanager.server.marc.MarcRecord)15 ControlField (org.marc4j.marc.ControlField)13 Record (org.marc4j.marc.Record)13 MarcRecordImpl (cz.mzk.recordmanager.server.marc.MarcRecordImpl)12 RecordImpl (cz.mzk.recordmanager.server.marc.marc4j.RecordImpl)11 List (java.util.List)11 TreeSet (java.util.TreeSet)11 Matcher (java.util.regex.Matcher)11 MarcFactory (org.marc4j.marc.MarcFactory)8 MarcFactoryImpl (cz.mzk.recordmanager.server.marc.marc4j.MarcFactoryImpl)6 ByteArrayInputStream (java.io.ByteArrayInputStream)5 NoDataException (cz.mzk.recordmanager.server.util.identifier.NoDataException)4 HarvestedRecord (cz.mzk.recordmanager.server.model.HarvestedRecord)3 IOException (java.io.IOException)3 XMLStreamException (javax.xml.stream.XMLStreamException)3 ImportConfiguration (cz.mzk.recordmanager.server.model.ImportConfiguration)2 ShortTitle (cz.mzk.recordmanager.server.model.ShortTitle)2