Examples of PuzzlePiece


Examples of schema2template.model.PuzzlePiece

     */
    static Map<String, SortedSet<PuzzlePiece>> createDefinitionMap(Set<PuzzlePiece> definitions) {
        Map<String, SortedSet<PuzzlePiece>> retval = new HashMap<String, SortedSet<PuzzlePiece>>();
        Iterator<PuzzlePiece> iter = definitions.iterator();
        while (iter.hasNext()) {
            PuzzlePiece def = iter.next();
            SortedSet<PuzzlePiece> multiples = retval.get(def.getQName());
            if (multiples == null) {
                multiples = new TreeSet<PuzzlePiece>();
                retval.put(def.getQName(), multiples);
            }
            multiples.add(def);
        }
        return retval;
    }
View Full Code Here

Examples of schema2template.model.PuzzlePiece

        if (pieces == null) {
            System.out.println("No parent element found by the given name: " + EXAMPLE_PARENT);
        }

        PuzzlePiece parent = pieces.first();

        pieces = nameToDefinition.get(EXAMPLE_CHILD);

        if (pieces == null) {
            System.out.println("No child element found by the given name: " + EXAMPLE_CHILD);
        }

        PuzzlePiece child = pieces.first();

        if (pieces.size() > 1) {
            System.out.println("There were more than one element by this name. Dropped all instances but one.");
        }

        System.out.println();
        System.out.println("PATHS from " + parent.getQName() + " to " + child.getQName() + ": ");
        System.out.println("---------------------------------------------------------");

        List<String> paths = new PathPrinter(parent).printPathsToChild(child);

        if (paths == null) {
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.