use of org.openntf.domino.ViewNavigator in project org.openntf.domino by OpenNTF.
the class View method createViewNavFromDescendants.
/*
* (non-Javadoc)
*
* @see org.openntf.domino.View#createViewNavFromDescendants(java.lang.Object, int)
*/
@Override
public ViewNavigator createViewNavFromDescendants(final Object entry, final int cacheSize) {
try {
getDelegate().setAutoUpdate(false);
getDelegate().setEnableNoteIDsForCategories(true);
ViewNavigator result = fromLotus(getDelegate().createViewNavFromDescendants(toLotus(entry), cacheSize), ViewNavigator.SCHEMA, this);
result.setCacheSize(cacheSize);
((org.openntf.domino.impl.ViewNavigator) result).setType(ViewNavigator.Types.DESCENDANTS);
return result;
} catch (NotesException e) {
DominoUtils.handleException(e);
}
return null;
}
use of org.openntf.domino.ViewNavigator in project org.openntf.domino by OpenNTF.
the class IndexDatabase method getTermStarts.
/* (non-Javadoc)
* @see org.openntf.domino.big.impl.IIndexDatabase#getTermStarts(java.lang.String, int)
*/
@Override
public List<String> getTermStarts(final String startsWith, final int count) {
List<String> result = new ArrayList<String>();
ViewEntry startEntry = getTermView().getFirstEntryByKey(startsWith, false);
if (startEntry == null) {
if (log_.isLoggable(Level.FINE)) {
log_.log(Level.FINE, "Unable to find ViewEntry for key " + startsWith);
}
// System.out.println("ViewEntryCollection strategy returned " + vec.getCount() + " entries.");
return result;
}
String val = startEntry.getColumnValue(IndexDatabase.TERM_KEY_NAME, String.class);
result.add(val);
ViewNavigator nav = getTermView().createViewNavFrom(startEntry, count);
for (int i = 1; i < count; i++) {
ViewEntry nextEntry = nav.getNextSibling();
val = nextEntry.getColumnValue(IndexDatabase.TERM_KEY_NAME, String.class);
result.add(val);
}
return result;
}
use of org.openntf.domino.ViewNavigator in project org.openntf.domino by OpenNTF.
the class DCategoryVertex method getSubNavigator.
public ViewNavigator getSubNavigator() {
View view = getView();
// $NON-NLS-1$
ViewEntry entry = view.getEntryAtPosition(getProperty("position", String.class));
ViewNavigator result = view.createViewNavFromDescendants(entry, 100);
if (getParent().getConfiguration().isSuppressSingleValueCategories()) {
while (checkSkipCategory(result)) {
// System.out.println("TEMP DEBUG SubNavigator skipping category level...");
result = dropSingleValueCategory(view, result);
}
}
return result;
}
use of org.openntf.domino.ViewNavigator in project org.openntf.domino by OpenNTF.
the class DCategoryVertex method dropSingleValueCategory.
public static ViewNavigator dropSingleValueCategory(final View view, final ViewNavigator nav) {
ViewEntry first = nav.getFirst();
ViewNavigator result = view.createViewNavFromDescendants(first);
return result;
}
use of org.openntf.domino.ViewNavigator in project org.openntf.domino by OpenNTF.
the class DEdgeEntryList method initEntryList.
public void initEntryList(final List<CharSequence> list) {
ViewNavigator nav = null;
if (org.openntf.domino.View.class.equals(source_.getDelegateType())) {
View view = source_.getView();
Vector<Object> repeatKeys = new Vector<Object>();
repeatKeys.addAll(list);
ViewEntry entry = view.getFirstEntryByKey(repeatKeys, false);
if (entry != null) {
nav = view.createViewNavFrom(entry);
entryList_ = new ViewEntryList(nav);
} else {
throw new KeyNotFoundException(list);
}
} else {
throw new IllegalArgumentException("Cannot use start keys on anything except a view root.");
}
}
Aggregations