You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/01/25 18:02:26 UTC

[jira] [Commented] (COMMONSRDF-54) overloaded versions of RDF4J#asRDFTerm(org.eclipse.rdf4j.model.Value)

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

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

GitHub user ghxiao opened a pull request:

    https://github.com/apache/commons-rdf/pull/31

    COMMONSRDF-54: overloads of RDF4J#asRDFTerm

    Resolves: COMMONSRDF-54
    
    This PR adds three overloaded methods into the class RDF4J:
    
    RDF4JBlankNode asRDFTerm(final org.eclipse.rdf4j.model.BNode value)
    RDF4JLiteral asRDFTerm(final org.eclipse.rdf4j.model.Literal value)
    RDF4JIRI asRDFTerm(final org.eclipse.rdf4j.model.IRI value)

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

    $ git pull https://github.com/ghxiao/commons-rdf COMMONSRDF-54

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

    https://github.com/apache/commons-rdf/pull/31.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 #31
    
----

----


> overloaded versions of RDF4J#asRDFTerm(org.eclipse.rdf4j.model.Value)
> ---------------------------------------------------------------------
>
>                 Key: COMMONSRDF-54
>                 URL: https://issues.apache.org/jira/browse/COMMONSRDF-54
>             Project: Apache Commons RDF
>          Issue Type: Improvement
>          Components: rdf4j
>            Reporter: Guohui Xiao
>            Priority: Minor
>             Fix For: 1.0.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> In the class org.apache.commons.rdf.rdf4j.RDF4J, there is a  method
>     public RDF4JTerm asRDFTerm(final Value value)
> Suppose that we declare a variable iri of the type org.eclipse.rdf4j.model.IRI, then asRDFTerm(iri) returns RDF4JTerm but not RDF4JIRI. To use the result as RDF4JIRI, I always need to explicitly cast.
> Therefore, I would like to add three overloaded versions of this method:
> - RDF4JBlankNode asRDFTerm(final org.eclipse.rdf4j.model.BNode value) 
> - RDF4JLiteral asRDFTerm(final org.eclipse.rdf4j.model.Literal value)
> - RDF4JIRI asRDFTerm(final org.eclipse.rdf4j.model.IRI value)
> So that we can avoid unnecessary casts.
> There is also a similar situation in org.apache.commons.rdf.jena.JenaRDF#asRDFTerm(org.apache.jena.graph.Node)



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