Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rdf:Alt, rdf:Bag, rdf:Seq to org.eclipse.rdf4j.model #405

Closed
abrokenjester opened this issue Sep 7, 2016 · 8 comments · Fixed by #2254
Closed

add rdf:Alt, rdf:Bag, rdf:Seq to org.eclipse.rdf4j.model #405

abrokenjester opened this issue Sep 7, 2016 · 8 comments · Fixed by #2254
Assignees
Labels
📶 enhancement issue is a new feature or improvement help wanted we could use your help in fixing this issue M1 Fixed in milestone 1
Milestone

Comments

@abrokenjester
Copy link
Contributor

abrokenjester commented Sep 7, 2016

(Migrated from https://openrdf.atlassian.net/browse/SES-2008)

In many cases it is very convenient to create statements with java/scala in a typesafe controlled manner and without SPARQL string evaluation. But it is not possible with current API as there are no (rdf:Alt, rdf:Bag, rdf:Seq) That means that in many cases instead of writing several lines of scala/java code users have to write SPARQL Update/Insert quries that are not only often inconvenient and potential source of bugs (as they are not typesafe) but also have SPARQL parsing overhead (esp. in such intensive operations like generating SPIN SPARQL rules from quires in embedded storages for instance).

@abrokenjester abrokenjester added the 📶 enhancement issue is a new feature or improvement label Sep 7, 2016
@abrokenjester abrokenjester added the help wanted we could use your help in fixing this issue label Feb 12, 2020
@abrokenjester abrokenjester changed the title add rdf:Alt, rdf:Bag, rdf:Seq to org.openrdf.model add rdf:Alt, rdf:Bag, rdf:Seq to org.eclipse.rdf4j.model Feb 12, 2020
@guvi007
Copy link
Contributor

guvi007 commented Mar 27, 2020

Hi @jeenbroekstra, I would like to know if this issue is still open and if I could work on this.

@abrokenjester
Copy link
Contributor Author

@guvi007 it's certainly still open and we'd welcome your input. The requirements here are a little vague though. Do you have a particular design in mind so we can discuss the approach?

If you need inspiration, one approach might be something similar to what we did for RDF collections: a couple of utility methods to convert to/from Java collections.

@reeshabhranjan
Copy link
Contributor

reeshabhranjan commented Apr 14, 2020

@jeenbroekstra We are thinking to refer to RDFCollections.java and code a similar class for RDFContainers. We will create a base class RDFContainer, and will extend it from Bag, Sequence and Alt. We might need to copy some code from RDFCollection, if that's fine. This is because much of the basic implementation might be the same. Also, I would like to tell you that three people- me, @prince17080, @guvi007 ) will be working on this issue, and the pull request will be done by Gaurav

@abrokenjester
Copy link
Contributor Author

Sounds good, although I wonder if it is necessary to have separate classes for Bag, Sequence and Alt - the only structural difference is just the type, so a single RDFContainers util that has methods for producing the three different kinds of container (represented as Model objects) might be easier. Feel free to put up an early pull request to discuss what you've got, even if it's not complete yet.

Also: before you get started, please have a look at the contributor guidelines, in particular the points on how to sign the Eclipse ECA. Since you will be working with multiple authors, be aware that every person who adds a commit to your change will need to sign this ECA. It should be straightforward, it's an online form, shouldn't take more than 10 minutes to sort out. Let me know if you need any help with any of it.

@reeshabhranjan
Copy link
Contributor

Alright, we will sign the Eclipse ECA and will follow the contributor guidelines. We will put up a pull request as soon as we get on it and write some basic code. Thanks!

reeshabhranjan added a commit to guvi007/rdf4j that referenced this issue May 1, 2020
Signed-off-by: Reeshabh Kumar Ranjan <reeshabhkumarranjan@gmail.com>
@reeshabhranjan
Copy link
Contributor

reeshabhranjan commented May 5, 2020

@jeenbroekstra we apologise since it is taking some time. We are college students caught in lots of assignment and projects deadlines lately, we are trying our best to get this done ASAP.

@abrokenjester
Copy link
Contributor Author

@jeenbroekstra we apologise since it is taking some time. We are college students caught in lots of assignment and projects deadlines lately, we are trying our best to get this done ASAP.

No worries, in your own time!

reeshabhranjan added a commit to guvi007/rdf4j that referenced this issue May 21, 2020
Signed-off-by: Reeshabh Kumar Ranjan <reeshabhkumarranjan@gmail.com>
@reeshabhranjan
Copy link
Contributor

@jeenbroekstra we have added an early pull request as you suggested to see if we are on the right track, please review it.

@barthanssens barthanssens added this to the 3.3.0 milestone May 21, 2020
reeshabhranjan added a commit to guvi007/rdf4j that referenced this issue May 22, 2020
…, add untested code for consumeValues() method for RDFContainers.java (documentation pending)

Signed-off-by: Reeshabh Kumar Ranjan <reeshabhkumarranjan@gmail.com>
reeshabhranjan added a commit to guvi007/rdf4j that referenced this issue May 22, 2020
… (documentation pending)

Signed-off-by: Reeshabh Kumar Ranjan <reeshabhkumarranjan@gmail.com>
prince17080 added a commit to guvi007/rdf4j that referenced this issue May 23, 2020
Signed-off-by: Prince Sachdeva <prince17080@iiitd.ac.in>
prince17080 added a commit to guvi007/rdf4j that referenced this issue May 23, 2020
Signed-off-by: Prince Sachdeva <prince17080@iiitd.ac.in>
prince17080 added a commit to guvi007/rdf4j that referenced this issue May 23, 2020
…method

Signed-off-by: Prince Sachdeva <prince17080@iiitd.ac.in>
prince17080 added a commit to guvi007/rdf4j that referenced this issue May 24, 2020
…un mvn impsort:sort

Signed-off-by: Prince Sachdeva <prince17080@iiitd.ac.in>
guvi007 added a commit to guvi007/rdf4j that referenced this issue May 25, 2020
…ava, Remove distinct element check for rdf:alt in RDFContainers.java

Signed-off-by: Gaurav Aggarwal <gaurav17288@iiitd.ac.in>
abrokenjester pushed a commit that referenced this issue May 26, 2020
* #405 Add file for the new feature

Signed-off-by: Reeshabh Kumar Ranjan <reeshabhkumarranjan@gmail.com>

* #405 Add code for consumeCollection for RDFContainers

Signed-off-by: Reeshabh Kumar Ranjan <reeshabhkumarranjan@gmail.com>

* #405 Replace assertion with throwing a runtime exception, add untested code for consumeValues() method for RDFContainers.java (documentation pending)

Signed-off-by: Reeshabh Kumar Ranjan <reeshabhkumarranjan@gmail.com>

* #405 Add remaining methods (as present in RDFCollection) (documentation pending)

Signed-off-by: Reeshabh Kumar Ranjan <reeshabhkumarranjan@gmail.com>

* #405 Add documentation

Signed-off-by: Prince Sachdeva <prince17080@iiitd.ac.in>

* #405 Format the file

Signed-off-by: Prince Sachdeva <prince17080@iiitd.ac.in>

* #405 Correct the RDFS.Member triple in consumeContainer method

Signed-off-by: Prince Sachdeva <prince17080@iiitd.ac.in>

* #405 Change 'as' to 'to', Change version 3.0 to 3.3.0, Run mvn impsort:sort

Signed-off-by: Prince Sachdeva <prince17080@iiitd.ac.in>

* #405 Add tests for RDF Containers in RDFContainersTest.java, Remove distinct element check for rdf:alt in RDFContainers.java

Signed-off-by: Gaurav Aggarwal <gaurav17288@iiitd.ac.in>

Co-authored-by: Prince Sachdeva <prince17080@iiitd.ac.in>
Co-authored-by: Gaurav Aggarwal <gaurav17288@iiitd.ac.in>
@hmottestad hmottestad added the M1 Fixed in milestone 1 label Jun 23, 2020
abrokenjester added a commit to eclipse-rdf4j/rdf4j-doc that referenced this issue Jul 23, 2020
abrokenjester added a commit to eclipse-rdf4j/rdf4j-doc that referenced this issue Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📶 enhancement issue is a new feature or improvement help wanted we could use your help in fixing this issue M1 Fixed in milestone 1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants