You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by Fabian Baumgartner <fa...@getunik.com> on 2010/08/05 14:22:36 UTC

Howto create new RichGraphNode in scala

Hi,

howto create a new RichGraphNode in scala? I'm on a scala page and have an URI (a predicate from the current RichGraphNode) stored as plain literal, this is because I have to do the language switch and the language infomation is only storable on plain literals (PlainLiteralImpl). Now I would like to create a new RichGraphNode with this URI to recieve the information there, any ideas?

Another question, is it possible to save URI's with language information?

Thanks in advance,
Fabian

--getunik ag-------------------------------------------
  Fabian Baumgartner     fabian.baumgartner@getunik.com
  hardturmstrasse 101    fon: +41 44 388 55 88
  ch-8005 zuerich               fax: +41 44 388 55 89

 --latest getunik project-------------------------
   Act local! Geo Marketing for your E-Mail campaign: www.geomarketing.com<http://www.geomarketing.com/>

 --best of swiss web awards 2009------------------
   Gold & Silver for Connect2Earth / Bronze for WWF UK

we make the web a better place - www.getunik.com<http://www.getunik.com/>




***********************************************************
P Think about the environment ! Do not print this mail unless necessary.
***********************************************************


Re: Howto create new RichGraphNode in scala

Posted by Reto Bachmann-Gmuer <re...@trialox.org>.
Hi Fabian

While you coul instantiate RichGraphNodes or GraphNodes (which are
implicietely converted to RichGraphNodes) in ScalaServerPages with something
like new GraphNode(new UriRef(myLit*), res.getGraph) I would strongly
disadvise using plain literals to store the langauge information of
documents referenced by uris. I would rather set a property on the
documet-resource (dcterms:language), in the rather rare case the language is
not a property of the target document but rather of the link to it I would
recommend using bodes like [ dct:langauge lang:en. eg:target
<http://...targetDocument>]
.

Cheers,
reto




On Thu, Aug 5, 2010 at 2:22 PM, Fabian Baumgartner <
fabian.baumgartner@getunik.com> wrote:

> Hi,
>
> howto create a new RichGraphNode in scala? I'm on a scala page and have an
> URI (a predicate from the current RichGraphNode) stored as plain literal,
> this is because I have to do the language switch and the language infomation
> is only storable on plain literals (PlainLiteralImpl). Now I would like to
> create a new RichGraphNode with this URI to recieve the information there,
> any ideas?
>
> Another question, is it possible to save URI's with language information?
>
> Thanks in advance,
> Fabian
>
> --getunik ag-------------------------------------------
>  Fabian Baumgartner     fabian.baumgartner@getunik.com
>  hardturmstrasse 101    fon: +41 44 388 55 88
>  ch-8005 zuerich               fax: +41 44 388 55 89
>
>  --latest getunik project-------------------------
>   Act local! Geo Marketing for your E-Mail campaign: www.geomarketing.com<
> http://www.geomarketing.com/>
>
>  --best of swiss web awards 2009------------------
>   Gold & Silver for Connect2Earth / Bronze for WWF UK
>
> we make the web a better place - www.getunik.com<http://www.getunik.com/>
>
>
>
>
> ***********************************************************
> P Think about the environment ! Do not print this mail unless necessary.
> ***********************************************************
>
>