|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.sandev.TaskHeap.util.HeapDataConverter
public class HeapDataConverter
Utility class for finding and converting heap data for import.
| Field Summary | |
|---|---|
protected long |
baseoffset
The offset to use when converting old standalone data uniqueIDs. |
protected org.xml.sax.Locator |
documentLocator
During a callback method implementation, the locator can be used to report where you are in the XML file. |
protected Plan |
future
|
protected HeapAttributes |
heap
A reference to the HeapAttributes we are converting. |
protected Plan |
immediate
|
protected int |
itemindex
The index of the instance we are currently writing. |
protected static int |
LOGDEBUG
|
protected static int |
LOGERROR
|
protected static int |
LOGINFO
|
protected static int |
LOGWARN
|
protected Plan |
near
|
protected java.io.PrintWriter |
out
Converted file output writer. |
protected org.sandev.basics.util.UIFormOwner |
owner
Back reference to the owner, mainly for logging. |
protected Plan |
recycling
|
protected int |
removalCount
A record of how many entries are going to be removed as part of the file conversion. |
| Constructor Summary | |
|---|---|
HeapDataConverter()
|
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
Receive notification of character data. |
protected java.lang.String |
convertIDCSV(java.lang.String sourceCSV)
Add the baseoffset to the IDs in the given serialized CSV value and return the result. |
protected java.lang.String |
convertStandaloneHeapFile(java.lang.String filespec)
Convert the specified standalone heap data file and return the converted filespec for import processing. |
protected java.lang.String |
convertVal(java.lang.String msgclass,
java.lang.String name,
java.lang.String attr,
java.lang.String val)
Convert the given value as needed and return the result. |
protected void |
debug(java.lang.String text)
|
void |
endDocument()
Receive notification of the end of a document. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
Receive notification of the end of an element |
void |
endPrefixMapping(java.lang.String prefix)
Hook for notifying close of prefix mapping. |
org.xml.sax.Locator |
getDocumentLocator()
accessor for documentLocator |
java.lang.String |
getImportFilespec(org.sandev.basics.util.UIFormContext uifc,
org.sandev.basics.util.UserWorkLog uwl,
org.sandev.basics.util.UIFormOwner owner,
Account user,
HeapAttributes heap,
Plan[] topLevelPlans,
java.lang.String impfileName,
long baseoffset)
Get the file to use for importing the current heap data. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Receive notification of ignorable whitespace in element content. |
protected boolean |
ignoreAttr(java.lang.String msgclass,
java.lang.String attr,
java.lang.String val)
Return true if the given field is no longer valid and should be removed from the converted output. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Receive notification of a processing instruction. |
void |
setDocumentLocator(org.xml.sax.Locator loc)
mutator for documentLocator |
void |
skippedEntity(java.lang.String name)
Receive notification of a skipped entity. |
void |
startDocument()
Receive notification of the beginning of a document. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
Receive notification of the beginning of an element |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
Hook for handling prefix URIs for Namespace expansion. |
protected java.lang.String |
verifyImportFile(java.lang.String filespec)
If the specified file needs to be converted, then do that and pass back the converted file name for import processing. |
protected void |
writeAdditionalFields(java.lang.String msgclass,
java.lang.String assignedToVal)
Write out any additional field values needed to read the converted class from file |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int LOGDEBUG
protected static final int LOGINFO
protected static final int LOGWARN
protected static final int LOGERROR
protected org.sandev.basics.util.UIFormOwner owner
protected java.io.PrintWriter out
protected HeapAttributes heap
protected Plan immediate
protected Plan near
protected Plan future
protected Plan recycling
protected long baseoffset
protected int removalCount
protected int itemindex
protected org.xml.sax.Locator documentLocator
| Constructor Detail |
|---|
public HeapDataConverter()
| Method Detail |
|---|
protected void debug(java.lang.String text)
public java.lang.String getImportFilespec(org.sandev.basics.util.UIFormContext uifc,
org.sandev.basics.util.UserWorkLog uwl,
org.sandev.basics.util.UIFormOwner owner,
Account user,
HeapAttributes heap,
Plan[] topLevelPlans,
java.lang.String impfileName,
long baseoffset)
protected java.lang.String verifyImportFile(java.lang.String filespec)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
protected java.lang.String convertStandaloneHeapFile(java.lang.String filespec)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXExceptionpublic org.xml.sax.Locator getDocumentLocator()
public void setDocumentLocator(org.xml.sax.Locator loc)
setDocumentLocator in interface org.xml.sax.ContentHandler
public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionpublic void endDocument()
endDocument in interface org.xml.sax.ContentHandler
public void startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
throws org.xml.sax.SAXException
startPrefixMapping in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void endPrefixMapping(java.lang.String prefix)
throws org.xml.sax.SAXException
endPrefixMapping in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
ignorableWhitespace in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void processingInstruction(java.lang.String target,
java.lang.String data)
throws org.xml.sax.SAXException
processingInstruction in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void skippedEntity(java.lang.String name)
throws org.xml.sax.SAXException
skippedEntity in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
protected boolean ignoreAttr(java.lang.String msgclass,
java.lang.String attr,
java.lang.String val)
protected java.lang.String convertVal(java.lang.String msgclass,
java.lang.String name,
java.lang.String attr,
java.lang.String val)
protected void writeAdditionalFields(java.lang.String msgclass,
java.lang.String assignedToVal)
protected java.lang.String convertIDCSV(java.lang.String sourceCSV)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||