Examples of PlainLiteralImpl


Examples of org.apache.clerezza.rdf.core.impl.PlainLiteralImpl

    AccessController.checkPermission(new UserManagerAccessPermission());
    MGraph contentGraph = cgProvider.getContentGraph();
    MGraph resultGraph = new SimpleMGraph();
    NonLiteral propertyManagementPage = new BNode();
    resultGraph.add(new TripleImpl(propertyManagementPage,
        USERMANAGER.role, new PlainLiteralImpl(role)));
    resultGraph.add(new TripleImpl(propertyManagementPage, RDF.type,
        USERMANAGER.CustomFieldPage));
    resultGraph.add(new TripleImpl(propertyManagementPage, RDF.type,
        PLATFORM.HeadedPage));
    ArrayList<NonLiteral> customfields = customPropertyManager
        .getCustomfieldsOfCollection(customPropertyManager
            .getCustomPropertyCollection(PERMISSION.Role, role));
    for (NonLiteral customfield : customfields) {
      resultGraph.add(new TripleImpl(customfield, USERMANAGER.role,
          new PlainLiteralImpl(role)));
      resultGraph.add(new TripleImpl(propertyManagementPage,
          CUSTOMPROPERTY.customfield, customfield));
    }
    return new GraphNode(propertyManagementPage, new UnionMGraph(
        resultGraph, contentGraph));
View Full Code Here

Examples of org.apache.clerezza.rdf.core.impl.PlainLiteralImpl

    resultGraph.add(new TripleImpl(resource,
        RDF.type,
        SCRIPTMANAGER.SelectedScript));
    resultGraph.add(new TripleImpl(scriptUri,
        SCRIPTMANAGER.code,
        new PlainLiteralImpl(
          new String(contentHandler.getData(scriptUri)))));

    GraphNode scriptLanguageList = getScriptLanguageList(resource);

    return new GraphNode(resource, new UnionMGraph(resultGraph,
View Full Code Here

Examples of org.apache.clerezza.rdf.core.impl.PlainLiteralImpl

      tripleArray.add(new TripleImpl(customField, RDF.type,
          CUSTOMPROPERTY.CustomField));
      tripleArray.add(new TripleImpl(customField, CUSTOMPROPERTY.cardinality,
          LiteralFactory.getInstance().createTypedLiteral(cardinality)));
      tripleArray.add(new TripleImpl(customField,
          CUSTOMPROPERTY.presentationlabel, new PlainLiteralImpl(label)));
      if(description != null && !description.isEmpty()) {
        tripleArray.add(new TripleImpl(customField,
          DCTERMS.description, new PlainLiteralImpl(description)));
      }
      if(config != null && !config.isEmpty()) {
        tripleArray.add(new TripleImpl(customField,
          CUSTOMPROPERTY.configuration, new PlainLiteralImpl(config)));
      }
      if(contentGraph.addAll(tripleArray)){
        return customField;
      } else {
        return null;
View Full Code Here

Examples of org.apache.clerezza.rdf.core.impl.PlainLiteralImpl

  @Override
  public GraphNode getExceptionGraphNode() {
    GraphNode result = new GraphNode(new BNode(), new SimpleMGraph());
    result.addProperty(RDF.type, TYPERENDERING.Exception);
    result.addProperty(TYPERENDERING.errorSource, new UriRef(renderingSpecification.toString()));
    result.addProperty(TYPERENDERING.message, new PlainLiteralImpl(getMessage()));
    result.addProperty(TYPERENDERING.stackTrace, getStackTraceLiteral());
    return result;
  }
View Full Code Here

Examples of org.apache.clerezza.rdf.core.impl.PlainLiteralImpl

  private PlainLiteral getStackTraceLiteral() {
    StringWriter sw = new StringWriter();
    PrintWriter pw = new PrintWriter(sw);
    cause.printStackTrace(pw);
    pw.flush();
    return new PlainLiteralImpl(sw.toString());
  }
View Full Code Here

Examples of org.apache.clerezza.rdf.core.impl.PlainLiteralImpl

          NonLiteral agent;
          Lock readLock = systemGraph.getLock().readLock();
          readLock.lock();
          try {
            Iterator<Triple> agents = systemGraph.filter(null, PLATFORM.userName,
                new PlainLiteralImpl(userName));
            agent = agents.next().getSubject();
          } finally {
            readLock.unlock();
          }
          MGraph temporary = new SimpleMGraph();
          temporary.add(new TripleImpl(agent, PERMISSION.password,
              new PlainLiteralImpl(newPassword)));
          MGraph result = new UnionMGraph(temporary, systemGraph);
          GraphNode mailGraph = new GraphNode(new BNode(), result);
          mailGraph.addProperty(RDF.type, USERMANAGER.PasswordResetMail);
          mailGraph.addProperty(USERMANAGER.recipient, agent);
          List<MediaType> acceptableMediaTypes =
View Full Code Here

Examples of org.apache.clerezza.rdf.core.impl.PlainLiteralImpl

      result.addProperty(TYPERENDERING.line, factory.createTypedLiteral(new Integer(lineNumber)));
    }
    if (columnNumber != -1) {
      result.addProperty(TYPERENDERING.column, factory.createTypedLiteral(Integer.valueOf(columnNumber)));
    }
    result.addProperty(TYPERENDERING.message, new PlainLiteralImpl(getMessage()));
    return result;
  }
View Full Code Here

Examples of org.apache.clerezza.rdf.core.impl.PlainLiteralImpl

      case 0:
        return new BNode();
      case 1:
        return createRandomUriRef();
      case 2:
        return new PlainLiteralImpl(RandomStringUtils.random(rollDice(100) + 1));
    }
    throw new RuntimeException("in createRandomResource()");
  }
View Full Code Here

Examples of org.apache.clerezza.rdf.core.impl.PlainLiteralImpl

          triple.getObject().toString().contains(RDF.Bag.getURI()));
    }

    Assert.assertTrue(tc.filter(null,
        new UriRef("http://ns.adobe.com/photoshop/1.0/City"),
        new PlainLiteralImpl("City")).hasNext());
  }
View Full Code Here

Examples of org.apache.clerezza.rdf.core.impl.PlainLiteralImpl

          triple.getObject().toString().contains(RDF.Alt.getURI()));
    }
   
    Assert.assertTrue(tc.filter(null,
        new UriRef("http://ns.adobe.com/tiff/1.0/Artist"),
        new PlainLiteralImpl("Hans Wurst")).hasNext());
   
  }
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.