Actions
Feature #26
openRemove getElement() from the Constraint interface - An easy fix, no prior mulgara-internals experience required.
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Description
Back in the distant past when the only type of Constraint supported was what we now refer to as [[ConstraintImpl]], getElement() was an ugly, but harmless way of obtaining the different elements of a constraint.
<br/>
<br/>
Now that we have dozens of different constraint types, the vast majority of which have to implement getElement() by throwing an exception, this is not so harmless.
<br/>
<br/>
It would be great if someone could go through the codebase and:
<br/>
<br/>
1) Add getSubject(), getPredicate(), and getObject() to [[ConstraintImpl]]
<br/>
2) Find each call to [[ConstraintImpl]]::getElement(), and replace with the appropriate call (element 0->subject, 1->predicate, 2->object; 3->model but that should already have been done).
<br/>
3) Repeat for [[ConstraintNegation]] (and any other constraint type that implements getElement(), but IIRC there aren't any).
<br/>
4) Remove getElement() from the Constraint interface and implementing classes thereby banishing this aberration.
No data to display
Actions