Search in sources :

Example 6 with EntityLookupRequest

use of edu.stanford.bmir.protege.web.shared.entity.EntityLookupRequest in project webprotege by protegeproject.

the class EntityLookupRequestTestCase method suppliedSearchedEntityTypesIsCopied.

@Test
public void suppliedSearchedEntityTypesIsCopied() {
    Set<EntityType<?>> types = new HashSet<EntityType<?>>();
    types.add(EntityType.CLASS);
    Set<EntityType<?>> typesCopy = new HashSet<EntityType<?>>(types);
    EntityLookupRequest request = new EntityLookupRequest("Test", SearchType.SUB_STRING_MATCH_IGNORE_CASE, 20, types);
    types.add(EntityType.OBJECT_PROPERTY);
    assertEquals(typesCopy, request.getSearchedEntityTypes());
}
Also used : EntityType(org.semanticweb.owlapi.model.EntityType) EntityLookupRequest(edu.stanford.bmir.protege.web.shared.entity.EntityLookupRequest) HashSet(java.util.HashSet) Test(org.junit.Test)

Example 7 with EntityLookupRequest

use of edu.stanford.bmir.protege.web.shared.entity.EntityLookupRequest in project webprotege by protegeproject.

the class EntityLookupRequestTestCase method getSearchLimitReturnsSuppliedSearchLimit.

@Test
public void getSearchLimitReturnsSuppliedSearchLimit() {
    EntityLookupRequest request = new EntityLookupRequest("Test", SearchType.SUB_STRING_MATCH_IGNORE_CASE, 5, Arrays.asList(EntityType.CLASS));
    assertEquals(5, request.getSearchLimit());
}
Also used : EntityLookupRequest(edu.stanford.bmir.protege.web.shared.entity.EntityLookupRequest) Test(org.junit.Test)

Example 8 with EntityLookupRequest

use of edu.stanford.bmir.protege.web.shared.entity.EntityLookupRequest in project webprotege by protegeproject.

the class CommentAutoCompleter method lookUpEntities.

private static EntityLookupRequest lookUpEntities(String lastWord) {
    EntityLookupRequest req = new EntityLookupRequest(lastWord, SearchType.getDefault());
    GWT.log("[CommentAutoCompleter] Request: " + req);
    return req;
}
Also used : EntityLookupRequest(edu.stanford.bmir.protege.web.shared.entity.EntityLookupRequest)

Aggregations

EntityLookupRequest (edu.stanford.bmir.protege.web.shared.entity.EntityLookupRequest)8 Test (org.junit.Test)7 HashSet (java.util.HashSet)2 EntityType (org.semanticweb.owlapi.model.EntityType)2