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

Examples of com.hp.hpl.jena.rdf.model.Model.listObjectsOfProperty()


              }
            } else if(resource.getURI() != null) {
              resourceName = resource.getURI();
            }
            System.out.println("  " + resourceName+" class:"+resource.getClass());
            NodeIterator nodes = model.listObjectsOfProperty(resource, RDF.type);
            while(nodes.hasNext()) {
              RDFNode node = nodes.nextNode();
              if(node.isResource()) {
                System.out.println("   type " + node.asResource().getURI());
              }
View Full Code Here


              while(stmtI1.hasNext()) {
                Statement statement = stmtI1.nextStatement();             
                System.out.println("   OnlineAccount "+statement.getObject());
                if(statement.getObject().isResource()) {
                  Resource onlineAccount = statement.getObject().asResource();                 
                  NodeIterator nodess = model.listObjectsOfProperty(
                      onlineAccount, RDF.type);
                  while(nodess.hasNext()) {
                    RDFNode node = nodess.nextNode();
                    if(node.isResource()) {
                      System.out.println("      type " + node.asResource().getURI());
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) {
            if(resource.getId().getLabelString() != null) {
View Full Code Here

              }
            } else if(resource.getURI() != null) {
              resourceName = resource.getURI();
            }
            System.out.println("  " + resourceName+" class:"+resource.getClass());
            NodeIterator nodes = model.listObjectsOfProperty(resource, RDF.type);
            while(nodes.hasNext()) {
              RDFNode node = nodes.nextNode();
              if(node.isResource()) {
                System.out.println("   type " + node.asResource().getURI());
              }
View Full Code Here

                System.out.println("   OnlineAccount "+statement.getObject());
                String accountURL = "";
                String accountUserName = "";
                if(statement.getObject().isResource()) {
                  Resource onlineAccount = statement.getObject().asResource();                 
                  NodeIterator nodess = model.listObjectsOfProperty(onlineAccount, RDF.type);
                  while(nodess.hasNext()) {
                    RDFNode node = nodess.nextNode();
                    if(node.isResource()) {
                      System.out.println("      type " + node.asResource().getURI());
                    }
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) {
            if(resource.getId().getLabelString() != null) {
View Full Code Here

                        }
                    } else if(resource.getURI() != null) {
                            resourceName = resource.getURI();
                    }
                    System.out.println("  " + resourceName+" class:"+resource.getClass());
                    NodeIterator nodes = model.listObjectsOfProperty(resource, RDF.type);
                    while(nodes.hasNext()) {
                        RDFNode node = nodes.nextNode();
                        if(node.isResource()) {
                                System.out.println("   type " + node.asResource().getURI());
                        }
View Full Code Here

                        while(stmtI1.hasNext()) {
                            Statement statement = stmtI1.nextStatement();                                  
                            System.out.println("   OnlineAccount "+statement.getObject());
                            if(statement.getObject().isResource()) {
                                Resource onlineAccount = statement.getObject().asResource();                                                   
                                NodeIterator nodess = model.listObjectsOfProperty(onlineAccount, RDF.type);
                                while(nodess.hasNext()) {
                                    RDFNode node = nodess.nextNode();
                                    if(node.isResource()) {
                                        System.out.println("      type " + node.asResource().getURI());
                                    }
View Full Code Here

    }
  }

  public Set<IDoapCategory> getAll() throws SimalRepositoryException {
    Model model = ((JenaSimalRepository) getRepository()).getModel();
      NodeIterator itr = model.listObjectsOfProperty(Doap.CATEGORY);
      Set<IDoapCategory> categories = new HashSet<IDoapCategory>();
      while (itr.hasNext()) {
        String uri = itr.nextNode().toString();
        categories.add(new Category(model.getResource(uri)));
      }
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.