Examples of ResultCache


Examples of edu.stanford.bmir.protege.web.client.dispatch.cache.ResultCache

    private int requestCount;

    private Map<ProjectId, ResultCache> resultCacheMap = new HashMap<ProjectId, ResultCache>();

    private ResultCache getResultCache(ProjectId projectId) {
        ResultCache resultCache = resultCacheMap.get(projectId);
        if(resultCache == null) {
            resultCache = new ResultCache(projectId);
            resultCacheMap.put(projectId, resultCache);
        }
        return resultCache;
    }
View Full Code Here

Examples of edu.stanford.bmir.protege.web.client.dispatch.cache.ResultCache

    @SuppressWarnings("unchecked")
    public <A extends Action<R>, R extends Result> void execute(A action, final AsyncCallback<R> callback) {
        if(action instanceof HasProjectId) {
            ProjectId projectId = ((HasProjectId) action).getProjectId();
            ResultCache resultCache = getResultCache(projectId);
            Optional<R> result = resultCache.getCachedResult(action);
            if(result.isPresent()) {
                GWT.log("[DISPATCH] Using cached result (" + action + ")");
                callback.onSuccess(result.get());
                return;
            }
View Full Code Here

Examples of edu.stanford.bmir.protege.web.client.dispatch.cache.ResultCache

        @Override
        public void onSuccess(DispatchServiceResultContainer result) {
            // TODO: Fix
            if(action instanceof HasProjectId) {
                ResultCache resultCache = getResultCache(((HasProjectId) action).getProjectId());
                resultCache.cacheResult((Action<R>) action, (R) result.getResult());
            }
            cacheRenderables(result.getResult());
            dispatchEvents(result.getResult());
            delegate.onSuccess(result.getResult());
View Full Code Here

Examples of mondrian.web.taglib.ResultCache

    private void processTransform(
        HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException
    {
        String queryName = request.getParameter("query");
        ResultCache rc =
            ResultCache.getInstance(
                request.getSession(), getServletContext(), queryName);
        Query query = rc.getQuery();
        query = query.clone();
        rc.setDirty();
        String operation = request.getParameter("operation");
        if (operation.equals("expand")) {
            String memberName = request.getParameter("member");
            boolean fail = true;
            Member member = query.getSchemaReader(true).getMemberByUniqueName(
                Util.parseIdentifier(memberName), fail);
            if (true) {
                throw new UnsupportedOperationException(
                    "query.toggleDrillState(member) has been de-supported");
            }
        } else {
            throw Util.newInternal("unkown operation '" + operation + "'");
        }
        rc.setQuery(query);
        String redirect = request.getParameter("redirect");
        if (redirect == null) {
            redirect = "/adhoc.jsp";
        }
        response.setHeader("Content-Type", "text/html");
View Full Code Here

Examples of mondrian.web.taglib.ResultCache

    private void processTransform(
        HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException
    {
        String queryName = request.getParameter("query");
        ResultCache rc =
            ResultCache.getInstance(
                request.getSession(), getServletContext(), queryName);
        Query query = rc.getQuery();
        query = query.clone();
        rc.setDirty();
        String operation = request.getParameter("operation");
        if (operation.equals("expand")) {
            String memberName = request.getParameter("member");
            boolean fail = true;
            Member member = query.getSchemaReader(true).getMemberByUniqueName(
                Util.parseIdentifier(memberName), fail);
            if (true) {
                throw new UnsupportedOperationException(
                    "query.toggleDrillState(member) has been de-supported");
            }
        } else {
            throw Util.newInternal("unkown operation '" + operation + "'");
        }
        rc.setQuery(query);
        String redirect = request.getParameter("redirect");
        if (redirect == null) {
            redirect = "/adhoc.jsp";
        }
        response.setHeader("Content-Type", "text/html");
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.