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
Booleans to an array of RdfLiteral.BooleanLiterals |
static RdfLiteral.NumericLiteral[] |
toRdfLiteralArray(Number... literals)
Convert an array of
Numbers to an array of RdfLiteral.NumericLiterals |
static RdfLiteral.StringLiteral[] |
toRdfLiteralArray(String... literals)
Convert an array of
Strings to an array of RdfLiteral.StringLiterals |
public static Iri iri(String iriString)
iriString - the String representing the iriIri instancepublic static Iri iri(IRI iri)
IRIiri - 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 IRIRdfLiteral.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)
RdfPredicateObjectListpredicate - the RdfPredicate of the predicate-object listobjects - the RdfObject(s) of the listRdfPredicateObjectListpublic static RdfPredicateObjectListCollection predicateObjectListCollection(RdfPredicate predicate, RdfObject... objects)
RdfPredicateObjectListCollection with an initial RdfPredicateObjectListpredicate - the RdfPredicate of the initial RdfPredicateObjectListobjects - the RdfObject(s) of the initial RdfPredicateObjectListRdfPredicateObjectListCollectionpublic static RdfPredicateObjectListCollection predicateObjectListCollection(RdfPredicateObjectList... predicateObjectLists)
RdfPredicateObjectListCollection with the given RdfPredicateObjectList(s)predicateObjectLists - the RdfPredicateObjectList(s) to add to the collectionRdfPredicateObjectListCollectionpublic static RdfLiteral.StringLiteral[] toRdfLiteralArray(String... literals)
Strings to an array of RdfLiteral.StringLiteralsliterals - the Strings to convertRdfLiteral.StringLiteralspublic static RdfLiteral.BooleanLiteral[] toRdfLiteralArray(Boolean... literals)
Booleans to an array of RdfLiteral.BooleanLiteralsliterals - the Booleans to convertRdfLiteral.BooleanLiteralspublic static RdfLiteral.NumericLiteral[] toRdfLiteralArray(Number... literals)
Numbers to an array of RdfLiteral.NumericLiteralsliterals - the Numbers to convertRdfLiteral.NumericLiteralsCopyright © 2015-2020 Eclipse Foundation. All Rights Reserved.