maito.datacollecting.oaipmh
Class OAIPMHRecordParser

java.lang.Object
  extended by maito.datacollecting.oaipmh.OAIPMHRecordParser
All Implemented Interfaces:
RecordParser

public class OAIPMHRecordParser
extends java.lang.Object
implements RecordParser

Parses records from an incoming OAI-PMH stream NOTE: this actually works with any other character stream as long as the content is in a format similar to OAI-PMH / DC XML

Version:
1.0
Author:
Antti Laitinen, Väinö Ala-Härkönen 15.11.2005 This software is released under the GNU GPL license

Constructor Summary
OAIPMHRecordParser(RecordConstructor recordConstructor, DataStorage dataStorage)
           
 
Method Summary
 void putData(java.lang.String part)
          Adds the part to the internal buffer and checks out if there's a full record in the buffer already.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAIPMHRecordParser

public OAIPMHRecordParser(RecordConstructor recordConstructor,
                          DataStorage dataStorage)
Method Detail

putData

public void putData(java.lang.String part)
Adds the part to the internal buffer and checks out if there's a full record in the buffer already. If a full record is found, constructs a Record with the specified RecordConstructor and passes it on to the DataStorage. If several full Records are found in buffer, does the same to them all.

Specified by:
putData in interface RecordParser
Parameters:
part - The next part of the record data