marmotta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sschaff...@apache.org
Subject svn commit: r1450763 - /incubator/marmotta/site/trunk/content/markdown/ldclient/modules.md.vm
Date Wed, 27 Feb 2013 12:56:04 GMT
Author: sschaffert
Date: Wed Feb 27 12:56:04 2013
New Revision: 1450763

URL: http://svn.apache.org/r1450763
Log:
finished documentation of ldclient modules

Modified:
    incubator/marmotta/site/trunk/content/markdown/ldclient/modules.md.vm

Modified: incubator/marmotta/site/trunk/content/markdown/ldclient/modules.md.vm
URL: http://svn.apache.org/viewvc/incubator/marmotta/site/trunk/content/markdown/ldclient/modules.md.vm?rev=1450763&r1=1450762&r2=1450763&view=diff
==============================================================================
--- incubator/marmotta/site/trunk/content/markdown/ldclient/modules.md.vm (original)
+++ incubator/marmotta/site/trunk/content/markdown/ldclient/modules.md.vm Wed Feb 27 12:56:04
2013
@@ -27,6 +27,27 @@ The RDF module auto-registers an endpoin
 configuration matches first, the LDClient library will always try to issue a Linked Data
request by default once the
 module is on the classpath.
 
+In addition to this default behaviour, the RDF module also offers pre-defined endpoint classes
that can be used for
+configuring special cases:
+
+* SPARQLEndpoint allows redirecting the request of all resources matching a regular expression
pattern to a SPARQL
+  service; the provider will then issue a SPARQL query of the form `SELECT ?p ?o WHERE {
<{uri}> ?p ?o }` to retrieve
+  all triples having the requested resource as subject
+* StanbolEndpoint allows redirecting the request to a Apache Stanbol Entityhub (which can
be configured as a local
+  cache of frequently-used Linked Data resources).
+
+For example, to redirect requests to DBPedia resources to the (more reliable) SPARQL endpoint
offered by the service,
+you can use the following statements:
+
+    ClientConfiguration config = new ClientConfiguration();
+    config.addEndpoint(
+        new SPARQLEndpoint("DBPedia (SPARQL)","http://dbpedia.org/sparql","^http://dbpedia\\.org/resource/.*")
+    );
+
+    LDClientService ldclient = new LDClient(config);
+
+
+
 RDFa Module
 -----------
 
@@ -74,28 +95,28 @@ youtu.be video with a `foaf:primaryTopic
 Using the [Ontology for Media Resources][1], the module will create the following triples
when requesting a video
 resource:
 
-* `rdf:type` will be `ma:MediaResource` and `ma:VideoTrack`
-* `ma:title` will be the title of the video on YouTube
-* `ma:locator` will be the URL of the actual video on the platform
-* `ma:hasCreator` and `ma:hasPublisher` will point to the resource URI of the user who uploaded
the video
-* `ma:date` will be set to the publication date of the video
-* `ma:locationLatitude` and `ma:locationLongitude` will be set to the geo-coordinates of
the video (if available)
-* `ma:description` will contain the textual description provided by the publisher
-* `ma:hasKeyword` will contain the names of all YouTube keywords associated with the video
-* `ma:hasGenre` will point to the resources identifying the YouTube categories of the video
-* `ma:hasRating` will contain the average user rating of the video at the time of retrieval
-* `ma:copyright` will describe the license terms of the video
+* `rdf:type` is `ma:MediaResource` and `ma:VideoTrack`
+* `ma:title` is the title of the video on YouTube
+* `ma:locator` is the URL of the actual video on the platform
+* `ma:hasCreator` and `ma:hasPublisher`  point to the resource URI of the user who uploaded
the video
+* `ma:date` is set to the publication date of the video
+* `ma:locationLatitude` and `ma:locationLongitude` is set to the geo-coordinates of the video
(if available)
+* `ma:description` contains the textual description provided by the publisher
+* `ma:hasKeyword` contains the names of all YouTube keywords associated with the video
+* `ma:hasGenre` points to the resources identifying the YouTube categories of the video
+* `ma:hasRating` contains the average user rating of the video at the time of retrieval
+* `ma:copyright` describes the license terms of the video
 * `ma:hasCompression` and `ma:format` will describe the content format used for storing the
video
-* `ma:duration` will contain the duration of the video in seconds
-* `foaf:thumbnail` will contain references to thumbnail images of the video
-* `sioc:num_views` will contain the number of views of the video at the time of retrieval
+* `ma:duration` contains the duration of the video in seconds
+* `foaf:thumbnail` contains references to thumbnail images of the video
+* `sioc:num_views` contains the number of views of the video at the time of retrieval
 
 Similarly, channels and playlists are represented using the Media Collections offered by
the Ontology for Media Resources:
 
-* `rdf:type` will be `ma:Collection`
-* `ma:collectionName` will be the title of the channel or playlist
+* `rdf:type` is `ma:Collection`
+* `ma:collectionName` is the title of the channel or playlist
 * `ma:hasMember` points to the resource URIs of all videos contained in the channel or plalist
-* `ma:hasCreator` and `ma:hasPublisher` will point to the resource URI of the user who uploaded
the video
+* `ma:hasCreator` and `ma:hasPublisher` points to the resource URI of the user who uploaded
the video
 
 
 
@@ -126,21 +147,21 @@ about Vimeo resources using the LDClient
 Using the [Ontology for Media Resources][1], the module will create the following triples
when requesting a video
 resource. Note that the Vimeo API provides significantly less details than the YouTube API:
 
-* `rdf:type` will be `ma:MediaResource` and `ma:VideoTrack`
-* `ma:title` will be the title of the video on Vimeo
-* `ma:locator` will be the URL of the actual video on the platform
-* `ma:hasCreator` and `ma:hasPublisher` will point to the resource URI of the user who uploaded
the video
-* `ma:date` will be set to the publication date of the video
-* `ma:description` will contain the textual description provided by the publisher
-* `ma:hasKeyword` will contain the keywords the publisher associated with the video
-* `ma:duration` will contain the duration of the video in seconds
-* `foaf:thumbnail` will contain references to thumbnail images of the video
-* `sioc:num_views` will contain the number of views of the video at the time of retrieval
-* `sioc:num_replies` will contain the number of comments on the video at the time of retrieval
+* `rdf:type` is `ma:MediaResource` and `ma:VideoTrack`
+* `ma:title` is the title of the video on Vimeo
+* `ma:locator` is the URL of the actual video on the platform
+* `ma:hasCreator` and `ma:hasPublisher` point to the resource URI of the user who uploaded
the video
+* `ma:date` is set to the publication date of the video
+* `ma:description` contains the textual description provided by the publisher
+* `ma:hasKeyword` contains the keywords the publisher associated with the video
+* `ma:duration` contains the duration of the video in seconds
+* `foaf:thumbnail` contains references to thumbnail images of the video
+* `sioc:num_views` contains the number of views of the video at the time of retrieval
+* `sioc:num_replies` contains the number of comments on the video at the time of retrieval
 
 Similarly, channels and playlists are represented using the Media Collections offered by
the Ontology for Media Resources:
 
-* `rdf:type` will be `ma:Collection`
+* `rdf:type` is `ma:Collection`
 * `ma:hasMember` points to the resource URIs of all videos contained in the channel or group
 
 
@@ -166,18 +187,18 @@ you are using (see the WikipediaPageEndp
 
 The MediaWiki provider creates triples for a wiki page using SIOC and Dublin Core as follows:
 
-* `rdf:type` will be `sioc:WikiArticle`
-* `dct:title` will be the title of the wiki page
-* `dct:identifier` will be the page identifier in the MediaWiki database
-* `dct:modified` will be the last modification date of the page
-* `dct:created` will be the creation date of the page
-* `content:encoded` will be the content of the page in MediaWiki syntax
-* `sioc:topic` will be references to all resource URIs of MediaWiki categories used by the
wiki page
-* `sioc:links_to` will be references to all resource URIs of wiki pages the page links to
+* `rdf:type` is `sioc:WikiArticle`
+* `dct:title` is the title of the wiki page
+* `dct:identifier` is the page identifier in the MediaWiki database
+* `dct:modified` is the last modification date of the page
+* `dct:created` is the creation date of the page
+* `content:encoded` is the content of the page in MediaWiki syntax
+* `sioc:topic` is references to all resource URIs of MediaWiki categories used by the wiki
page
+* `sioc:links_to` is references to all resource URIs of wiki pages the page links to
 
 
-PHPBB Module
-------------
+PHPBB Module (Experimental)
+---------------------------
 
 The PHPBB module tries to parse the HTML pages generated by a PHPBB discussion forum and
extract posts and threads
 from the content. Since PHPBB does not offer an RSS feed or service API, this extraction
is unreliable at best,
@@ -193,17 +214,47 @@ If you want to try out the module, inclu
 The module does not auto-register any endpoints, but it offers simplified endpoint classes
that allow a more convenient
 configuration of endpoints. If you want to configure all endpoints for a PHPBB site, simply
use
 
-    PHPBBEndpoints.getEndpoints("http://www.carving-ski.de/phpBB/,"Carving Ski Forum");
+    ClientConfiguration config = new ClientConfiguration();
+    config.getEndpoints().addAll(PHPBBEndpoints.getEndpoints("http://www.carving-ski.de/phpBB/,"Carving
Ski Forum"));
+
+    LDClient ldclient = new LDClient(config);
 
 where the first argument is the URL of the PHPBB installation and the second argument gives
a human-readable name
 to the endpoint configuration. The method returns a set of endpoints that can be directly
added to an LDClient instance.
 
+The PHPBB module will map information from posts to RDF using the SIOC and Dublin Core vocabulary
as follows:
 
-
-
-LDAP Module
------------
-
+* `rdf:type` is `sioc:Post`, `sioc-types:BoardPost` and `foaf:Document`
+* `dc:title` is the post title; some cleanup will be performed to remove common "Re:" and
similar prefixes
+* `dc:creator` is the name of the user as found in the post
+* `dc:description` is the content of the post
+* `dc:date` is the date of the post 
+
+A topic or thread in a PHPBB forum will be mapped to RDF as follows:
+
+* `rdf:type` is `sioc:Thread`, `sioc:Collection` and `foaf:Document`
+* `dc:title` is the thread or topic title
+* `dc:creator` is the name of the user who started the thread/topic
+* `dc:date` is the date when the topic/thread was started
+* `sioc:has_container` points to the resource URI of the forum this thread belongs to
+* `sioc:container_of` points to all resource URIs of the posts contained in the thread
+
+Finally, a forum in a PHPBB installation will be mapped to RDF as follows:
+
+* `rdf:type` is `sioc:Forum`, `sioc:Collection` and `foaf:Document`
+* `dc:title` is the forum title
+* `dc:description` contains a short description of the forum (as given on the webpage)
+* `sioc:container_of` points to all resource URIs of the threads/topics contained in the
forum
+* `sioc:parent_of` points to all resource URIs of subforums contained in the forum
+
+
+LDAP Module (Experimental)
+--------------------------
+
+The LDAP module allows accessing a LDAP directory to get information about users. LDAP properties
will be mapped to the
+FOAF vocabulary. Endpoint configurations need to provide the two properties "loginDN" and
"loginPW" to support LDAP
+directories with access control. In order to use the LDAP module in your project, add the
following dependency to
+your project build:
 
     <dependency>
         <groupId>org.apache.marmotta</groupId>
@@ -211,3 +262,24 @@ LDAP Module
         <version>${projectVersion}</version>
     </dependency>
 
+The module does not auto-register any endpoints. You need to create an endpoint configuration
for each LDAP directory
+you want to access. In most cases the LDAP directory will require a login to access the user
data. These can be
+configured using the "loginDN" and "loginPW" properties:
+
+    Endpoint endpoint = new Endpoint("mydirectory", "LdapFoafProvider", "ldap://mydirectory.com:389/SRFG/USERS/.*",
"ldap://mydirectory.com:389/dc=salzburgresearch,dc=at", null, 86400L);
+    endpoint.setProperty("loginDN","login");
+    endpoint.setProperty("loginPW","password");
+
+    ClientConfiguration config = new ClientConfiguration();
+    config.addEndpoint(endpoint);
+
+    LDClient ldclient = new LDClient(config);
+
+The LDAP module will map LDAP properties to FOAF properties as follows:
+
+* the `rdf:type` is `foaf:Person`
+* `distinguishedName` is mapped to `dct:identifier`
+* `name` is mapped to `foaf:name`
+* `givenName` is mapped to `foaf:firstName`
+* `sn` is mapped to `foaf:surname`
+* `mail` is mapped to `foaf:mbox`



Mime
View raw message