Search in sources :

Example 31 with FormInstance

use of org.javarosa.core.model.instance.FormInstance in project javarosa by opendatakit.

the class RestoreUtils method exportRMS.

public static void exportRMS(FormInstance parent, Class type, String grouperName, IStorageUtility storage, IRecordFilter filter) {
    FormInstance entities = RestoreUtils.exportRMS(storage, type, grouperName, filter);
    RestoreUtils.mergeDataModel(parent, entities, ".");
}
Also used : FormInstance(org.javarosa.core.model.instance.FormInstance)

Example 32 with FormInstance

use of org.javarosa.core.model.instance.FormInstance in project javarosa by opendatakit.

the class RestoreUtils method subDataModel.

public static FormInstance subDataModel(TreeElement top) {
    TreeElement newTop = top.shallowCopy();
    newTop.setMult(0);
    return new FormInstance(newTop);
}
Also used : FormInstance(org.javarosa.core.model.instance.FormInstance) TreeElement(org.javarosa.core.model.instance.TreeElement)

Aggregations

FormInstance (org.javarosa.core.model.instance.FormInstance)32 TreeElement (org.javarosa.core.model.instance.TreeElement)16 TreeReference (org.javarosa.core.model.instance.TreeReference)8 Test (org.junit.Test)7 InstanceInitializationFactory (org.javarosa.core.model.instance.InstanceInitializationFactory)6 FormDef (org.javarosa.core.model.FormDef)5 AbstractTreeElement (org.javarosa.core.model.instance.AbstractTreeElement)5 IOException (java.io.IOException)4 EvaluationContext (org.javarosa.core.model.condition.EvaluationContext)3 StringData (org.javarosa.core.model.data.StringData)3 ByteArrayPayload (org.javarosa.core.services.transport.payload.ByteArrayPayload)3 XFormSerializingVisitor (org.javarosa.model.xform.XFormSerializingVisitor)3 XPathNodeset (org.javarosa.xpath.XPathNodeset)3 ArrayList (java.util.ArrayList)2 Date (java.util.Date)2 IFormElement (org.javarosa.core.model.IFormElement)2 ITreeVisitor (org.javarosa.core.model.instance.utils.ITreeVisitor)2 XPathTypeMismatchException (org.javarosa.xpath.XPathTypeMismatchException)2 XPathUnhandledException (org.javarosa.xpath.XPathUnhandledException)2 Cursor (android.database.Cursor)1