public class LiteralLabelFactory extends Object
Constructor and Description |
---|
LiteralLabelFactory() |
Modifier and Type | Method and Description |
---|---|
static LiteralLabel |
create(Object value)
Deprecated.
|
static LiteralLabel |
create(String lex,
RDFDatatype dtype)
Create a literal with a dtype.
|
static LiteralLabel |
create(String lex,
String lang)
Build a plain literal label from its lexical form and language tag.
|
static LiteralLabel |
create(String s,
String lang,
boolean xml)
Creates either a plain literal or an XMLLiteral.
|
static LiteralLabel |
createByValue(Object value,
String lang,
RDFDatatype dtype)
Build a typed literal label from its value form.
|
static LiteralLabel |
createLiteralLabel(String lex,
String lang,
RDFDatatype dtype)
Using
create(String, String) or create(String, RDFDatatype)
where possible is preferred. |
static LiteralLabel |
createTypedLiteral(Object value)
Build a typed literal label from its value form using
whatever datatype is currently registered as the default
representation for this java class.
|
public static LiteralLabel create(String lex, RDFDatatype dtype)
public static LiteralLabel createLiteralLabel(String lex, String lang, RDFDatatype dtype) throws DatatypeFormatException
create(String, String)
or create(String, RDFDatatype)
where possible is preferred.DatatypeFormatException
public static LiteralLabel create(String lex, String lang)
lex
- the lexical form of the literallang
- the optional language tag, only relevant for plain literalspublic static LiteralLabel createByValue(Object value, String lang, RDFDatatype dtype) throws DatatypeFormatException
value
- the value of the literallang
- the optional language tag, only relevant for plain literalsdtype
- the type of the literal, null for old style "plain" literals (which become xsd:string in RDF 1.1)DatatypeFormatException
@Deprecated public static LiteralLabel create(Object value)
public static LiteralLabel createTypedLiteral(Object value)
value
- the literal value to encapsulatepublic static LiteralLabel create(String s, String lang, boolean xml)
xml
- If true then s is exclusive canonical XML of type rdf:XMLLiteral, and no checking will be invoked.Licenced under the Apache License, Version 2.0