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 + "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

     * @return {@link OntClass} instance.
     */
    public OntClass createUnionClass(List<Resource> classes) {
        RDFList list = ontModel.createList();
        for (Resource klass : classes) {
            list.cons(klass);
        }
        return createUnionClass(list);
    }

    /**
 
View Full Code Here

    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 + "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

    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

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.