Package com.google.enterprise.connector.spi

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


  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

  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

  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

  }
 
  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

        SpiConstants.ActionType.ADD, null);

    Property property = dctmSpm.findProperty("keywords");
    Value val = null;

    while ((val = property.nextValue()) != null) {
      // TOOD: compare val.toString() to expected keywords.
    }

    property = dctmSpm.findProperty("r_object_id");
    assertEquals(DmInitialize.DM_ID2, property.nextValue().toString());
View Full Code Here

    while ((val = property.nextValue()) != null) {
      // TOOD: compare val.toString() to expected keywords.
    }

    property = dctmSpm.findProperty("r_object_id");
    assertEquals(DmInitialize.DM_ID2, property.nextValue().toString());

    property = dctmSpm.findProperty(SpiConstants.PROPNAME_DOCID);
    assertEquals(DmInitialize.DM_VSID2, property.nextValue().toString());
  }
}
View Full Code Here

    property = dctmSpm.findProperty("r_object_id");
    assertEquals(DmInitialize.DM_ID2, property.nextValue().toString());

    property = dctmSpm.findProperty(SpiConstants.PROPNAME_DOCID);
    assertEquals(DmInitialize.DM_VSID2, property.nextValue().toString());
  }
}
View Full Code Here

  }

  public void testFindProperty_docid() throws RepositoryException {
    Property property = document.findProperty(SpiConstants.PROPNAME_DOCID);
    assertNotNull(property);
    Value value = property.nextValue();
    assertNotNull(value);
    assertEquals(DmInitialize.DM_ID1, value.toString());
  }

  public void testFindProperty_folder() throws RepositoryException {
View Full Code Here

      property = document.findProperty(SpiConstants.PROPNAME_FOLDER);
    } catch (Exception e) {
      return;
    }
    assertNotNull(property);
    Value value = property.nextValue();
    assertNotNull(value);
  }

  public void testFindProperty_objectId() throws RepositoryException {
    Property property =
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.