commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guohui Xiao (JIRA)" <>
Subject [jira] [Created] (COMMONSRDF-54) overloaded versions of RDF4J#asRDFTerm(org.eclipse.rdf4j.model.Value)
Date Wed, 25 Jan 2017 17:52:26 GMT
Guohui Xiao created COMMONSRDF-54:

             Summary: overloaded versions of RDF4J#asRDFTerm(org.eclipse.rdf4j.model.Value)
                 Key: COMMONSRDF-54
             Project: Apache Commons RDF
          Issue Type: Improvement
          Components: rdf4j
            Reporter: Guohui Xiao
            Priority: Minor
             Fix For: 1.0.0

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

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

View raw message