maito.datacollecting.dcxml
Class DCXMLRecordConstructWorker

java.lang.Object
  extended by maito.datacollecting.dcxml.DCXMLRecordConstructWorker
All Implemented Interfaces:
org.xml.sax.ErrorHandler

public class DCXMLRecordConstructWorker
extends java.lang.Object
implements org.xml.sax.ErrorHandler

Constructs a Record object from a valid XML String that specifies a record in either Dublin Core 2.0 XML or oai_citeseer format (see the integer constants in this class). Does the "real work" for both OAICiteseerRecordConstructor and DCXMLRecordConstructor.

Version:
1.0
Author:
Väinö Ala-Härkönen

Field Summary
static int RECORD_CITESEER
          The Record is in oai_citeseer format
static int RECORD_DCXML
          The Record is in Dublin Core 2.0 XML format
 
Constructor Summary
DCXMLRecordConstructWorker()
           
 
Method Summary
protected  Record constructRecord(java.lang.String data, int recordFormat)
          Constructs a record from the data string.
 void error(org.xml.sax.SAXParseException exception)
           
 void fatalError(org.xml.sax.SAXParseException exception)
           
protected  boolean testNamespaceImpl()
          This method is needed to reach and test the inner class.
 void warning(org.xml.sax.SAXParseException exception)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RECORD_DCXML

public static final int RECORD_DCXML
The Record is in Dublin Core 2.0 XML format

See Also:
Constant Field Values

RECORD_CITESEER

public static final int RECORD_CITESEER
The Record is in oai_citeseer format

See Also:
Constant Field Values
Constructor Detail

DCXMLRecordConstructWorker

public DCXMLRecordConstructWorker()
Method Detail

constructRecord

protected Record constructRecord(java.lang.String data,
                                 int recordFormat)
                          throws java.lang.IllegalArgumentException
Constructs a record from the data string. The string must be a string representation of a valid XML document. Root tag should be "record" according to OAI-PMH / oai_citeseer record specifications.

Parameters:
data - The data the Record should be constructed from
recordFormat - Format of the record to be processed. See integer constants in this class.
Returns:
A Record ready for transformation
Throws:
java.lang.IllegalArgumentException

error

public void error(org.xml.sax.SAXParseException exception)
Specified by:
error in interface org.xml.sax.ErrorHandler

fatalError

public void fatalError(org.xml.sax.SAXParseException exception)
Specified by:
fatalError in interface org.xml.sax.ErrorHandler

warning

public void warning(org.xml.sax.SAXParseException exception)
Specified by:
warning in interface org.xml.sax.ErrorHandler

testNamespaceImpl

protected boolean testNamespaceImpl()
This method is needed to reach and test the inner class. It does nothing useful.