Package org.apache.clerezza.rdf.utils

Examples of org.apache.clerezza.rdf.utils.GraphNode.addProperty()


      TypedLiteral dataLiteral = LiteralFactory.getInstance().createTypedLiteral(data);
      infoDiscoBitNode.deleteProperties(DISCOBITS.infoBit);
      infoDiscoBitNode.addProperty(DISCOBITS.infoBit, dataLiteral);
      TypedLiteral mediaTypeLiteral = LiteralFactory.getInstance().createTypedLiteral(mediaType.toString());
      infoDiscoBitNode.deleteProperties(DISCOBITS.mediaType);
      infoDiscoBitNode.addProperty(DISCOBITS.mediaType,mediaTypeLiteral);
    } finally {
      writeLock.unlock();
    }
    Set<MetaDataGenerator> metaDataGenerators = getMetaDataGenerators();
    synchronized(metaDataGenerators) {
View Full Code Here


      GraphNode scriptNode = new GraphNode(scriptUri, contentGraph);
      scriptNode.deleteProperties(DCTERMS.title);
      scriptNode.deleteProperties(SCRIPT.scriptLanguage);
      scriptNode.deleteProperties(SCRIPT.scriptLanguageVersion);
      scriptNode.deleteProperties(SCRIPT.producedType);
      scriptNode.addProperty(RDF.type, SCRIPT.Script);
      scriptNode.addProperty(DCTERMS.title,
          LiteralFactory.getInstance().
          createTypedLiteral(scriptName));
      scriptNode.addProperty(SCRIPT.scriptLanguage,
          LiteralFactory.getInstance().
View Full Code Here

      scriptNode.deleteProperties(DCTERMS.title);
      scriptNode.deleteProperties(SCRIPT.scriptLanguage);
      scriptNode.deleteProperties(SCRIPT.scriptLanguageVersion);
      scriptNode.deleteProperties(SCRIPT.producedType);
      scriptNode.addProperty(RDF.type, SCRIPT.Script);
      scriptNode.addProperty(DCTERMS.title,
          LiteralFactory.getInstance().
          createTypedLiteral(scriptName));
      scriptNode.addProperty(SCRIPT.scriptLanguage,
          LiteralFactory.getInstance().
          createTypedLiteral(scriptLanguage));
View Full Code Here

      scriptNode.deleteProperties(SCRIPT.producedType);
      scriptNode.addProperty(RDF.type, SCRIPT.Script);
      scriptNode.addProperty(DCTERMS.title,
          LiteralFactory.getInstance().
          createTypedLiteral(scriptName));
      scriptNode.addProperty(SCRIPT.scriptLanguage,
          LiteralFactory.getInstance().
          createTypedLiteral(scriptLanguage));
      scriptNode.addProperty(SCRIPT.scriptLanguageVersion,
          LiteralFactory.getInstance().
          createTypedLiteral(scriptLanguageVersion));
View Full Code Here

          LiteralFactory.getInstance().
          createTypedLiteral(scriptName));
      scriptNode.addProperty(SCRIPT.scriptLanguage,
          LiteralFactory.getInstance().
          createTypedLiteral(scriptLanguage));
      scriptNode.addProperty(SCRIPT.scriptLanguageVersion,
          LiteralFactory.getInstance().
          createTypedLiteral(scriptLanguageVersion));
      if(!producedTypeString.equals("")) {
        scriptNode.addProperty(SCRIPT.producedType,
            LiteralFactory.getInstance().
View Full Code Here

          createTypedLiteral(scriptLanguage));
      scriptNode.addProperty(SCRIPT.scriptLanguageVersion,
          LiteralFactory.getInstance().
          createTypedLiteral(scriptLanguageVersion));
      if(!producedTypeString.equals("")) {
        scriptNode.addProperty(SCRIPT.producedType,
            LiteralFactory.getInstance().
              createTypedLiteral(
                MediaType.valueOf(producedTypeString).
                  toString()));
      }
View Full Code Here

      if (!contentGraph.filter(generatedResourceUri, RDF.type,
          SCRIPT.ScriptGeneratedResource).hasNext()) {
       
        GraphNode generatedResourceNode =
            new GraphNode(generatedResourceUri, contentGraph);
        generatedResourceNode.addProperty(RDF.type,
            SCRIPT.ScriptGeneratedResource);
        generatedResourceNode.addProperty(SCRIPT.scriptSource,
            scriptUri);
      } else {
        return false;
View Full Code Here

       
        GraphNode generatedResourceNode =
            new GraphNode(generatedResourceUri, contentGraph);
        generatedResourceNode.addProperty(RDF.type,
            SCRIPT.ScriptGeneratedResource);
        generatedResourceNode.addProperty(SCRIPT.scriptSource,
            scriptUri);
      } else {
        return false;
      }
    }
View Full Code Here

  }

  @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

  @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

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.