Package edu.stanford.bmir.protege.web.server.owlapi.change

Examples of edu.stanford.bmir.protege.web.server.owlapi.change.OWLAPIChangeManager


    }


    public List<RevisionSummary> getRevisionSummaries(ProjectId projectId) {
        OWLAPIProject project = getProject(projectId);
        OWLAPIChangeManager changeManager = project.getChangeManager();
        return changeManager.getRevisionSummaries();
    }
View Full Code Here


            File cachedFile = getDownloadCacheFile(format);
            if (!cachedFile.exists()) {
                downloadCacheDirectory.mkdirs();
                // Create
                OWLAPIProject project = OWLAPIProjectManager.getProjectManager().getProject(projectId);
                OWLAPIChangeManager changeManager = project.getChangeManager();
                RevisionNumber currentRevisionNumber = changeManager.getCurrentRevision();

                BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(cachedFile));
                exportProjectRevision(currentRevisionNumber, outputStream, format);
                outputStream.close();
            }
View Full Code Here

        manager.applyChanges(annotater.getChanges());
    }

    private OWLOntologyManager getOntologyManagerForRevision(RevisionNumber revision) {
        OWLAPIProject project = OWLAPIProjectManager.getProjectManager().getProject(projectId);
        OWLAPIChangeManager changeManager = project.getChangeManager();
        return changeManager.getOntologyManagerForRevision(revision);
    }
View Full Code Here

        return PaginationServerUtil.pagedRecords(changes, start, limit, sort, dir);
    }

    public List<ChangeData> getChanges(String projectName, Date start, Date end) {
        OWLAPIProject project = getProject(projectName);
        OWLAPIChangeManager changeManager = project.getChangeManager();
        return changeManager.getChangeDataInTimestampInterval(start.getTime(), end.getTime(), RevisionType.EDIT);
    }
View Full Code Here

        return changeManager.getChangeDataInTimestampInterval(start.getTime(), end.getTime(), RevisionType.EDIT);
    }

    public Integer getNumChanges(String projectName, Date start, Date end) {
        OWLAPIProject project = getProject(projectName);
        OWLAPIChangeManager changeManager = project.getChangeManager();
        long fromTimestamp = start.getTime();
        long toTimestamp = end.getTime();
        return changeManager.getChangeSetCount(fromTimestamp, toTimestamp);
    }
View Full Code Here

        return changeManager.getChangeSetCount(fromTimestamp, toTimestamp);
    }

    public List<ChangeData> getChanges(String projectName, String entityName) {
        OWLAPIProject project = getProject(projectName);
        OWLAPIChangeManager changeManager = project.getChangeManager();
        RenderingManager rm = project.getRenderingManager();
        Set<OWLEntity> entities = rm.getEntities(entityName);
        return changeManager.getChangeDataForEntitiesInTimeStampInterval(entities, 0, Long.MAX_VALUE);
    }
View Full Code Here

     * Watched entities
     */

    public PaginationData<ChangeData> getWatchedEntities(String projectName, String userName, int start, int limit, String sort, String dir) {
        OWLAPIProject project = getProject(projectName);
        OWLAPIChangeManager changeManager = project.getChangeManager();
        final UserId userId = UserId.getUserId(userName);
        Set<Watch<?>> watches = project.getWatchManager().getWatches(userId);
        List<ChangeData> data = changeManager.getChangeDataForWatches(watches);
        return PaginationServerUtil.pagedRecords(data, start, limit, sort, dir);
    }
View Full Code Here

    private void initialiseProjectMachinery() {
        renderingManager = new RenderingManager(this);

        searchManager = new OWLAPISearchManager(this);

        changeManager = new OWLAPIChangeManager(this);

        notesManager = new OWLAPINotesManagerNotesAPIImpl(this);


        // MH: All of this is highly dodgy and not at all thread safe.  It is therefore BROKEN!  Needs fixing.
View Full Code Here

        return result;
    }

    private Set<String> getRevisionAuthorNames() {
        OWLAPIProject project = getProject();
        OWLAPIChangeManager changeManager = project.getChangeManager();
        List<RevisionSummary> revisionSummaries = changeManager.getRevisionSummaries();
        Set<String> authorNames = new HashSet<String>();
        for(RevisionSummary revisionSummary : revisionSummaries) {
            if(revisionSummary.getRevisionNumber().compareTo(revisionNumber) > 0) {
                break;
            }
View Full Code Here

        return authorNames;
    }

    private OWLAnnotation getRevisionDateAnnotation() {
        OWLAPIProject project = getProject();
        OWLAPIChangeManager changeManager = project.getChangeManager();
        RevisionSummary summary = changeManager.getRevisionSummary(revisionNumber);
        long timestamp = summary.getTimestamp();
        DateFormat dateFormat = DateFormat.getDateTimeInstance();
        String date = dateFormat.format(new Date(timestamp));
        OWLDataFactory df = project.getDataFactory();
        return df.getOWLAnnotation(df.getOWLAnnotationProperty(DublinCoreVocabulary.DATE.getIRI()), df.getOWLLiteral(date, OWL2Datatype.XSD_DATE_TIME));
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.server.owlapi.change.OWLAPIChangeManager

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.