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

ManagedIndividual.checkMembership checks for class type membership but not object RDF types #484

Open
cstockloew opened this issue Jun 3, 2017 · 1 comment

Comments

@cstockloew
Copy link
Member

Originally Opened: @amedranogil (2016-06-09 20:24:39)

ManagedIndividual.checkMembership relies on the OntClassInfo information but fails to check the PROP_RDF_TYPE property of the object itself.

Thus if:

ManagedIndividual mi = new ManagedIndividual;
mi.addType(Device.MY_URI,false);

then:
ManagedIndividual.checkMembership(Device.MY_URI,mi) == false

--

From: this issue has been automatically imported from our old issue tracker

@cstockloew
Copy link
Member Author

Original author: @cstockloew (2016-06-10 00:34:54)

It is assumed that the object was created correctly. Therefore, in your example, you should use:
Device d = new Device(..);
which will have the correct type.

BTW: ManagedIndividual is abstract, so you anyway need to create an instance of a subclass.

If this is changed, the matchmaking needs to be revisited to make sure the change does not break anything. I would leave it as it is (maybe add a different method, if needed).

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

No branches or pull requests

1 participant