public final class Marc
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Marc.Builder
A builder for MARC field streams, MARC records, and XML.
|
static class |
Marc.MarcIso2709Reader
Read from a ISO 2709 stream and emit SAX events.
|
static class |
Marc.MarcXmlReader
A XML reader for MARC XML.
|
Modifier and Type | Method and Description |
---|---|
AlephSequentialInputStream |
aleph()
Return an ALEPH SEQUENTIAL input stream with line-feed separator.
|
BiblioMondoInputStream |
bibliomondo()
Return a BiblioMonod MARC export input stream.
|
static Marc.Builder |
builder()
Create a new MARC builder.
|
org.w3c.dom.Document |
document()
Return a W3C DOM of the record in the ISO 2709 input stream.
|
BufferedSeparatorInputStream |
iso2709Stream()
Return ISO 2709 stream.
|
Marc.MarcIso2709Reader |
iso2709XmlReader()
Return an XML reader on a ISO 2709 input stream.
|
MabDisketteInputStream |
mabDisketteCRLF()
Return a MAB DISKETTE input stream with carriage-return/line-feed spearator.
|
MabDisketteInputStream |
mabDisketteLF()
Return a MAB DISKETTE input stream with line-feed spearator.
|
MabDisketteInputStream |
mabDiskettePlusSubfieldsCRLF(char subfieldDelimiter)
Return a MAB DISKETTE input stream with carriage-return/line-feed spearator and subfields.
|
void |
parseEvents(MarcXchangeEventConsumer consumer)
Run XML stream parser over an XML input stream, with an XML event consumer.
|
PicaInputStream |
pica()
Return a Pica input stream with line-feed separator.
|
PicaPlainInputStream |
picaPlain()
Return a Pica Plain input stream with line-feed separator.
|
SisisInputStream |
sisis()
Return a SISIS input stream with line-feed spearator.
|
SisisInputStream |
sisisCRLF()
Return a SISIS input stream with carriage-return/line-feed spearator.
|
void |
transform(javax.xml.transform.TransformerFactory factory,
java.net.URL stylesheetUrl,
javax.xml.transform.Result result)
Transform W3C document of the record in the ISO 2709 input stream by an XSL stylesheet.
|
void |
transform(java.net.URL stylesheetUrl,
javax.xml.transform.Result result)
Transform W3C document of the record in the ISO 2709 input stream by an XSL stylesheet.
|
int |
wrapFields(ChunkStream<byte[],BytesReference> stream,
boolean withCollection)
Pass a given chunk stream to a MARC generator, chunk by chunk.
|
int |
wrapIntoCollection(ChunkStream<byte[],BytesReference> stream) |
long |
wrapRecords(ChunkStream<byte[],BytesReference> stream,
boolean withCollection)
Wrap records into a collection.
|
void |
writeCollection()
Write MARC bibliographic data from seperator stream chunk by chunk to a MARC collection.
|
void |
writeRecordCollection()
Write MARC bibliographic events from a separator strem, record by record, wrapped into a
pair of
collection elements. |
void |
writeRecords()
Write MARC bibliographic events from a separator strem, record by record.
|
Marc.MarcXmlReader |
xmlReader()
Return an XML reader on an XML input stream.
|
public static Marc.Builder builder()
public Marc.MarcIso2709Reader iso2709XmlReader()
public Marc.MarcXmlReader xmlReader()
public void parseEvents(MarcXchangeEventConsumer consumer) throws javax.xml.stream.XMLStreamException
consumer
- the XML event consumerjavax.xml.stream.XMLStreamException
- if parsing failspublic BufferedSeparatorInputStream iso2709Stream()
public MabDisketteInputStream mabDisketteCRLF()
public MabDisketteInputStream mabDisketteLF()
public MabDisketteInputStream mabDiskettePlusSubfieldsCRLF(char subfieldDelimiter)
subfieldDelimiter
- subfield delimiterpublic SisisInputStream sisis()
public SisisInputStream sisisCRLF()
public AlephSequentialInputStream aleph()
public PicaInputStream pica()
public PicaPlainInputStream picaPlain()
public BiblioMondoInputStream bibliomondo()
public org.w3c.dom.Document document() throws java.io.IOException
java.io.IOException
- if parsing failspublic void transform(java.net.URL stylesheetUrl, javax.xml.transform.Result result) throws java.io.IOException
stylesheetUrl
- the URL of the stylesheetresult
- the result of the transformationjava.io.IOException
- if transformation failspublic void transform(javax.xml.transform.TransformerFactory factory, java.net.URL stylesheetUrl, javax.xml.transform.Result result) throws java.io.IOException
factory
- the transformer factorystylesheetUrl
- the URL of the stylesheetresult
- the result of the transformationjava.io.IOException
- if transformation failspublic void writeCollection() throws java.io.IOException
java.io.IOException
- if writing failspublic int wrapIntoCollection(ChunkStream<byte[],BytesReference> stream) throws java.io.IOException
java.io.IOException
public int wrapFields(ChunkStream<byte[],BytesReference> stream, boolean withCollection) throws java.io.IOException
stream
- a chunk streamwithCollection
- true if stream should be wrapped into a collection elementjava.io.IOException
- if chunk reading failspublic void writeRecordCollection() throws java.io.IOException
collection
elements.java.io.IOException
- if writing failspublic void writeRecords() throws java.io.IOException
java.io.IOException
- if writing failspublic long wrapRecords(ChunkStream<byte[],BytesReference> stream, boolean withCollection) throws java.io.IOException
stream
- a chunk streamwithCollection
- true if collection
elements should be used, false if notjava.io.IOException
- if chunk reading fails