Package com.google.enterprise.connector.spi

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


        doc);
    assertTrue(filter.getPropertyNames().toString(),
        filter.getPropertyNames().contains("nonExistentProperty"));
    Property unpublished = filter.findProperty("nonExistentProperty");
    assertNotNull(unpublished);
    assertEquals("", unpublished.nextValue().toString());
    assertNull(unpublished.nextValue());
  }

  /**
   * Creates a {@link SimpleDocument} with the id of "dummy" and the
View Full Code Here


    assertTrue(filter.getPropertyNames().toString(),
        filter.getPropertyNames().contains("nonExistentProperty"));
    Property unpublished = filter.findProperty("nonExistentProperty");
    assertNotNull(unpublished);
    assertEquals("", unpublished.nextValue().toString());
    assertNull(unpublished.nextValue());
  }

  /**
   * Creates a {@link SimpleDocument} with the id of "dummy" and the
   * non-public property "nonExistentProperty" that has the value "dummy".
View Full Code Here

      Map<String, List<Value>> expectedProps) throws Exception {
    for (Map.Entry<String, List<Value>> entry : expectedProps.entrySet()) {
      Property prop = document.findProperty(entry.getKey());
      assertNotNull(prop);
      for (Value expectedValue : entry.getValue()) {
        Value value = prop.nextValue();
        assertNotNull(value);
        if (value instanceof BinaryValue) {
          assertEquals(getStringFromBinaryValue(expectedValue),
              getStringFromBinaryValue(value));
        } else {
View Full Code Here

              getStringFromBinaryValue(value));
        } else {
          assertEquals(expectedValue.toString(), value.toString());
        }
      }
      assertNull(prop.nextValue());
    }
  }

  protected static String getStringFromBinaryValue(Value value)
      throws Exception {
View Full Code Here

      throws RepositoryException {
    LinkedList<Value> values = new LinkedList<Value>();
    Property prop = source.findProperty(name);
    if (prop != null) {
      Value value;
      while ((value = prop.nextValue()) != null) {
        values.add(value);
      }
    }
    return values;
  }
View Full Code Here

      // MockUserProfileGenerator happens to return bare usernames here.
      names.add(socialDoc.getUserContent().toString());

      Property propDocId = doc.findProperty(SpiConstants.PROPNAME_DOCID);
      assertNotNull(propDocId);
      String docid = propDocId.nextValue().toString();
      assertTrue(docid, docid.startsWith("social"));
    }
  }

View Full Code Here

        while (pm != null) {
          System.out.println("<document>");
          final Property lastModProp = pm.findProperty(SpiConstants.PROPNAME_LASTMODIFIED);
          if (lastModProp != null) {
            System.out.println("<lastModify>"
                + lastModProp.nextValue().toString() + "</lastModify>");
          }
          final Property docProp = pm.findProperty(SpiConstants.PROPNAME_DOCID);
          if (lastModProp != null) {
            System.out.println("<docId>" + docProp.nextValue().toString()
                + "</docId>");
View Full Code Here

            System.out.println("<lastModify>"
                + lastModProp.nextValue().toString() + "</lastModify>");
          }
          final Property docProp = pm.findProperty(SpiConstants.PROPNAME_DOCID);
          if (lastModProp != null) {
            System.out.println("<docId>" + docProp.nextValue().toString()
                + "</docId>");
          }
          final Property searchUrlProp = pm.findProperty(SpiConstants.PROPNAME_SEARCHURL);
          if (searchUrlProp != null) {
            System.out.println("<searchUrl>"
View Full Code Here

                + "</docId>");
          }
          final Property searchUrlProp = pm.findProperty(SpiConstants.PROPNAME_SEARCHURL);
          if (searchUrlProp != null) {
            System.out.println("<searchUrl>"
                + searchUrlProp.nextValue().toString() + "</searchUrl>");
          }
          final Property listGuidProp = pm.findProperty(SPConstants.LIST_GUID);
          if (listGuidProp != null) {
            System.out.println("<listGuid>"
                + listGuidProp.nextValue().toString() + "</listguid>");
View Full Code Here

                + searchUrlProp.nextValue().toString() + "</searchUrl>");
          }
          final Property listGuidProp = pm.findProperty(SPConstants.LIST_GUID);
          if (listGuidProp != null) {
            System.out.println("<listGuid>"
                + listGuidProp.nextValue().toString() + "</listguid>");
          }
          final Property displayUrlProp = pm.findProperty(SpiConstants.PROPNAME_DISPLAYURL);
          if (displayUrlProp != null) {
            System.out.println("<displayUrl>"
                + displayUrlProp.nextValue().toString() + "</displayUrl>");
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.