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

Examples of edu.stanford.bmir.protege.web.shared.search.EntityNameMatcher$MatchIndexHelper


    private List<EntityLookupResult> lookupEntities(final OWLAPIProject project, final EntityLookupRequest entityLookupRequest) {
        final RenderingManager rm = project.getRenderingManager();
        BidirectionalShortFormProvider sfp = rm.getShortFormProvider();
        Set<OWLEntityDataMatch> matches = new TreeSet<OWLEntityDataMatch>();
        EntityNameMatcher matcher = new EntityNameMatcher(entityLookupRequest.getSearchString());
        for(String shortForm : sfp.getShortForms()) {
            Optional<EntityNameMatchResult> result = matcher.findIn(shortForm);
            if(result.isPresent()) {
                Set<OWLEntity> entities = sfp.getEntities(shortForm);
                for(OWLEntity matchingEntity : entities) {
                    Optional<OWLEntityData> match = toOWLEntityData(matchingEntity, entityLookupRequest, rm);
                    if(match.isPresent()) {
View Full Code Here


        List<AutoCompletionMatch> matches = Lists.newArrayList();
        Set<EntityType<?>> expectedEntityTypes = Sets.newHashSet(ManchesterSyntaxFrameParser.getExpectedEntityTypes(e));
        if(!expectedEntityTypes.isEmpty()) {
            BidirectionalShortFormProvider shortFormProvider = project.getRenderingManager().getShortFormProvider();
            for(String shortForm : shortFormProvider.getShortForms()) {
                EntityNameMatcher entityNameMatcher = new EntityNameMatcher(lastWordPrefix);
                Optional<EntityNameMatchResult> match = entityNameMatcher.findIn(shortForm);
                if(match.isPresent()) {
                    Set<OWLEntity> entities = shortFormProvider.getEntities(shortForm);
                    for(OWLEntity entity : entities) {
                        if(expectedEntityTypes.contains(entity.getEntityType())) {
                            EscapingShortFormProvider escapingShortFormProvider = new EscapingShortFormProvider(shortFormProvider);
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.shared.search.EntityNameMatcher$MatchIndexHelper

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.