|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.marc4j.marcxml.MarcXmlReader
MarcXmlReader
is an XMLReader
that
consumes MarcHandler
events and reports events to
a SAX2 ContentHandler
.
MarcHandler
,
ContentHandler
Field Summary | |
LexicalHandler |
lh
the lexical handler object |
Constructor Summary | |
MarcXmlReader()
|
Method Summary | |
void |
controlField(String tag,
char[] data)
Reports a control field node (001-009). |
void |
endCollection()
Reports the closing element for the root, reports the end of the prefix mapping and the end a document. |
void |
endDataField(String tag)
Reports the closing element for a data field. |
void |
endRecord()
Reports the closing element for a record. |
ContentHandler |
getContentHandler()
Returns the content handler. |
DTDHandler |
getDTDHandler()
|
EntityResolver |
getEntityResolver()
|
ErrorHandler |
getErrorHandler()
|
boolean |
getFeature(String name)
Returns the boolean for the feature with the given name. |
Object |
getProperty(String name)
Returns the object for the given property. |
void |
parse(InputSource input)
Sends the input source to the MarcReader . |
void |
parse(String systemId)
Parse input from a system identifier (URI). |
void |
setContentHandler(ContentHandler ch)
Sets the content handler. |
void |
setDTDHandler(DTDHandler dh)
Not supported. |
void |
setEntityResolver(EntityResolver er)
Not supported. |
void |
setErrorHandler(ErrorHandler seh)
Not supported. |
void |
setFeature(String name,
boolean value)
Sets the boolean for the feature with the given name. |
void |
setProperty(String name,
Object obj)
Sets the object for the given property. |
void |
startCollection()
Returns the document handler being used, starts the document and reports the root element. |
void |
startDataField(String tag,
char ind1,
char ind2)
Reports the starting element for a data field (010-999). |
void |
startRecord(Leader leader)
Reports the starting element for a record and the leader node. |
void |
subfield(char code,
char[] data)
Reports a subfield node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public LexicalHandler lh
Constructor Detail |
public MarcXmlReader()
Method Detail |
public void setContentHandler(ContentHandler ch)
Sets the content handler.
setContentHandler
in interface XMLReader
ch
- public ContentHandler getContentHandler()
Returns the content handler.
getContentHandler
in interface XMLReader
public void setEntityResolver(EntityResolver er)
Not supported.
setEntityResolver
in interface XMLReader
er
- public EntityResolver getEntityResolver()
getEntityResolver
in interface XMLReader
public void setDTDHandler(DTDHandler dh)
Not supported.
setDTDHandler
in interface XMLReader
dh
- public DTDHandler getDTDHandler()
getDTDHandler
in interface XMLReader
public void setErrorHandler(ErrorHandler seh)
Not supported.
setErrorHandler
in interface XMLReader
public ErrorHandler getErrorHandler()
getErrorHandler
in interface XMLReader
public void setProperty(String name, Object obj) throws SAXNotRecognizedException, SAXNotSupportedException
Sets the object for the given property.
setProperty
in interface XMLReader
name
- the property nameobj
- the property object
SAXNotRecognizedException
SAXNotSupportedException
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException
Returns the object for the given property.
getProperty
in interface XMLReader
name
- the property name
SAXNotRecognizedException
SAXNotSupportedException
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException
Sets the boolean for the feature with the given name.
setFeature
in interface XMLReader
name
- the name of the featurevalue
- the boolean value
SAXNotRecognizedException
SAXNotSupportedException
public boolean getFeature(String name) throws SAXNotRecognizedException
Returns the boolean for the feature with the given name.
getFeature
in interface XMLReader
name
- the name of the feature
SAXNotRecognizedException
public void parse(String systemId) throws SAXException, IOException
Parse input from a system identifier (URI).
parse
in interface XMLReader
systemId
- the system identifier (URI)
SAXException
IOException
public void parse(InputSource input)
Sends the input source to the MarcReader
.
parse
in interface XMLReader
input
- the InputSource
public void startCollection()
Returns the document handler being used, starts the document and reports the root element.
startCollection
in interface MarcHandler
public void startRecord(Leader leader)
Reports the starting element for a record and the leader node.
startRecord
in interface MarcHandler
leader
- the leaderpublic void controlField(String tag, char[] data)
Reports a control field node (001-009).
controlField
in interface MarcHandler
tag
- the tag namedata
- the data elementpublic void startDataField(String tag, char ind1, char ind2)
Reports the starting element for a data field (010-999).
startDataField
in interface MarcHandler
tag
- the tag nameind1
- the first indicator valueind2
- the second indicator valuepublic void subfield(char code, char[] data)
Reports a subfield node.
subfield
in interface MarcHandler
code
- the data element identifierdata
- the data elementpublic void endDataField(String tag)
Reports the closing element for a data field.
endDataField
in interface MarcHandler
tag
- the tag namepublic void endRecord()
Reports the closing element for a record.
endRecord
in interface MarcHandler
public void endCollection()
Reports the closing element for the root, reports the end of the prefix mapping and the end a document.
endCollection
in interface MarcHandler
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |