Class DataForm.Builder

    • Method Detail

      • setTitle

        public DataForm.Builder setTitle​(String title)
        Sets the description of the data. It is similar to the title on a web page or an X window. You can put a <title/> on either a form to fill out, or a set of data results.
        Parameters:
        title - description of the data.
        Returns:
        a reference to this builder.
      • addField

        public DataForm.Builder addField​(FormField field)
        Adds a new field as part of the form.
        Parameters:
        field - the field to add to the form.
        Returns:
        a reference to this builder.
      • setInstructions

        public DataForm.Builder setInstructions​(List<String> instructions)
        Sets the list of instructions that explain how to fill out the form and what the form is about. The dataform could include multiple instructions since each instruction could not contain newlines characters.
        Parameters:
        instructions - list of instructions that explain how to fill out the form.
        Returns:
        a reference to this builder.
      • addInstruction

        public DataForm.Builder addInstruction​(String instruction)
        Adds a new instruction to the list of instructions that explain how to fill out the form and what the form is about. The dataform could include multiple instructions since each instruction could not contain newlines characters.
        Parameters:
        instruction - the new instruction that explain how to fill out the form.
        Returns:
        a reference to this builder.
      • addItem

        public DataForm.Builder addItem​(DataForm.Item item)
        Adds a new item returned from a search.
        Parameters:
        item - the item returned from a search.
        Returns:
        a reference to this builder.
      • setReportedData

        public DataForm.Builder setReportedData​(DataForm.ReportedData reportedData)
        Sets the fields that will be returned from a search.
        Parameters:
        reportedData - the fields that will be returned from a search.
        Returns:
        a reference to this builder.