@Test public void getResourcesNames() throws TTException, ParserConfigurationException, SAXException, IOException { final StreamingOutput sOutput = treetank.getResourcesNames(); final ByteArrayOutputStream output = new ByteArrayOutputStream(); sOutput.write(output); final Document doc = DOMHelper.buildDocument(output); final NodeList nodes = doc.getElementsByTagName("resource"); assertTrue("Check if a resource exists", nodes.getLength() > 0); for (int i = 0; i < nodes.getLength(); i++) { Node node = nodes.item(i); Attr attribute = (Attr) node.getAttributes().getNamedItem( "lastRevision"); assertNotNull("Check if lastRevision exists", attribute); attribute = (Attr) node.getAttributes().getNamedItem("name"); assertNotNull("Check if name attribute exists", attribute); assertTrue( "Check if name is the expected one", attribute.getTextContent().equals( CoreTestHelper.RESOURCENAME) || attribute.getTextContent().equals( CoreTestHelper.RESOURCENAME)); } output.close(); }
public StreamingOutput getResourcesNames() throws JaxRxException { return RESTResponseHelper.buildResponseOfDomLR(mDatabase, mStorageFac, mRevision); }
DatabaseRepresentation { public StreamingOutput getResourcesNames() throws JaxRxException { return RESTResponseHelper.buildResponseOfDomLR(mDatabase, mStorageFac, mRevision); } }
DatabaseRepresentation { public StreamingOutput getResourcesNames() throws JaxRxException { return RESTResponseHelper.buildResponseOfDomLR(mDatabase, mStorageFac, mRevision); } DatabaseRepresentation(final IStorage pDatabase, final IBackendFactory pStorageFac,
        final IRevisioning pRevision); }
DatabaseRepresentation { public StreamingOutput getResourcesNames() throws JaxRxException { return RESTResponseHelper.buildResponseOfDomLR(mDatabase, mStorageFac, mRevision); } DatabaseRepresentation(final IStorage pDatabase, final IBackendFactory pStorageFac,
        final IRevisioning pRevision); void createResource(final InputStream inputStream, final String resourceName); StreamingOutput getResource(final String resourceName,
        final Map<QueryParameter, String> queryParams); StreamingOutput performQueryOnResource(final String resource, final String query,
        final Map<QueryParameter, String> otherParams); StreamingOutput getResourcesNames(); void add(final InputStream input, final String resource); void deleteResource(final String resourceName); final boolean shred(final InputStream xmlInput, final String resource); long getLastRevision(final String resourceName); OutputStream getModificHistory(final String resourceName, // NOPMD this method needs alls these
        // functions
        final String revisionRange, final boolean nodeid, final OutputStream output, final boolean wrap); void revertToRevision(final String resourceName, final long backToRevision); }
DatabaseRepresentation { public StreamingOutput getResourcesNames() throws JaxRxException { return RESTResponseHelper.buildResponseOfDomLR(mDatabase, mStorageFac, mRevision); } DatabaseRepresentation(final IStorage pDatabase, final IBackendFactory pStorageFac,
        final IRevisioning pRevision); void createResource(final InputStream inputStream, final String resourceName); StreamingOutput getResource(final String resourceName,
        final Map<QueryParameter, String> queryParams); StreamingOutput performQueryOnResource(final String resource, final String query,
        final Map<QueryParameter, String> otherParams); StreamingOutput getResourcesNames(); void add(final InputStream input, final String resource); void deleteResource(final String resourceName); final boolean shred(final InputStream xmlInput, final String resource); long getLastRevision(final String resourceName); OutputStream getModificHistory(final String resourceName, // NOPMD this method needs alls these
        // functions
        final String revisionRange, final boolean nodeid, final OutputStream output, final boolean wrap); void revertToRevision(final String resourceName, final long backToRevision);  }