Class FormDefinitionUtils


  • public class FormDefinitionUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static javax.xml.parsers.DocumentBuilder getDocumentBuilder()  
      protected static org.w3c.dom.Element getElementByXPath​(java.lang.String content, java.lang.String path)  
      protected static org.w3c.dom.Element getElementByXPath​(org.w3c.dom.Document doc, java.lang.String path)  
      static java.lang.String getFormDataIdFromResponse​(java.lang.String response)
      Given a response it returns id of newly created document
      static java.lang.String getFormDefinition​(java.lang.String content)
      Used to get the form definition given the content parameter.
      static java.lang.String getFormDefinitionContent​(java.lang.String content, YFormDefinitionData yformDefinition)
      Given a content it returns a new content containing the meta information provided by the given yForm Definition
      static java.util.Map<java.lang.String,​java.lang.String> getFormDefinitionMetadata​(java.lang.String content)
      It returns the DOM representation of the Metadata TAG from the given content parameter.
      static java.lang.String getXML​(org.w3c.dom.Document doc)  
      protected static javax.xml.xpath.XPath getXPath()  
      static java.lang.String normalize​(java.lang.String content)
      Normalizes the given xml content.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getFormDataIdFromResponse

        public static java.lang.String getFormDataIdFromResponse​(java.lang.String response)
                                                          throws YFormServiceException
        Given a response it returns id of newly created document
        Parameters:
        response -
        Throws:
        YFormServiceException
      • getFormDefinitionContent

        public static java.lang.String getFormDefinitionContent​(java.lang.String content,
                                                                YFormDefinitionData yformDefinition)
                                                         throws YFormServiceException
        Given a content it returns a new content containing the meta information provided by the given yForm Definition
        Parameters:
        content -
        yformDefinition -
        Throws:
        YFormServiceException
      • getFormDefinitionMetadata

        public static java.util.Map<java.lang.String,​java.lang.String> getFormDefinitionMetadata​(java.lang.String content)
                                                                                                throws YFormServiceException
        It returns the DOM representation of the Metadata TAG from the given content parameter.
        Parameters:
        content -
        Throws:
        YFormServiceException
      • normalize

        public static java.lang.String normalize​(java.lang.String content)
                                          throws YFormServiceException
        Normalizes the given xml content. Useful when comparing contents that have been manipulated using other xml tools.
        Parameters:
        content -
        Throws:
        YFormServiceException
      • getFormDefinition

        public static java.lang.String getFormDefinition​(java.lang.String content)
                                                  throws YFormServiceException
        Used to get the form definition given the content parameter.
        Parameters:
        content -
        Throws:
        YFormServiceException
      • getXPath

        protected static javax.xml.xpath.XPath getXPath()