Package com.google.enterprise.connector.spi

Examples of com.google.enterprise.connector.spi.Value


  public List<Value> getPropertyValues(Document source, String name)
      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


    }

    @Override
    public Value nextValue() throws RepositoryException {
      // Look for a pattern match in any of the property values.
      Value value = property.nextValue();
      if (value != null) {
        // Use matcher.matches() or matcher.find()?  I choose the latter
        // because you can get the behaviour of the former using \A and \Z
        // in the pattern.
        if (pattern.matcher(Strings.nullToEmpty(value.toString())).find()
            ^ !skipOnMatch) {
          throw new SkippedDocumentException("Skipping document based upon "
              + "property " + propertyName + " value: " + value.toString());
        }
        if (!isPublished) {
          value = Value.getStringValue("");
        }
      }
View Full Code Here

          isPublic ? VALUE_TRUE : VALUE_FALSE);

      if (connector.getFeedType() == FeedType.CONTENTURL) {
        // If we are not using content feeds, don't supply the content yet.
        // TODO: What about SkippedDocumentExceptions?
        Value value = Value.getStringValue(FeedType.CONTENTURL.toString());
        props.addProperty(SpiConstants.PROPNAME_FEEDTYPE, value);
      } else {
        // Fetch the content.
        collectContentProperty();
      }
View Full Code Here

      // If we pass the gauntlet, create a content stream property and
      // add it to the property map. The size parameter is an int, but
      // it is only a hint, so cap the long value at Integer.MAX_VALUE.
      InputStream is = contentHandler.getInputStream(volumeId, objectId, 0,
          Ints.saturatedCast(size));
      Value contentValue = Value.getBinaryValue(is);
      props.addProperty(SpiConstants.PROPNAME_CONTENT, contentValue);
    }
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.spi.Value

Copyright © 2018 www.massapicom. 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.