Examples of PageReader


Examples of ch.entwine.weblounge.common.impl.content.page.PageReader

          throws IOException, ParserConfigurationException, SAXException {

    InputStream is = null;
    Page page = null;
    try {
      PageReader pageReader = new PageReader();
      is = IOUtils.toInputStream(pageXml, "utf-8");
      page = pageReader.read(is, site);
    } finally {
      IOUtils.closeQuietly(is);
    }

    // Load the composer
View Full Code Here

Examples of io.higgs.http.client.future.PageReader

        if (name == null || source == null) {
            throw new IllegalArgumentException("Name and a data source are both required");
        }
        FutureData<ManagedSource> future = new FutureData<>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(id == null ? CREATE : UPDATE));
        POST request = config.http().POST(uri, new PageReader(newRequestCallback(future, new ManagedSource(), config)))
                .form("source_type", source.type().value())
                .form("name", name);
        if (source.hasParams()) {
            request.form("parameters", source.getParametersAsJSON());
        }
View Full Code Here

Examples of io.higgs.http.client.readers.PageReader

            throw new IllegalArgumentException("A valid ID is required to start a Historics query");
        }
        FutureData<DataSiftResult> future = f != null ? f : new FutureData<DataSiftResult>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(START));
        POST request = config.http()
                .POST(uri, new PageReader(newRequestCallback(future, new BaseDataSiftResult(), config)))
                .form("id", id);
        applyConfig(request).execute();
        return future;
    }
View Full Code Here

Examples of io.higgs.http.client.readers.PageReader

            throw new IllegalArgumentException("A valid ID is required to stop a Historics query");
        }
        FutureData<DataSiftResult> future = new FutureData<>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(STOP));
        POST request = config.http()
                .POST(uri, new PageReader(newRequestCallback(future, new BaseDataSiftResult(), config)))
                .form("id", id);
        if (reason != null) {
            request.form("reason", reason);
        }
        applyConfig(request).execute();
View Full Code Here

Examples of io.higgs.http.client.readers.PageReader

     * validation was successful or not
     */
    public FutureData<Validation> validate(String csdl) {
        FutureData<Validation> future = new FutureData<Validation>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(VALIDATE));
        POST request = config.http().POST(uri, new PageReader(newRequestCallback(future, new Validation(), config)))
                .form("csdl", csdl);
        applyConfig(request).execute();
        return future;
    }
View Full Code Here

Examples of io.higgs.http.client.readers.PageReader

            throw new IllegalArgumentException("A valid ID is required to delete a Historics query");
        }
        FutureData<DataSiftResult> future = new FutureData<>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(DELETE));
        POST request = config.http()
                .POST(uri, new PageReader(newRequestCallback(future, new BaseDataSiftResult(), config)))
                .form("id", id);
        applyConfig(request).execute();
        return future;
    }
View Full Code Here

Examples of io.higgs.http.client.readers.PageReader

            throw new IllegalArgumentException("A valid ID AND name is required to update a Historics query");
        }
        FutureData<DataSiftResult> future = new FutureData<>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(UPDATE));
        POST request = config.http()
                .POST(uri, new PageReader(newRequestCallback(future, new BaseDataSiftResult(), config)))
                .form("id", id)
                .form("name", name);
        applyConfig(request).execute();
        return future;
    }
View Full Code Here

Examples of io.higgs.http.client.readers.PageReader

     * to list the hash for the compiled CSDL
     */
    public FutureData<Stream> compile(String csdl) {
        FutureData<Stream> future = new FutureData<Stream>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(COMPILE));
        POST request = config.http().POST(uri, new PageReader(newRequestCallback(future, new Stream(), config)))
                .form("csdl", csdl);
        applyConfig(request).execute();
        return future;
    }
View Full Code Here

Examples of io.higgs.http.client.readers.PageReader

     */
    public FutureData<HistoricsStatus> status(DateTime start, DateTime end, String... sources) {
        FutureData<HistoricsStatus> future = new FutureData<>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(STATUS));
        POST request = config.http()
                .POST(uri, new PageReader(newRequestCallback(future, new HistoricsStatus(), config)))
                .form("start", MILLISECONDS.toSeconds(start.getMillis()))
                .form("end", MILLISECONDS.toSeconds(end.getMillis()));
        if (sources != null && sources.length > 0) {
            StringBuilder b = new StringBuilder();
            for (String source : sources) {
View Full Code Here

Examples of io.higgs.http.client.readers.PageReader

        if (id == null || id.isEmpty()) {
            throw new IllegalArgumentException("ID is required get a historics query");
        }
        FutureData<HistoricsQuery> future = new FutureData<>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(GET));
        POST request = config.http().POST(uri, new PageReader(newRequestCallback(future, new HistoricsQuery(), config)))
                .form("id", id)
                .form("with_estimate", withEstimate ? 1 : 0);
        applyConfig(request).execute();
        return future;
    }
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.