org.dllearner.core.owl
Class UntypedConstant
java.lang.Object
org.dllearner.core.owl.Constant
org.dllearner.core.owl.UntypedConstant
- All Implemented Interfaces:
- Serializable, Comparable<Constant>, KBElement
public class UntypedConstant
- extends Constant
An untyped constant is a string which has not been assigned
a datatype and can have an optional language tag.
- Author:
- Jens Lehmann
- See Also:
- Serialized Form
UntypedConstant
public UntypedConstant(String literal)
UntypedConstant
public UntypedConstant(String literal,
String lang)
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.
- 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)
toKBSyntaxString
public String toKBSyntaxString(String baseURI,
Map<String,String> prefixes)
toManchesterSyntaxString
public String toManchesterSyntaxString(String baseURI,
Map<String,String> prefixes)
getLang
public String getLang()
- Returns:
- the lang
hasLang
public boolean hasLang()
- Returns:
- the hasLang
accept
public void accept(KBElementVisitor visitor)
toString
public String toString()
- Overrides:
toString in class Object
compareTo
public int compareTo(Constant o)
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2011 Jens Lehmann