com.opnworks.timesheet.serializers
Class HrRawXmlSerializer

java.lang.Object
  extended bycom.opnworks.timesheet.serializers.HrRawXmlSerializer
All Implemented Interfaces:
IHrXmlTimeCard, IXmlSerializer

public class HrRawXmlSerializer
extends java.lang.Object
implements IHrXmlTimeCard, IXmlSerializer

This class is used to serialize timesheet entities according to the HR-XML standard formats

Author:
Laurent

Field Summary
 
Fields inherited from interface com.opnworks.timesheet.serializers.IHrXmlTimeCard
ATT_APPROVER_TYPE, ATT_BILLABLE, ATT_ID, ATT_STATUS, ATT_TYPE, DURATION_PREFIX, DURATION_SUFFIX, PERIOD_DATE_FORMAT, TIMECARD_ACTIVITY_TYPE, TIMECARD_ACTIVITY_TYPES, TIMECARD_ADDITIONAL_DATA, TIMECARD_APPROVAL_DATETIME, TIMECARD_APPROVAL_INFO, TIMECARD_AUTHOR, TIMECARD_CHILDREN, TIMECARD_CODE, TIMECARD_COMMENT, TIMECARD_DURATION, TIMECARD_END_DATETIME, TIMECARD_FORMATTED_NAME, TIMECARD_ID, TIMECARD_ID_VALUE, TIMECARD_NAME, TIMECARD_PARTIES, TIMECARD_PARTY, TIMECARD_PERIOD_END_DATE, TIMECARD_PERIOD_START_DATE, TIMECARD_PERSON, TIMECARD_PERSON_NAME, TIMECARD_PROJECT, TIMECARD_PROJECTS, TIMECARD_REPORTED_RESOURCE, TIMECARD_REPORTED_TIME, TIMECARD_ROOT, TIMECARD_SPONSOR, TIMECARD_START_DATETIME, TIMECARD_SUBMITTER_INFO, TIMECARD_TEXT, TIMECARD_TIME_INTERVAL, TIMECARD_TIMESTAMP, TYPE_ACTIVITY, TYPE_COST_CENTER, TYPE_PROJECT
 
Constructor Summary
HrRawXmlSerializer()
           
 
Method Summary
 org.dom4j.Document asDOM(ActivityType[] activityTypes)
          Description of the Method
 org.dom4j.Document asDOM(Invoice invoice)
          Description of the Method
 org.dom4j.Document asDOM(IParty[] parties)
          Description of the Method
 org.dom4j.Document asDOM(Project[] projects)
          Description of the Method
 org.dom4j.Document asDOM(Timesheet timesheet)
          Description of the Method
 void loadActivityTypes(org.dom4j.Document document)
          Description of the Method
 void loadProjects(org.dom4j.Document document)
          Description of the Method
 org.dom4j.Element populateElement(org.dom4j.Element root, ActivityType activityType)
          Description of the Method
 void populateElement(org.dom4j.Element parent, IOrganization org)
          Description of the Method
 void populateElement(org.dom4j.Element element, IPerson person)
          Description of the Method
 void populateElement(org.dom4j.Element element, IStreetAddress address)
          Description of the Method
 org.dom4j.Element populateElement(org.dom4j.Element root, Project project)
           
 void populateElement(org.dom4j.Element element, Week week, TimesheetLineItem item)
           
static void printDocument(org.dom4j.Document doc, java.io.OutputStream out, java.lang.String aEncodingScheme)
          Description of the Method
static void transform(org.dom4j.Document doc, java.io.OutputStream out, java.io.InputStream xslInput)
           
static void transform(org.w3c.dom.Document doc, java.io.OutputStream out, java.io.InputStream xslInput)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HrRawXmlSerializer

public HrRawXmlSerializer()
Method Detail

asDOM

public org.dom4j.Document asDOM(Timesheet timesheet)
                         throws TimesheetException
Description of the Method

Specified by:
asDOM in interface IXmlSerializer
Parameters:
timesheet - Description of Parameter
Returns:
Description of the Returned Value
Throws:
TimesheetException - Description of Exception

asDOM

public org.dom4j.Document asDOM(ActivityType[] activityTypes)
                         throws TimesheetException
Description of the Method

Specified by:
asDOM in interface IXmlSerializer
Parameters:
activityTypes - Description of Parameter
Returns:
Description of the Returned Value
Throws:
TimesheetException - Description of Exception

populateElement

public org.dom4j.Element populateElement(org.dom4j.Element root,
                                         ActivityType activityType)
                                  throws TimesheetException
Description of the Method

Parameters:
root - Description of Parameter
activityType - Description of Parameter
Returns:
Description of the Returned Value
Throws:
TimesheetException - Description of Exception

asDOM

public org.dom4j.Document asDOM(Invoice invoice)
                         throws TimesheetException
Description of the Method

Specified by:
asDOM in interface IXmlSerializer
Parameters:
invoice - Description of Parameter
Returns:
Description of the Returned Value
Throws:
TimesheetException - Description of Exception

populateElement

public void populateElement(org.dom4j.Element element,
                            Week week,
                            TimesheetLineItem item)
Parameters:
element -
week - Description of Parameter
item -

populateElement

public void populateElement(org.dom4j.Element parent,
                            IOrganization org)
Description of the Method

Parameters:
parent - Description of Parameter
org - Description of Parameter

populateElement

public void populateElement(org.dom4j.Element element,
                            IPerson person)
Description of the Method

Parameters:
element - Description of Parameter
person - Description of Parameter

populateElement

public void populateElement(org.dom4j.Element element,
                            IStreetAddress address)
Description of the Method

Parameters:
element - Description of Parameter
address - Description of Parameter

asDOM

public org.dom4j.Document asDOM(IParty[] parties)
                         throws TimesheetException
Description of the Method

Specified by:
asDOM in interface IXmlSerializer
Parameters:
parties - Description of Parameter
Returns:
Description of the Returned Value
Throws:
TimesheetException - Description of Exception

asDOM

public org.dom4j.Document asDOM(Project[] projects)
                         throws TimesheetException
Description of the Method

Specified by:
asDOM in interface IXmlSerializer
Parameters:
projects - Description of Parameter
Returns:
Description of the Returned Value
Throws:
TimesheetException - Description of Exception

populateElement

public org.dom4j.Element populateElement(org.dom4j.Element root,
                                         Project project)
Parameters:
root -
project -
Returns:
Description of the Returned Value

loadActivityTypes

public void loadActivityTypes(org.dom4j.Document document)
                       throws TimesheetException
Description of the Method

Specified by:
loadActivityTypes in interface IXmlSerializer
Parameters:
document - Description of Parameter
Throws:
TimesheetException - Description of Exception

loadProjects

public void loadProjects(org.dom4j.Document document)
                  throws TimesheetException
Description of the Method

Specified by:
loadProjects in interface IXmlSerializer
Parameters:
document - Description of Parameter
Throws:
TimesheetException - Description of Exception

printDocument

public static void printDocument(org.dom4j.Document doc,
                                 java.io.OutputStream out,
                                 java.lang.String aEncodingScheme)
                          throws java.io.IOException
Description of the Method

Parameters:
doc - Description of Parameter
out - Description of Parameter
aEncodingScheme - Description of Parameter
Throws:
java.io.IOException - Description of Exception

transform

public static void transform(org.dom4j.Document doc,
                             java.io.OutputStream out,
                             java.io.InputStream xslInput)
                      throws java.io.IOException
Parameters:
doc -
out -
xslInput -
Throws:
java.io.IOException

transform

public static void transform(org.w3c.dom.Document doc,
                             java.io.OutputStream out,
                             java.io.InputStream xslInput)
                      throws java.io.IOException
Parameters:
doc -
out -
xslInput -
Throws:
java.io.IOException