Examples of find()


Examples of com.ettrema.httpclient.Host.find()

        StreamUtils.readTo(in, fout, true, true);
      }
    }, null);
    System.out.println("meta file: " + fRemoteMeta.getAbsolutePath());
    // Now build local file
    com.ettrema.httpclient.File remoteFile = (com.ettrema.httpclient.File) host.find("/source.txt");
    Assert.assertNotNull(remoteFile);
    HttpRangeLoader rangeLoader = new HttpRangeLoader(remoteFile);

    System.out.println("local: " + fLocal.getAbsolutePath());
    fileMaker.make(fLocal, fRemoteMeta, rangeLoader);
View Full Code Here

Examples of com.firefly.template.ObjectNavigator.find()

   
    Model model = new ModelMock();
    model.put("foo", foo);
   
    ObjectNavigator o = ObjectNavigator.getInstance();
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.info")), is("bar1"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.serialNumber")), is("33"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.price")), is("3.3"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.numbers[2]")), is("5"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.map['bar2'].price")), is("2.3"));
  }
View Full Code Here

Examples of com.firefly.template.support.ObjectNavigator.find()

    model.put("b", map2);
    model.put("arr", arr);
    model.put("list", list);
   
    ObjectNavigator o = ObjectNavigator.getInstance();
    Assert.assertThat(o.find(model, "a").toString(), is("fffff"));
    Assert.assertThat(o.find(model, "b['ccc']").toString(), is("ddd"));
    Assert.assertThat(o.find(model, "b['eee']").toString(), is("fff"));
    Assert.assertThat(o.find(model, "b[\"ccc\"]").toString(), is("ddd"));
    Assert.assertThat((Integer)o.find(model, "arr[2]"), is(333));
    Assert.assertThat(o.find(model, "list[2]").toString(), is("list333"));
View Full Code Here

Examples of com.foundationdb.server.types.service.ReflectiveInstanceFinder.find()

        return new Object[] { tClass, valuefromObject(o, tClass.instance(true)), str, json, literal };
    }

    public static Collection<Object[]> checkParams(TBundleID bundle, Collection<Object[]> params, TClass... ignore) throws Exception {
        ReflectiveInstanceFinder finder = new ReflectiveInstanceFinder();
        Collection<? extends TClass> allTypes = finder.find(TClass.class);
        for(TClass tClass : allTypes) {
            if(tClass.name().bundleId() == bundle) {
                boolean found = false;
                for(Object[] tc : params) {
                    if(tc[0] == tClass) {
View Full Code Here

Examples of com.germinus.mashupbuilder.dao.jdbc.MashupDAO.find()

                Mashup mashupPattern = new Mashup();
                mashupPattern.setId(intId);

                DAOFactory daoFactory = DAOFactory.getDAOFactory(DAOFactory.FactoryType.JDBC);
                MashupDAO mashupDAO = (MashupDAO) daoFactory.getDAO(Mashup.class);
                Mashup mashupFound = mashupDAO.find(mashupPattern);
                if (mashupFound != null) {
                    StringBuilder sb = new StringBuilder();
                    if (callback != null) {
                        sb.append(callback).append("(");
                    } else if (!JSON.equals(json)) {
View Full Code Here

Examples of com.germinus.mashupbuilder.dao.jdbc.PageDAO.find()

                Page pagePattern = new Page();
                pagePattern.setId(intId);

                DAOFactory daoFactory = DAOFactory.getDAOFactory(DAOFactory.FactoryType.JDBC);
                PageDAO pageDAO = (PageDAO) daoFactory.getDAO(Page.class);
                Page pageFound = pageDAO.find(pagePattern);
                if (pageFound != null) {
                    StringBuilder sb = new StringBuilder();
                    if (callback != null) {
                        sb.append(callback).append("(");
                    } else if (!JSON.equals(json)) {
View Full Code Here

Examples of com.gi.server.core.service.mapservice.MapServiceInstance.find()

        ArrayList<FeatureResult> featureResults = null;
        MapServiceInstance instance = (MapServiceInstance) mapService
            .getMapServicePool().checkoutIdleInstance();
        try {
          featureResults = instance.find(layerIdArray, findParam);
        } finally {
          if (instance != null) {
            mapService.getMapServicePool().checkinIdelInstance(
                instance);
          }
View Full Code Here

Examples of com.gistlabs.mechanize.document.json.node.JsonNode.find()

  @Test
  public void testAttributeTilda() throws Exception {
    JsonNode node = build("{ \"a\" : 2, \"b\" : { \"x\" : \"y foo bar\" }, \"results\" : [ { \"a\" : 1 }, { \"b\" : 2 } ] }");

    assertNotNull(node.find("b[x~=\"y\"]"));
    assertEquals(1, node.findAll("b[x~=\"foo\"]").size());
    assertEquals(1, node.findAll("b[x~=\"bar\"]").size());

    assertEquals(0, node.findAll("b[x~=\"baz\"]").size());
  }
View Full Code Here

Examples of com.gistlabs.mechanize.document.link.Links.find()

    AbstractDocument page = agent.get("http://www.wikipedia.org");
    assertNotNull(page);
    assertTrue(page.size() > 10000);
    Links links = page.links();
    assertTrue(links.size() > 10);
    assertNotNull(links.find("*[title*='English']"));
  }

  @Test
  public void testClickingEnglishWikipediaVersionLink() {
    Mechanize agent = new MechanizeAgent();
View Full Code Here

Examples of com.github.jmkgreen.morphia.Datastore.find()

        DBCollection dbColl = dsi.getCollection(c);
        if (!dbColl.getName().equals(dbRef.getRef()))
            log.warning("Class " + c.getName() + " is stored in the '" + dbColl.getName()
                    + "' collection but a reference was found for this type to another collection, '" + dbRef.getRef()
                    + "'. The reference will be loaded using the class anyway. " + dbRef);
        boolean exists = (dsi.find(dbRef.getRef(), c).disableValidation().filter("_id", dbRef.getId()).asKeyList()
                .size() == 1);
        cache.notifyExists(key, exists);
        return exists;
    }
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.