fixing JSON format

This commit is contained in:
Jörg Prante 2016-09-19 11:38:44 +02:00
parent ed67b27e61
commit dcbe694669
8 changed files with 134 additions and 89 deletions

View file

@ -35,10 +35,8 @@ import java.util.stream.Collectors;
*/
public class MarcRecord extends LinkedHashMap<String, Object> {
private static final long serialVersionUID = 5305809148724342653L;
public static final MarcRecord EMPTY = Marc.builder().buildRecord();
private static final long serialVersionUID = 5305809148724342653L;
private final String format;
private final String type;
@ -49,6 +47,7 @@ public class MarcRecord extends LinkedHashMap<String, Object> {
/**
* Create a MARC record. Use {@link Marc.Builder} to create a MARC record.
*
* @param format the format of the record
* @param type the type
* @param recordLabel the record label
@ -69,6 +68,7 @@ public class MarcRecord extends LinkedHashMap<String, Object> {
/**
* Return the MARC record format.
*
* @return the MARC record format
*/
public String getFormat() {
@ -77,6 +77,7 @@ public class MarcRecord extends LinkedHashMap<String, Object> {
/**
* Return the MARC record type.
*
* @return the MARC record type
*/
public String getType() {
@ -85,6 +86,7 @@ public class MarcRecord extends LinkedHashMap<String, Object> {
/**
* Return MARC record label.
*
* @return the MARC record label
*/
public RecordLabel getRecordLabel() {
@ -93,6 +95,7 @@ public class MarcRecord extends LinkedHashMap<String, Object> {
/**
* Return the MARC fields of this record.
*
* @return the MARC field list
*/
public List<MarcField> getFields() {
@ -101,6 +104,7 @@ public class MarcRecord extends LinkedHashMap<String, Object> {
/**
* Return a list of MARC fields of this record where key pattern matches were found.
*
* @param pattern the pattern
* @return a list of MARC fields
*/
@ -108,8 +112,10 @@ public class MarcRecord extends LinkedHashMap<String, Object> {
return marcFields.stream().map(field ->
field.matchKey(pattern)).filter(Objects::nonNull).collect(Collectors.toList());
}
/**
* Return a list of MARC fields of this record where pattern matches were found.
*
* @param pattern the pattern
* @return a list of MARC fields
*/
@ -138,13 +144,21 @@ public class MarcRecord extends LinkedHashMap<String, Object> {
put(LEADER_TAG, recordLabel.toString());
for (MarcField marcField : marcFields) {
String tag = marcField.getTag();
int repeat;
Map<String, Object> repeatMap;
if (!containsKey(tag)) {
put(tag, new LinkedHashMap<>());
repeatMap = new LinkedHashMap<>();
repeat = 1;
put(tag, repeatMap);
} else {
repeatMap = (Map<String, Object>) get(tag);
repeat = repeatMap.size() + 1;
}
String indicator = marcField.getIndicator();
if (indicator != null && !indicator.isEmpty()) {
indicator = indicator.replace(' ', '_');
Map<String, Object> indicators = (Map<String, Object>) get(tag);
Map<String, Object> indicators = new LinkedHashMap<>();
repeatMap.put(Integer.toString(repeat), indicators);
if (!indicators.containsKey(indicator)) {
indicators.put(indicator, new LinkedHashMap<>());
}
@ -164,7 +178,7 @@ public class MarcRecord extends LinkedHashMap<String, Object> {
}
}
} else {
put(tag, marcField.getValue());
repeatMap.put(Integer.toString(repeat), marcField.getValue());
}
}
}

View file

@ -82,6 +82,10 @@ public class MarcJsonWriter extends MarcContentHandler implements Flushable, Clo
this.builder = Marc.builder();
}
private static String escape(String value) {
return value != null ? value.replaceAll("\"", "\\\"") : null;
}
public MarcJsonWriter setFatalErrors(boolean fatalErrors) {
this.fatalErrors = fatalErrors;
return this;
@ -197,6 +201,7 @@ public class MarcJsonWriter extends MarcContentHandler implements Flushable, Clo
/**
* Format MARC record as key-oriented JSON.
*
* @param sb a string builder to append JSON to
*/
@SuppressWarnings("unchecked")
@ -216,6 +221,15 @@ public class MarcJsonWriter extends MarcContentHandler implements Flushable, Clo
String tag = tags.getKey();
sb.append("\"").append(tag).append("\":");
Object o = tags.getValue();
if (o instanceof Map) {
int c00 = 0;
Map<String, Object> repeatMap = (Map<String, Object>) o;
sb.append("[");
for (Map.Entry<String, Object> repeats : repeatMap.entrySet()) {
if (c00 > 0) {
sb.append(",");
}
o = repeats.getValue();
if (!(o instanceof List)) {
o = Collections.singletonList(o);
}
@ -242,27 +256,25 @@ public class MarcJsonWriter extends MarcContentHandler implements Flushable, Clo
o = Collections.singletonList(o);
}
List<?> list2 = (List<?>) o;
if (list2.size() > 1) {
sb.append("[");
}
int c3 = 0;
for (Object value2 : list2) {
if (c3 > 0) {
sb.append(",");
}
if (value2 instanceof Map) {
sb.append("{");
Map<String, Object> map = (Map<String, Object>) value2;
int c4 = 0;
for (Map.Entry<String, Object> subfield : map.entrySet()) {
if (c4 > 0) {
sb.append(",");
}
sb.append("{");
sb.append("\"").append(subfield.getKey()).append("\":");
if (subfield.getValue() instanceof List) {
sb.append("[");
int c5 = 0;
for (String s : (List<String>)subfield.getValue()) {
for (String s : (List<String>) subfield.getValue()) {
if (c5 > 0) {
sb.append(",");
}
@ -274,16 +286,14 @@ public class MarcJsonWriter extends MarcContentHandler implements Flushable, Clo
sb.append("\"").append(escape(subfield.getValue().toString())).append("\"");
}
c4++;
}
sb.append("}");
}
} else {
sb.append("\"").append(escape(value2.toString())).append("\"");
}
c3++;
}
if (list2.size() > 1) {
sb.append("]");
}
c2++;
}
sb.append("}");
@ -299,6 +309,12 @@ public class MarcJsonWriter extends MarcContentHandler implements Flushable, Clo
if (list.size() > 1) {
sb.append("]");
}
c00++;
}
sb.append("]");
} else {
sb.append("\"").append(escape(o.toString())).append("\"");
}
c0++;
}
sb.append('}');
@ -308,10 +324,6 @@ public class MarcJsonWriter extends MarcContentHandler implements Flushable, Clo
return exception;
}
private static String escape(String value) {
return value != null ? value.replaceAll("\"", "\\\"") : null;
}
private void handleException(IOException e) {
exception = e;
if (fatalErrors) {

View file

@ -22,6 +22,8 @@ import org.xbib.marc.MarcField;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ -31,8 +33,13 @@ import java.util.regex.Pattern;
public class MarcFieldTransformer extends LinkedHashMap<String, MarcField> {
private static final long serialVersionUID = -3250616818472683245L;
// the repeat counter pattern
private static final Logger logger = Logger.getLogger(MarcFieldTransformer.class.getName());
// the repeat counter pattern, simple integer
private static final Pattern REP = Pattern.compile("\\{r\\}");
// the two-string numeric repeat counter pattern
private static final Pattern NREP = Pattern.compile("\\{n\\}");
private final boolean ignoreIndicator;
private final boolean ignoreSubfieldIds;
private transient MarcField lastReceived;
@ -114,7 +121,7 @@ public class MarcFieldTransformer extends LinkedHashMap<String, MarcField> {
if (ignoreIndicator) {
builder.indicator(marcField.getIndicator());
} else {
builder.indicator(interpolate(newMarcField.getIndicator()));
builder.indicator(interpolate(marcField, newMarcField.getIndicator()));
}
if (!builder.isEmpty()) {
if (ignoreSubfieldIds) {
@ -173,7 +180,7 @@ public class MarcFieldTransformer extends LinkedHashMap<String, MarcField> {
if (ignoreIndicator) {
builder.indicator(marcField.getIndicator());
} else {
builder.indicator(interpolate(newMarcField.getIndicator()));
builder.indicator(interpolate(marcField, newMarcField.getIndicator()));
}
}
if (ignoreSubfieldIds) {
@ -198,15 +205,26 @@ public class MarcFieldTransformer extends LinkedHashMap<String, MarcField> {
/**
* Interpolate variables.
*
* @param marcField MARC field
* @param value the input value
* @return the interpolated string
*/
private String interpolate(String value) {
private String interpolate(MarcField marcField, String value) {
if (value == null) {
return null;
}
Matcher m = REP.matcher(value);
return m.find() ? m.replaceAll(Integer.toString(repeatCounter)) : value;
if (m.find()) {
return m.replaceAll(Integer.toString(repeatCounter));
}
m = NREP.matcher(value);
if (m.find()) {
if (repeatCounter > 99) {
logger.log(Level.WARNING, "counter > 99, overflow in " + marcField);
}
return m.replaceAll(String.format("%02d", repeatCounter));
}
return value;
}
/**

View file

@ -136,6 +136,7 @@ public class MarcJsonWriterTest {
String s = "HT016424175.xml";
InputStream in = getClass().getResource("/org/xbib/marc/dialects/mab/" + s).openStream();
File file = File.createTempFile(s + ".", ".json");
file.deleteOnExit();
FileOutputStream out = new FileOutputStream(file);
try (MarcJsonWriter writer = new MarcJsonWriter(out, true)
.setFormat(MarcXchangeConstants.MARCXCHANGE_FORMAT)

View file

@ -1 +1 @@
{"_FORMAT":"MARC21","_TYPE":"Bibliographic","_LEADER":"00000 M2.01200024 000h","LDR":"------M2.01200024------h","FMT":"MH","001":{"_1":{"a":"HT016424175"}},"002":{"a1":{"a":"20100705"}},"026":{"_1":{"a":"HBZHT016424175"}},"030":"a|1uc||||||1|","036":{"a1":{"a":"DE"}},"037":{"b1":{"a":"lat"}},"050":"a|||||||||||||","051":"am||||||","070":{"_1":{"a":"575"}},"080":{"_1":{"a":"60"}},"100":{"_1":{"p":"Hildegardis","c":"Bingensis","d":"1098-1179","9":"(DE-588)118550993"}},"101":{"_1":{"p":["Hildegard","Hildegard","Hildegard","Hildegardis","Hildegardis","Hildegarde","Ildegarda","Hildegardis","Hildegard","Hildegardis","Hildegardt","Hildegardis","Bingen, Hildegard <<von>>","Hildegard","Hildegardis","Ildegarda","Ildegarda","Hildegardis","Hildegard","Hildegarde","Ildegarda","Hildegardis","Hildegarda","Hildegarda","Hildegard","Childegard","Bingen, Childegard <<ot>>","Bingen, Hildegarde <<de>>","Hildegard","Hildegardis von Bingen","Hildegard","Hildegardis"],"d":["1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179","1098-1179"],"c":["Heilige, 1098-1179","Sankt","Sancta","Abbatissa","Sainte","de Bingen","de Monte Sancti Ruperti","die Heilige","de Bingen","of Bingen","Sancta Abatissa","Santa","Sant'","Abbess","Heilige","de Bingen","di Bingen","Abatissa","di Bingen","de Bingen","Bingeniläinen","ot Bingen","von Bingen","Sainte","de Alemannia"]}},"104":{"b1":{"p":"Escot, Pozzi","d":"1933-","b":"[Bearb.]","9":"(DE-588)128917687"}},"105":{"_1":{"p":"Pozzi Escot, Olga","d":"1933-"}},"304":{"b1":{"a":"Unde quocumque"}},"331":{"_1":{"a":"Unde quocumque"}},"334":{"_1":{"a":"Musikdruck"}},"359":{"_1":{"a":"Hildegard von Bingen"}},"425":{"_1":{"a":"c 1994"},"a1":{"a":"1994"}},"503":{"a1":{"a":"Transkription der mittelalterlichen Neumen in moderne Notation"}},"516":{"_1":{"a":"Melodien mit unterlegtem Text"}},"590":{"_1":{"a":"<<The>> Ursula Antiphons ... [Musikdruck]"}},"591":{"_1":{"a":"Hildegard von Bingen"}},"594":{"_1":{"a":"[Kassel]"}},"595":{"_1":{"a":"1994"}},"599":{"_1":{"a":"HT016424145"}},"SYS":"018117852"}
{"_FORMAT":"MARC21","_TYPE":"Bibliographic","_LEADER":"00000 M2.01200024 000h","LDR":["------M2.01200024------h"],"FMT":["MH"],"001":[{"_1":[{"a":"HT016424175"}]}],"002":[{"a1":[{"a":"20100705"}]}],"026":[{"_1":[{"a":"HBZHT016424175"}]}],"030":["a|1uc||||||1|"],"036":[{"a1":[{"a":"DE"}]}],"037":[{"b1":[{"a":"lat"}]}],"050":["a|||||||||||||"],"051":["am||||||"],"070":[{"_1":[{"a":"575"}]}],"080":[{"_1":[{"a":"60"}]}],"100":[{"_1":[{"p":"Hildegardis"},{"c":"Bingensis"},{"d":"1098-1179"},{"9":"(DE-588)118550993"}]}],"101":[{"_1":[{"p":"Hildegard"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegard"},{"c":"Heilige, 1098-1179"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegard"},{"c":"Sankt"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegardis"},{"c":"Sancta"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegardis"},{"c":"Abbatissa"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegarde"},{"c":"Sainte"},{"d":"1098-1179"}]},{"_1":[{"p":"Ildegarda"},{"c":"de Bingen"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegardis"},{"c":"de Monte Sancti Ruperti"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegard"},{"c":"die Heilige"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegardis"},{"c":"de Bingen"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegardt"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegardis"},{"d":"1098-1179"}]},{"_1":[{"p":"Bingen, Hildegard <<von>>"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegard"},{"c":"of Bingen"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegardis"},{"c":"Sancta Abatissa"},{"d":"1098-1179"}]},{"_1":[{"p":"Ildegarda"},{"c":"Santa"},{"d":"1098-1179"}]},{"_1":[{"p":"Ildegarda"},{"c":"Sant'"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegardis"},{"c":"Abbess"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegard"},{"c":"Heilige"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegarde"},{"c":"de Bingen"},{"d":"1098-1179"}]},{"_1":[{"p":"Ildegarda"},{"c":"di Bingen"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegardis"},{"c":"Abatissa"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegarda"},{"c":"di Bingen"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegarda"},{"c":"de Bingen"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegard"},{"c":"Bingeniläinen"},{"d":"1098-1179"}]},{"_1":[{"p":"Childegard"},{"c":"ot Bingen"},{"d":"1098-1179"}]},{"_1":[{"p":"Bingen, Childegard <<ot>>"},{"d":"1098-1179"}]},{"_1":[{"p":"Bingen, Hildegarde <<de>>"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegard"},{"c":"von Bingen"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegardis von Bingen"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegard"},{"c":"Sainte"},{"d":"1098-1179"}]},{"_1":[{"p":"Hildegardis"},{"c":"de Alemannia"},{"d":"1098-1179"}]}],"104":[{"b1":[{"p":"Escot, Pozzi"},{"d":"1933-"},{"b":"[Bearb.]"},{"9":"(DE-588)128917687"}]}],"105":[{"_1":[{"p":"Pozzi Escot, Olga"},{"d":"1933-"}]}],"304":[{"b1":[{"a":"Unde quocumque"}]}],"331":[{"_1":[{"a":"Unde quocumque"}]}],"334":[{"_1":[{"a":"Musikdruck"}]}],"359":[{"_1":[{"a":"Hildegard von Bingen"}]}],"425":[{"_1":[{"a":"c 1994"}]},{"a1":[{"a":"1994"}]}],"503":[{"a1":[{"a":"Transkription der mittelalterlichen Neumen in moderne Notation"}]}],"516":[{"_1":[{"a":"Melodien mit unterlegtem Text"}]}],"590":[{"_1":[{"a":"<<The>> Ursula Antiphons ... [Musikdruck]"}]}],"591":[{"_1":[{"a":"Hildegard von Bingen"}]}],"594":[{"_1":[{"a":"[Kassel]"}]}],"595":[{"_1":[{"a":"1994"}]}],"599":[{"_1":[{"a":"HT016424145"}]}],"SYS":["018117852"]}

View file

@ -1 +1 @@
[{"_FORMAT":"MarcXchange","_TYPE":"Bibliographic","_LEADER":"01488cam 2200349 a 4500","001":"11939876","005":"20041229190604.0","008":"000313s2000 nyu 000 1 eng ","906":{"__":{"a":"7","b":"cbc","c":"orignew","d":"1","e":"ocip","f":"20","g":"y-gencatlg"}},"925":{"0_":{"a":"acquire","b":"2 shelf copies","x":"policy default"}},"955":{"__":{"a":"to HLCD pc03 03-13-00; lh08 to subj. 03-14-00; lh06 03-22-00; lk02 03-22-00; to Dewey 03-22-00; aa05 03-23-00; ps13 2001-11-06 bk rec'd, to CIP ver.","f":"pv08 2001-11-07 CIP ver. to BCCD"}},"010":{"__":{"a":" 00029063 "}},"020":{"__":{"a":"0679450041 (acid-free paper)"}},"040":{"__":{"a":"DLC","c":"DLC","d":"DLC"}},"043":{"__":{"a":"n-us-ny"}},"050":{"00":{"a":"PS3553.H15","b":"A82 2000"}},"082":{"00":{"a":"813/.54","2":"21"}},"100":{"1_":{"a":"Chabon, Michael."}},"245":{"14":{"a":"The amazing adventures of Kavalier and Clay :","b":"a novel /","c":"Michael Chabon."}},"260":{"__":{"a":"New York :","b":"Random House,","c":"c2000."}},"300":{"__":{"a":"639 p. ;","c":"25 cm."}},"650":{"_0":{"a":["Comic books, strips, etc.","Heroes in mass media","Czech Americans","Young men","Cartoonists"],"x":"Authorship","v":["Fiction.","Fiction.","Fiction.","Fiction.","Fiction."]}},"651":{"_0":{"a":"New York (N.Y.)","v":"Fiction."}},"655":{"_7":{"a":["Humorous stories.","Bildungsromane."],"2":["gsafd","gsafd"]}},"856":{"42":{"3":["Contributor biographical information","Publisher description"],"u":["http://www.loc.gov/catdir/bios/random052/00029063.html","http://www.loc.gov/catdir/description/random0411/00029063.html"]},"41":{"3":"Sample text","u":"http://www.loc.gov/catdir/samples/random044/00029063.html"}}},{"_FORMAT":"MarcXchange","_TYPE":"Bibliographic","_LEADER":"01185cam 2200301 a 4500","001":"12883376","005":"20030616111422.0","008":"020805s2002 nyu j 000 1 eng ","906":{"__":{"a":"7","b":"cbc","c":"orignew","d":"1","e":"ocip","f":"20","g":"y-gencatlg"}},"925":{"0_":{"a":"acquire","b":"2 shelf copies","x":"policy default"}},"955":{"__":{"a":["pc14 2002-08-05 to HLCD","ps09 2003-03-04 1 copy rec'd., to CIP ver.","ld11 2003-05-12 cp2 to BCCD"],"c":"lh08 2002-08-06 to subj.;","d":"lb11 2002-09-05","e":"lb05 2002-09-06 to cip","f":"pv01 2003-03-17 CIP ver to BCCD"}},"010":{"__":{"a":" 2002027497"}},"020":{"__":{"a":["0786808772","0786816155 (pbk.)"]}},"040":{"__":{"a":"DLC","c":"DLC","d":"DLC"}},"042":{"__":{"a":"lcac"}},"050":{"00":{"a":"PZ7.C3315","b":"Su 2002"}},"082":{"00":{"a":"[Fic]","2":"21"}},"100":{"1_":{"a":"Chabon, Michael."}},"245":{"10":{"a":"Summerland /","c":"Michael Chabon."}},"250":{"__":{"a":"1st ed."}},"260":{"__":{"a":"New York :","b":"Miramax Books/Hyperion Books for Children,","c":"c2002."}},"300":{"__":{"a":"500 p. ;","c":"22 cm."}},"520":{"__":{"a":"Ethan Feld, the worst baseball player in the history of the game, finds himself recruited by a 100-year-old scout to help a band of fairies triumph over an ancient enemy."}},"650":{"_1":{"a":["Fantasy.","Baseball","Magic"],"v":["Fiction.","Fiction."]}},"952":{"__":{"a":"II lb11 09-05-02"}}}]
[{"_FORMAT":"MarcXchange","_TYPE":"Bibliographic","_LEADER":"01488cam 2200349 a 4500","001":["11939876"],"005":["20041229190604.0"],"008":["000313s2000 nyu 000 1 eng "],"906":[{"__":[{"a":"7"},{"b":"cbc"},{"c":"orignew"},{"d":"1"},{"e":"ocip"},{"f":"20"},{"g":"y-gencatlg"}]}],"925":[{"0_":[{"a":"acquire"},{"b":"2 shelf copies"},{"x":"policy default"}]}],"955":[{"__":[{"a":"to HLCD pc03 03-13-00; lh08 to subj. 03-14-00; lh06 03-22-00; lk02 03-22-00; to Dewey 03-22-00; aa05 03-23-00; ps13 2001-11-06 bk rec'd, to CIP ver."},{"f":"pv08 2001-11-07 CIP ver. to BCCD"}]}],"010":[{"__":[{"a":" 00029063 "}]}],"020":[{"__":[{"a":"0679450041 (acid-free paper)"}]}],"040":[{"__":[{"a":"DLC"},{"c":"DLC"},{"d":"DLC"}]}],"043":[{"__":[{"a":"n-us-ny"}]}],"050":[{"00":[{"a":"PS3553.H15"},{"b":"A82 2000"}]}],"082":[{"00":[{"a":"813/.54"},{"2":"21"}]}],"100":[{"1_":[{"a":"Chabon, Michael."}]}],"245":[{"14":[{"a":"The amazing adventures of Kavalier and Clay :"},{"b":"a novel /"},{"c":"Michael Chabon."}]}],"260":[{"__":[{"a":"New York :"},{"b":"Random House,"},{"c":"c2000."}]}],"300":[{"__":[{"a":"639 p. ;"},{"c":"25 cm."}]}],"650":[{"_0":[{"a":"Comic books, strips, etc."},{"x":"Authorship"},{"v":"Fiction."}]},{"_0":[{"a":"Heroes in mass media"},{"v":"Fiction."}]},{"_0":[{"a":"Czech Americans"},{"v":"Fiction."}]},{"_0":[{"a":"Young men"},{"v":"Fiction."}]},{"_0":[{"a":"Cartoonists"},{"v":"Fiction."}]}],"651":[{"_0":[{"a":"New York (N.Y.)"},{"v":"Fiction."}]}],"655":[{"_7":[{"a":"Humorous stories."},{"2":"gsafd"}]},{"_7":[{"a":"Bildungsromane."},{"2":"gsafd"}]}],"856":[{"42":[{"3":"Contributor biographical information"},{"u":"http://www.loc.gov/catdir/bios/random052/00029063.html"}]},{"41":[{"3":"Sample text"},{"u":"http://www.loc.gov/catdir/samples/random044/00029063.html"}]},{"42":[{"3":"Publisher description"},{"u":"http://www.loc.gov/catdir/description/random0411/00029063.html"}]}]},{"_FORMAT":"MarcXchange","_TYPE":"Bibliographic","_LEADER":"01185cam 2200301 a 4500","001":["12883376"],"005":["20030616111422.0"],"008":["020805s2002 nyu j 000 1 eng "],"906":[{"__":[{"a":"7"},{"b":"cbc"},{"c":"orignew"},{"d":"1"},{"e":"ocip"},{"f":"20"},{"g":"y-gencatlg"}]}],"925":[{"0_":[{"a":"acquire"},{"b":"2 shelf copies"},{"x":"policy default"}]}],"955":[{"__":[{"a":["pc14 2002-08-05 to HLCD","ps09 2003-03-04 1 copy rec'd., to CIP ver.","ld11 2003-05-12 cp2 to BCCD"]},{"c":"lh08 2002-08-06 to subj.;"},{"d":"lb11 2002-09-05"},{"e":"lb05 2002-09-06 to cip"},{"f":"pv01 2003-03-17 CIP ver to BCCD"}]}],"010":[{"__":[{"a":" 2002027497"}]}],"020":[{"__":[{"a":"0786808772"}]},{"__":[{"a":"0786816155 (pbk.)"}]}],"040":[{"__":[{"a":"DLC"},{"c":"DLC"},{"d":"DLC"}]}],"042":[{"__":[{"a":"lcac"}]}],"050":[{"00":[{"a":"PZ7.C3315"},{"b":"Su 2002"}]}],"082":[{"00":[{"a":"[Fic]"},{"2":"21"}]}],"100":[{"1_":[{"a":"Chabon, Michael."}]}],"245":[{"10":[{"a":"Summerland /"},{"c":"Michael Chabon."}]}],"250":[{"__":[{"a":"1st ed."}]}],"260":[{"__":[{"a":"New York :"},{"b":"Miramax Books/Hyperion Books for Children,"},{"c":"c2002."}]}],"300":[{"__":[{"a":"500 p. ;"},{"c":"22 cm."}]}],"520":[{"__":[{"a":"Ethan Feld, the worst baseball player in the history of the game, finds himself recruited by a 100-year-old scout to help a band of fairies triumph over an ancient enemy."}]}],"650":[{"_1":[{"a":"Fantasy."}]},{"_1":[{"a":"Baseball"},{"v":"Fiction."}]},{"_1":[{"a":"Magic"},{"v":"Fiction."}]}],"952":[{"__":[{"a":"II lb11 09-05-02"}]}]}]

View file

@ -1 +1 @@
[{"_FORMAT":"MarcXchange","_TYPE":"Bibliographic","_LEADER":"00759cam a2200229 a 4500","001":"11939876","005":"20041229190604.0","008":"000313s2000 nyu 000 1 eng ","020":{"__":{"a":"0679450041 (acid-free paper)"}},"040":{"__":{"a":"DLC","c":"DLC","d":"DLC"}},"100":{"1_":{"a":"Chabon, Michael."}},"245":{"14":{"a":"The amazing adventures of Kavalier and Clay :","b":"a novel /","c":"Michael Chabon."}},"260":{"__":{"a":"New York :","b":"Random House,","c":"c2000."}},"300":{"__":{"a":"639 p. ;","c":"25 cm."}},"650":{"_0":{"a":["Comic books, strips, etc.","Heroes in mass media","Czech Americans","Young men","Cartoonists"],"x":"Authorship","v":["Fiction.","Fiction.","Fiction.","Fiction.","Fiction."]}},"651":{"_0":{"a":"New York (N.Y.)","v":"Fiction."}},"655":{"_7":{"a":["Humorous stories.","Bildungsromane."],"2":["gsafd","gsafd"]}}},{"_FORMAT":"MarcXchange","_TYPE":"Bibliographic","_LEADER":"00714cam a2200205 a 4500","001":"12883376","005":"20030616111422.0","008":"020805s2002 nyu j 000 1 eng ","020":{"__":{"a":["0786808772","0786816155 (pbk.)"]}},"040":{"__":{"a":"DLC","c":"DLC","d":"DLC"}},"100":{"1_":{"a":"Chabon, Michael."}},"245":{"10":{"a":"Summerland /","c":"Michael Chabon."}},"250":{"__":{"a":"1st ed."}},"260":{"__":{"a":"New York :","b":"Miramax Books/Hyperion Books for Children,","c":"c2002."}},"300":{"__":{"a":"500 p. ;","c":"22 cm."}},"520":{"__":{"a":"Ethan Feld, the worst baseball player in the history of the game, finds himself recruited by a 100-year-old scout to help a band of fairies triumph over an ancient enemy."}},"650":{"_1":{"a":["Fantasy.","Baseball","Magic"],"v":["Fiction.","Fiction."]}}}]
[{"_FORMAT":"MarcXchange","_TYPE":"Bibliographic","_LEADER":"00759cam a2200229 a 4500","001":["11939876"],"005":["20041229190604.0"],"008":["000313s2000 nyu 000 1 eng "],"020":[{"__":[{"a":"0679450041 (acid-free paper)"}]}],"040":[{"__":[{"a":"DLC"},{"c":"DLC"},{"d":"DLC"}]}],"100":[{"1_":[{"a":"Chabon, Michael."}]}],"245":[{"14":[{"a":"The amazing adventures of Kavalier and Clay :"},{"b":"a novel /"},{"c":"Michael Chabon."}]}],"260":[{"__":[{"a":"New York :"},{"b":"Random House,"},{"c":"c2000."}]}],"300":[{"__":[{"a":"639 p. ;"},{"c":"25 cm."}]}],"650":[{"_0":[{"a":"Comic books, strips, etc."},{"x":"Authorship"},{"v":"Fiction."}]},{"_0":[{"a":"Heroes in mass media"},{"v":"Fiction."}]},{"_0":[{"a":"Czech Americans"},{"v":"Fiction."}]},{"_0":[{"a":"Young men"},{"v":"Fiction."}]},{"_0":[{"a":"Cartoonists"},{"v":"Fiction."}]}],"651":[{"_0":[{"a":"New York (N.Y.)"},{"v":"Fiction."}]}],"655":[{"_7":[{"a":"Humorous stories."},{"2":"gsafd"}]},{"_7":[{"a":"Bildungsromane."},{"2":"gsafd"}]}]},{"_FORMAT":"MarcXchange","_TYPE":"Bibliographic","_LEADER":"00714cam a2200205 a 4500","001":["12883376"],"005":["20030616111422.0"],"008":["020805s2002 nyu j 000 1 eng "],"020":[{"__":[{"a":"0786808772"}]},{"__":[{"a":"0786816155 (pbk.)"}]}],"040":[{"__":[{"a":"DLC"},{"c":"DLC"},{"d":"DLC"}]}],"100":[{"1_":[{"a":"Chabon, Michael."}]}],"245":[{"10":[{"a":"Summerland /"},{"c":"Michael Chabon."}]}],"250":[{"__":[{"a":"1st ed."}]}],"260":[{"__":[{"a":"New York :"},{"b":"Miramax Books/Hyperion Books for Children,"},{"c":"c2002."}]}],"300":[{"__":[{"a":"500 p. ;"},{"c":"22 cm."}]}],"520":[{"__":[{"a":"Ethan Feld, the worst baseball player in the history of the game, finds himself recruited by a 100-year-old scout to help a band of fairies triumph over an ancient enemy."}]}],"650":[{"_1":[{"a":"Fantasy."}]},{"_1":[{"a":"Baseball"},{"v":"Fiction."}]},{"_1":[{"a":"Magic"},{"v":"Fiction."}]}]}]

View file

@ -1 +1 @@
[{"_FORMAT":"MarcXchange","_TYPE":"Bibliographic","_LEADER":"00714cam a2200205 a 4500","001":"12883376","005":"20030616111422.0","008":"020805s2002 nyu j 000 1 eng ","020":{"__":{"a":["0786808772","0786816155 (pbk.)"]}},"040":{"__":{"a":"DLC","c":"DLC","d":"DLC"}},"100":{"1_":{"a":"Chabon, Michael."}},"245":{"10":{"a":"Summerland /","c":"Michael Chabon."}},"250":{"__":{"a":"1st ed."}},"260":{"__":{"a":"New York :","b":"Miramax Books/Hyperion Books for Children,","c":"c2002."}},"300":{"__":{"a":"500 p. ;","c":"22 cm."}},"520":{"__":{"a":"Ethan Feld, the worst baseball player in the history of the game, finds himself recruited by a 100-year-old scout to help a band of fairies triumph over an ancient enemy."}},"650":{"_1":{"a":["Fantasy.","Baseball","Magic"],"v":["Fiction.","Fiction."]}}}]
[{"_FORMAT":"MarcXchange","_TYPE":"Bibliographic","_LEADER":"00714cam a2200205 a 4500","001":["12883376"],"005":["20030616111422.0"],"008":["020805s2002 nyu j 000 1 eng "],"020":[{"__":[{"a":"0786808772"}]},{"__":[{"a":"0786816155 (pbk.)"}]}],"040":[{"__":[{"a":"DLC"},{"c":"DLC"},{"d":"DLC"}]}],"100":[{"1_":[{"a":"Chabon, Michael."}]}],"245":[{"10":[{"a":"Summerland /"},{"c":"Michael Chabon."}]}],"250":[{"__":[{"a":"1st ed."}]}],"260":[{"__":[{"a":"New York :"},{"b":"Miramax Books/Hyperion Books for Children,"},{"c":"c2002."}]}],"300":[{"__":[{"a":"500 p. ;"},{"c":"22 cm."}]}],"520":[{"__":[{"a":"Ethan Feld, the worst baseball player in the history of the game, finds himself recruited by a 100-year-old scout to help a band of fairies triumph over an ancient enemy."}]}],"650":[{"_1":[{"a":"Fantasy."}]},{"_1":[{"a":"Baseball"},{"v":"Fiction."}]},{"_1":[{"a":"Magic"},{"v":"Fiction."}]}]}]