Package org.openntf.domino.types

Examples of org.openntf.domino.types.CaseInsensitiveString


      System.out.println("Scanner reports processing " + scanner.getDocCount() + " documents, " + scanner.getItemCount()
          + " items, and " + scanner.getTokenCount() + " tokens.");
      System.out.println("Built field token map of " + scanner.getFieldTokenMap().size() + " entries");
      Map<?, ?> tfmap = scanner.getTokenLocationMap();
      System.out.println("Built token location map of " + tfmap.size() + " entries");
      CaseInsensitiveString dom = new CaseInsensitiveString("domino");
      if (tfmap.get(dom) != null) {
        int hitCount = 0;
        Map<?, ?> tlvalue = (Map<?, ?>) tfmap.get(dom);
        for (Object key : tlvalue.keySet()) {
          Set<?> hits = (Set<?>) tlvalue.get(key);
View Full Code Here


      Iterable values = (Iterable) value;
      for (Object o : values) {
        if (o instanceof CaseInsensitiveString) {
          result.add((CaseInsensitiveString) o);
        } else if (o instanceof CharSequence) {
          result.add(new CaseInsensitiveString(((CharSequence) o).toString()));
        } else {
          result.add(new CaseInsensitiveString(String.valueOf(o)));
        }
      }
    } else if (value instanceof CaseInsensitiveString) {
      result.add((CaseInsensitiveString) value);
    } else if (value instanceof CharSequence) {
      result.add(new CaseInsensitiveString(((CharSequence) value).toString()));
    } else {
      result.add(new CaseInsensitiveString(String.valueOf(value)));
    }
    return result;
  }
View Full Code Here

      String itemName = TERM_MAP_PREFIX + dbid;
      if (doc.hasItem(itemName)) {
        Map termMap = doc.getItemValue(itemName, Map.class);

        for (Object key : itemNames) {
          CaseInsensitiveString ciskey = null;
          if (key instanceof CaseInsensitiveString) {
            ciskey = (CaseInsensitiveString) key;
          } else if (key instanceof String) {
            ciskey = new CaseInsensitiveString((String) key);
          } else {
            ciskey = new CaseInsensitiveString(String.valueOf(key));
          }
          Object termObj = termMap.get(ciskey);
          if (termObj != null) {
            if (termObj instanceof Collection) {
              unids.addAll((Collection) termObj);
View Full Code Here

      if (doc.hasItem(itemName)) {
        Map termMap = doc.getItemValue(itemName, Map.class);
        //        Database db = session.getDatabaseByReplicaID(serverName, dbid);
        //        if (db != null) {
        for (Object key : itemNames) {
          CaseInsensitiveString ciskey = null;
          if (key instanceof CaseInsensitiveString) {
            ciskey = (CaseInsensitiveString) key;
          } else if (key instanceof String) {
            ciskey = new CaseInsensitiveString((String) key);
          } else {
            ciskey = new CaseInsensitiveString(String.valueOf(key));
          }
          Object termObj = termMap.get(ciskey);
          if (termObj != null) {
            if (termObj instanceof Collection) {
              for (Object unid : (Collection) termObj) {
View Full Code Here

      String itemName = item.getName();
      if (itemName.startsWith(TERM_MAP_PREFIX)) {
        //        String dbid = itemName.substring(TERM_MAP_PREFIX.length());
        Map termMap = doc.getItemValue(itemName, Map.class);
        for (String key : itemNames) {
          CaseInsensitiveString ciskey = new CaseInsensitiveString(key);
          Object termObj = termMap.get(ciskey);
          if (termObj != null) {
            if (termObj instanceof Collection) {
              unids.addAll((Collection) termObj);
            } else if (termObj instanceof CharSequence) {
View Full Code Here

    result = result.trim();
    if (DominoUtils.isHex(result))
      return null;

    return caseSensitive ? result : new CaseInsensitiveString(result);
  }
View Full Code Here

      Map<CharSequence, Item.Type> typeMap = getFieldTypeMap();
      Vector<Item> items = doc.getItems();
      boolean hasReaders = doc.hasReaders();
      String address = doc.getUniversalID() + (hasReaders ? "1" : "0") + doc.getFormName();
      for (Item item : items) {
        CaseInsensitiveString name = new CaseInsensitiveString(item.getName());
        if (/*lastMod.after(getLastScanDate()) && */!(name.startsWith("$") && getIgnoreDollar())) {
          try {
            String value = null;
            Vector<Object> values = null;

            switch (item.getTypeEx()) {
            case AUTHORS:
            case READERS:
            case NAMES:
            case TEXT:
              value = item.getValueString();
              values = item.getValues();
              break;
            case RICHTEXT:
              value = ((RichTextItem) item).getUnformattedText();
              break;
            default:
            }
            if (value != null && value.length() > 0 && !DominoUtils.isNumber(value)) {
              if (item.isNames()) {
                if (values != null && !values.isEmpty()) {
                  for (Object o : values) {
                    if (o instanceof String) {
                      CharSequence parmName = caseSensitive_ ? (String) o : new CaseInsensitiveString((String) o);
                      processName(parmName, name, doc.getAncestorSession(), address);
                    }
                  }
                }
              } else {
View Full Code Here

    } else {
      tokenSet = tmap.get(itemName);
    }
    tokenSet.add(name);
    if (DominoUtils.isHierarchicalName(name.toString())) {
      CharSequence cn = caseSensitive_ ? DominoUtils.toCommonName(name.toString()) : new CaseInsensitiveString(
          DominoUtils.toCommonName(name.toString()));
      tokenSet.add(cn);
      if (tfmap.containsKey(cn)) {
        tfmap.put(cn, tfmap.get(cn) + 1);
      } else {
        tfmap.put(cn, 1);
      }
      if (isTrackNameLocation()) {
        Map<CharSequence, Set<CharSequence>> tlval = getNameLocationMap(name.toString());
        if (tlval.containsKey(itemName)) {
          Set<CharSequence> tllist = tlval.get(itemName);
          tllist.add(address);
        } else {
          Set<CharSequence> tllist = new ConcurrentSkipListSet<CharSequence>();
          tllist.add(address);
          tlval.put(itemName, tllist);
        }
      }

    } else {
      CharSequence lname = caseSensitive_ ? name : new CaseInsensitiveString(name);
      if (tfmap.containsKey(lname)) {
        tfmap.put(lname, tfmap.get(lname) + 1);
      } else {
        tfmap.put(lname, 1);
      }
View Full Code Here

    stopTokenList_ = new HashSet<CharSequence>();
    for (Object o : value) {
      if (o instanceof CaseInsensitiveString) {
        stopTokenList_.add((CaseInsensitiveString) o);
      } else if (o instanceof String) {
        stopTokenList_.add(new CaseInsensitiveString((String) o));
      } else {
        stopTokenList_.add(new CaseInsensitiveString(String.valueOf(o)));
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.openntf.domino.types.CaseInsensitiveString

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.