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

Allow passing inference flag and context parameters #26

Merged
merged 5 commits into from
Jul 27, 2017

Conversation

reckart
Copy link
Contributor

@reckart reckart commented Jul 26, 2017

Cf. #25

Although eventually, I am not using rdfbeans for loading/storing data atm. others might find these additional parameters useful.

reckart added 5 commits July 2, 2017 11:53
* feature/contexts:
  Support contexts in getAll()

# Conflicts:
#	src/main/java/org/cyberborean/rdfbeans/RDFBeanManager.java
* feature/contexts:
  Forgot to actually pass parameter to getStatements()

# Conflicts:
#	src/main/java/org/cyberborean/rdfbeans/RDFBeanManager.java
@wherget
Copy link
Collaborator

wherget commented Jul 26, 2017

a little bit of whitespace confusion, but other than that it looks good to me

@cyberborean cyberborean merged commit b30aa85 into cyberborean:master Jul 27, 2017
@cyberborean
Copy link
Owner

Looks good!

It seems it addresses #20 as well?

@twallmey
Copy link

Im working with interfaces instead of classes. For this purpose having the inference parameter on createAll as well would be fine. Could you pls. supply the parameter for this kind of method, too?

@cyberborean cyberborean self-assigned this Apr 17, 2019
@cyberborean cyberborean added this to the 2.3 milestone Apr 17, 2019
@twallmey
Copy link

twallmey commented Jul 8, 2019

Are there any news about this? I would really appreciate having inferred statements included within the result set, too. Are there any plans when this feature will be available for bean interfaces?

I've had a look into the code and added the required feature. Would you mind to add/change the following lines of code within class RDFBeanManager to reflect the changes within the repository as well?

  1. Change method signature of createAll (line: 760)
    public <T> Collection<T> createAll(Class<T> iface, boolean includeInferred, Resource... contexts)

  2. Change parameter of method call (line: 771)
    sts = conn.getStatements(null, RDF.TYPE, type, includeInferred, contexts);

  3. (Re)add all method signature and delegate call to method with new parameter
    public <T> Collection<T> createAll(Class<T> iface, Resource... contexts) throws RDFBeanException, RepositoryException { return createAll(iface, false, contexts); }

I'm not allowed to push my changes so it would be great if you could perform these changes!

Thanks a lot,

Thorben

@cyberborean
Copy link
Owner

The change you have suggested only affects identification of resources for a specific RDF type. I think we have to consider inferred triples also on getters execution: so it needs a bit more work.

I'm also thinking if it would be better to have this flag as a RDFBeanManager property, rather than to pass it to each individual method.

@twallmey
Copy link

twallmey commented Jul 16, 2019

  1. Considering inferred triples on getter execution as well would be perfect!
  2. From my point of view the flag shouldn't be set as a property of RDFBeanManager. I would like to decide on each single call whether I want to get inferred triples or not. Setting the property on RDFBeanManger would require to have different instances for this purpose or re-instantiating a manager before every call.

@twallmey
Copy link

Are there any news about this topic? I'm currently working with a slightly modified version of RDFBeans that contains my three suggested changes. That's fine for my requirements but I do understand that the issue should be solved in a more generic way.

Do you have an idea when the issued could be solved? For our team it is a bit difficult to work with a modified version that isn't archived officially within Maven. It would be great if this issue would be fixed.

Perhaps you can announce a timeline?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants