當前位置: 首頁>>代碼示例>>Java>>正文


Java Document.getItemValue方法代碼示例

本文整理匯總了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;
}
 
開發者ID:OpenNTF,項目名稱:org.openntf.domino,代碼行數:19,代碼來源:IndexDatabase.java

示例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;
}
 
開發者ID:OpenNTF,項目名稱:org.openntf.domino,代碼行數:27,代碼來源:IndexDatabase.java

示例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;
}
 
開發者ID:OpenNTF,項目名稱:org.openntf.domino,代碼行數:26,代碼來源:IndexDatabase.java

示例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;
}
 
開發者ID:OpenNTF,項目名稱:org.openntf.domino,代碼行數:19,代碼來源:Database.java

示例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");
}
 
開發者ID:OpenNTF,項目名稱:org.openntf.domino,代碼行數:17,代碼來源:DominoAPIScratchTest.java

示例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");
}
 
開發者ID:OpenNTF,項目名稱:org.openntf.domino,代碼行數:19,代碼來源:BigDominoAPIScratchTest.java

示例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");
}
 
開發者ID:OpenNTF,項目名稱:org.openntf.domino,代碼行數:18,代碼來源:TransactionScratchTest.java

示例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;
}
 
開發者ID:OpenNTF,項目名稱:org.openntf.domino,代碼行數:15,代碼來源:IndexDatabase.java

示例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;
}
 
開發者ID:OpenNTF,項目名稱:org.openntf.domino,代碼行數:14,代碼來源:IndexDatabase.java

示例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;
}
 
開發者ID:OpenNTF,項目名稱:org.openntf.domino,代碼行數:34,代碼來源:IndexDatabase.java

示例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;
}
 
開發者ID:OpenNTF,項目名稱:org.openntf.domino,代碼行數:15,代碼來源:IndexDatabase.java

示例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;
}
 
開發者ID:OpenNTF,項目名稱:org.openntf.domino,代碼行數:28,代碼來源:IndexDatabase.java

示例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;
}
 
開發者ID:OpenNTF,項目名稱:org.openntf.domino,代碼行數:14,代碼來源:IndexDatabase.java

示例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;
}
 
開發者ID:OpenNTF,項目名稱:org.openntf.domino,代碼行數:13,代碼來源:IndexDatabase.java

示例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;
}
 
開發者ID:OpenNTF,項目名稱:org.openntf.domino,代碼行數:9,代碼來源:IndexDatabase.java


注:本文中的org.openntf.domino.Document.getItemValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。