Package edu.stanford.bmir.protege.web.shared.entity

Examples of edu.stanford.bmir.protege.web.shared.entity.OWLEntityData


                if (suggestion.isPresent()) {
                    result.add(suggestion.get());
                }
            }
            OWLEntity entity = DataFactory.getFreshOWLEntity(type, query);
            OWLEntityData entityData = DataFactory.getOWLEntityData(entity, query);
            result.add(new EntitySuggestion(entityData, formatSuggestText(query, type)));
        }
        return result;
    }
View Full Code Here


    }

    private Optional<FreshEntitySuggestion> getSuggestion(String query, EntityType<?> type, Optional<OWLEntityData> auxiliaryType) {
        // TODO: If query starts with a lowercase letter, suggest individual first?
        OWLEntity entity = DataFactory.getFreshOWLEntity(type, query);
        OWLEntityData entityData = DataFactory.getOWLEntityData(entity, query);
        if(auxiliaryType.isPresent()) {
            AuxiliaryTypeHandler auxiliaryTypeHandler = AuxiliaryTypeHandler.get(auxiliaryType.get());
            if(auxiliaryTypeHandler.isApplicableTo(type)) {
                Set<OWLAxiom> augmentingAxioms = auxiliaryTypeHandler.getAdditionalAxioms(entity);
                return Optional.of(new FreshEntitySuggestion(entityData, auxiliaryTypeHandler.getSuggestionText(entityData), augmentingAxioms));
View Full Code Here

    public Map<OWLEntity, OWLEntityData> getMap() {
        return map;
    }

    public Optional<OWLEntityData> getEntityData(OWLEntity entity) {
        final OWLEntityData entityData = map.get(entity);
        if(entityData == null) {
            return Optional.absent();
        }
        else {
            return Optional.of(entityData);
View Full Code Here

    @Override
    public void execute(GetRendering request, final AsyncCallback<GetRenderingResponse> async) {
        Set<OWLEntity> toFetch = new HashSet<OWLEntity>();
        final Map<OWLEntity, OWLEntityData> cachedResult = new HashMap<OWLEntity, OWLEntityData>();
        for(OWLEntity entity : request.getEntities()) {
            OWLEntityData entityData = cache.getIfPresent(entity);
            if(entityData == null) {
                toFetch.add(entity);
            }
            else {
                cachedResult.put(entity, entityData);
View Full Code Here

    @Override
    public List<EntitySuggestion> getSuggestions(String query, List<EntityType<?>> suggestedTypes) {
        List<EntitySuggestion> suggestions = Lists.newArrayList();
        for(EntityType<?> allowedType : suggestedTypes) {
                OWLEntity entity = DataFactory.getFreshOWLEntity(allowedType, query);
                OWLEntityData entityData = DataFactory.getOWLEntityData(entity, query);
                suggestions.add(new EntitySuggestion(entityData, formatSuggestText(query, allowedType)));
        }
        return suggestions;
    }
View Full Code Here

            return;
        }
        Optional<OWLEntityData> previousEntity = rootEntity;
        rootEntity = nextRoot;
        if(nextRoot.isPresent()) {
            OWLEntityData nextRootEntity = nextRoot.get();
            mostRecentRootEntityByTypeMap.put(nextRootEntity.getEntity().getEntityType(), nextRootEntity);
        }
        // Fire event
        RootEntityChangedEvent event = new RootEntityChangedEvent(previousEntity, rootEntity, source);
        eventBus.fireEvent(event);
    }
View Full Code Here

        if (!selection.isPresent()) {
            MessageBox.alert("Please select first a property to delete.");
            return;
        }

        final OWLEntityData entityData = selection.get();

        if (!(entityData instanceof OWLPropertyData)) {
            // Better safe than sorry
            return;
        }
View Full Code Here

            checkNotNull(targetEntity);
            checkNotNull(noteContent);
            checkNotNull(author);
            AnnotatableThing target = getAnnotatableThing(targetEntity);
            Note note = addNoteToTarget(target, noteContent, author, timestamp);
            OWLEntityData entityData = DataFactory.getOWLEntityData(targetEntity, project.getRenderingManager().getBrowserText(targetEntity));
            final NotePostedEvent evt = new NotePostedEvent(project.getProjectId(), Optional.of(entityData), new NoteDetails(note.getHeader(), note.getContent()));
            project.getEventManager().postEvent(evt);
            return note;
        }
        catch (NotesException e) {
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.shared.entity.OWLEntityData

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.