Examples of nextResource()


Examples of com.hp.hpl.jena.rdf.model.ResIterator.nextResource()

      ResIterator i2 = ont.listSubjectsWithProperty(RDFS.subPropertyOf,r);
      // r should not be used in an existing restriction or subPropertyOf relation
      // ignore case where r is a subPropertyOf itself
      Resource s = null;
      while (i2.hasNext() && (s==null || s.equals(r)))
        s = i2.nextResource();
      if (!i1.hasNext() && (s==null || s.equals(r)))
        r.removeProperties();
    }
  }
 
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.ResIterator.nextResource()

    //out.printf("<th>Name</th>%n");
    out.printf("</tr>%n");

    ResIterator iter = model.listSubjects();
    while (iter.hasNext()) {
      Resource elem = iter.nextResource();
      String elemUri = elem.getURI();
      if ( elemUri != null ) {
        String elemUriSlash = elemUri.replace('#' , '/');
       
        // generate anchor for the term using "id" in the row:
View Full Code Here

Examples of org.apache.commons.discovery.ResourceIterator.nextResource()

        DiscoverResources disc = new DiscoverResources();
        disc.addClassLoader(JDKHooks.getJDKHooks().getThreadContextClassLoader());
        disc.addClassLoader(loader);
        ResourceIterator iterator = disc.findResources(location);
        if (iterator.hasNext()) {
            Resource resource = iterator.nextResource();
            is = resource.getResourceAsStream();
        }

        /**
         * If we don't find it, then look on the file system.
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavResourceIterator.nextResource()

    private static boolean isInternalMember(DavResource resource, String memberPath) {
        if (resource.getResourcePath().equals(Text.getRelativeParent(memberPath, 1))) {
            // find the member with the given path
            DavResourceIterator it = resource.getMembers();
            while (it.hasNext()) {
                DavResource member = it.nextResource();
                if (member.getResourcePath().equals(memberPath)) {
                    // return true if that member is not a collection
                    return !member.isCollection();
                }
            }
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavResourceIterator.nextResource()

            log.error(e);
        }
        if (depth > 0) {
            DavResourceIterator it = res.getMembers();
            while (it.hasNext()) {
                buildResponse(it.nextResource(), propNameSet, depth-1, ms);
            }
        }
    }

    /**
 
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavResourceIterator.nextResource()

        MultiStatusResponse response = getResponse(res, propertyElements);
        ms.addResponse(response);
        if (depth > 0) {
            DavResourceIterator it = res.getMembers();
            while (it.hasNext()) {
                addResponses(it.nextResource(), depth-1, ms);
            }
        }
    }

    /**
 
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavResourceIterator.nextResource()

    private void buildResponse(DavResource res, DavPropertyNameSet propNameSet,
                               int depth, MultiStatus ms) {
        // loop over members first, since this report only list members
        DavResourceIterator it = res.getMembers();
        while (!vhHrefSet.isEmpty() && it.hasNext()) {
            DavResource childRes = it.nextResource();
            if (childRes instanceof VersionControlledResource) {
                try {
                    VersionHistoryResource vhr = ((VersionControlledResource)childRes).getVersionHistory();
                    if (vhHrefSet.remove(vhr.getHref())) {
                        if (propNameSet.isEmpty()) {
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavResourceIterator.nextResource()

                    log.info(e.getMessage());
                }
            }
            // traverse subtree
            if (depth > 0) {
                buildResponse(it.nextResource(), propNameSet, depth-1, ms);
            }
        }
    }
}
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavResourceIterator.nextResource()

    private static boolean isInternalMember(DavResource resource, String memberPath) {
  if (resource.getResourcePath().equals(Text.getRelativeParent(memberPath, 1))) {
      // find the member with the given path
      DavResourceIterator it = resource.getMembers();
      while (it.hasNext()) {
    DavResource member = it.nextResource();
    if (member.getResourcePath().equals(memberPath)) {
        // return true if that member is not a collection
        return !member.isCollection();
    }
      }
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavResourceIterator.nextResource()

                writer.print(resource.getResourcePath());
                writer.print("</h2><ul>");
                writer.print("<li><a href=\"..\">..</a></li>");
                DavResourceIterator iter = resource.getMembers();
                while (iter.hasNext()) {
                    DavResource child = iter.nextResource();
                    String label = Text.getName(child.getResourcePath());
                    writer.print("<li><a href=\"");
                    writer.print(child.getHref());
                    writer.print("\">");
                    writer.print(label);
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.