Class FormDefinitionUtils


  • public class FormDefinitionUtils
    extends java.lang.Object
    Static class used to interact with yForm Definition and yForm Data
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static org.jdom2.input.SAXBuilder createSAXBuilder()  
      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 org.jdom2.Element 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.jdom2.Document doc)
      Given a DOM document it returns the String representation
      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

      • 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 org.jdom2.Element 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
      • getXML

        public static java.lang.String getXML​(org.jdom2.Document doc)
                                       throws java.io.IOException
        Given a DOM document it returns the String representation
        Parameters:
        doc -
        Throws:
        java.io.IOException
      • createSAXBuilder

        protected static org.jdom2.input.SAXBuilder createSAXBuilder()