|
|
Index
| Recent Threads
| Who's Online
| User List
| Search
| Help
| |
|
Forum has been closed down This forum has been closed down due to extensive spamming activities. Please use the mailing list instead. |
![]() |
openRDF.org Forum » AliBaba & Elmo: Help » Thread: string-typed literals and Elmo |
|
Total posts in this thread: 2 |
[Add To My Favorites] [Watch this Thread] |
| Author |
|
|
Jan 31, 2008 9:08:20 PM
josh Visitor
|
Hello. I'd like to know if it's possible to have Elmo create string-typed literals instead of plain literals. For instance, this interface has a "set" method which takes a String as an argument: @rdf("http://www.example.com/onto#SomeClass")Supposing that the domain of stringTypedProperty is xsd:string, the objects of the statements created by setStringTypedProperty must (in my application) have a datatype of xsd:string. I notice that the org.openrdf.elmo.literals file included with Elmo does map java.lang.String to xsd:string, and I've even tried adding the association programmatically using ElmoModule.recordLiteral, yet I only manage to get plain literals for Strings. Is there anything I've overlooked? |
||
|
|
Feb 1, 2008 5:33:09 PM
james OpenRDF.org Consultant Canada Joined: Jul 21, 2005 Posts: 650 Status: Offline |
There is no way to override that behaviour through resources files. You will have to override the behaviour in Java. All String are converted into Literals using the ValueFactory#createLiteral(String) method, which is called from the SesameLiteralManager#getLiteral(Object) For each SesameManager, create a LiteralManager wrapper around the one returned by SesameManagerFactory and override the getLiteral(Object) method. http://www.openrdf.org/doc/elmo/1.0-beta2/apidocs/org/openrdf/elmo/sesame/SesameManagerFactory.html http://www.openrdf.org/doc/elmo/1.0-beta2/apidocs/org/openrdf/elmo/sesame/SesameManager.html ---------------------------------------- Sesame Consultant http://leighnet.ca http://jamesrdf.blogspot.com |
||
|
| [Show Printable Version of Thread] |