use of org.openntf.domino.ViewEntry in project org.openntf.domino by OpenNTF.
the class DEntryEdge method getVertex.
@Override
public Vertex getVertex(final Direction direction) throws IllegalArgumentException {
ViewEntry entry = (org.openntf.domino.ViewEntry) getDelegate();
if (Direction.OUT.equals(direction) && entry.isCategory()) {
Map<String, Object> delegateMap = new LinkedHashMap<String, Object>();
delegateMap.put("value", entry.getCategoryValue());
delegateMap.put("position", entry.getPosition());
delegateMap.put("noteid", entry.getNoteID());
delegateMap.put("childcount", entry.getChildCount());
DCategoryVertex result = new DCategoryVertex(getParent(), delegateMap, entry.getParentView());
result.delegateKey_ = getVertexId(Direction.OUT);
result.setView(entry.getParentView());
return result;
}
return super.getVertex(direction);
}
use of org.openntf.domino.ViewEntry 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.ViewEntry 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.ViewEntry 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.");
}
}
use of org.openntf.domino.ViewEntry in project org.openntf.domino by OpenNTF.
the class Connect17ODA method run.
@SuppressWarnings("unchecked")
@Override
public void run() {
try {
Session sess = Factory.getSession(SessionType.NATIVE);
TreeSet<String> names = new TreeSet<String>();
Database extLib = sess.getDatabase("odademo/oda_1.nsf");
View states = extLib.getView("AllStates");
ViewEntry entState = states.getAllEntries().getFirstEntry();
View byState = extLib.getView("AllContactsByState");
ArrayList<Object> stateVals = new ArrayList(entState.getColumnValuesEx());
ViewEntryCollection ec = byState.getAllEntriesByKey(stateVals.get(0));
for (ViewEntry ent : ec) {
names.add((String) ent.getColumnValues().get(8));
}
System.out.println(names.toString());
} catch (Exception e) {
XspOpenLogUtil.logError(e);
}
}
Aggregations