Package edu.stanford.bmir.protege.web.client.ui.library.suggest

Examples of edu.stanford.bmir.protege.web.client.ui.library.suggest.EntitySuggestion


                    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


        view.setMode(PrimitiveDataEditorView.Mode.SINGLE_LINE);
        view.setSuggestOracle(entitySuggestOracle);
        view.addSelectionHandler(new SelectionHandler<EntitySuggestion>() {
            @Override
            public void onSelection(SelectionEvent<EntitySuggestion> event) {
                EntitySuggestion suggestion = event.getSelectedItem();
                selectedSuggestion = Optional.of(suggestion);
                setCurrentData(Optional.<OWLPrimitiveData>of(suggestion.getEntity()), EventStrategy.FIRE_EVENTS);
            }
        });
        view.addValueChangeHandler(new ValueChangeHandler<String>() {
            @Override
            public void onValueChange(ValueChangeEvent<String> event) {
View Full Code Here

    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

TOP

Related Classes of edu.stanford.bmir.protege.web.client.ui.library.suggest.EntitySuggestion

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.