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)));
}
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));
}
}
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
}
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));
}
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();
}
Aggregations