consuming the javarosa library

Issue #71 new
ant cosentino
created an issue

i've cloned the repo and begun assessing the source to try and wrap my head around the way it's intended to be used. the problem is that the library is inconsistently documented within the source code.

from what i have read and subsequently pieced together, it seems as though consumers of the api are to use classes within org/javarosa/form/api and org/javarosa/formmanager/view to process xforms, though i can't be sure. i've read this document for further explanation of these classes.

am i on the right track, here? or am i looking in an entirely wrong section of the project? if possible, could someone provide some usage examples of the library?

kind regards

Comments (4)

  1. Mitch Sundt

    I'm not sure what you are trying to accomplish.

    An example usage is ODK Collect

    (note that this uses the m.sundt fork of javarosa).

    This uses the core library, without the extensions for J2ME devices.

    Within ODK Collect, this class:

    is a wrapper handling most interactions with the javarosa library.

  2. ant cosentino reporter

    @m.sundt thank you for getting back to me on this one!

    i'm building a web service that takes (hopefully) well-formed and valid xforms as input. the service is to programmatically append answer data to the model/instance part of the xform.

    i've included a step by step lifecycle of the service for an overview of the process.


    1. request to web service --> store a provided xform in database.
    2. parse new xform using javarosa and generate a question string for the first unanswered form question.
    3. send unanswered question to consumer of web service as http response.
    4. serialise javarosa instance.
    5. request to web service --> provide answer to question.
    6. unserialise javarosa instance, add provided answer to xform and reserialise.
    7. respond to consumer of web service with the next unanswered question (if any exist) as http response.
    8. if all xform questions are satisfied, pipe the xform to an external service.
  3. Mitch Sundt

    Have you seen ? It provides a full web browser interface to javarosa forms, including, I believe, intermediate saves of results.

    Note that javarosa is not a full and complete XForms implementation, and that it deviates from the XForms spec is several ways.

  4. Log in to comment