Package org.apache.jena.rdf.model
Interface ResourceFactory.Interface
-
- Enclosing class:
- ResourceFactory
public static interface ResourceFactory.Interface
The interface to resource factory objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description Literal
createLangLiteral(java.lang.String string, java.lang.String lang)
Answer a plain (untyped) literal with no language and the given content.default Literal
createPlainLiteral(java.lang.String string)
Deprecated.Property
createProperty(java.lang.String uriref)
Create a new property.Property
createProperty(java.lang.String namespace, java.lang.String localName)
Create a new property.Resource
createResource()
Create a new anonymous resource.Resource
createResource(java.lang.String uriref)
Create a new resource.Statement
createStatement(Resource subject, Property predicate, RDFNode object)
Create a new statement.Resource
createStmtResource(Statement statement)
Create a new resource representing an RDF-star triple term.Literal
createStringLiteral(java.lang.String string)
Answer a string (xsd:string) literal.Literal
createTypedLiteral(java.lang.Object value)
Answer a typed literal.Literal
createTypedLiteral(java.lang.String string, RDFDatatype datatype)
Answer a typed literal.
-
-
-
Method Detail
-
createResource
Resource createResource()
Create a new anonymous resource.- Returns:
- a new anonymous resource
-
createResource
Resource createResource(java.lang.String uriref)
Create a new resource.- Parameters:
uriref
- URIREF of the resource- Returns:
- a new resource
-
createStmtResource
Resource createStmtResource(Statement statement)
Create a new resource representing an RDF-star triple term.- Parameters:
statement
-- Returns:
- a new resource
-
createStringLiteral
Literal createStringLiteral(java.lang.String string)
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
-
createPlainLiteral
@Deprecated default Literal createPlainLiteral(java.lang.String string)
Deprecated.Use createStringLiteral
-
createLangLiteral
Literal createLangLiteral(java.lang.String string, java.lang.String lang)
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
Literal createTypedLiteral(java.lang.String string, RDFDatatype datatype)
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
Literal createTypedLiteral(java.lang.Object value)
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
Property createProperty(java.lang.String uriref)
Create a new property.- Parameters:
uriref
- URIREF of the property- Returns:
- a new property
-
createProperty
Property createProperty(java.lang.String namespace, java.lang.String localName)
Create a new property.- Parameters:
namespace
- uriref of the namespacelocalName
- localname of the property- Returns:
- a new property
-
-