Search in sources :

Example 11 with ExtWrapTagged

use of org.javarosa.core.util.externalizable.ExtWrapTagged in project javarosa by opendatakit.

the class XPathConditional method writeExternal.

public void writeExternal(DataOutputStream out) throws IOException {
    ExtUtil.write(out, new ExtWrapTagged(expr));
    ExtUtil.writeBool(out, hasNow);
}
Also used : ExtWrapTagged(org.javarosa.core.util.externalizable.ExtWrapTagged)

Example 12 with ExtWrapTagged

use of org.javarosa.core.util.externalizable.ExtWrapTagged in project javarosa by opendatakit.

the class XPathBinaryOpExpr method writeExternal.

public void writeExternal(DataOutputStream out) throws IOException {
    ExtUtil.write(out, new ExtWrapTagged(a));
    ExtUtil.write(out, new ExtWrapTagged(b));
}
Also used : ExtWrapTagged(org.javarosa.core.util.externalizable.ExtWrapTagged)

Example 13 with ExtWrapTagged

use of org.javarosa.core.util.externalizable.ExtWrapTagged in project javarosa by opendatakit.

the class XPathFilterExpr method writeExternal.

public void writeExternal(DataOutputStream out) throws IOException {
    List<XPathExpression> v = Arrays.asList(predicates);
    ExtUtil.write(out, new ExtWrapTagged(x));
    ExtUtil.write(out, new ExtWrapListPoly(v));
}
Also used : ExtWrapListPoly(org.javarosa.core.util.externalizable.ExtWrapListPoly) ExtWrapTagged(org.javarosa.core.util.externalizable.ExtWrapTagged)

Example 14 with ExtWrapTagged

use of org.javarosa.core.util.externalizable.ExtWrapTagged in project javarosa by opendatakit.

the class XPathFilterExpr method readExternal.

public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
    x = (XPathExpression) ExtUtil.read(in, new ExtWrapTagged(), pf);
    List<Object> v = (List<Object>) ExtUtil.read(in, new ExtWrapListPoly(), pf);
    predicates = new XPathExpression[v.size()];
    for (int i = 0; i < predicates.length; i++) predicates[i] = (XPathExpression) v.get(i);
}
Also used : ExtWrapListPoly(org.javarosa.core.util.externalizable.ExtWrapListPoly) ExtWrapTagged(org.javarosa.core.util.externalizable.ExtWrapTagged) ArrayList(java.util.ArrayList) List(java.util.List)

Example 15 with ExtWrapTagged

use of org.javarosa.core.util.externalizable.ExtWrapTagged in project javarosa by opendatakit.

the class FormDef method writeExternal.

/**
 * Writes the form definition object to the supplied stream.
 *
 * @param dos - the stream to write to.
 * @throws IOException
 */
@Override
public void writeExternal(DataOutputStream dos) throws IOException {
    ExtUtil.writeNumeric(dos, getID());
    ExtUtil.writeString(dos, ExtUtil.emptyIfNull(getName()));
    ExtUtil.write(dos, new ExtWrapNullable(getTitle()));
    ExtUtil.write(dos, new ExtWrapListPoly(getChildren()));
    ExtUtil.write(dos, getMainInstance());
    ExtUtil.write(dos, new ExtWrapNullable(localizer));
    List<Condition> conditions = dagImpl.getConditions();
    List<Recalculate> recalcs = dagImpl.getRecalculates();
    ExtUtil.write(dos, new ExtWrapList(conditions));
    ExtUtil.write(dos, new ExtWrapList(recalcs));
    ExtUtil.write(dos, new ExtWrapListPoly(outputFragments));
    ExtUtil.write(dos, new ExtWrapMap(submissionProfiles));
    // for support of multi-instance forms
    ExtUtil.write(dos, new ExtWrapMap(formInstances, new ExtWrapTagged()));
    ExtUtil.write(dos, new ExtWrapMap(eventListeners, new ExtWrapListPoly()));
    ExtUtil.write(dos, new ExtWrapListPoly(extensions));
}
Also used : Condition(org.javarosa.core.model.condition.Condition) ExtWrapListPoly(org.javarosa.core.util.externalizable.ExtWrapListPoly) Recalculate(org.javarosa.core.model.condition.Recalculate) ExtWrapTagged(org.javarosa.core.util.externalizable.ExtWrapTagged) ExtWrapMap(org.javarosa.core.util.externalizable.ExtWrapMap) ExtWrapList(org.javarosa.core.util.externalizable.ExtWrapList) ExtWrapNullable(org.javarosa.core.util.externalizable.ExtWrapNullable)

Aggregations

ExtWrapTagged (org.javarosa.core.util.externalizable.ExtWrapTagged)29 ExtWrapNullable (org.javarosa.core.util.externalizable.ExtWrapNullable)13 ExtWrapList (org.javarosa.core.util.externalizable.ExtWrapList)7 ExtWrapListPoly (org.javarosa.core.util.externalizable.ExtWrapListPoly)7 ArrayList (java.util.ArrayList)6 ExtWrapMap (org.javarosa.core.util.externalizable.ExtWrapMap)5 List (java.util.List)4 Condition (org.javarosa.core.model.condition.Condition)2 Recalculate (org.javarosa.core.model.condition.Recalculate)2 TreeReference (org.javarosa.core.model.instance.TreeReference)2 DeserializationException (org.javarosa.core.util.externalizable.DeserializationException)2 Date (java.util.Date)1 HashMap (java.util.HashMap)1 Constraint (org.javarosa.core.model.condition.Constraint)1 IConditionExpr (org.javarosa.core.model.condition.IConditionExpr)1 DataInstance (org.javarosa.core.model.instance.DataInstance)1 OSMTag (org.javarosa.core.model.osm.OSMTag)1 Localizer (org.javarosa.core.services.locale.Localizer)1 OrderedMap (org.javarosa.core.util.OrderedMap)1 ExtWrapBase (org.javarosa.core.util.externalizable.ExtWrapBase)1