You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by si...@apache.org on 2012/03/07 09:39:20 UTC

svn commit: r1297881 - /incubator/stanbol/site/trunk/content/stanbol/docs/trunk/contenthub/contenthub5min.mdtext

Author: sinaci
Date: Wed Mar  7 08:39:19 2012
New Revision: 1297881

URL: http://svn.apache.org/viewvc?rev=1297881&view=rev
Log:
Refactoring example commands

Modified:
    incubator/stanbol/site/trunk/content/stanbol/docs/trunk/contenthub/contenthub5min.mdtext

Modified: incubator/stanbol/site/trunk/content/stanbol/docs/trunk/contenthub/contenthub5min.mdtext
URL: http://svn.apache.org/viewvc/incubator/stanbol/site/trunk/content/stanbol/docs/trunk/contenthub/contenthub5min.mdtext?rev=1297881&r1=1297880&r2=1297881&view=diff
==============================================================================
--- incubator/stanbol/site/trunk/content/stanbol/docs/trunk/contenthub/contenthub5min.mdtext (original)
+++ incubator/stanbol/site/trunk/content/stanbol/docs/trunk/contenthub/contenthub5min.mdtext Wed Mar  7 08:39:19 2012
@@ -38,7 +38,14 @@ Given an LDPath program, Contenthub can 
 
 To submit an LDPath program, you can use the following command through the REST API of Contenthub
 
-    curl -i -X POST -d "name=myindex&program=@prefix rdf : <http://www.w3.org/1999/02/22-rdf-syntax-ns#>; @prefix rdfs : <http://www.w3.org/2000/01/rdf-schema#>; @prefix db-ont : <http://dbpedia.org/ontology/>; title = rdfs:label :: xsd:string; dbpediatype = rdf:type :: xsd:anyURI; population = db-ont:populationTotal :: xsd:int;" http://localhost:8080/contenthub/ldpath/program
+    curl -i -X POST -d \ 
+        "name=myindex&program=\
+        @prefix rdf : <http://www.w3.org/1999/02/22-rdf-syntax-ns#>; \ 
+        @prefix rdfs : <http://www.w3.org/2000/01/rdf-schema#>; \
+        @prefix db-ont : <http://dbpedia.org/ontology/>; \
+        title = rdfs:label :: xsd:string; dbpediatype = rdf:type :: xsd:anyURI; \ 
+        population = db-ont:populationTotal :: xsd:int;" \
+        http://localhost:8080/contenthub/ldpath/program
 
 You can retrieve the list of managed LDPath programs in JSON format with the following command. This is also the list of available Solr cores (except the default Solr core)
 
@@ -46,11 +53,15 @@ You can retrieve the list of managed LDP
 
 LDPath related management is performed through SemanticIndexManager of Contenthub. To take advantage of semantic indexes while storing content items, you need to specify the name of the index in the path of the url while submitting the document. Default index for contenthub is named as "contenthub". Hence, following command submits document to the default index:
 
-    curl -i -X POST -H "Content-Type:application/x-www-form-urlencoded" -d "title=about me&content=I live in Istanbul." http://localhost:8080/contenthub/contenthub/store
+    curl -i -X POST -H "Content-Type:application/x-www-form-urlencoded" \
+        -d "title=about me&content=I live in Istanbul." \
+        http://localhost:8080/contenthub/contenthub/store
 
 Following command will store the content item into Solr core names with "myindex". Therefore, the indexing will be performed through the field properties indicated with the LDPath program named with "myindex".
 
-    curl -i -X POST -H "Content-Type:application/x-www-form-urlencoded" -d "title=about me&content=I live in Istanbul." http://localhost:8080/contenthub/myindex/store
+    curl -i -X POST -H "Content-Type:application/x-www-form-urlencoded" \
+        -d "title=about me&content=I live in Istanbul." \
+        http://localhost:8080/contenthub/myindex/store
 
 Contenthub Search
 -----------------
@@ -106,15 +117,18 @@ RelatedKeywordSearch is performed by thr
 	
 Following command will retrieve related keywords about "turkey" from referenced sites and wordnet (ReferencedSiteSearch and WordnetSearch). Since no ontology is specified, OntologyResourceSearch will not execute.
 
-    curl -i -X GET -H "Accept: application/json" http://localhost:8080/contenthub/contenthub/search/related?keyword=turkey
+    curl -i -X GET -H "Accept: application/json" \
+        http://localhost:8080/contenthub/contenthub/search/related?keyword=turkey
 
 If URI of an ontology is also specified with the keyword as follows, result of the service will include related keywords found through the specified ontology in addition to referenced site and wordnet data. Following command will add the related keywords of "turkey" which are retrieved from the ontology identified with "uri-dummy" to the search result of related keyword service.
 
-    curl -i -X GET -H "Accept: application/json" http://localhost:8080/contenthub/contenthub/search/related?keyword=turkey&ontologyURI=uri-dummy
+    curl -i -X GET -H "Accept: application/json" \
+        http://localhost:8080/contenthub/contenthub/search/related?keyword=turkey&ontologyURI=uri-dummy
 
 Lastly, Contenthub provides a featured search interface which combines the services of SolrSearch and RelatedKeywordSearch. Results of the services of FeaturedSearch interface includes resultant documents and related keywords of the given query term. Following query will retrieve the documents whose indexed fileds includes the term "turkey" and related keywords from several sources about "turkey".
 
-    curl -i -X GET -H "Accept: application/json" -H "Content-Type:text/plain" http://localhost:8080/contenthub/contenthub/search/featured?queryTerm=turkey
+    curl -i -X GET -H "Accept: application/json" -H "Content-Type:text/plain" \
+        http://localhost:8080/contenthub/contenthub/search/featured?queryTerm=turkey
 
   [1]: http://code.google.com/p/ldpath/
   [2]: http://code.google.com/p/ldpath/wiki/PathLanguage