The documentation for listDeclaredProperties(boolean direct) says about the direct parameter:
""" direct - If true, restrict the properties returned to those directly associated with this class. If false, the properties of super-classes of this class will not be listed among the declared properties of this class. """ If it's true, then you should only get properties directly associated with the class (i.e., you don't include properties included with, e.g., superclasses) If it's false, then you don't list properties of super-classes of this class (i.e., you only include properties directly associated with the class). Don't those mean the same thing? The code for OntClassImpl, when considering a candidate, calls to OntClassImpl#hasDeclaredProperty(Property p, boolean direct), and the javadoc says that when direct is true, only direct associations are considered: """ direct If true, only direct associations between classes and properties are considered """ That's the *behavior* that I'd expect, but the documentation on listDeclaredProperties(boolean) is misleading, isn't it? Or am I misreading it? If I'm understanding this correctly, it could be fixed by removing the word "not": """ direct - If true, restrict the properties returned to those directly associated with this class. If false, the properties of super-classes of this class will <del>not</del> be listed among the declared properties of this class. """ //JT -- Joshua Taylor, http://www.cs.rpi.edu/~tayloj/
