org.dllearner.core.owl
Class TypedConstant

java.lang.Object
  extended by org.dllearner.core.owl.Constant
      extended by org.dllearner.core.owl.TypedConstant
All Implemented Interfaces:
Comparable<TypedConstant>, KBElement

public class TypedConstant
extends Constant
implements Comparable<TypedConstant>

A constant which has an explicitly assigned datatype.

Author:
Jens Lehmann

Constructor Summary
TypedConstant(String literal, Datatype datatype)
           
 
Method Summary
 void accept(KBElementVisitor visitor)
           
 int compareTo(TypedConstant o)
           
 Datatype getDatatype()
           
 int getLength()
          Gets the length of this knowledge base element.
 String toKBSyntaxString(String baseURI, Map<String,String> prefixes)
           
 String toManchesterSyntaxString(String baseURI, Map<String,String> prefixes)
           
 String toString()
           
 String toString(String baseURI, Map<String,String> prefixes)
           
 
Methods inherited from class org.dllearner.core.owl.Constant
getLiteral
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypedConstant

public TypedConstant(String literal,
                     Datatype datatype)
Method Detail

getLength

public int getLength()
Description copied from interface: KBElement
Gets the length of this knowledge base element. For instance, A AND B should have length 3 (as three constructs are involved). There are different ways to define the length of an axiom, class description etc., but this method provides a straightforward definition of it.

Specified by:
getLength in interface KBElement
Returns:
The syntactic length of the KB element, defined as the number of syntactic constructs not including brackets.

toString

public String toString(String baseURI,
                       Map<String,String> prefixes)
Specified by:
toString in interface KBElement

toKBSyntaxString

public String toKBSyntaxString(String baseURI,
                               Map<String,String> prefixes)
Specified by:
toKBSyntaxString in interface KBElement

toManchesterSyntaxString

public String toManchesterSyntaxString(String baseURI,
                                       Map<String,String> prefixes)
Specified by:
toManchesterSyntaxString in interface KBElement

getDatatype

public Datatype getDatatype()
Returns:
the datatype

accept

public void accept(KBElementVisitor visitor)
Specified by:
accept in interface KBElement

compareTo

public int compareTo(TypedConstant o)
Specified by:
compareTo in interface Comparable<TypedConstant>

toString

public String toString()
Overrides:
toString in class Object


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