Interface GuideModelImporter


  • public interface GuideModelImporter
    • Method Detail

      • createFormJsonFromSchema

        java.lang.String createFormJsonFromSchema​(SchemaImportOptions schemaImportOptions)
                                           throws GuideException
        Returns JSON String of the schema depending on the schemaImportOptions.
        Parameters:
        schemaImportOptions -
        Returns:
        Throws:
        GuideException
      • importFromXSD

        java.lang.String importFromXSD​(java.io.InputStream xsdStream,
                                       java.lang.String rootElName,
                                       java.lang.String rootElNamespace)
                                throws GuideException
        Throws:
        GuideException
      • getRootElementsFromSchema

        JSONArray getRootElementsFromSchema​(GuideSchemaType schemaType,
                                            java.lang.String schemaPath)
        Depending on the schema Type, the API returns JSONArray containing root Elements of the XSD, Form Data Model or JSON Schema
        Parameters:
        schemaType -
        schemaPath -
        Returns:
        Throws:
        GuideException
      • importFromXFA

        java.util.Hashtable<java.lang.String,​java.lang.Object> importFromXFA​(java.lang.String xfaFormdomJson,
                                                                                   boolean saveXFAObjects)
                                                                            throws GuideException
        Throws:
        GuideException
      • importFromXSD

        java.lang.String importFromXSD​(java.lang.String xsdPath,
                                       java.lang.String elementName,
                                       java.lang.String elementNameSpace)
                                throws GuideException
        Throws:
        GuideException
      • importFromDataDictionary

        java.lang.String importFromDataDictionary​(java.lang.String ddRef)
                                           throws GuideException
        Throws:
        GuideException
      • getTypeOfElement

        java.lang.String getTypeOfElement​(java.lang.String xsdRef,
                                          java.lang.String rootName,
                                          java.lang.String xPath)
                                   throws org.xml.sax.SAXException,
                                          JSONException
        Throws:
        org.xml.sax.SAXException
        JSONException
      • getJSONHTMLFragmentOrForm

        java.lang.String getJSONHTMLFragmentOrForm​(LazyLoadingOptions lazyLoadingOptions)
                                            throws GuideException
        This API would return JSON or HTML for a on demand fragment panel or a list of JSON or HTML of all the on demand components of an AF The API is to be user with the following flags set in lazyLoadingOptions // Todo THIS API has to be marked private GET_CHILD_PANEL_JSON- GET_CHILD_FORM_JSON- GET_JSON_FOR_ALL_LAZY_CHILDERN- GET_CHILD_PANEL_HTML- GET_CHILD_FORM_HTML- GET_HTML_FOR_ALL_LAZY_CHILDREN- GET_RENDER_JSON_FOR_PARENT_FORM- GET_RENDER_HTML_FOR_PARENT_FORM - GET_PIGGY_BANKED_JSON
        Parameters:
        lazyLoadingOptions -
        Returns:
        string representing JSON or HTML for the on demand fragment
        Throws:
        GuideException
      • getSchemaJson

        JSONObject getSchemaJson​(Resource guideContainerResource)
                          throws GuideException
        This API converts the XSD into a JSON representation that contains the values of minOccur, type, bindRef, defaultValue, maxOccur and nillable property for every Node.
        Parameters:
        guideContainerResource -
        Returns:
        JSONObject representing the XSD
        Throws:
        GuideException
      • getDefinitionOfElement

        java.lang.String getDefinitionOfElement​(GuideSchemaType schemaType,
                                                java.lang.String schemaRef,
                                                java.lang.String rootName,
                                                java.lang.String bindRef)
                                         throws GuideException
        Returns the definition of the element at the end of the bindRef. eg- if bindRef is a/b/c , it will return the type of c.
        Parameters:
        schemaType - - type of schema
        schemaRef - - path of schema on CRX
        rootName - - String, Name of the root element.
        bindRef - - bindRef of the element.
        Returns:
        String
        Throws:
        GuideException