[ 
https://issues.apache.org/jira/browse/COMMONSRDF-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14521164#comment-14521164
 ] 

Rob Vesse commented on COMMONSRDF-20:
-------------------------------------

The general approach is to use a registry with another factory for this

For example in Apache Jena Elephas:

https://github.com/apache/jena/blob/master/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/registry/HadoopRdfIORegistry.java
https://github.com/apache/jena/blob/master/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/registry/ReaderFactory.java

The JDK JDBC drivers are also managed in a similar fashion

The registry handles the details of selecting the correct factory and passing 
some parameters as necessary to the constructor of the real instance you want 
to create

> Provide a mechanism of loading different RDF Term Factories 
> ------------------------------------------------------------
>
>                 Key: COMMONSRDF-20
>                 URL: https://issues.apache.org/jira/browse/COMMONSRDF-20
>             Project: Apache Commons RDF
>          Issue Type: New Feature
>    Affects Versions: 0.1
>            Reporter: Sergio Fernández
>             Fix For: 0.2
>
>
> Benedikt has asked this questions in the mailing list:
> http://markmail.org/message/az4jb744zfct2uq5
> What [we currently 
> have|http://commonsrdf.incubator.apache.org/userguide.html#Creating_Commons_RDF_instances]
>  remains valid, but would be great to make easier the life of people.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to