本文整理汇总了Java中org.openntf.domino.Document.getItemValue方法的典型用法代码示例。如果您正苦于以下问题:Java Document.getItemValue方法的具体用法?Java Document.getItemValue怎么用?Java Document.getItemValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openntf.domino.Document
的用法示例。
在下文中一共展示了Document.getItemValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTermHitCount
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public int getTermHitCount(final String term) {
int result = 0;
Document doc = getTermDocument(term);
for (Item item : doc.getItems()) {
String itemName = item.getName();
if (itemName.startsWith(TERM_MAP_PREFIX)) {
Map termMap = doc.getItemValue(itemName, Map.class);
for (Object key : termMap.keySet()) {
Object val = termMap.get(key);
if (val instanceof Collection) {
result += ((Collection) val).size();
}
}
}
}
return result;
}
示例2: getTermUnidInItems
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public Set<CharSequence> getTermUnidInItems(final CharSequence term, final Collection<String> itemNames) {
Set<CharSequence> unids = new HashSet<CharSequence>();
Document doc = getTermDocument(term);
for (Item item : doc.getItems()) {
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) {
unids.add(((CharSequence) termObj).toString());
} else {
unids.add(String.valueOf(termObj));
}
}
}
}
}
return unids;
}
示例3: getTermUnidInDbids
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public Set<String> getTermUnidInDbids(final CharSequence term, final Collection<String> dbids) {
Set<String> unids = new HashSet<String>();
Document doc = getTermDocument(term);
for (String dbid : dbids) {
String itemName = TERM_MAP_PREFIX + dbid;
if (doc.hasItem(itemName)) {
Map termMap = doc.getItemValue(itemName, Map.class);
for (Object key : termMap.keySet()) {
Object termObj = termMap.get(key);
if (termObj != null) {
if (termObj instanceof Collection) {
unids.addAll((Collection) termObj);
} else if (termObj instanceof CharSequence) {
unids.add(((CharSequence) termObj).toString());
} else {
unids.add(String.valueOf(termObj));
}
}
}
}
}
return unids;
}
示例4: getView
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public View getView(final Document viewDocument) {
View result = null;
if (viewDocument.hasItem("$Index") || viewDocument.hasItem("$Collection") || viewDocument.hasItem("$Collation")
|| viewDocument.hasItem("$VIEWFORMAT")) {
String unid = viewDocument.getUniversalID();
String rawtitles = viewDocument.getItemValue("$Title", String.class);
String[] titles = PIPE_SPLIT.split(rawtitles);
for (String title : titles) {
View chk = getView(title);
if (chk.getUniversalID().equalsIgnoreCase(unid)) {
result = chk;
break;
}
}
}
return result;
}
示例5: iterateForms
import org.openntf.domino.Document; //导入方法依赖的package包/类
private void iterateForms(final Database db) {
System.out.println("Thread " + Thread.currentThread().getName() + " BEGINNING ITERATION of Forms");
Vector<Form> forms = db.getForms();
for (Form form : forms) {
// System.out.println("Form : " + form.getName() + " (" + DominoUtils.getUnidFromNotesUrl(form.getNotesURL()) + ")");
Document d = form.getDocument();
Vector<Object> v = d.getItemValue("$UpdatedBy");
Name n = db.getParent().createName((String) v.get(0));
String cn = n.getCommon();
nameCount++;
docCount++;
// System.out.println("Last Editor: " + n);
}
System.out.println("ENDING ITERATION of Forms");
}
示例6: iterateForms
import org.openntf.domino.Document; //导入方法依赖的package包/类
private void iterateForms(final Database db) {
System.out.println("Thread " + Thread.currentThread().getName() + " BEGINNING ITERATION of Forms");
Vector<Form> forms = db.getForms();
for (Form form : forms) {
// System.out.println("Form : " + form.getName() + " (" + DominoUtils.getUnidFromNotesUrl(form.getNotesURL()) + ")");
Document d = form.getDocument();
Vector<?> v = d.getItemValue("$UpdatedBy");
Name n = db.getParent().createName((String) v.get(0));
String cn = n.getCommon();
if (cn != null) {
nameCount++;
docCount++;
}
// System.out.println("Last Editor: " + n);
}
System.out.println("ENDING ITERATION of Forms");
}
示例7: iterateForms
import org.openntf.domino.Document; //导入方法依赖的package包/类
private void iterateForms(final Database db) {
System.out.println("Thread " + Thread.currentThread().getName() + " BEGINNING ITERATION of Forms");
Vector<Form> forms = db.getForms();
for (Form form : forms) {
// System.out.println("Form : " + form.getName() + " (" + DominoUtils.getUnidFromNotesUrl(form.getNotesURL()) + ")");
Document d = form.getDocument();
Vector<Object> v = d.getItemValue("$UpdatedBy");
Name n = db.getParent().createName((String) v.get(0));
@SuppressWarnings("unused")
String cn = n.getCommon();
nameCount++;
docCount++;
// System.out.println("Last Editor: " + n);
}
System.out.println("ENDING ITERATION of Forms");
}
示例8: getTermDbidHitCount
import org.openntf.domino.Document; //导入方法依赖的package包/类
protected int getTermDbidHitCount(final Document doc, final CharSequence dbid) {
int result = 0;
String itemName = TERM_MAP_PREFIX + dbid;
if (doc.hasItem(itemName)) {
Map termMap = doc.getItemValue(itemName, Map.class);
for (Object key : termMap.keySet()) {
Object val = termMap.get(key);
if (val instanceof Collection) {
result += ((Collection) val).size();
}
}
}
return result;
}
示例9: getTermItemsInDbids
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public Set<CharSequence> getTermItemsInDbids(final String term, final Collection<String> dbids) {
Set<CharSequence> result = new HashSet<CharSequence>();
Document doc = getTermDocument(term);
for (String dbid : dbids) {
String itemName = TERM_MAP_PREFIX + dbid;
if (doc.hasItem(itemName)) {
Map termMap = doc.getItemValue(itemName, Map.class);
result.addAll(termMap.keySet());
}
}
return result;
}
示例10: getTermUnidInDbsItems
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public Set<CharSequence> getTermUnidInDbsItems(final String term, final Collection<String> dbids, final Collection<?> itemNames) {
Set<CharSequence> unids = new HashSet<CharSequence>();
Document doc = getTermDocument(term);
for (String dbid : dbids) {
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);
} else if (termObj instanceof CharSequence) {
unids.add(((CharSequence) termObj).toString());
} else {
unids.add(String.valueOf(termObj));
}
}
}
}
}
return unids;
}
示例11: getTermItemMap
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public Map<String, Set<CharSequence>> getTermItemMap(final String term) {
Map<String, Set<CharSequence>> result = new LinkedHashMap<String, Set<CharSequence>>();
Document doc = getTermDocument(term);
for (Item item : doc.getItems()) {
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);
result.put(dbid, termMap.keySet());
}
}
return result;
}
示例12: getTermUnidMap
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public Map<CharSequence, Set<CharSequence>> getTermUnidMap(final CharSequence term) {
Map<CharSequence, Set<CharSequence>> result = new LinkedHashMap<CharSequence, Set<CharSequence>>();
Document doc = getTermDocument(term);
for (Item item : doc.getItems()) {
String itemName = item.getName();
if (itemName.startsWith(TERM_MAP_PREFIX)) {
String dbid = itemName.substring(TERM_MAP_PREFIX.length());
Set<CharSequence> unids = new HashSet<CharSequence>();
Map termMap = doc.getItemValue(itemName, Map.class);
for (Object key : termMap.keySet()) {
Object termObj = termMap.get(key);
if (termObj != null) {
if (termObj instanceof Collection) {
unids.addAll((Collection) termObj);
} else if (termObj instanceof CharSequence) {
unids.add(((CharSequence) termObj).toString());
} else {
unids.add(String.valueOf(termObj));
}
}
}
result.put(dbid, unids);
}
}
return result;
}
示例13: restoreTokenLocationMap
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public Map<CharSequence, Set<CharSequence>> restoreTokenLocationMap(final CharSequence token, final Object mapKey) {
Map result = null;
Document doc = getTermDocument(token.toString());
String itemName = TERM_MAP_PREFIX + String.valueOf(mapKey);
if (doc.hasItem(itemName)) {
result = doc.getItemValue(itemName, Map.class);
// System.out.println("Found existing term match for: " + token.toString() + " with " + result.size() + " items");
} else {
result = new ConcurrentHashMap<CaseInsensitiveString, Set<String>>(8, 0.9f, 1);
}
return result;
}
示例14: restoreValueLocationMap
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public Map<CharSequence, Set<CharSequence>> restoreValueLocationMap(final CharSequence token, final Object mapKey) {
Map result = null;
Document doc = getValueDocument(token.toString());
String itemName = VALUE_MAP_PREFIX + String.valueOf(mapKey);
if (doc.hasItem(itemName)) {
result = doc.getItemValue(itemName, Map.class);
} else {
result = new ConcurrentHashMap<CaseInsensitiveString, Set<String>>(8, 0.9f, 1);
}
return result;
}
示例15: getLastIndexDate
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public Date getLastIndexDate(final Object mapKey) {
Document dbDoc = getDbDocument((String) mapKey);
Date result = dbDoc.getItemValue(DB_LAST_INDEX_NAME, java.util.Date.class);
if (result == null)
result = new Date(0);
return result;
}