You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commonsrdf.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/04/10 00:26:12 UTC
[jira] [Commented] (COMMONSRDF-11) Simple should be extendable
classes
[ https://issues.apache.org/jira/browse/COMMONSRDF-11?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14488402#comment-14488402 ]
ASF GitHub Bot commented on COMMONSRDF-11:
------------------------------------------
GitHub user stain opened a pull request:
https://github.com/apache/incubator-commonsrdf/pull/5
COMMONSRDF-11 make simple subclassable
Fixes [COMMONSRDF-11](https://issues.apache.org/jira/browse/COMMONSRDF-11) by making all simple classes (except `Types`) non-`final` and have `public` constructors.
A new `SubClassRDFTermFactoryTest` verifies this by constructing each of them as an empty, anonymous subclass. (although it does not try to override any of their methods).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/stain/incubator-commonsrdf COMMONSRDF-11-subclassable
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-commonsrdf/pull/5.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5
----
commit edefcef4d8787362c3c3565d3421244cd4d8bd3a
Author: Stian Soiland-Reyes <st...@apache.org>
Date: 2015-04-09T21:58:53Z
BlankNodeImpl salt using System.identityHashCode instead of .toString()
still not unique across JVMs (or even across GC-ed objects) - but then
the only way currently to call this is through SimpleRDFTermFactory.
commit 4ffbfd582624dfdbcfd906fcac950479f8d45ddd
Author: Stian Soiland-Reyes <st...@apache.org>
Date: 2015-04-09T22:19:13Z
COMMONSRDF-11 Test to verify subclassiness
commit e43a5a052e99b13c4a78c5d094ef26c9398106b0
Author: Stian Soiland-Reyes <st...@apache.org>
Date: 2015-04-09T22:19:29Z
COMMONSRDF-11 Make simple subclassable
.. e.g. public and non-final
----
> Simple should be extendable classes
> -----------------------------------
>
> Key: COMMONSRDF-11
> URL: https://issues.apache.org/jira/browse/COMMONSRDF-11
> Project: Apache Commons RDF
> Issue Type: Improvement
> Reporter: Stian Soiland-Reyes
> Assignee: Stian Soiland-Reyes
>
> In my view, org.apache.commons.rdf.simple should also be a possible basis for other implementations - for instance if they only need a new Graph and Triple implementation, they should be able to use the other classes directly.
> Current the simple classes are defined like:
> {code}
> final class LiteralImpl implements Literal {
> {code}
> with a mixture of public and package constructors.
> I would prefer for these to all be public, non-final, so that it would be easy to extend the simple* classes if so desired, and to instantiate them directly without having to make a shadow of SimpleRDFTermFactory.
> (Note - SimpleRDFTermFactory is not final and so can easily be subclassed to reuse some of the implementations, but constructors must be at least protected to be subclassable outside this package)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)