Examples of SimpleProperty


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

      List categoryList = new LinkedList();
      for (Iterator ci = entry.getCategories().iterator(); ci.hasNext(); ) {
        Category category = (Category) ci.next();
        categoryList.add( Value.getStringValue(category.getTerm()) );
      }
      map.put(PROPNAME_CATEGORY, new SimpleProperty(categoryList));
    }
   
    if (entry.getAuthors() != null) {
      List authorList = new LinkedList();
      for (Iterator ai = entry.getAuthors().iterator(); ai.hasNext(); ) {
        Person person = (Person) ai.next();
        authorList.add(Value.getStringValue(person.getName()) );
        if (person.getEmail() != null) {
          authorList.add(Value.getStringValue( person.getEmail()) );
        }
      }
      map.put(PROPNAME_AUTHOR, new SimpleProperty(authorList));
    }

    return new SimpleDocument(map);
  }
View Full Code Here

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

  /** Make a SimpleProperty with one value using the given string. */
  public static Property makeProperty(String str) {
    List strList = new LinkedList();
    strList.add(Value.getStringValue(str));
    return new SimpleProperty(strList);
  }
View Full Code Here

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

    } catch (IOException ioe) {
      throw new RepositoryException(ioe);
    }
    List list = new LinkedList();
    list.add(Value.getBinaryValue(stream.toByteArray()));
    return new SimpleProperty(list);
  }
View Full Code Here

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

   * Make a SimpleProperty with one value using the given byte array directly.
   */
  public static Property makeProperty(byte [] bytes) {
    List list = new LinkedList();
    list.add(Value.getBinaryValue(bytes));
    return new SimpleProperty(list);
  }
View Full Code Here

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

    }

    if (logger.isLoggable(Level.FINE)) {
      logger.fine("property " + name + " has the values " + values);
    }
    return values.isEmpty() ? null : new SimpleProperty(values);
  }
View Full Code Here

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

  public Property findProperty(String name) throws RepositoryException {
    // Maintain the ability to check docProps directly for testing.
    List<Value> list = docProps.get(name);
    Property prop = null;
    if (list != null) {
      prop = new SimpleProperty(list);
    }
    return prop;
  }
View Full Code Here

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

    LinkedList<Value> list = new LinkedList<Value>();

    LOGGER.log(Level.FINEST, "Find ACL property: {0}", name);
    if (SpiConstants.PROPNAME_DOCUMENTTYPE.equals(name)) {
      list.add(Value.getStringValue(SpiConstants.DocumentType.ACL.toString()));
      return new SimpleProperty(list);
    } else if (SpiConstants.PROPNAME_ACTION.equals(name)) {
      list.add(Value.getStringValue(ActionType.ADD.toString()));
      return new SimpleProperty(list);
    } else if (SpiConstants.PROPNAME_DOCID.equals(name)) {
      list.add(Value.getStringValue(docId));
      return new SimpleProperty(list);
    } else if (SpiConstants.PROPNAME_ACLINHERITFROM_DOCID.equals(name)) {
      if (parentId == null) {
        return null;
      } else {
        list.add(Value.getStringValue(parentId));
        return new SimpleProperty(list);
      }
    } else if (SpiConstants.PROPNAME_ACLINHERITANCETYPE.equals(name)) {
      list.add(Value.getStringValue(inheritanceType.toString()));
      return new SimpleProperty(list);
    } else if (SpiConstants.PROPNAME_ACLUSERS.equals(name)) {
      if (allowUsers.isEmpty()) {
        return null;
      } else {
        FileUtil.addPrincipals(list, PrincipalType.UNKNOWN,
            googleGlobalNamespace, allowUsers,
            CaseSensitivityType.EVERYTHING_CASE_INSENSITIVE);
        return new SimpleProperty(list);
      }
    } else if (SpiConstants.PROPNAME_ACLDENYUSERS.equals(name)) {
      if (denyUsers.isEmpty()) {
        return null;
      } else {
        FileUtil.addPrincipals(list, PrincipalType.UNKNOWN,
            googleGlobalNamespace, denyUsers,
            CaseSensitivityType.EVERYTHING_CASE_INSENSITIVE);
        return new SimpleProperty(list);
      }
    } else if (SpiConstants.PROPNAME_ACLGROUPS.equals(name)) {
      if (allowGroups.isEmpty()) {
        return null;
      } else {
        FileUtil.addPrincipals(list, PrincipalType.UNKNOWN,
            googleGlobalNamespace, allowGroups,
            CaseSensitivityType.EVERYTHING_CASE_INSENSITIVE);
        return new SimpleProperty(list);
      }
    } else if (SpiConstants.PROPNAME_ACLDENYGROUPS.equals(name)) {
      if (denyGroups.isEmpty()) {
        return null;
      } else {
        FileUtil.addPrincipals(list, PrincipalType.UNKNOWN,
            googleGlobalNamespace, denyGroups,
            CaseSensitivityType.EVERYTHING_CASE_INSENSITIVE);
        return new SimpleProperty(list);
      }
    } else {
      return null;
    }
  }
View Full Code Here

Examples of com.simpleplugin.psi.SimpleProperty

                SimpleFile simpleFile = (SimpleFile) PsiManager.getInstance(project).findFile(file);
                ASTNode lastChildNode = simpleFile.getNode().getLastChildNode();
                if (lastChildNode != null && !lastChildNode.getElementType().equals(SimpleTypes.CRLF)) {
                    simpleFile.getNode().addChild(SimpleElementFactory.createCRLF(project).getNode());
                }
                SimpleProperty property = SimpleElementFactory.createProperty(project, key, "");
                simpleFile.getNode().addChild(property.getNode());
                ((Navigatable) property.getLastChild().getNavigationElement()).navigate(true);
                FileEditorManager.getInstance(project).getSelectedTextEditor().getCaretModel().
                        moveCaretRelatively(2, 0, false, false, false);
            }
        });
    }
View Full Code Here

Examples of com.vercer.engine.persist.util.SimpleProperty

  public Set<Property> typesafeToProperties(Object object, Path path, boolean indexed)
  {
    if (object instanceof Enum<?>)
    {
      String name = ((Enum<?>) object).name();
      Property property = new SimpleProperty(path, name, indexed);
      return Collections.singleton(property);
    }
    else
    {
      return null;
View Full Code Here

Examples of com.vercer.engine.persist.util.SimpleProperty

          Object value = field.get(object);
          if (value == null)
          {
            if (isNullStored())
            {
              merged.add(new SimpleProperty(path, null, indexed));
            }
            continue;
          }

          value = converters.convert(value, type);
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.