Re: [RDF] adaptation methods in RDFTermFactory

2016-09-15 Thread Matt Sicker
Yeah, I mean as a generic asFoo() type method, particularly in an interface. I also suggest having generic bounds to suggest what types are possible. It really depends on if the casting is useful to a user of the library or a developer of the library. On 14 September 2016 at 22:23, Stian

Re: [RDF] adaptation methods in RDFTermFactory

2016-09-14 Thread Stian Soiland-Reyes
You mean to add unwrap() to the implementation classes? So it would just do a cast? But we have an operator for that in Java... :-) If you mean to add it to RDFTermFactory as a different name/style for the many asSomething() methods, perhaps just as the name as()? That is how Jena does it, to

Re: [RDF] adaptation methods in RDFTermFactory?

2016-09-12 Thread Matt Sicker
Couldn't you do the JDBC Wrapper style interface and have a generic method like: T unwrap(Class cls); Or make more specific unwrap methods like: T unwrap(Class cls); If this is for implementation-specific casts and such. On 12 September 2016 at 19:56, Stian Soiland-Reyes

[RDF] adaptation methods in RDFTermFactory?

2016-09-12 Thread Stian Soiland-Reyes
[[ Cross-post - prefer replies to dev@commons ]] Each of the Common RDF implementations come with a RDFTermFatory http://stain.github.io/incubator-commonsrdf/integration/org/apache/commons/rdf/api/RDFTermFactory.html On a classical flat classloader the implementations of this factory can be