Package com.volantis.mcs.model.path

Examples of com.volantis.mcs.model.path.PathBuilder


        return type;
    }

    public Path parsePath(String path) {

        PathBuilder builder = new PathBuilderImpl();
//        PathImpl pathImpl = new PathImpl();

        StringTokenizer tokenizer = new StringTokenizer(path, "/");
        while (tokenizer.hasMoreTokens()) {
            String token = tokenizer.nextToken();

            // Try and convert it to an integer.
            try {
                int index = Integer.parseInt(token);
                builder.addIndexedStep(index);
            } catch (NumberFormatException e) {
                // Assume it is a property name.
                builder.addPropertyStep(token);
            }
        }

        return builder.getPath();
    }
View Full Code Here


        traversePath(path, true, proxies);
        return proxies;
    }

    public Path getPathFromRoot() {
        PathBuilder builder = modelFactory.createPathBuilder();
        if (parent != null) {
            parent.buildPath(builder, this);
        }

        return builder.getPath();
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.model.path.PathBuilder

Copyright © 2018 www.massapicom. 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.