@Override public String getPath(String selectorName) throws RepositoryException { return delegate.getPath(selectorName); }
public String getPath(String selectorName) throws RepositoryException { return row.getPath(selectorName); }
public String getPath(String selectorName) throws RepositoryException { return row.getPath(selectorName); }
@Override public String getPath() throws RepositoryException { return delegate.getPath(); }
/** {@inheritDoc} */ public String getPath(String selectorName) throws RepositoryException, RemoteException { try { return row.getPath(selectorName); } catch (RepositoryException ex) { throw getRepositoryException(ex); } }
/** {@inheritDoc} */ public String getPath() throws RepositoryException, RemoteException { try { return row.getPath(); } catch (RepositoryException ex) { throw getRepositoryException(ex); } }
public String execute() throws Exception { return getDelegate().getPath(); } });
public void testGetPathWithSelector() throws RepositoryException { Row r = getRow(); String expectedPath = testRootNode.getNode(nodeName1).getPath(); assertEquals("unexpected result node", expectedPath, r.getPath(SELECTOR_NAME)); }
public void testGetPath() throws RepositoryException { Row r = getRow(); String expectedPath = testRootNode.getNode(nodeName1).getPath(); assertEquals("unexpected result node", expectedPath, r.getPath()); }
@Override public void validate( int rowNumber, Row row ) throws RepositoryException { expectedResults.remove(row.getPath()); } })
@Override public void validate( int rowNumber, Row row ) throws RepositoryException { expectedResults.remove(row.getPath()); } })
@Override public void validate( int rowNumber, Row row ) throws RepositoryException { expectedResults2.remove(row.getPath()); } })
@Override public void validate( int rowNumber, Row row ) throws RepositoryException { // Path of all rows should have an even digit at the end ... String path = row.getPath(); int lastIntValue = Integer.parseInt(path.substring(path.length() - 1)); assertTrue(lastIntValue % 2 == 0); } }).validate(query, result);
@Override public void validate( int rowNumber, Row row ) throws RepositoryException { assertTrue("Path not found", expectedPaths.remove(row.getPath())); } })
protected void printRow() throws RepositoryException { Row row = iter.nextRow(); System.out.print(rowNumberStr()); for (String selectorName : selectorNames) { System.out.print(" "); System.out.print(row.getPath(selectorName)); } System.out.println(); }
@Override public void checkRow( Row row, String[] selectorNames ) throws RepositoryException { Object expected = iterator.next(); if (expected instanceof String) { assertThat(row.getPath(), is((String)expected)); } else if (expected instanceof Node) { assertThat(row.getNode(), is(expected)); } } }
private static String getPaths(Query q) throws RepositoryException { QueryResult r = q.execute(); RowIterator it = r.getRows(); StringBuilder buff = new StringBuilder(); if (it.hasNext()) { Row row = it.nextRow(); if (buff.length() > 0) { buff.append(", "); } buff.append(row.getPath()); } return buff.toString(); }
private static List<String> queryResult(Session session, String indexedPropName, String value) throws RepositoryException{ session.refresh(false); QueryManager qm = session.getWorkspace().getQueryManager(); Query q = qm.createQuery("select * from [nt:base] where [" + indexedPropName + "] = $value", Query.JCR_SQL2); q.bindValue("value", session.getValueFactory().createValue(value)); QueryResult result = q.execute(); List<String> paths = Lists.newArrayList(); for (Row r : JcrUtils.getRows(result)){ paths.add(r.getPath()); } return paths; } }