Package org.apache.clerezza.rdf.utils

Examples of org.apache.clerezza.rdf.utils.RdfList


  }

  private List<Resource> getPropertyList(GraphNode r) {
    Iterator<GraphNode> propertyLists = r.getObjectNodes(CRIS.propertyList);
    if (propertyLists.hasNext()) {
      List<Resource> rdfList = new RdfList(propertyLists.next());
      return rdfList;
    }
    throw new RuntimeException("There is no propertyList on this definition.");
  }
View Full Code Here


      BNode virtualProperty = new BNode();
      definitionGraph.add(new TripleImpl(virtualProperty, RDF.type, CRIS.JoinVirtualProperty));
      BNode listBNode = new BNode();
      definitionGraph.add(new TripleImpl(virtualProperty, CRIS.propertyList, listBNode));
      List rdfList = new RdfList(listBNode, definitionGraph);
      for (VirtualProperty uri : joinVirtualProperty.properties) {
        rdfList.add(asResource(uri));
      }
      return virtualProperty;
    } else if (vp instanceof PathVirtualProperty) {
      PathVirtualProperty pathVirtualProperty = (PathVirtualProperty) vp;
      if (pathVirtualProperty.properties.isEmpty()) {
        throw new RuntimeException("vp " + vp + " conatins an empty list");
      }
      BNode virtualProperty = new BNode();
      definitionGraph.add(new TripleImpl(virtualProperty, RDF.type, CRIS.PathVirtualProperty));
      BNode listBNode = new BNode();
      definitionGraph.add(new TripleImpl(virtualProperty, CRIS.propertyList, listBNode));
      List rdfList = new RdfList(listBNode, definitionGraph);
      for (UriRef uri : pathVirtualProperty.properties) {
        rdfList.add(uri);
      }
      return virtualProperty;
    }

    throw new RuntimeException("Could not create resource.");
View Full Code Here

            BNode virtualProperty = new BNode();
            definitionGraph.add(new TripleImpl(virtualProperty, RDF.type, CRIS.JoinVirtualProperty));
            BNode listBNode = new BNode();
            definitionGraph.add(new TripleImpl(virtualProperty, CRIS.propertyList, listBNode));
            List rdfList = new RdfList(listBNode, definitionGraph);
            for (VirtualProperty uri : joinVirtualProperty.properties) {
                rdfList.add(asResource(uri));
            }
            return virtualProperty;
        } else if (vp instanceof PathVirtualProperty) {
            PathVirtualProperty pathVirtualProperty = (PathVirtualProperty) vp;
            if (pathVirtualProperty.properties.isEmpty()) {
                throw new RuntimeException("vp " + vp + " conatins an empty list");
            }
            BNode virtualProperty = new BNode();
            definitionGraph.add(new TripleImpl(virtualProperty, RDF.type, CRIS.PathVirtualProperty));
            BNode listBNode = new BNode();
            definitionGraph.add(new TripleImpl(virtualProperty, CRIS.propertyList, listBNode));
            List rdfList = new RdfList(listBNode, definitionGraph);
            for (UriRef uri : pathVirtualProperty.properties) {
                rdfList.add(uri);
            }
            return virtualProperty;
        }

        throw new RuntimeException("Could not create resource.");
View Full Code Here

    }

    private List<Resource> getPropertyList(GraphNode r) {
        Iterator<GraphNode> propertyLists = r.getObjectNodes(CRIS.propertyList);
        if (propertyLists.hasNext()) {
            List<Resource> rdfList = new RdfList(propertyLists.next());
            return rdfList;
        }
        throw new RuntimeException("There is no propertyList on this definition.");
    }
View Full Code Here

TOP

Related Classes of org.apache.clerezza.rdf.utils.RdfList

Copyright © 2018 www.massapicom. 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.