You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by re...@apache.org on 2013/02/20 17:26:49 UTC

svn commit: r1448279 - in /stanbol/trunk/commons/web: rdfviewable-writer/src/main/java/org/apache/stanbol/commons/web/rdfviewable/writer/impl/ viewable/ viewable/src/main/java/org/apache/stanbol/commons/web/viewable/

Author: reto
Date: Wed Feb 20 16:26:48 2013
New Revision: 1448279

URL: http://svn.apache.org/r1448279
Log:
STANBOL-946: renamed template-path to rendering specification

Modified:
    stanbol/trunk/commons/web/rdfviewable-writer/src/main/java/org/apache/stanbol/commons/web/rdfviewable/writer/impl/LdViewableWriter.java
    stanbol/trunk/commons/web/rdfviewable-writer/src/main/java/org/apache/stanbol/commons/web/rdfviewable/writer/impl/RdfSerializingWriter.java
    stanbol/trunk/commons/web/viewable/pom.xml
    stanbol/trunk/commons/web/viewable/src/main/java/org/apache/stanbol/commons/web/viewable/RdfViewable.java

Modified: stanbol/trunk/commons/web/rdfviewable-writer/src/main/java/org/apache/stanbol/commons/web/rdfviewable/writer/impl/LdViewableWriter.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/commons/web/rdfviewable-writer/src/main/java/org/apache/stanbol/commons/web/rdfviewable/writer/impl/LdViewableWriter.java?rev=1448279&r1=1448278&r2=1448279&view=diff
==============================================================================
--- stanbol/trunk/commons/web/rdfviewable-writer/src/main/java/org/apache/stanbol/commons/web/rdfviewable/writer/impl/LdViewableWriter.java (original)
+++ stanbol/trunk/commons/web/rdfviewable-writer/src/main/java/org/apache/stanbol/commons/web/rdfviewable/writer/impl/LdViewableWriter.java Wed Feb 20 16:26:48 2013
@@ -70,7 +70,7 @@ public class LdViewableWriter implements
             OutputStream entityStream) throws IOException,
             WebApplicationException {
         Writer out = new OutputStreamWriter(entityStream, "utf-8");
-        ldRenderer.render(t.getGraphNode(), "html/" + t.getTemplatePath(), out);
+        ldRenderer.render(t.getGraphNode(), "html/" + t.getRenderingSpecification(), out);
         out.flush();
     }
 }

Modified: stanbol/trunk/commons/web/rdfviewable-writer/src/main/java/org/apache/stanbol/commons/web/rdfviewable/writer/impl/RdfSerializingWriter.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/commons/web/rdfviewable-writer/src/main/java/org/apache/stanbol/commons/web/rdfviewable/writer/impl/RdfSerializingWriter.java?rev=1448279&r1=1448278&r2=1448279&view=diff
==============================================================================
--- stanbol/trunk/commons/web/rdfviewable-writer/src/main/java/org/apache/stanbol/commons/web/rdfviewable/writer/impl/RdfSerializingWriter.java (original)
+++ stanbol/trunk/commons/web/rdfviewable-writer/src/main/java/org/apache/stanbol/commons/web/rdfviewable/writer/impl/RdfSerializingWriter.java Wed Feb 20 16:26:48 2013
@@ -104,7 +104,7 @@ public class RdfSerializingWriter implem
             MultivaluedMap<String, Object> httpHeaders,
             OutputStream entityStream) throws IOException, WebApplicationException {
         GraphNode node = v.getGraphNode();
-        GraphNode recipe = getRecipe(v.getTemplatePath());
+        GraphNode recipe = getRecipe(v.getRenderingSpecification());
         serializer.serialize(entityStream, getExpandedContext(node, recipe), mediaType.toString());
     }
 

Modified: stanbol/trunk/commons/web/viewable/pom.xml
URL: http://svn.apache.org/viewvc/stanbol/trunk/commons/web/viewable/pom.xml?rev=1448279&r1=1448278&r2=1448279&view=diff
==============================================================================
--- stanbol/trunk/commons/web/viewable/pom.xml (original)
+++ stanbol/trunk/commons/web/viewable/pom.xml Wed Feb 20 16:26:48 2013
@@ -30,7 +30,7 @@
   <version>0.12.0-SNAPSHOT</version>
   <packaging>bundle</packaging>
 
-  <name>Apache Stanbol Commons Web Template Viewable</name>
+  <name>Apache Stanbol Commons Web Viewable</name>
   <description>A service providing classes and message body writer for response rendering with the viewable pattern.</description>
   <scm>
     <connection>

Modified: stanbol/trunk/commons/web/viewable/src/main/java/org/apache/stanbol/commons/web/viewable/RdfViewable.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/commons/web/viewable/src/main/java/org/apache/stanbol/commons/web/viewable/RdfViewable.java?rev=1448279&r1=1448278&r2=1448279&view=diff
==============================================================================
--- stanbol/trunk/commons/web/viewable/src/main/java/org/apache/stanbol/commons/web/viewable/RdfViewable.java (original)
+++ stanbol/trunk/commons/web/viewable/src/main/java/org/apache/stanbol/commons/web/viewable/RdfViewable.java Wed Feb 20 16:26:48 2013
@@ -19,43 +19,44 @@ package org.apache.stanbol.commons.web.v
 import org.apache.clerezza.rdf.utils.GraphNode;
 
 /**
- * An RdfViewable is a GraphNode associated with a template path. The template 
- * path will be attempted to be resolved based on the accepted target formats
- * to create a representation of the GraphNode. 
+ * An RdfViewable is a GraphNode associated with a rendering specification. The 
+ * rendering specification determines the way the GraphNode is rendered in the 
+ * requested format. The rendering specification is typically a path to a 
+ * template. 
  *
  */
 public class RdfViewable {
 
     /**
      * 
-     * @param templatePath the templatePath
+     * @param renderingSpecification the rendering specification
      * @param graphNode the graphNode with the actual content
      */
-    public RdfViewable(final String templatePath, final GraphNode graphNode) {
-        this.templatePath = templatePath;
+    public RdfViewable(final String renderingSpecification, final GraphNode graphNode) {
+        this.renderingSpecification = renderingSpecification;
         this.graphNode = graphNode;
     }
     
     /**
-     * With this version of the constructor the templatePath is prefixed with
+     * With this version of the constructor the rendering specification is prefixed with
      * the slash-separated package name of the given Class.
      * 
      */
-    public RdfViewable(final String templatePath, final GraphNode graphNode, final Class<?> clazz) {
+    public RdfViewable(final String renderingSpecification, final GraphNode graphNode, final Class<?> clazz) {
         final String slahSeparatedPacakgeName = clazz.getPackage().getName().replace('.', '/');
-        if (templatePath.startsWith("/")) {
-            this.templatePath = slahSeparatedPacakgeName+templatePath;
+        if (renderingSpecification.startsWith("/")) {
+            this.renderingSpecification = slahSeparatedPacakgeName+renderingSpecification;
         } else {
-            this.templatePath = slahSeparatedPacakgeName+'/'+templatePath;
+            this.renderingSpecification = slahSeparatedPacakgeName+'/'+renderingSpecification;
         }
         this.graphNode = graphNode;
     }
     
-    private String templatePath;
+    private String renderingSpecification;
     private GraphNode graphNode;
     
-    public String getTemplatePath() {
-        return templatePath;
+    public String getRenderingSpecification() {
+        return renderingSpecification;
     }
     
     public GraphNode getGraphNode() {