Package org.haystack

Examples of org.haystack.HDictBuilder.toDict()


        if (unit != null)
            b.add("unit", unit);
        StringTokenizer st = new StringTokenizer(markers);
        while (st.hasMoreTokens())
            b.add(st.nextToken());
        recs.put(dis, b.toDict());
    }

    //////////////////////////////////////////////////////////////////////////
    // Ops
    //////////////////////////////////////////////////////////////////////////
View Full Code Here


            catch (Exception e) {
                val = HStr.make(valStr);
            }
            b.add(name, val);
        }
        return HGridBuilder.dictToGrid(b.toDict());
    }

    /**
     * Map the POST body to grid
     */
 
View Full Code Here

        // build and return result grid
        HDict meta = new HDictBuilder().add("id", id).add("hisStart", r.start).add("hisEnd", r.end).toDict();
        writer.writeMeta(meta);

        HDictBuilder dictBuilder = new HDictBuilder();
        HCol[] cols = { new HCol(0, "ts", dictBuilder.toDict()), new HCol(1, "val", dictBuilder.toDict()), };
        writer.writeCols(cols);

        // route to subclass
        onHisRead(rec, r, writer, cols);
View Full Code Here

        // build and return result grid
        HDict meta = new HDictBuilder().add("id", id).add("hisStart", r.start).add("hisEnd", r.end).toDict();
        writer.writeMeta(meta);

        HDictBuilder dictBuilder = new HDictBuilder();
        HCol[] cols = { new HCol(0, "ts", dictBuilder.toDict()), new HCol(1, "val", dictBuilder.toDict()), };
        writer.writeCols(cols);

        // route to subclass
        onHisRead(rec, r, writer, cols);
View Full Code Here

    public HDict readDict() {
        HDictBuilder b = new HDictBuilder();
        readMeta(b);
        if (cur >= 0)
            throw errChar("Expected end of stream");
        return b.toDict();
    }

    //////////////////////////////////////////////////////////////////////////
    // Implementation
    //////////////////////////////////////////////////////////////////////////
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.