proai.cache
Class ParsedRecord

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by proai.cache.ParsedRecord
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, Record

public class ParsedRecord
extends org.xml.sax.helpers.DefaultHandler
implements Record


Constructor Summary
ParsedRecord(java.lang.String itemID, java.lang.String prefix, java.lang.String sourceInfo, java.io.File file)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 boolean deleteFile()
           
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
           
 java.util.Date getDate()
           
 java.lang.String getItemID()
           
 java.lang.String getPrefix()
           
 java.util.List<java.lang.String> getSetSpecs()
           
 java.lang.String getSourceInfo()
          Get a string that can be used to construct the XML of the record.
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes a)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParsedRecord

public ParsedRecord(java.lang.String itemID,
                    java.lang.String prefix,
                    java.lang.String sourceInfo,
                    java.io.File file)
             throws ServerException
Throws:
ServerException
Method Detail

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes a)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

getItemID

public java.lang.String getItemID()
Specified by:
getItemID in interface Record

getPrefix

public java.lang.String getPrefix()
Specified by:
getPrefix in interface Record

getSourceInfo

public java.lang.String getSourceInfo()
Description copied from interface: Record
Get a string that can be used to construct the XML of the record. The format of this string is defined by the implementation. The string will typically contain some kind of identifier or locator (a file path or URL) and possibly, other attributes that may be used to construct a record's XML.

Specified by:
getSourceInfo in interface Record

getDate

public java.util.Date getDate()

getSetSpecs

public java.util.List<java.lang.String> getSetSpecs()

deleteFile

public boolean deleteFile()