Examples of Search


Examples of aima.core.search.framework.Search

            EightPuzzleFrame.SEARCH_SEL);
        Problem problem = new Problem(env.getBoard(),
            EightPuzzleFunctionFactory.getActionsFunction(),
            EightPuzzleFunctionFactory.getResultFunction(),
            new EightPuzzleGoalTest());
        Search search = SEARCH_ALGOS.get(pSel);
        agent = new SearchAgent(problem, search);
        env.addAgent(agent);
      }
    }
View Full Code Here

Examples of ca.uhn.fhir.rest.annotation.Search

  }

  @SuppressWarnings("unchecked")
  public static BaseMethodBinding bindMethod(Method theMethod, FhirContext theContext, Object theProvider) {
    Read read = theMethod.getAnnotation(Read.class);
    Search search = theMethod.getAnnotation(Search.class);
    Metadata conformance = theMethod.getAnnotation(Metadata.class);
    Create create = theMethod.getAnnotation(Create.class);
    Update update = theMethod.getAnnotation(Update.class);
    Delete delete = theMethod.getAnnotation(Delete.class);
    History history = theMethod.getAnnotation(History.class);
    // ** if you add another annotation above, also add it to the next line:
    if (!verifyMethodHasZeroOrOneOperationAnnotation(theMethod, read, search, conformance, create, update, delete, history)) {
      return null;
    }

    Class<? extends IResource> returnType;

    Class<? extends IResource> returnTypeFromRp = null;
    if (theProvider instanceof IResourceProvider) {
      returnTypeFromRp = ((IResourceProvider) theProvider).getResourceType();
      if (!verifyIsValidResourceReturnType(returnTypeFromRp)) {
        throw new ConfigurationException("getResourceType() from " + IResourceProvider.class.getSimpleName() + " type " + theMethod.getDeclaringClass().getCanonicalName() + " returned "
            + toLogString(returnTypeFromRp) + " - Must return a resource type");
      }
    }

    Class<?> returnTypeFromMethod = theMethod.getReturnType();
    if (MethodOutcome.class.equals(returnTypeFromMethod)) {
      // returns a method outcome
    }else if (Bundle.class.equals(returnTypeFromMethod)) {
      // returns a bundle
    }else if (void.class.equals(returnTypeFromMethod)) {
      // returns a bundle
    } else if (Collection.class.isAssignableFrom(returnTypeFromMethod)) {
      returnTypeFromMethod = ReflectionUtil.getGenericCollectionTypeOfMethodReturnType(theMethod);
      if (!verifyIsValidResourceReturnType(returnTypeFromMethod)) {
        throw new ConfigurationException("Method '" + theMethod.getName() + "' from " + IResourceProvider.class.getSimpleName() + " type " + theMethod.getDeclaringClass().getCanonicalName()
            + " returns a collection with generic type " + toLogString(returnTypeFromMethod) + " - Must return a resource type or a collection (List, Set) of a resource type");
      }
    } else {
      if (!verifyIsValidResourceReturnType(returnTypeFromMethod)) {
        throw new ConfigurationException("Method '" + theMethod.getName() + "' from " + IResourceProvider.class.getSimpleName() + " type " + theMethod.getDeclaringClass().getCanonicalName()
            + " returns " + toLogString(returnTypeFromMethod) + " - Must return a resource type");
      }
    }

    Class<? extends IResource> returnTypeFromAnnotation = IResource.class;
    if (read != null) {
      returnTypeFromAnnotation = read.type();
    } else if (search != null) {
      returnTypeFromAnnotation = search.type();
    } else if (history != null) {
      returnTypeFromAnnotation = history.type();
    } else if (delete != null) {
      returnTypeFromAnnotation = delete.type();
    } else if (create != null) {
      returnTypeFromAnnotation = create.type();
    } else if (update != null) {
      returnTypeFromAnnotation = update.type();
    }

    if (returnTypeFromRp != null) {
      if (returnTypeFromAnnotation != null && returnTypeFromAnnotation != IResource.class) {
        if (!returnTypeFromRp.isAssignableFrom(returnTypeFromAnnotation)) {
          throw new ConfigurationException("Method '" + theMethod.getName() + "' in type " + theMethod.getDeclaringClass().getCanonicalName() + " returns type "
              + returnTypeFromMethod.getCanonicalName() + " - Must return " + returnTypeFromRp.getCanonicalName() + " (or a subclass of it) per IResourceProvider contract");
        }
        if (!returnTypeFromRp.isAssignableFrom(returnTypeFromAnnotation)) {
          throw new ConfigurationException("Method '" + theMethod.getName() + "' in type " + theMethod.getDeclaringClass().getCanonicalName() + " claims to return type "
              + returnTypeFromAnnotation.getCanonicalName() + " per method annotation - Must return " + returnTypeFromRp.getCanonicalName()
              + " (or a subclass of it) per IResourceProvider contract");
        }
        returnType = returnTypeFromAnnotation;
      } else {
        returnType = returnTypeFromRp;
      }
    } else {
      if (returnTypeFromAnnotation != IResource.class) {
        if (!verifyIsValidResourceReturnType(returnTypeFromAnnotation)) {
          throw new ConfigurationException("Method '"+theMethod.getName() + "' from " + IResourceProvider.class.getSimpleName() + " type " + theMethod.getDeclaringClass().getCanonicalName() + " returns "
              + toLogString(returnTypeFromAnnotation) + " according to annotation - Must return a resource type");
        }
        returnType=returnTypeFromAnnotation;
      } else {
        returnType = (Class<? extends IResource>) returnTypeFromMethod;
      }
    }

    if (read != null) {
      return new ReadMethodBinding(returnType, theMethod, theContext, theProvider);
    } else if (search != null) {
      String queryName = search.queryName();
      return new SearchMethodBinding(returnType, theMethod, queryName, theContext, theProvider);
    } else if (conformance != null) {
      return new ConformanceMethodBinding(theMethod, theContext, theProvider);
    } else if (create != null) {
      return new CreateMethodBinding(theMethod, theContext, theProvider);
View Full Code Here

Examples of com.centraview.search.Search

      this.put("TimeSpan", timeSpanColl);

      SearchHome sh = (SearchHome)CVUtility.getHomeObject("com.centraview.search.SearchHome",
          "Search");
      Search rmt = sh.create();
      rmt.setDataSource(this.dataSource);
      HashMap hmp = rmt.getTableIdsAndNames();
      this.put("Tables", hmp);

      setSupportLists();

      AccountHelperHome hm = (AccountHelperHome)CVUtility.getHomeObject(
View Full Code Here

Examples of com.centraview.search.Search

    this.dataSource = dataSource;
    this.finalMapping = new HashMap();
    SearchHome searchHome = (SearchHome)CVUtility.getHomeObject("com.centraview.search.SearchHome", "Search");
    try
    {
      Search searchRemote = (Search)searchHome.create();
      searchRemote.setDataSource(this.dataSource);
      this.finalMapping = searchRemote.getFinalMapping();
    } catch (Exception e) {
      logger.error("[DataDictionary] Exception thrown.", e);   
    }
  }
View Full Code Here

Examples of com.centraview.search.Search

    MasterDictionary mdir = null;
    SearchHome yy = (SearchHome)CVUtility.getHomeObject("com.centraview.search.SearchHome", "Search");
    try
    {
      Search remote = (Search)yy.create();
      remote.setDataSource(this.dataSource);
      mdir = remote.getMasterDictionary();
    } catch (Exception e) {
      logger.error("[getAdvanceQuery] Exception thrown.", e);
    }

    SearchCollection scol = new SearchCollection();
View Full Code Here

Examples of com.cos399.sumo.behaviors.Search

  }
 
  private void initializeSumoCompetition() {
    Behavior startupBehavior = new Startup();
    Behavior contactBehavior = new Contact();
    Behavior searchBehavior = new Search();
    Behavior[] behaviorArray = {startupBehavior, contactBehavior, searchBehavior};
   
    SumoProperties sp = SumoProperties.getInstance();
    SensorInitializer.initializeSensors();
   
View Full Code Here

Examples of com.flaptor.indextank.api.resources.Search

    protected void map() {

        get("/indexes/:name/autocomplete", new Autocomplete());

        get("/indexes/:name/search", new Search());

        put("/indexes/:name/docs", new Docs());

        delete("/indexes/:name/docs", new DeleteDocs());
       
View Full Code Here

Examples of com.gnizr.core.search.Search

    bmManager = new BookmarkManager(getGnizrDao());
  }
  protected void setUp() throws Exception {
    super.setUp();
    action = new ClusterSearchResult();
    action.setSearch(new Search(getGnizrDao()));
   
    User user1 = new User(1);
    Link link1 = new Link(1);
    Link link2 = new Link(2);
    Link link3 = new Link(3);
View Full Code Here

Examples of com.gnizr.core.search.Search

    super.setUp();
    userManager = new UserManager(getGnizrDao());
    GnizrConfiguration config = new GnizrConfiguration();
    config.setWebApplicationUrl("http://foo.com/gnizr");
   
    search = new Search(getGnizrDao());
   
    action = new SearchBookmark();   
    action.setSearch(search);
    action.setGnizrConfiguration(config);
    action.setSession(session);
View Full Code Here

Examples of com.psddev.cms.tool.Search

    @Override
    @SuppressWarnings("unchecked")
    protected void doService(ToolPageContext page) throws IOException, ServletException {
        List<UUID> ids = page.params(UUID.class, ContentSearchAdvanced.ITEMS_PARAMETER);
        Query<?> query = ids.isEmpty() ? new Search(page).toQuery(page.getSite()) : Query.fromAll().where("_id = ?", ids);
        long count = query.count();
        ObjectType type = ObjectType.getInstance(page.param(UUID.class, "typeId"));
        State state = State.getInstance(type.createObject(page.param(UUID.class, "id")));

        state.clear();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.