Search in sources :

Example 6 with ExtWrapTagged

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

the class QuestionDef method writeExternal.

@Override
public void writeExternal(DataOutputStream dos) throws IOException {
    ExtUtil.writeNumeric(dos, getID());
    ExtUtil.write(dos, new ExtWrapNullable(binding == null ? null : new ExtWrapTagged(binding)));
    ExtUtil.write(dos, new ExtWrapNullable(getAppearanceAttr()));
    ExtUtil.write(dos, new ExtWrapNullable(getTextID()));
    ExtUtil.write(dos, new ExtWrapNullable(getLabelInnerText()));
    ExtUtil.write(dos, new ExtWrapNullable(getHelpText()));
    ExtUtil.write(dos, new ExtWrapNullable(getHelpTextID()));
    ExtUtil.write(dos, new ExtWrapNullable(getHelpInnerText()));
    ExtUtil.writeNumeric(dos, getControlType());
    ExtUtil.writeAttributes(dos, additionalAttributes);
    ExtUtil.write(dos, new ExtWrapList(ExtUtil.emptyIfNull(choices)));
    ExtUtil.write(dos, new ExtWrapNullable(dynamicChoices));
    ExtUtil.write(dos, new ExtWrapList(ExtUtil.emptyIfNull(osmTags)));
}
Also used : ExtWrapTagged(org.javarosa.core.util.externalizable.ExtWrapTagged) ExtWrapList(org.javarosa.core.util.externalizable.ExtWrapList) ExtWrapNullable(org.javarosa.core.util.externalizable.ExtWrapNullable)

Example 7 with ExtWrapTagged

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

the class SetValueAction method writeExternal.

public void writeExternal(DataOutputStream out) throws IOException {
    ExtUtil.write(out, target);
    ExtUtil.write(out, ExtUtil.emptyIfNull(explicitValue));
    if (explicitValue == null) {
        ExtUtil.write(out, new ExtWrapTagged(value));
    }
}
Also used : ExtWrapTagged(org.javarosa.core.util.externalizable.ExtWrapTagged)

Example 8 with ExtWrapTagged

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

the class DataBinding method readExternal.

/* (non-Javadoc)
     * @see org.javarosa.core.services.storage.utilities.Externalizable#readExternal(java.io.DataInputStream)
     */
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
    setId((String) ExtUtil.read(in, new ExtWrapNullable(String.class), pf));
    setDataType(ExtUtil.readInt(in));
    setPreload((String) ExtUtil.read(in, new ExtWrapNullable(String.class), pf));
    setPreloadParams((String) ExtUtil.read(in, new ExtWrapNullable(String.class), pf));
    ref = (IDataReference) ExtUtil.read(in, new ExtWrapTagged());
// don't bother reading relevancy/required/readonly/constraint/calculate/additionalAttrs right now; they're only used during parse anyway
}
Also used : ExtWrapTagged(org.javarosa.core.util.externalizable.ExtWrapTagged) ExtWrapNullable(org.javarosa.core.util.externalizable.ExtWrapNullable)

Example 9 with ExtWrapTagged

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

the class Constraint method writeExternal.

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

Example 10 with ExtWrapTagged

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

the class Constraint method readExternal.

public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
    constraint = (IConditionExpr) ExtUtil.read(in, new ExtWrapTagged(), pf);
    constraintMsg = ExtUtil.nullIfEmpty(ExtUtil.readString(in));
    attemptConstraintCompile();
}
Also used : ExtWrapTagged(org.javarosa.core.util.externalizable.ExtWrapTagged)

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