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

Examples of com.hp.hpl.jena.rdf.model.RDFList.cons()


    final Resource r = model.createResource(TestList.NS + "foo");

    // create a list of foos
    for (int i = 0; i < 5; i++)
    {
      list = list.cons(r);
    }

    final int listLen = list.size();

    // now append foos to the root list
View Full Code Here


    final Resource r = model.createResource(TestList.NS + "a");

    // cons each a's onto the front of the list
    for (int i = 0; i < 10; i++)
    {
      list = list.cons(r);
    }

    // now index them back again
    for (int j = 0; j < 10; j++)
    {
View Full Code Here

    final Resource r2 = model.createResource(TestList.NS + "z");

    for (int i = 0; i < 10; i++)
    {
      list0 = list0.cons(r0);
      list1 = list1.cons(r1);
    }

    // delete the elements of list0 one at a time
    while (!list0.isEmpty())
    {
View Full Code Here

          }
        }

        if(atomResource != null){

          list = list.cons(atomResource);
          log.debug("ENTRO QUI "+list.size());

        }

      }
View Full Code Here

     
     
      //RDF list for body
      RDFList list = model.createList();     
      for(RuleAtom atom : body){
        list = list.cons(atom.toSWRL(model));
      }     
      imp.addProperty(SWRL.body, list);
     
      //RDF list for head
      list = model.createList();     
View Full Code Here

      imp.addProperty(SWRL.body, list);
     
      //RDF list for head
      list = model.createList();     
      for(RuleAtom atom : head){
        list = list.cons(atom.toSWRL(model));
      }     
      imp.addProperty(SWRL.head, list);
     
    }
   
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.