- Enclosing class:
- ResourceFactory
public static interface ResourceFactory.Interface
The interface to resource factory objects.
-
Method Summary
Modifier and TypeMethodDescriptioncreateLangLiteral(String string, String lang) Answer a plain (untyped) literal with no language and the given content.createProperty(String uriref) Create a new property.createProperty(String namespace, String localName) Create a new property.Create a new anonymous resource.createResource(String uriref) Create a new resource.createStatement(Resource subject, Property predicate, RDFNode object) Create a new statement.createStatementTerm(Statement statement) Create a new statement term representing an RDF 1.2 triple term.createStringLiteral(String string) Answer a string (xsd:string) literal.createTypedLiteral(Object value) Answer a typed literal.createTypedLiteral(String string, RDFDatatype datatype) Answer a typed literal.
-
Method Details
-
createResource
Resource createResource()Create a new anonymous resource.- Returns:
- a new anonymous resource
-
createResource
Create a new resource.- Parameters:
uriref- URIREF of the resource- Returns:
- a new resource
-
createStringLiteral
Answer a string (xsd:string) literal. This is the equivalent of a plain liteal with no language from RDF 1.0 (also called a simple literal in SPARQL)- Parameters:
string- the string which forms the value of the literal- Returns:
- a Literal node with that string as value
-
createLangLiteral
Answer a plain (untyped) literal with no language and the given content.- Parameters:
string- the string which forms the value of the literallang- The language tag to be used- Returns:
- a Literal node with that string as value
-
createTypedLiteral
Answer a typed literal.- Parameters:
string- the string which forms the value of the literaldatatype- RDFDatatype of the type literal- Returns:
- a Literal node with that string as value
-
createTypedLiteral
Answer a typed literal.- Parameters:
value- a java Object, the default RDFDatatype for that object will be used- Returns:
- a Literal node with that value
-
createProperty
Create a new property.- Parameters:
uriref- URIREF of the property- Returns:
- a new property
-
createProperty
Create a new property.- Parameters:
namespace- uriref of the namespacelocalName- localname of the property- Returns:
- a new property
-
createStatement
Create a new statement.- Parameters:
subject- subject of the new statementpredicate- predicate of the new statementobject- object of the new statement- Returns:
- a new statement
-
createStatementTerm
Create a new statement term representing an RDF 1.2 triple term.- Parameters:
statement-- Returns:
- a new statement term
-