Esempio n. 1
0
 public void writeExternal(BinaryWriter out_renamed)
 {
     ExtUtil.writeBool(out_renamed, isLocalizable_);
     ExtUtil.writeString(out_renamed, ExtUtil.emptyIfNull(labelInnerText));
     ExtUtil.writeString(out_renamed, ExtUtil.emptyIfNull(textID));
     ExtUtil.writeString(out_renamed, ExtUtil.emptyIfNull(value));
     //don't serialize index; it will be restored from questiondef
 }
Esempio n. 2
0
 /**
  * Write the object to stream.
  */
 public void writeExternal(BinaryWriter dos)
 {
     ExtUtil.writeBool(dos, fallbackDefaultLocale);
     ExtUtil.writeBool(dos, fallbackDefaultForm);
     ExtUtil.write(dos, new ExtWrapMap(localeResources, new ExtWrapListPoly()));
     ExtUtil.write(dos, new ExtWrapList(locales));
     ExtUtil.write(dos, new ExtWrapNullable(defaultLocale));
     ExtUtil.write(dos, new ExtWrapNullable(currentLocale));
 }
Esempio n. 3
0
 public void writeExternal(BinaryWriter out_)
 {
     ExtUtil.write(out_, nodesetRef);
     ExtUtil.write(out_, new ExtWrapTagged(nodesetExpr));
     ExtUtil.write(out_, contextRef);
     ExtUtil.write(out_, labelRef);
     ExtUtil.write(out_, new ExtWrapTagged(labelExpr));
     ExtUtil.write(out_, new ExtWrapNullable(valueRef));
     ExtUtil.write(out_, new ExtWrapNullable(valueExpr == null ? null : new ExtWrapTagged(valueExpr)));
     ExtUtil.write(out_, new ExtWrapNullable(copyRef));
     ExtUtil.writeBool(out_, labelIsItext);
     ExtUtil.writeBool(out_, copyMode);
 }
Esempio n. 4
0
        /** Write the group definition object to the supplied stream. */
        public void writeExternal(BinaryWriter dos)
        {
            ExtUtil.writeNumeric(dos, ID);
            ExtUtil.write(dos, new ExtWrapNullable(AppearanceAttr));
            ExtUtil.write(dos, new ExtWrapTagged(Bind));
            ExtUtil.write(dos, new ExtWrapNullable(TextID));
            ExtUtil.write(dos, new ExtWrapNullable(LabelInnerText));
            ExtUtil.writeBool(dos, Repeat);
            ExtUtil.write(dos, new ExtWrapListPoly(Children));

            ExtUtil.writeBool(dos, noAddRemove);
            ExtUtil.write(dos, new ExtWrapNullable(count != null ? new ExtWrapTagged(count) : null));

            ExtUtil.writeString(dos, ExtUtil.emptyIfNull(chooseCaption));
            ExtUtil.writeString(dos, ExtUtil.emptyIfNull(addCaption));
            ExtUtil.writeString(dos, ExtUtil.emptyIfNull(delCaption));
            ExtUtil.writeString(dos, ExtUtil.emptyIfNull(doneCaption));
            ExtUtil.writeString(dos, ExtUtil.emptyIfNull(addEmptyCaption));
            ExtUtil.writeString(dos, ExtUtil.emptyIfNull(doneEmptyCaption));
            ExtUtil.writeString(dos, ExtUtil.emptyIfNull(entryHeader));
            ExtUtil.writeString(dos, ExtUtil.emptyIfNull(delHeader));
            ExtUtil.writeString(dos, ExtUtil.emptyIfNull(mainHeader));
        }
Esempio n. 5
0
        /*
         * (non-Javadoc)
         *
         * @see
         * org.javarosa.core.services.storage.utilities.Externalizable#writeExternal
         * (java.io.DataOutputStream)
         */
        public void writeExternal(BinaryWriter out_renamed)
        {
            ExtUtil.writeString(out_renamed, ExtUtil.emptyIfNull(name));
            ExtUtil.writeNumeric(out_renamed, multiplicity);
            ExtUtil.writeBool(out_renamed, repeatable);
            ExtUtil.write(out_renamed, new ExtWrapNullable(value == null ? null : new ExtWrapTagged(value)));

            // Jan 22, 2009 - [email protected]
            // old line: ExtUtil.write(out, new
            // ExtWrapList(ExtUtil.emptyIfNull(children)));
            // New Child serialization
            // 1. write null status as boolean
            // 2. write number of children
            // 3. for all child in children
            // 3.1 if child type == TreeElement write boolean true , then serialize
            // directly.
            // 3.2 if child type != TreeElement, write boolean false, then tagged
            // child
            if (children == null)
            {
                // 1.
                ExtUtil.writeBool(out_renamed, false);
            }
            else
            {
                // 1.
                ExtUtil.writeBool(out_renamed, true);
                // 2.
                ExtUtil.writeNumeric(out_renamed, children.Count);
                // 3.
                IEnumerator en = children.GetEnumerator();
                while (en.MoveNext())
                {
                    TreeElement child = (TreeElement)en.Current;
                    if (child.GetType() == typeof(TreeElement))
                    {
                        // 3.1
                        ExtUtil.writeBool(out_renamed, true);
                        child.writeExternal(out_renamed);
                    }
                    else
                    {
                        // 3.2
                        ExtUtil.writeBool(out_renamed, false);
                        ExtUtil.write(out_renamed, new ExtWrapTagged(child));
                    }
                }
            }

            // end Jan 22, 2009

            ExtUtil.writeNumeric(out_renamed, dataType);
            ExtUtil.writeBool(out_renamed, relevant);
            ExtUtil.writeBool(out_renamed, required);
            ExtUtil.writeBool(out_renamed, enabled);
            ExtUtil.writeBool(out_renamed, relevantInherited);
            ExtUtil.writeBool(out_renamed, enabledInherited);
            ExtUtil.write(out_renamed, new ExtWrapNullable(constraint)); // TODO: inefficient for repeats
            ExtUtil.writeString(out_renamed, ExtUtil.emptyIfNull(preloadHandler));
            ExtUtil.writeString(out_renamed, ExtUtil.emptyIfNull(preloadParams));

            ArrayList attStrings = getSingleStringAttributeVector();
            ArrayList al         = ExtUtil.emptyIfNull(attStrings);

            ExtUtil.write(out_renamed, new ExtWrapList(al));
        }
Esempio n. 6
0
 public void writeExternal(BinaryWriter out_)
 {
     ExtUtil.write(out_, new ExtWrapTagged(expr));
     ExtUtil.writeBool(out_, hasNow);
 }
Esempio n. 7
0
 public void writeExternal(BinaryWriter out_)
 {
     ExtUtil.writeBool(out_, equal);
     base.writeExternal(out_);
 }