Examples of listResourcesWithProperty()


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

    agentResource.add(ResourceFactory.createResource(foafNamespace + "Agent"));
    agentResource.add(ResourceFactory.createResource(foafNamespace + "Person"));
    Resource person = ResourceFactory.createResource(foafNamespace + "Person" );
   
    for(Resource agent : agentResource) {       
      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;
View Full Code Here

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

    agentResource.add(ResourceFactory.createResource(foafNamespace + "Agent"));
    agentResource.add(ResourceFactory.createResource(foafNamespace + "Person"));
    //Resource person = ResourceFactory.createResource(foafNamespace + "Person" );
   
    for(Resource agent : agentResource) {       
      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();
View Full Code Here

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

            riNamespace + "importsFrom");
       
        addPropertiesAndResources();
       
        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;
View Full Code Here

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

            }
        } else {
            System.out.println("No simple String riNamespace+Dimension were found in the database");
        }
       
        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());
View Full Code Here

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

    try {
      Model model = WorksheetR2RMLJenaModelParser.loadSourceModelIntoJenaModel(modelURL);
      Property rdfTypeProp = model.getProperty(Uris.RDF_TYPE_URI);
      Property baseURIProp = model.getProperty(Uris.KM_HAS_BASEURI);
      RDFNode node = model.getResource(Uris.KM_R2RML_MAPPING_URI);
      ResIterator res = model.listResourcesWithProperty(rdfTypeProp, node);
      List<Resource> resList = res.toList();
      for(Resource r: resList)
      {
        if (r.hasProperty(baseURIProp)) {
          baseURI = r.getProperty(baseURIProp).asTriple().getObject().toString();
View Full Code Here

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

      StringWriter test = new StringWriter();
      Model model = WorksheetR2RMLJenaModelParser.loadSourceModelIntoJenaModel(url);
      Property rdfTypeProp = model.getProperty(Uris.RDF_TYPE_URI);

      RDFNode node = model.getResource(Uris.KM_R2RML_MAPPING_URI);
      ResIterator res = model.listResourcesWithProperty(rdfTypeProp, node);
      List<Resource> resList = res.toList();
      for(Resource r: resList)
      {
        model.add(r, model.getProperty(Uris.OWL_SAMEAS_URI), model.getResource(url.toString()));
      }
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.