Like a single: Collection<Statement> getPropertyOnResource( Resource r, Property p, String... langs );
which returns with a (possibly empty) collection of statements with objects _only_ in one language? If there are any in the first language, in that, or in the second, or the third, etc. But then what if no lang params are included? Are language tags then ignored? That leads to the slightly-odd behavior that no lang param gets maximal results, then one lang param cuts down those results, but then two lang tags gives you no more results unless you weren't getting any with the first lang param, etc. Not very "monotonic"... but maybe there's another semantic? --- A. Soroka The University of Virginia Library > On Sep 29, 2016, at 3:27 PM, Claude Warren <[email protected]> wrote: > > Would it be better to have a list of languages so that if one is not found > a secomd might be returned? > > On 29 Sep 2016 13:21, "A. Soroka (JIRA)" <[email protected]> wrote: > >> >> [ https://issues.apache.org/jira/browse/JENA-1238?page= >> com.atlassian.jira.plugin.system.issuetabpanels:comment- >> tabpanel&focusedCommentId=15533783#comment-15533783 ] >> >> A. Soroka commented on JENA-1238: >> --------------------------------- >> >> There is a class now called {{GraphUtils}}: >> >> https://jena.apache.org/documentation/javadoc/arq/org/ >> apache/jena/sparql/util/graph/GraphUtils.html >> >> that does some similar things for a {{Graph}}. Perhaps a {{ModelUtils}} or >> {{ResourceUtils}} might be a good way to provide this kind of functionality >> without adding to {{Resource}} directly. >> >>> Add methods on Resource class that look for Properties in a specific >> language >>> ------------------------------------------------------------ >> ----------------- >>> >>> Key: JENA-1238 >>> URL: https://issues.apache.org/jira/browse/JENA-1238 >>> Project: Apache Jena >>> Issue Type: Improvement >>> Components: Core >>> Affects Versions: Jena 3.1.0 >>> Reporter: Ramiro Pereira de Magalhães >>> >>> It would be very convenient to have in the >>> {{org.apache.jena.rdf.model.Resource}} >> interface methods such as: >>> {code} >>> public Statement getProperty( Property p, String lang ); >>> public Statement getRequiredProperty( Property p, String lang ); >>> {code} >>> They'd work like very much like {{org.apache.jena.rdf.model. >> ModelCon.listStatements(Resource, Property, String, String)}}. >>> This would simplify queries to a Resource's language-specific properties. >> >> >> >> -- >> This message was sent by Atlassian JIRA >> (v6.3.4#6332) >>
