Package com.hp.hpl.jena.rdf.model

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


    Resource dimension = ResourceFactory.createResource(riNamespace + "Dimension");
    ResIterator iters = model.listSubjectsWithProperty(RDF.type,dimension);
        if (iters.hasNext()) {
            System.out.println("The database contains subjects of type dimension:");
            while (iters.hasNext()) {
                Resource resource = iters.nextResource();
                System.out.println("  " + resource.getLocalName());
                Dimension dimensionInstance = getDimension(model,resource);
                System.out.println(dimensionInstance.toString("     "));                       
            }
        } else {
View Full Code Here


      ResIterator iters = model.listResourcesWithProperty(RDF.type,agent);
     
      if (iters.hasNext()) {
          System.out.println("The database contains resource Person for:");
          while (iters.hasNext()) {
            Resource resource = iters.nextResource();
            String resourceName = null;
            if(resource.getLocalName() != null) {
              resourceName = resource.getLocalName();
            } else if(resource.getId() != null) {
              if(resource.getId().getLabelString() != null) {
View Full Code Here

   
    ResIterator iters = model.listSubjectsWithProperty(RDF.type,foafNamespace+"Person");
    if (iters.hasNext()) {
        System.out.println("The database contains literal person for:");
        while (iters.hasNext()) {
          Resource resource = iters.nextResource();
          System.out.println("  " + resource.getLocalName());
           // node.
           
        }
    } else {
View Full Code Here

        foafNamespace, "OnlineAccount");   
    iters = model.listSubjectsWithProperty(propertyOnlineAccount);
    if (iters.hasNext()) {
        System.out.println("The database contains OnlineAccount for:");
        while (iters.hasNext()) {
          Resource resource = iters.nextResource();
          System.out.println("  " + resource.getLocalName());
        }
    } else {
        System.out.println("No PROPERTY OnlineAccount were found in the database");
    }   
View Full Code Here

   
    iters = model.listSubjectsWithProperty(RDF.type);
    if (iters.hasNext()) {
        System.out.println("The database contains RDF.type for:");
        while (iters.hasNext()) {
          Resource resource = iters.nextResource();
          NodeIterator nodes = model.listObjectsOfProperty(resource, RDF.type);
          String resourceName = null;
          if(resource.getLocalName() != null) {
            resourceName = resource.getLocalName();
          } else if(resource.getId() != null) {
View Full Code Here

        for(Resource agent : resources) {                          
            ResIterator iters = model.listResourcesWithProperty(RDF.type,agent);
            if (iters.hasNext()) {
                System.out.println("The database contains resource for:");
                while (iters.hasNext()) {
                    Resource resource = iters.nextResource();
                    String resourceName = null;
                    if(resource.getLocalName() != null) {
                            resourceName = resource.getLocalName();
                    } else if(resource.getId() != null) {
                      if(resource.getId().getLabelString() != null) {
View Full Code Here

       
        ResIterator iters = model.listSubjectsWithProperty(RDF.type,dimension);
        if (iters.hasNext()) {
            System.out.println("The database contains subjects of type dimension:");
            while (iters.hasNext()) {
                Resource resource = iters.nextResource();
                System.out.println("  " + resource.getLocalName());
            }
        } else {
            System.out.println("No simple String riNamespace+Dimension were found in the database");
        }
View Full Code Here

       
        iters = model.listResourcesWithProperty(RDF.type,categoryMatching);
        if (iters.hasNext()) {
            System.out.println("The database contains resources of type CategoryMatching:");
            while (iters.hasNext()) {
                Resource resource = iters.nextResource();
                System.out.println("  " + resource.getLocalName());
            }
        } else {
            System.out.println("No simple String "+riNamespace+
                "CategoryMatching were found in the database");
View Full Code Here

       
        iters = model.listSubjectsWithProperty(RDF.type,fixedCommunitiesTrust);
        if (iters.hasNext()) {
            System.out.println("The database contains resources of type fixedCommunitiesTrust:");
            while (iters.hasNext()) {
                Resource resource = iters.nextResource();
                System.out.println("  " + resource.getLocalName());
            }
        } else {
            System.out.println("No simple String riNamespace+" +
                "FixedCommunitiesTrust were found in the database");
View Full Code Here

        }
        iters = model.listSubjectsWithProperty(RDF.type,trustBetweenCommunities);
        if (iters.hasNext()) {
            System.out.println("The database contains resources of type trustBetweenCommunities:");
            while (iters.hasNext()) {
                Resource resource = iters.nextResource();
                System.out.println("  " + resource.getLocalName());
            }
        } else {
            System.out.println("No simple String riNamespace+" +
                "trustBetweenCommunities were found in the database");
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.