Package org.openrdf.model

Examples of org.openrdf.model.ValueFactory.createLiteral()


    if (id != null) {
      graph.add(repositoryNode, REPOSITORYID, vf.createLiteral(id));
    }
    if (title != null) {
      graph.add(repositoryNode, RDFS.LABEL, vf.createLiteral(title));
    }
    if (implConfig != null) {
      Resource implNode = implConfig.export(graph);
      graph.add(repositoryNode, REPOSITORYIMPL, implNode);
    }
View Full Code Here


      RepositoryConnection con = systemRepo.getConnection();

      try {
        Resource context;
        TupleQuery query = con.prepareTupleQuery(QueryLanguage.SERQL, REPOSITORY_CONTEXT_QUERY);
        query.setBinding("ID", vf.createLiteral(id));
        TupleQueryResult queryResult = query.evaluate();

        try {
          if (!queryResult.hasNext()) {
            writeError("Unable to find context information for repository '" + id + "'");
View Full Code Here

    Resource r = vf.createURI(user);
    BNode bn = vf.createBNode();
    URI uint = vf.createURI("http://www.w3.org/2001/XMLSchema#integer");
   
    try {
      bn.addProperty(Concepts.HAS_TYPE.get(gToAdd), vf.createLiteral(this.name.getName(), vf.createURI("http://www.w3.org/2001/XMLSchema#string")));
      bn.addProperty(Concepts.HAS_LIMIT.get(gToAdd), vf.createLiteral(String.valueOf(this.limit), uint));
      if(this.weight != null)
        bn.addProperty(Concepts.HAS_WEIGHT.get(gToAdd), vf.createLiteral(String.valueOf(this.weight), uint));
     
      r.addProperty(Concepts.HAS_RECOMMENDATION.get(gToAdd), bn);
View Full Code Here

    BNode bn = vf.createBNode();
    URI uint = vf.createURI("http://www.w3.org/2001/XMLSchema#integer");
   
    try {
      bn.addProperty(Concepts.HAS_TYPE.get(gToAdd), vf.createLiteral(this.name.getName(), vf.createURI("http://www.w3.org/2001/XMLSchema#string")));
      bn.addProperty(Concepts.HAS_LIMIT.get(gToAdd), vf.createLiteral(String.valueOf(this.limit), uint));
      if(this.weight != null)
        bn.addProperty(Concepts.HAS_WEIGHT.get(gToAdd), vf.createLiteral(String.valueOf(this.weight), uint));
     
      r.addProperty(Concepts.HAS_RECOMMENDATION.get(gToAdd), bn);
View Full Code Here

   
    try {
      bn.addProperty(Concepts.HAS_TYPE.get(gToAdd), vf.createLiteral(this.name.getName(), vf.createURI("http://www.w3.org/2001/XMLSchema#string")));
      bn.addProperty(Concepts.HAS_LIMIT.get(gToAdd), vf.createLiteral(String.valueOf(this.limit), uint));
      if(this.weight != null)
        bn.addProperty(Concepts.HAS_WEIGHT.get(gToAdd), vf.createLiteral(String.valueOf(this.weight), uint));
     
      r.addProperty(Concepts.HAS_RECOMMENDATION.get(gToAdd), bn);

      SesameWrapper.addGraph(Repository.FOAFREALM_REPOSITORY.getLocalRepository(), gToAdd);
    } catch (GraphException e) {
View Full Code Here

   
    g.add(action,
        DC_CREATOR.getURI(g),
        (_user.indexOf("mailto:")==0 ||
             _user.indexOf("user:")==0 ||
             _user.indexOf("ip:")==0)?vf.createURI(_user):vf.createLiteral(_user, xsdString));
    g.add(action,
        MBB_CREATEDATE.getURI(g),
        vf.createLiteral(date, xsdDateTime));
    g.add(action,
        MBB_ACCESSDATE.getURI(g),
View Full Code Here

        (_user.indexOf("mailto:")==0 ||
             _user.indexOf("user:")==0 ||
             _user.indexOf("ip:")==0)?vf.createURI(_user):vf.createLiteral(_user, xsdString));
    g.add(action,
        MBB_CREATEDATE.getURI(g),
        vf.createLiteral(date, xsdDateTime));
    g.add(action,
        MBB_ACCESSDATE.getURI(g),
        vf.createLiteral(date, xsdDateTime));
    g.add(action,
        MBB_UPDATEDATE.getURI(g),
View Full Code Here

    g.add(action,
        MBB_CREATEDATE.getURI(g),
        vf.createLiteral(date, xsdDateTime));
    g.add(action,
        MBB_ACCESSDATE.getURI(g),
        vf.createLiteral(date, xsdDateTime));
    g.add(action,
        MBB_UPDATEDATE.getURI(g),
        vf.createLiteral(date, xsdDateTime));

    ///--- is in context
View Full Code Here

    g.add(action,
        MBB_ACCESSDATE.getURI(g),
        vf.createLiteral(date, xsdDateTime));
    g.add(action,
        MBB_UPDATEDATE.getURI(g),
        vf.createLiteral(date, xsdDateTime));

    ///--- is in context
    g.add(action,
        MBB_ISINCONTEXT.getURI(g),
        context);
View Full Code Here

    if(_usedPath.size() == 0) {
      if(lastAction != null) {
        Repository.logger.severe("ActionAccessContextService:newAction - this should not happen!");
        g.add(action,
            MBB_FOLLOWSALONGAXIS.getURI(g),
            vf.createLiteral("0", xsdInt));
   
        g.add(action,
            MBB_FOLLOWS.getURI(g),
            lastAction);
      }else
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.