private void checkContentV1()

in src/main/java/org/apache/cxf/cwiki/Page.java [192:238]


    private void checkContentV1(String c) {
        int idx = c.indexOf("{children");
        while (idx != -1) {
            if (childrenOf == null) {
                childrenOf = new HashMap<String, Integer>();
            }
            idx += 9;
            if (c.charAt(idx) != '}') {
                // {children:page=Foo|...}
                idx++;
                int idx2 = c.indexOf('}', idx);
                String paramString = c.substring(idx, idx2);
                String params[] = paramString.split("\\||=");
                String page = null;
                int depth = 1;
                for (int x = 0; x < params.length; x++) {
                    if ("page".equals(params[x])) {
                        page = params[x + 1];
                        x++;
                    } else if ("depth".equals(params[x])) {
                        depth = Integer.parseInt(params[x + 1]);
                        x++;
                    }
                }
                childrenOf.put(page, depth);
            } else {
                childrenOf.put(title, 1);
            }
            idx = c.indexOf("{children", idx);
        }
        
        idx = c.indexOf("{include:");
        while (idx != -1) {
            int idx2 = c.indexOf("}", idx);
            String inc = c.substring(idx + 9, idx2);
            if (includes == null) {
                includes = new CopyOnWriteArraySet<String>();
            }
            includes.add(inc);
            idx = c.indexOf("{include:", idx2);
        }
        idx = c.indexOf("{blog-posts");
        if (idx != -1) {
            hasBlog = true;
        }
        handleCode(c);
    }