Examples of nextValue()


Examples of com.google.enterprise.connector.spi.Property.nextValue()

    Value v = p.nextValue();
    assertNotNull("property foo value missing", v);
    assertEquals("property foo 1", "foo text 1", v.toString());
    v = p.nextValue();
    assertEquals("property foo 2", "foo text 2", v.toString());
    v = p.nextValue();
    assertEquals("property foo 3", "foo text 3", v.toString());
    assertNull(p.nextValue());
  }

  public void testDeleteDocument() throws Exception {
View Full Code Here

Examples of com.google.enterprise.connector.spi.Property.nextValue()

    assertEquals("property foo 1", "foo text 1", v.toString());
    v = p.nextValue();
    assertEquals("property foo 2", "foo text 2", v.toString());
    v = p.nextValue();
    assertEquals("property foo 3", "foo text 3", v.toString());
    assertNull(p.nextValue());
  }

  public void testDeleteDocument() throws Exception {
    NotesDocumentMock crawlDoc = new NotesDocumentMock();
    crawlDoc.addItem(new NotesItemMock("name", NCCONST.ITM_ACTION,
View Full Code Here

Examples of com.google.enterprise.connector.spi.Property.nextValue()

    Property p = document.findProperty(property);
    assertNotNull("Missing property " + property, p);

    int i = 0;
    Value v;
    while ((v = p.nextValue()) != null) {
      if (i == index) {
        if (v instanceof PrincipalValue) {
          assertEquals(expected, ((PrincipalValue) v).getPrincipal().getName());
        } else {
          assertEquals(expected, v.toString());
View Full Code Here

Examples of com.google.enterprise.connector.spi.Property.nextValue()

  private Principal getFirstPrincipal(NotesConnectorDocument document,
      String propertyName) throws Exception {
    Property property = document.findProperty(propertyName);
    assertNotNull("Missing " + propertyName, property);
    Value value = property.nextValue();
    assertNotNull("Missing value for " + propertyName, value);
    assertTrue("Not PrincipalValue: " + propertyName,
        value instanceof PrincipalValue);
    return ((PrincipalValue) value).getPrincipal();
  }
View Full Code Here

Examples of com.google.enterprise.connector.spi.Property.nextValue()

  private void getDocumentProperty(NotesConnectorDocument doc,
      Collection<String> readers, String propName) throws Exception {
    Property prop = doc.findProperty(propName);
    assertNotNull(prop);
    Value v;
    while ((v = prop.nextValue()) != null) {
      String decoded = URLDecoder.decode(v.toString(), "UTF-8");
      readers.add(decoded.replaceFirst("Domino/", ""));
    }
  }
View Full Code Here

Examples of com.google.enterprise.connector.spi.Property.nextValue()

  private static List<String> getValues(Document doc, String name)
      throws Exception {
    List<String> values = new ArrayList<String>();
    Property p = doc.findProperty(name);
    if (p != null) {
      Value v = p.nextValue();
      if (v != null) {
        values.add(v.toString());
      }
    }
    return values;
View Full Code Here

Examples of com.google.enterprise.connector.spi.Property.nextValue()

  }
 
  private static String getFirstStringValue(Document doc, String key) {
    try {
      Property prop = doc.findProperty(key);
      return prop.nextValue().toString();
    } catch (RepositoryException re) {
      return null;
    }
  }
 
View Full Code Here

Examples of com.google.enterprise.connector.spi.SimpleProperty.nextValue()

  public void testSingleValue() throws Exception {
    Value expected = Value.getStringValue("test1");
    SimpleProperty property = new SimpleProperty(expected);

    // We should get our value back, but only once.
    Value value = property.nextValue();
    assertNotNull(value);
    assertEquals(expected, value);

    // Next fetch should yield null.
    value = property.nextValue();
View Full Code Here

Examples of com.sdicons.json.parser.JSONParser.nextValue()

     * @see de.netseeker.ejoe.adapter.SerializeAdapter#read(java.io.InputStream)
     */
    public Object read( InputStream in ) throws Exception
    {
        JSONParser parser = new JSONParser( in );
        JSONObject jObj = (JSONObject) parser.nextValue();
        Marshall marshaller = new JSONMarshall();
        return marshaller.unmarshall( jObj ).getReference();
    }

    /*
 
View Full Code Here

Examples of com.tinkerpop.furnace.generators.Distribution.nextValue()

        //normal
        Distribution n = new NormalDistribution(2);
        n = n.initialize(numNodes,numEdges);
        int degreeSum = 0;
        for (int i=0;i<numNodes;i++) {
            int degree=n.nextValue(random);
            degreeSum+=degree;
        }
        System.out.println(degreeSum);

        random = new Random(seed);
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.