-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
constraints.json #148
Labels
Comments
This includes parsing the JSON and adding this functionality to the TagEdit model. |
hallahan
added a commit
that referenced
this issue
May 13, 2016
hallahan
added a commit
that referenced
this issue
May 14, 2016
hallahan
added a commit
that referenced
this issue
May 14, 2016
hallahan
added a commit
that referenced
this issue
May 16, 2016
hallahan
added a commit
that referenced
this issue
May 16, 2016
hallahan
added a commit
that referenced
this issue
May 16, 2016
hallahan
added a commit
that referenced
this issue
May 16, 2016
hallahan
added a commit
that referenced
this issue
May 17, 2016
Note to self: make sure constraint JSON files get loaded case insensitive. |
hallahan
added a commit
that referenced
this issue
May 23, 2016
I'm going to close this when we have this documented. |
This has been completed and is documented at: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm breaking this comment out into an issue:
The basic approach with defining constraints will be JSON based. We copy JSON files form the constraints directory in the application assets to openmapkit/constraints in ExternalStorage. This way we will have a default setup, and then the constraints JSON settings can later be altered based on a REST endpoint in OpenMapKitServer (or a definition in XForms).
This approach is more extensible than building constraints into XForms up-front.
constraints.json - default constraints for all surveys
form_id-constraints.json - constraints that just apply to a specific form, overriding constraints.json
We can implement the actual functionality of constraints in OpenMapKit Android via this JSON settings mechanism. Later, we can go in and build XLSForm (pyxform) -> XForm (JavaRosa) -> Constraint JSON.
Doing pyxform and JavaRosa work right now will derail progress in the project as a whole. Also, this approach would lend well for development of a tag editor outside of an ODK context.
By having a set of constraints settings files in the Android application assets, we will have good defaults ship with the app. We can then have a simple OpenMapKit Server REST endpoint with modified constraints, but we won't require OMK Server for constraint functionality to work in Android.
See 0d58f2a showing how we take app assets and move them to ExternalStorage, allowing us to not rely on republishing the app to update an assets setting file. @ccabanero & @shawnaparadee - you can use this code in TechTracker.
The text was updated successfully, but these errors were encountered: