org.deri.iris.builtins.datatype
Class ToIriBuiltin
java.lang.Object
org.deri.iris.builtins.AbstractBuiltin
org.deri.iris.builtins.FunctionalBuiltin
org.deri.iris.builtins.datatype.ConversionBuiltin
org.deri.iris.builtins.datatype.ToIriBuiltin
- All Implemented Interfaces:
- Comparable<IAtom>, IAtom, IBuiltinAtom
public class ToIriBuiltin
- extends ConversionBuiltin
Represents a data type conversion function, which converts supported data
type instances to IRI instances. The following data types are supported:
|
Constructor Summary |
ToIriBuiltin(ITerm... terms)
Creates a new instance of this builtin. |
ToIriBuiltin
public ToIriBuiltin(ITerm... terms)
- Creates a new instance of this builtin.
- Parameters:
terms - The term representing the data type instance to be
converted.
convert
protected ITerm convert(ITerm term)
- Description copied from class:
ConversionBuiltin
- Converts the given supported data type instance to the specific data type
- Specified by:
convert in class ConversionBuiltin
- Returns:
- The result of the conversion or
null if the
specified data type is not compatible.
toText
public static IIri toText(IPlainLiteral term)
- Converts a Text term to an IRI term.
- Parameters:
term - The Text term to be converted.
- Returns:
- A new IRI term representing the result of the conversion, or
null if the conversion fails.
toText
public static IIri toText(IXMLLiteral term)
- Converts a XMLLiteral term to an IRI term.
- Parameters:
term - The Text term to be converted.
- Returns:
- A new IRI term representing the result of the conversion, or
null if the conversion fails.
toIri
public static IIri toIri(IStringTerm term)
- Converts a String term to an IRI term.
- Parameters:
term - The String term to be converted.
- Returns:
- A new IRI term representing the result of the conversion, or
null if the conversion fails.