Examples of nextResource()


Examples of org.jboss.gravia.repository.RepositoryReader.nextResource()

        try {
            RepositoryReader reader = new DefaultRepositoryXMLReader(content);
            Resource xmlres = reader.nextResource();
            while (xmlres != null) {
                systemStore.addResource(xmlres);
                xmlres = reader.nextResource();
            }
        } finally {
            IOUtils.safeClose(content);
        }
        return this;
View Full Code Here

Examples of org.jboss.gravia.repository.RepositoryReader.nextResource()

        if (resurl != null) {
            InputStream input = resurl.openStream();
            RepositoryMBean repository = MBeanProxy.get(context.getMBeanServer(), RepositoryMBean.OBJECT_NAME, RepositoryMBean.class);
            try {
                RepositoryReader reader = new DefaultRepositoryXMLReader(input);
                Resource auxres = reader.nextResource();
                while (auxres != null) {
                    ResourceIdentity identity = auxres.getIdentity();
                    if (repository.getResource(identity.getCanonicalForm()) == null) {
                        repository.addResource(auxres.adapt(CompositeData.class));
                        result.add(identity);
View Full Code Here

Examples of org.jboss.gravia.repository.RepositoryReader.nextResource()

                    ResourceIdentity identity = auxres.getIdentity();
                    if (repository.getResource(identity.getCanonicalForm()) == null) {
                        repository.addResource(auxres.adapt(CompositeData.class));
                        result.add(identity);
                    }
                    auxres = reader.nextResource();
                }
            } finally {
                IOUtils.safeClose(input);
            }
        }
View Full Code Here

Examples of org.jboss.gravia.repository.RepositoryReader.nextResource()

    public RuntimeEnvironment initDefaultContent(InputStream content) {
        IllegalArgumentAssertion.assertNotNull(content, "content");
        try {
            RepositoryReader reader = new DefaultRepositoryXMLReader(content);
            Resource xmlres = reader.nextResource();
            while (xmlres != null) {
                systemStore.addResource(xmlres);
                xmlres = reader.nextResource();
            }
        } finally {
View Full Code Here

Examples of org.jboss.gravia.repository.RepositoryReader.nextResource()

        try {
            RepositoryReader reader = new DefaultRepositoryXMLReader(content);
            Resource xmlres = reader.nextResource();
            while (xmlres != null) {
                systemStore.addResource(xmlres);
                xmlres = reader.nextResource();
            }
        } finally {
            IOUtils.safeClose(content);
        }
        return this;
View Full Code Here

Examples of org.xmldb.api.base.ResourceIterator.nextResource()

            IncludeXMLConsumer includeHandler = new IncludeXMLConsumer(handler);

            // Print search results
            ResourceIterator results = resultSet.getIterator();
            while (results.hasMoreResources()) {
                XMLResource result = (XMLResource)results.nextResource();

                final String id = result.getId();
                final String documentId = result.getDocumentId();

                attributes.clear();
View Full Code Here

Examples of org.xmldb.api.base.ResourceIterator.nextResource()

           
            ResourceSet resultSet = service.query(querystring);
            results = resultSet.getIterator();
           
            while (results.hasMoreResources() ) {
                XMLResource resource = (XMLResource)results.nextResource();
                String documentstr = (String)resource.getContent();
                System.out.println(documentstr);
            }
           
        } catch (Exception e) {
View Full Code Here

Examples of org.xmldb.api.base.ResourceIterator.nextResource()

        // Create an XObject to be used in Xpath query
        xo = new XObject();

        // Retrieve the next node
        XMLResource resource = (XMLResource) results.nextResource();

        originalnode = resource.getContentAsDOM();

      }
      catch (Exception e) {
View Full Code Here

Examples of org.xmldb.api.base.ResourceIterator.nextResource()

            IncludeXMLConsumer includeHandler = new IncludeXMLConsumer(handler);

            // Print search results
            ResourceIterator results = resultSet.getIterator();
            while (results.hasMoreResources()) {
                XMLResource result = (XMLResource)results.nextResource();

                final String id = result.getId();
                final String documentId = result.getDocumentId();

                attributes.clear();
View Full Code Here

Examples of org.xmldb.api.base.ResourceIterator.nextResource()

            ResourceSet resultSet = service.query(querystring);
            results = resultSet.getIterator();

            while (results.hasMoreResources()) {
                XMLResource resource = (XMLResource) results.nextResource();
                String documentstr = (String) resource.getContent();
                System.out.println(documentstr);
            }

        } catch (Exception e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.