You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juneau.apache.org by GitBox <gi...@apache.org> on 2018/12/14 16:46:13 UTC

[GitHub] jamesbognar closed pull request #5: adding marshall rdf samples modifications in website

jamesbognar closed pull request #5: adding marshall rdf samples modifications in website
URL: https://github.com/apache/juneau-website/pull/5
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/templates/marshall.html b/templates/marshall.html
index 837a08c6..fdd78045 100644
--- a/templates/marshall.html
+++ b/templates/marshall.html
@@ -480,8 +480,8 @@ <h5 class='figure'>OSGi Module</h5>
 		<p class='bcode w800'>
 	<jc>// A simple bean</jc>
 	<jk>public class</jk> Person {
-		<jk>public</jk> String name = <js>"John Smith"</js>;
-		<jk>public int</jk> age = 21;
+		<jk>public</jk> String name = <js>"This is RDF format."</js>;
+		<jk>public</jk> String id = "rdf";
 	}
 	
 	<jc>// Serialize a bean to JSON, XML, or HTML</jc>
@@ -493,27 +493,35 @@ <h5 class='figure'>OSGi Module</h5>
 	//  xmlns:jp="http://www.apache.org/juneaubp/"
 	//  xmlns:j="http://www.apache.org/juneau/"&gt;
 	// 	&lt;rdf:Description&gt;
-	// 		&lt;jp:name&gt;John Smith&lt;/jp:name&gt;
-	// 		&lt;jp:age&gt;21&lt;/jp:age&gt;
+	// 		&lt;jp:name&gt;This is RDF format.&lt;/jp:name&gt;
+	// 		&lt;jp:id&gt;rdf&lt;/jp:id&gt;
 	// 	&lt;/rdf:Description&gt;
 	// &lt;/rdf:RDF&gt;</jc>
-	String rdfXml = RdfSerializer.<jsf>DEFAULT_XMLABBREV</jsf>.serialize(p);
+	String rdfXml = RdfXmlAbbrevSerializer.<jsf>DEFAULT</jsf>.serialize(p);
 	
 	<jc>// Produces:
 	// @prefix jp:      &lt;http://www.apache.org/juneaubp/&gt; .
 	// @prefix j:       &lt;http://www.apache.org/juneau/&gt; .
-	//	[]    jp:age  "21" ;
-	//	      jp:name "John Smith" .</jc>
-	String rdfN3 = RdfSerializer.<jsf>DEFAULT_N3</jsf>.serialize(p);
+	//	[]    jp:id  "rdf" ;
+	//	      jp:name "This is RDF format." .</jc>
+	String rdfN3 = N3Serializer.<jsf>DEFAULT</jsf>.serialize(p);
+
+	<jc>// Produces:
+	// _:A3bf53c85X3aX157cf407e2dX3aXX2dX7ffd &lt;http://www.apache.org/juneaubp/name&gt; "This is RDF format." .
+	// _:A3bf53c85X3aX157cf407e2dX3aXX2dX7ffd &lt;http://www.apache.org/juneaubp/age&gt; "rdf" .</jc>
+	String rdfNTriple = NTripleSerializer.<jsf>DEFAULT</jsf>.serialize(p);
 
 	<jc>// Produces:
-	// _:A3bf53c85X3aX157cf407e2dX3aXX2dX7ffd &lt;http://www.apache.org/juneaubp/name&gt; "John Smith" .
-	// _:A3bf53c85X3aX157cf407e2dX3aXX2dX7ffd &lt;http://www.apache.org/juneaubp/age&gt; "21" .</jc>
-	String rdfNTriple = RdfSerializer.<jsf>DEFAULT_NTRIPLE</jsf>.serialize(p);
+	// @prefix jp:      &lt;http://www.apache.org/juneaubp/&gt; .
+	// @prefix j:       &lt;http://www.apache.org/juneau/&gt; .
+	//	[]    jp:id  "rdf" ;
+	//	      jp:name "This is RDF format." .</jc>
+	String rdfTurtle = TurtleSerializer.<jsf>DEFAULT</jsf>.serialize(p);
 		</p>
 		
 		<h5 class='section'>More Information:</h5>
 		<ul class='doctree'>
+
 			<li><a class='doclink' href='http://juneau.apache.org/site/apidocs-{@property juneauVersion}/overview-summary.html#juneau-marshall-rdf'>juneau-marshall-rdf</a>
 		</ul>
 	</div>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services