Class EDRFieldMap
java.lang.Object
com.portal.pfc.infranetui.edrviewer.EDRFieldMap
A field map is an XML document that maps serialized EDR field ids to
EDR field names.
EDRFieldMap parses the provided XML document and allows retrieving EDR field names based on the ID specified in the serialized EDR.
The class also provides a static method that takes a serialized EDR and
extracts from it the field map name and poid that's specified in the edr's
- Since:
- 6.5FP3
- Author:
- Max Spivak
-
Constructor Summary
ConstructorsConstructorDescriptionEDRFieldMap
(String fieldMapString) Creates a FieldMap object by parsing field map XML document. -
Method Summary
Modifier and TypeMethodDescriptiongetElementName
(String id) Returns name of the edr field specified by id.static Pair
getFieldMapInfo
(String edr) Returns field map's name and poid as specified in the edr.
-
Constructor Details
-
EDRFieldMap
public EDRFieldMap(String fieldMapString) throws IOException, ParserConfigurationException, SAXException Creates a FieldMap object by parsing field map XML document.- Parameters:
fieldMapString
- XML document in string format that contains the field mapping for serialized EDRs.- Throws:
IOException
ParserConfigurationException
SAXException
-
-
Method Details
-
getElementName
Returns name of the edr field specified by id.This method is currently fairly inefficient as it walks the tree in order to find each element. We should figure out how to use the more efficient
getElementById
method in order to access the desired element directly. -
getFieldMapInfo
Returns field map's name and poid as specified in the edr. This method uses the SAX parser to parse just enough of the EDR to get the field map information.- Parameters:
edr
- Serialized EDR XML in string format- Throws:
SAXException
IOException
-