org.dllearner.core.owl
Class BooleanValueRestriction
java.lang.Object
org.dllearner.core.owl.Description
org.dllearner.core.owl.Restriction
org.dllearner.core.owl.ValueRestriction
org.dllearner.core.owl.DatatypeValueRestriction
org.dllearner.core.owl.BooleanValueRestriction
- All Implemented Interfaces:
- Serializable, Cloneable, KBElement, PropertyRange
public class BooleanValueRestriction
- extends DatatypeValueRestriction
Convenience class for boolean value restrictions.
- Author:
- Jens Lehmann
- See Also:
- Serialized Form
| Methods inherited from class org.dllearner.core.owl.Description |
addChild, addChild, clone, getChild, getChildren, getDepth, getNumberOfNodes, getParent, getSubtree, isRoot, removeChild, removeChild, replaceChild, setParent, toKBSyntaxString, toString |
BooleanValueRestriction
public BooleanValueRestriction(DatatypeProperty restrictedPropertyExpression,
Boolean value)
- TODO: Internally a typed constant with datatype boolean and
strings "true" or "false" is created. This is a clean way to
implement boolean value restrictions. However, if they are
created millions of times during the run of an algorithm,
this may cause unnecessary delays.
Possible Solution: It may be good to create a BooleanConstant
class, which just holds the boolean value and only performs
operations when requested.
- Parameters:
restrictedPropertyExpression - value -
getBooleanValue
public boolean getBooleanValue()
getLength
public int getLength()
- Boolean value restrictions have length 2, because they encode two
pieces of information: the property and the boolean value.
- Returns:
- The syntactic length of the KB element, defined as the
number of syntactic constructs not including brackets.
toKBSyntaxString
public String toKBSyntaxString(String baseURI,
Map<String,String> prefixes)
- Specified by:
toKBSyntaxString in interface KBElement- Overrides:
toKBSyntaxString in class DatatypeValueRestriction
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2011 Jens Lehmann