Package org.xembly

Examples of org.xembly.Directives


        this.storage = stg;
        this.self = login;
        this.repo = rep;
        this.ticket = issue;
        this.storage.apply(
            new Directives().xpath(
                String.format(
                    // @checkstyle LineLength (1 line)
                    "/github/repos/repo[@coords='%s']/issues/issue[number='%d']",
                    rep, this.ticket
                )
View Full Code Here


    @Override
    public void add(@NotNull(message = "labels can't be NULL")
        final Iterable<String> labels
    ) throws IOException {
        final Directives dirs = new Directives().xpath(this.xpath());
        for (final String label : labels) {
            dirs.add("label").set(label).up();
        }
        this.storage.apply(dirs);
    }
View Full Code Here

    @Override
    public void remove(@NotNull(message = "name cannpt be NULL")
        final String name
    ) throws IOException {
        this.storage.apply(
            new Directives().xpath(
                String.format("%s/label[.='%s']", this.xpath(), name)
            ).remove()
        );
    }
View Full Code Here

    }

    @Override
    public void clear() throws IOException {
        this.storage.apply(
            new Directives().xpath(
                String.format("%s/label", this.xpath())
            ).remove()
        );
    }
View Full Code Here

        @NotNull(message = "login can't be NULL") final String login
    ) throws IOException {
        this.storage = stg;
        this.self = login;
        this.storage.apply(
            new Directives().xpath(this.userXpath()).addIf("keys")
        );
    }
View Full Code Here

        try {
            number = 1 + this.storage.xml().xpath(
                String.format("%s/key/id/text()", this.xpath())
            ).size();
            this.storage.apply(
                new Directives().xpath(this.xpath())
                    .add("key")
                    .add("id").set(String.valueOf(number)).up()
                    .add("title").set(title).up()
                    .add("key").set(key)
            );
View Full Code Here

    }

    @Override
    public void remove(final int number) throws IOException {
        this.storage.apply(
            new Directives().xpath(
                String.format("%s/key[id='%d']", this.xpath(), number)
            ).remove()
        );
    }
View Full Code Here

    }

    @Override
    public void remove() throws IOException {
        this.storage.apply(
            new Directives().xpath(this.xpath()).strict(1).remove()
        );
    }
View Full Code Here

    ) throws IOException {
        this.storage = stg;
        this.self = login;
        this.coords = rep;
        this.storage.apply(
            new Directives().xpath(
                String.format(
                    "/github/repos/repo[@coords='%s']",
                    this.coords
                )
            ).addIf("git")
View Full Code Here

    ) throws IOException {
        this.storage = stg;
        this.self = login;
        this.coords = rep;
        this.storage.apply(
            new Directives().xpath(
                String.format(
                    "/github/repos/repo[@coords='%s']",
                    this.coords
                )
            ).addIf("issues")
View Full Code Here

TOP

Related Classes of org.xembly.Directives

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.