Examples of RevisionResult


Examples of de.zib.scalaris.examples.wikipedia.RevisionResult

            if (pageCache.containsKey(pageName)) {
                return pageCache.get(pageName);
            } else {
                String text = null;
                // System.out.println("retrievePage(" + namespace + ", " + articleName + ")");
                RevisionResult getRevResult = ScalarisDataHandler.getRevision(connection, pageName, this.getNamespace());
                addStats(getRevResult.stats);
                if (getRevResult.success) {
                    text = getRevResult.revision.unpackedText();
                    final Matcher matcher = MATCH_WIKI_REDIRECT.matcher(text);
                    if (getRevResult.page.isRedirect() && matcher.matches()) {
View Full Code Here

Examples of de.zib.scalaris.examples.wikipedia.RevisionResult

     *         string for the redirect
     */
    @Override
    public String getRedirectContent(String pageName) {
        if (connection != null) {
            RevisionResult getRevResult = ScalarisDataHandler.getRevision(connection, pageName, this.getNamespace());
            addStats(getRevResult.stats);
            if (getRevResult.success) {
                // make PAGENAME in the redirected content work as expected
                setPageName(pageName);
                return getRevResult.revision.unpackedText();
View Full Code Here

Examples of de.zib.scalaris.examples.wikipedia.RevisionResult

        // get renderer
        int render = getParam_renderer(request);
        // get revision id to load:
        int req_oldid = getParam_oldid(request);

        RevisionResult result = getRevision(connection, title, req_oldid, namespace);
        page.addStats(result.stats);
       
        if (result.connect_failed) {
            setParam_error(request, "ERROR: DB connection failed");
            showEmptyPage(request, response, page);
View Full Code Here

Examples of de.zib.scalaris.examples.wikipedia.RevisionResult

            WikiPageBean page) throws ServletException, IOException {
        // get renderer
        int render = getParam_renderer(request);
        String notExistingTitle = "MediaWiki:Noarticletext";

        RevisionResult result = getRevision(connection, notExistingTitle, namespace);
        page.addStats(result.stats);
       
        if (result.success) {
            renderRevision(title, result.revision, render, request, connection, page);
        } else if (result.connect_failed) {
View Full Code Here

Examples of de.zib.scalaris.examples.wikipedia.RevisionResult

            HttpServletResponse response, String title, Connection connection,
            WikiPageEditBean page) throws ServletException, IOException {
        // get revision id to load:
        int req_oldid = getParam_oldid(request);

        RevisionResult result = getRevision(connection, title, req_oldid, namespace);
        page.addStats(result.stats);
        if (result.connect_failed) {
            setParam_error(request, "ERROR: DB connection failed");
            showEmptyPage(request, response, page);
            return;
View Full Code Here

Examples of de.zib.scalaris.examples.wikipedia.RevisionResult

       
        /*
         * Technical metadata / Latest revision to current page
         */
        if (name.equals(MAGIC_PAGE_SIZE)) {
            RevisionResult getRevResult = ScalarisDataHandler.getRevision(
                    model.connection, parameter, model.getNamespace());
            model.addStats(getRevResult.stats);
            int size = 0;
            if (getRevResult.success) {
                size = getRevResult.revision.unpackedText().getBytes().length;
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.