gov.grants.apply.xpath
Class GrantApplicationXpath

java.lang.Object
  extended bygov.grants.apply.xpath.GrantApplicationXpath

public class GrantApplicationXpath
extends java.lang.Object

Grant application Xpath class.

Author:
Brian Husted

Field Summary
static java.lang.String AGENCY_NAME_XPATH
           
static java.lang.String CFDA_NUMBER_XPATH
           
static java.lang.String CLOSING_DATE_XPATH
           
static java.lang.String COMPETITION_ID_XPATH
           
static java.lang.String FORMS_XPATH
           
static java.lang.String GLOBAL_NS
           
static java.lang.String GS_HEADER_XPATH
           
static java.lang.String HASH_XPATH
           
static java.lang.String HASHVALUE
           
static java.lang.String HEADER_XPATH
           
(package private) static org.apache.log4j.Logger log
           
static java.lang.String OPPORTUNITY_ID_XPATH
           
static java.lang.String OPPORTUNITY_TITLE_XPATH
           
static java.lang.String SUBMISSION_TITLE_XPATH
           
 
Constructor Summary
GrantApplicationXpath(java.lang.String xmlDoc)
           
 
Method Summary
 java.lang.String getAgencyName()
           
 java.lang.String getCfdaNumber()
           
 java.lang.String getClosingDate()
           
 java.lang.String getCompetitionId()
           
 XPathExecutor getExecutor()
           
 org.w3c.dom.Node getFormsNode()
          Get the <grant:Forms> Node.
 org.w3c.dom.Node getHashNode()
          Get the <glob:HashValue> Node.
 java.lang.String getHeaderHashValue()
          Get the value in the <glob:HashValue> element.
 org.w3c.dom.Node getHeaderNode()
          Get the <header:GrantSubmissionHeader> Node.
 java.lang.String getOpportunityId()
           
 java.lang.String getOpportunityTitle()
           
 java.lang.String getSubmissionTitle()
           
static void main(java.lang.String[] args)
           
 void setExecutor(XPathExecutor executor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

static final org.apache.log4j.Logger log

GS_HEADER_XPATH

public static final java.lang.String GS_HEADER_XPATH
See Also:
Constant Field Values

OPPORTUNITY_ID_XPATH

public static final java.lang.String OPPORTUNITY_ID_XPATH
See Also:
Constant Field Values

CFDA_NUMBER_XPATH

public static final java.lang.String CFDA_NUMBER_XPATH
See Also:
Constant Field Values

OPPORTUNITY_TITLE_XPATH

public static final java.lang.String OPPORTUNITY_TITLE_XPATH
See Also:
Constant Field Values

CLOSING_DATE_XPATH

public static final java.lang.String CLOSING_DATE_XPATH
See Also:
Constant Field Values

AGENCY_NAME_XPATH

public static final java.lang.String AGENCY_NAME_XPATH
See Also:
Constant Field Values

COMPETITION_ID_XPATH

public static final java.lang.String COMPETITION_ID_XPATH
See Also:
Constant Field Values

SUBMISSION_TITLE_XPATH

public static final java.lang.String SUBMISSION_TITLE_XPATH
See Also:
Constant Field Values

HASHVALUE

public static final java.lang.String HASHVALUE
See Also:
Constant Field Values

FORMS_XPATH

public static final java.lang.String FORMS_XPATH
See Also:
Constant Field Values

HEADER_XPATH

public static final java.lang.String HEADER_XPATH
See Also:
Constant Field Values

HASH_XPATH

public static final java.lang.String HASH_XPATH
See Also:
Constant Field Values

GLOBAL_NS

public static final java.lang.String GLOBAL_NS
See Also:
Constant Field Values
Constructor Detail

GrantApplicationXpath

public GrantApplicationXpath(java.lang.String xmlDoc)
                      throws java.lang.Exception
Method Detail

getExecutor

public XPathExecutor getExecutor()
Returns:
the XPathExecutor.

setExecutor

public void setExecutor(XPathExecutor executor)
Parameters:
executor - the XPathExecutor.

getFormsNode

public org.w3c.dom.Node getFormsNode()
                              throws javax.xml.transform.TransformerException
Get the <grant:Forms> Node.

Returns:
A DOM Node representing the <grant:Forms> tag in the XML document.
Throws:
javax.xml.transform.TransformerException

getHeaderNode

public org.w3c.dom.Node getHeaderNode()
                               throws javax.xml.transform.TransformerException
Get the <header:GrantSubmissionHeader> Node.

Returns:
A DOM Node representing the <header:GrantSubmissionHeader> tag in the XML document.
Throws:
javax.xml.transform.TransformerException

getHashNode

public org.w3c.dom.Node getHashNode()
                             throws javax.xml.transform.TransformerException
Get the <glob:HashValue> Node. If the Node does not exist, create one and add it to the Document.

Returns:
A DOM Node representing the <glob:HashValue> tag in the XML document.
Throws:
javax.xml.transform.TransformerException

getHeaderHashValue

public java.lang.String getHeaderHashValue()
                                    throws java.lang.Exception
Get the value in the <glob:HashValue> element.

Returns:
The value that is currently in the <glob:HashValue> element or null if the element does not exist or is empty.
Throws:
java.lang.Exception

getAgencyName

public java.lang.String getAgencyName()
                               throws java.lang.Exception
Returns:
Returns the agencyName.
Throws:
java.lang.Exception

getCfdaNumber

public java.lang.String getCfdaNumber()
                               throws java.lang.Exception
Returns:
the string of the CFDA Number.
Throws:
java.lang.Exception

getClosingDate

public java.lang.String getClosingDate()
                                throws java.lang.Exception
Returns:
the string of the closing date.
Throws:
java.lang.Exception

getOpportunityId

public java.lang.String getOpportunityId()
                                  throws java.lang.Exception
Returns:
the string of the opportunity ID.
Throws:
java.lang.Exception

getOpportunityTitle

public java.lang.String getOpportunityTitle()
                                     throws java.lang.Exception
Returns:
the string of the opportunity title.
Throws:
java.lang.Exception

getCompetitionId

public java.lang.String getCompetitionId()
                                  throws java.lang.Exception
Returns:
the string of the competition ID.
Throws:
java.lang.Exception

getSubmissionTitle

public java.lang.String getSubmissionTitle()
                                    throws java.lang.Exception
Returns:
returns the submissionTitle.
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception