openRDF.org Welcome Guest   | Login   
  Search  
  Index  | Recent Threads  | Who's Online  | User List  | Search  | Help  | RSS feeds

Forum has been closed down
This forum has been closed down due to extensive spamming activities. Please use the mailing list instead.


Quick Go »
Thread Status: Normal
Total posts in this thread: 4
[Add To My Favorites] [Watch this Thread]
Author
Previous Thread This topic has been viewed 982 times and has 3 replies Next Thread
Feb 8, 2009 3:58:15 PM

fabriziogiudici
Member


Italy
Joined: Jan 5, 2009
Posts: 18
Status: Offline

sk

Hi.

AFAIU, in order to change the Locale used in a certain statement I should call SesameManager.setLocale(...) before the operation (but I'm also unsure of this).

What I'm doing is:

                final SesameManager em = ...;
final Concept concept = ...;

final Locale localeSave = em.getLocale();

em.setLocale(Locale.ENGLISH);
concept.getSkosAltLabels.add("ENGLISH: " + englishName);
em.setLocale(Locale.ITALIAN);
concept.getSkosAltLabels.add("ITALIAN: " + italianName);

em.setLocale(localeSave);


But I end up with this:

<skos:Concept rdf:about="urn:bluebill:concept#dd11aac0-f5f8-11dd-a25e-002332c672e6">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
<skos:prefLabel>Ardea cinerea</skos:prefLabel>
<skos:inScheme rdf:resource="urn:bluebill:taxonomy/Birds"/>
<skos:altLabel>ENGLISH: Grey Heron</skos:altLabel>
<skos:altLabel>ITALIAN: Airone cenerino</skos:altLabel>
</skos:Concept>


that is, I don't see the language attribute inside skos:altLabel. Of course, my prefixes ENGLISH: and ITALIAN: are for debugging purposes only.

Thanks.
Show Printable Version of Post        Hidden to Guest    http://weblogs.java.net/blog/fabriziogiudici [Link] Report threatening or abusive post: please login first  Go to top 
Feb 9, 2009 3:56:40 PM

james
OpenRDF.org Consultant
Member's Avatar

Canada
Joined: Jul 21, 2005
Posts: 650
Status: Offline
Re: sk

The locale is only applied to properties that have a @localized annotation on them. The getSkosAltLabels property that ships with Elmo does not contain that annotation (maybe it should?). You may want to consider forking the skos jar and making your own modifications and add the @localized annotation.
----------------------------------------
Sesame Consultant
http://leighnet.ca
http://jamesrdf.blogspot.com
Show Printable Version of Post        Hidden to Guest    http://leighnet.ca [Link] Report threatening or abusive post: please login first  Go to top 
Feb 9, 2009 7:10:31 PM

fabriziogiudici
Member


Italy
Joined: Jan 5, 2009
Posts: 18
Status: Offline

Re: sk

Thanks. Forking is a delicate thing, so I think I'll go instead patching my code and explicitly creating some RDF statements. I'll open an issue about @localized in skos.Concept.

In any case, I suppose that for @localized properties the code I've posted is ok, right?
Show Printable Version of Post        Hidden to Guest    http://weblogs.java.net/blog/fabriziogiudici [Link] Report threatening or abusive post: please login first  Go to top 
Feb 9, 2009 7:18:37 PM

fabriziogiudici
Member


Italy
Joined: Jan 5, 2009
Posts: 18
Status: Offline

Re: sk

Filed http://www.openrdf.org/issues/browse/ELMO-70
Show Printable Version of Post        Hidden to Guest    http://weblogs.java.net/blog/fabriziogiudici [Link] Report threatening or abusive post: please login first  Go to top 
[Show Printable Version of Thread]