stardog-union / pinto Goto Github PK
View Code? Open in Web Editor NEWPinto: A lightweight framework for mapping Java Beans into RDF and back again
License: Apache License 2.0
Pinto: A lightweight framework for mapping Java Beans into RDF and back again
License: Apache License 2.0
This method seems to erroneously use the namespace prefix in place of the name:
public Builder namespace(final Namespace theNamespace) {
return namespace(theNamespace.getPrefix(), theNamespace.getPrefix());
}
right now we assume strict adherence to the beans standard, which means the beans should be mutable w/ their set
methods. but it would be great if you can use the builder pattern and have immutable beans.
iirc, JAXB has some support for this that would be worth reviewing
so identifiers can be generated into a specific namespace
The top level readme.md
says "If the object extends Identifiable
", but this should say "If the object implements Identifiable
".
auto-extend them from Identifiable
and SourcedObject
so via some casts we have access to 1) the original rdf:ID of the object and the 2) RDF used to generate the bean. This would be ideal for using Pinto as the base for the next-generation of Empire
I was wondering why, instead of updating to RDF4J, Pinto was only updated to Sesame 4.x? Was this a conscious decision based on certain things or just a preference?
public Builder namespace(final Namespace theNamespace) {
return namespace(theNamespace.getPrefix(), theNamespace.getPrefix());
}
should be
public Builder namespace(final Namespace theNamespace) {
return namespace(theNamespace.getPrefix(), theNamespace.getName());
}
Return a Value
or a ResourceBuilder
for simple cases where there's a known IRI, like w/ an Enum, or simple string mapping for a class
in addition to the code, dependencies will be updated, primarily sesame
you can use Graphs#withContext
to set the named graph for RDF generated by Pinto after the fact, but it would be convenient of the mapper did this for you. either by mapper configuration, annotations, or both.
There's an "i" missing in the class name "IdentifableImpl".
the round tripping correctly works for the id, but it should be updating Identifiable
as it goes
Hello,
Is there any comparison between these 4 libraries? That anybody already written or is willing to share?
Thank you,
Charbel
My input is a TTL file.
The desired output are POJO's.
Similar to how a json file is being parsed to pojo's.
Hello,
Is there any will to add OWL annotations? with OWL API?
Thank you,
similar to jackon's @class
field, add a property pinto:javaClass
which is the FQCN of the Java class corresponding to the RDF resource
running gradle build
:
com.complexible.pinto.RDFMapperTests > testWriteMap FAILED
java.lang.AssertionError at RDFMapperTests.java:740
Turns out this is because Models.isomorphic
doesn't consider the same instant at different timezones to be equal:
My local TZ is UTC+10:00.
The assertTrue
isomorphism comparison at RDFMapperTests.java#L740 fails because the date as constructed from the Long at RDFMapperTests.java#L732 becomes:
"2015-03-15T05:24:42.470+10:00"^^<http://www.w3.org/2001/XMLSchema#dateTime>
which is different than the reference value from data/map.nt
of:
"2015-03-14T15:24:42.470-04:00"^^<http://www.w3.org/2001/XMLSchema#dateTime>
If I change the date in data/map.nt
to be "2015-03-15T05:24:42.470+10:00"^^<http://www.w3.org/2001/XMLSchema#dateTime>
, the test passes.
if multiple values are found for a property which is only cardinality 1, ie public Foo getFoo()
, add something to MappingOptions
to make this non-fatal and log a warning.
By default, we'll traverse the entire object graph serializing it into RDF, and serialize all of the RDF into the full object graph. There could be cases where you only want to serialize the top-level of the object graph and not cascade into its child objects. More often, during serialization to RDF rather than deserialization; during deserialization you can control this on your own by not providing any more than the top level of the object graph
maps: NavigableMap, SortedMap, WeakHashMap, Hashtable, Concurrent*
enum: EnumSet, EnumMap
Guava immutables?
specifically, supporting JAXB like Jackson makes sense so the same beans could be used for XML, JSON, and RDF serialization.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.