Pinto and language support

1 view
Skip to first unread message

jan.bjo...@gmail.com

unread,
Nov 30, 2016, 7:28:10 AM11/30/16
to Stardog
Hey.

We are using Pinto to map between POJO and RDF.

Recently we encountering some problems with mapping literals with language from RDF back to POJO.

    @RdfProperty(value="virksomhet:navn", language="no-nb")
    public String getNavn() {
        return navn;
    }

java.lang.RuntimeException: Unsupported or unknown literal datatype: "Virksomhet"@no-nb
    at com.complexible.pinto.RDFMapper.valueToObject(RDFMapper.java:633)
    at com.complexible.pinto.RDFMapper.readValue(RDFMapper.java:336)
    at no.difi.einnsyn.admin.service.EnhetService.fromModel(EnhetService.java:139)
    at no.difi.einnsyn.admin.service.EnhetService.finnEnhet(EnhetService.java:129)
    at no.difi.einnsyn.admin.service.EnhetServiceTest.testOppdaterVirksomhet(EnhetServiceTest.java:201)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

We can't find any signs of language support for this in the Pinto source. Though the doc for the @RdfProperty annotation seems to indicate that this is possible. Is pinto supposed to support this?

Michael Grove

unread,
Nov 30, 2016, 11:04:24 AM11/30/16
to stardog
Eventually, yes, but as you've noticed, it does not currently. It would be fairly straightforward to update the mapper to make use of the information on the RdfProperty annotation.

Cheers,

Mike
 

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+unsubscribe@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Reply all
Reply to author
Forward
0 new messages