org.dllearner.core.owl
Class BooleanValueRestriction

java.lang.Object
  extended by org.dllearner.core.owl.Description
      extended by org.dllearner.core.owl.Restriction
          extended by org.dllearner.core.owl.ValueRestriction
              extended by org.dllearner.core.owl.DatatypeValueRestriction
                  extended by 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

Constructor Summary
BooleanValueRestriction(DatatypeProperty restrictedPropertyExpression, Boolean value)
          TODO: Internally a typed constant with datatype boolean and strings "true" or "false" is created.
 
Method Summary
 boolean getBooleanValue()
           
 int getLength()
          Boolean value restrictions have length 2, because they encode two pieces of information: the property and the boolean value.
 String toKBSyntaxString(String baseURI, Map<String,String> prefixes)
           
 
Methods inherited from class org.dllearner.core.owl.DatatypeValueRestriction
accept, accept, getArity, getRestrictedPropertyExpression, getValue, toManchesterSyntaxString, toString
 
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 -
Method Detail

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


SourceForge.net Logo DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2011 Jens Lehmann