public class Rdf extends Object
SparqlBuilder
RDF objects from either string values or RDF4J
Model objects.Modifier and Type | Method and Description |
---|---|
static RdfBlankNode.AnonymousBlankNode |
bNode()
create an empty anonymous blank node
|
static RdfBlankNode.PropertiesBlankNode |
bNode(RdfPredicate predicate,
RdfObject... objects)
creates a label-less blank node, identified by the supplied predicate-object lists
|
static RdfBlankNode.LabeledBlankNode |
bNode(String label)
creates a labeled blank node
|
static Iri |
iri(IRI iri)
Create a SparqlBuilder Iri instance from an
IRI |
static Iri |
iri(String iriString)
Create a SparqlBuilder Iri instance from a String iri
|
static Iri |
iri(String namespace,
String localName)
Create a SparqlBuilder Iri instance from a namespace and local name
|
static RdfLiteral.BooleanLiteral |
literalOf(Boolean boolValue)
create an RDF boolean literal
|
static RdfLiteral.NumericLiteral |
literalOf(Number numberValue)
create an RDF numeric literal
|
static RdfLiteral.StringLiteral |
literalOf(String stringValue)
create an RDF string literal
|
static RdfLiteral.StringLiteral |
literalOfLanguage(String stringValue,
String language)
create a literal with a language tag
|
static RdfLiteral.StringLiteral |
literalOfType(String stringValue,
Iri dataType)
create a literal with a datatype
|
static RdfLiteral.StringLiteral |
literalOfType(String stringValue,
IRI dataType)
create a literal with a datatype
|
static RdfObject |
object(Value value)
|
static RdfObject[] |
objects(Value... values)
|
static RdfPredicateObjectList |
predicateObjectList(RdfPredicate predicate,
RdfObject... objects)
Create a
RdfPredicateObjectList |
static RdfPredicateObjectListCollection |
predicateObjectListCollection(RdfPredicateObjectList... predicateObjectLists)
Create a
RdfPredicateObjectListCollection with the given RdfPredicateObjectList (s) |
static RdfPredicateObjectListCollection |
predicateObjectListCollection(RdfPredicate predicate,
RdfObject... objects)
Create a
RdfPredicateObjectListCollection with an initial RdfPredicateObjectList |
static RdfLiteral.BooleanLiteral[] |
toRdfLiteralArray(Boolean... literals)
Convert an array of
Boolean s to an array of RdfLiteral.BooleanLiteral s |
static RdfLiteral.NumericLiteral[] |
toRdfLiteralArray(Number... literals)
Convert an array of
Number s to an array of RdfLiteral.NumericLiteral s |
static RdfLiteral.StringLiteral[] |
toRdfLiteralArray(String... literals)
Convert an array of
String s to an array of RdfLiteral.StringLiteral s |
public static Iri iri(String iriString)
iriString
- the String representing the iriIri
instancepublic static Iri iri(IRI iri)
IRI
iri
- the IRIIri
instancepublic static Iri iri(String namespace, String localName)
namespace
- the namespace of the IrilocalName
- the local name of the IriIri
instancepublic static RdfBlankNode.LabeledBlankNode bNode(String label)
label
- the label of the blank nodeRdfBlankNode.LabeledBlankNode
instancepublic static RdfBlankNode.PropertiesBlankNode bNode(RdfPredicate predicate, RdfObject... objects)
predicate
- the predicate of the initial predicate-object list to populate this blank node withobjects
- the objects of the initial predicate-object list to populate this blank node withRdfBlankNode.PropertiesBlankNode
instancepublic static RdfBlankNode.AnonymousBlankNode bNode()
RdfBlankNode.AnonymousBlankNode
instancepublic static RdfLiteral.StringLiteral literalOf(String stringValue)
stringValue
- the String instance to create a literal fromRdfLiteral.StringLiteral
instance representing the given Stringpublic static RdfLiteral.StringLiteral literalOfType(String stringValue, Iri dataType)
stringValue
- the literal stringdataType
- the datatype tagRdfLiteral.StringLiteral
instance representing the given String and datatypepublic static RdfLiteral.StringLiteral literalOfType(String stringValue, IRI dataType)
stringValue
- the literal stringdataType
- the datatype as a IRI
RdfLiteral.StringLiteral
instance representing the given String and datatypepublic static RdfLiteral.StringLiteral literalOfLanguage(String stringValue, String language)
stringValue
- the literal stringlanguage
- the language tagRdfLiteral.StringLiteral
instance representing the given String and languagepublic static RdfLiteral.NumericLiteral literalOf(Number numberValue)
numberValue
- the Number instance to create a literal fromRdfLiteral.NumericLiteral
instance representing the given Numberpublic static RdfLiteral.BooleanLiteral literalOf(Boolean boolValue)
boolValue
- the boolean to create a literal fromRdfLiteral.BooleanLiteral
instance representing the given booleanpublic static RdfPredicateObjectList predicateObjectList(RdfPredicate predicate, RdfObject... objects)
RdfPredicateObjectList
predicate
- the RdfPredicate
of the predicate-object listobjects
- the RdfObject
(s) of the listRdfPredicateObjectList
public static RdfPredicateObjectListCollection predicateObjectListCollection(RdfPredicate predicate, RdfObject... objects)
RdfPredicateObjectListCollection
with an initial RdfPredicateObjectList
predicate
- the RdfPredicate
of the initial RdfPredicateObjectList
objects
- the RdfObject
(s) of the initial RdfPredicateObjectList
RdfPredicateObjectListCollection
public static RdfPredicateObjectListCollection predicateObjectListCollection(RdfPredicateObjectList... predicateObjectLists)
RdfPredicateObjectListCollection
with the given RdfPredicateObjectList
(s)predicateObjectLists
- the RdfPredicateObjectList
(s) to add to the collectionRdfPredicateObjectListCollection
public static RdfLiteral.StringLiteral[] toRdfLiteralArray(String... literals)
String
s to an array of RdfLiteral.StringLiteral
sliterals
- the String
s to convertRdfLiteral.StringLiteral
spublic static RdfLiteral.BooleanLiteral[] toRdfLiteralArray(Boolean... literals)
Boolean
s to an array of RdfLiteral.BooleanLiteral
sliterals
- the Boolean
s to convertRdfLiteral.BooleanLiteral
spublic static RdfLiteral.NumericLiteral[] toRdfLiteralArray(Number... literals)
Number
s to an array of RdfLiteral.NumericLiteral
sliterals
- the Number
s to convertRdfLiteral.NumericLiteral
sCopyright © 2015-2020 Eclipse Foundation. All Rights Reserved.