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

ASF GitHub Bot commented on COMMONSRDF-46:
------------------------------------------

GitHub user stain opened a pull request:

    https://github.com/apache/incubator-commonsrdf/pull/25

    COMMONSRDF-46 Rename RDFTermFactory to RDF

    [COMMONSRDF-46](https://issues.apache.org/jira/browse/COMMONSRDF-46)
    
    This keeps a `@Deprecated` skeleton `RDFTermFactory` with the 0.2.0 
signatures, adds a newer `RDF` interface which also includes the new 
`createDataset()` and implementation-specific methods.
    
    The `RDF` implementation also change names to match, e.g. `RDF4J` instead 
of `RDF4JFactory`, `JenaRDF` instead of `JenaFactory`.
    
    This pull requests includes suggested [changes to the user 
guide](https://github.com/apache/incubator-commonsrdf/blob/COMMONSRDF-46/src/site/markdown/userguide.md#creating-commons-rdf-instances)
    
    See also [suggested 
javadoc](http://stain.github.io/incubator-commonsrdf/COMMONSRDF-46/org/apache/commons/rdf/api/RDF.html)
 and children.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/incubator-commonsrdf COMMONSRDF-46

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-commonsrdf/pull/25.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 #25
    
----
commit c82f15ee25b0cbee4528a3a72b37503182bd01cc
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-19T16:03:09Z

    RDFTermFactory -> RDFFactory

commit 2f4a2769112d9e53c63b87e01c8b8fe9d4d273ab
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-19T16:04:34Z

    Deprecated RDFTermFactory skeleton with 0.2.0 method signatures

commit 518eacb516ff9ab6a98149c254728056eec80778
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-19T16:19:55Z

    RDFFactory methods no longer throw UnsupportedOperationException
    
    Thus we can remove the `default` methods and simplify the
    AbstractRDFTermFactoryTest

commit 2a6fefa17c6048881dacc994a82d766308a9be7e
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-19T16:25:44Z

    explain why relative IRI test can be ignored

commit 17c0d271cc17b61806ec8735ca2f82e0c4bd6050
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-19T16:26:11Z

    Tweaks for ignored tests

commit 08fbb929286d96adb52dfa1946e346900d1f06c5
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-19T16:37:56Z

    SimpleRDFTermFactory -> SimpleRDFFactory

commit 374bb0f84a60bcaab5813d49bc7427f7441e5c7d
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-19T16:43:19Z

    Deprecated SimpleRDFTermFactory

commit 2c62adad2f6e5a055e208345c0aa7f42ba8ebcc6
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-19T16:48:19Z

    Updated META-INF/services

commit 102a9fcebe32a384139ec2267fa332a3da8129a3
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-19T17:02:16Z

    tests for ServiceLoader

commit f229c1711fb70ad934d24b1d7530ecfd5cac5ba3
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-19T17:03:24Z

    RDFFactory documentation

commit 9addc8c08c991198c2736a8d1f89ddd37fe341e7
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-19T17:07:23Z

    Javadoc: @see RDFFactory for making IRI etc

commit ff94b9da54f1176816c48cb95edd12928eb0b035
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-22T23:17:49Z

    RDFFactory -> RDF

commit 384a83377e8f643d61ffc91d202e84053450fa55
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-22T23:44:43Z

    JenaFactory -> JenaRDF

commit 790b60591d23e5a332932d530f4e98c7e162eb59
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-22T23:44:53Z

    SimpleFactory -> SimpleRDF

commit defb7d81ca349f1403ff261cff0acf08275e61b7
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-22T23:46:53Z

    RDF4JFactory -> RDF4J

commit 430bc4d7c253ab9a023c39ff0afe9e750ff422e0
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-22T23:47:13Z

    JsonLDFactory -> JsonLDRDF

commit a1112a8f1a8d2c48b344af0d8ee3fa62784fe875
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-22T23:47:40Z

    Rephrase RDF to avoid "factory" speak
    
    ..just "RDF" is more difficult in text than the obvious
    Java class name "RDFFactory", hence more <code> typigraphy
    and "RDF implementation" phrases is needed.
    
    The good thing is that now we can think of instances of "RDF"
    as directly representing the implementation, e.g. "Jena".

commit d261f64f78e1c458d1c81b345a6869b53b5c1497
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-22T23:49:59Z

    SimpleRDFFactory -> SimpleRDF

commit 417963fe582804d2d1f3c47a7c0ffd702277b4db
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-22T23:54:59Z

    javadoc tweaks to avoid Factory

commit 3ed4272245535ed2fdb4b29ca074964734ea24ce
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-23T00:32:24Z

    avoid UnsupportedOperationException

commit fa27a178994bbe718bf8bff5a8bf405df39e4de7
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-23T00:42:03Z

    Merge branch 'avoid-unsupported' into COMMONSRDF-46

commit 9c191fc2f4ae00b6537e213d2681821b14104293
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-10-23T01:58:01Z

    RDFFactory -> RDF in user guide

----


> Rename RDFTermFactory to RDF
> ----------------------------
>
>                 Key: COMMONSRDF-46
>                 URL: https://issues.apache.org/jira/browse/COMMONSRDF-46
>             Project: Apache Commons RDF
>          Issue Type: Bug
>          Components: api
>            Reporter: Stian Soiland-Reyes
>            Assignee: Stian Soiland-Reyes
>             Fix For: 0.3.0
>
>
> As [mentioned on 
> dev@commons|https://lists.apache.org/thread.html/ff9f0eda82a70fea38bd46781a062d182cd7792aee57a4563f854b27@%3Cdev.commonsrdf.apache.org%3E],
>  the {{RDFTermFactory}} will grow in 0.3.0 to include {{Dataset}} and 
> {{Quad}} creation, which are not {{RDFTerm}} instances.
> As well, the new implementations of RDFTermFactory for Jena and RDF4J also 
> include converter methods from/to their underlying types - which feel 
> somewhat wrong in a "factory" as they may are free to wrap/unwrap rather than 
> make new instances. 
> So the suggestion is a radical style change - rename {{RDFTermFactory}} to 
> {{RDF}}, and its children to {{SimpleRDF}} {{JenaRDF}}, {{RDF4J}}, 
> {{JsonLDRDF}}.
> Typical usage then looks pretty neat:
> {code}
> RDF rdf = new JenaRDF(); 
> IRI iri = rdf.createIRI("http://example.com/";); 
> Triple triple = rdf.createTriple(iri, iri, iri); 
> Graph graph = rdf.createGraph(); 
> graph.add(triple);
> {code}
> but works less well as a static constant {{RDF}}:
> {code}
> private static final RDF RDF = new JenaRDF();
> {code}
> (before {{FACTORY}} might have made sense)
> Some style considerations:  
> * {{RDF4JRDF}} looks weird, so just {{RDF4J}} there
> * {{SimpleRDF}} looks good (as Simple does not exists outside Commons RDF)
> * Jena already have 
> [org.apache.jena](https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/Jena.html),
>  so {{JenaRDF}} is better than another {{Jena}}
> * {{JsonLdRDF}} 
> * Documentation about just {{RDF}} the interface can be confusing against 
> _RDF_ the concept, requiring using {{<code>}}-style typography and expanded 
> phrases like "an {{RDF}} implementation" instead of "an {{RDF}}"
> A milder variant is: {{RDFFactory}} with children {{SimpleRDFFactory}}, 
> {{JenaFactory}}, {{RDF4JFactory}}. {{JsonLDFactory}} -- here we can skip 
> {{RDF}} from the children except from the newbie {{Simple}}.



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

Reply via email to