Package com.apicatalog.rdf.primitive
Class TermHashMap
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<java.lang.String,RdfTerm>
-
- com.apicatalog.rdf.primitive.TermHashMap
-
- All Implemented Interfaces:
RdfTermFactory,java.io.Serializable,java.lang.Cloneable,java.util.Map<java.lang.String,RdfTerm>
public class TermHashMap extends java.util.HashMap<java.lang.String,RdfTerm> implements RdfTermFactory
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description TermHashMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RdfResourcecreateBlankNode(java.lang.String value)Creates a blank node with the specified value.RdfResourcecreateIRI(java.lang.String value)Creates an IRI (Internationalized Resource Identifier) with the specified value.RdfLiteralcreateLangString(java.lang.String lexicalValue, java.lang.String datatype, java.lang.String langTag, RdfLiteral.Direction direction)Creates an RDF language-tagged string with the specified lexical value, datatype, and language tag.RdfLiteralcreateLiteral(java.lang.String lexicalValue, java.lang.String datatype)Creates an RDF literal with the specified lexical value and datatype.RdfQuadcreateQuad(RdfResource subject, RdfResource predicate, RdfTerm object, RdfResource graph)Creates a quad consisting of a subject, predicate, object, and graph.RdfTriplecreateTriple(RdfResource subject, RdfResource predicate, RdfTerm object)Creates a triple consisting of a subject, predicate, and object.-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
createBlankNode
public RdfResource createBlankNode(java.lang.String value)
Description copied from interface:RdfTermFactoryCreates a blank node with the specified value.A blank node is an anonymous resource that does not have an IRI.
- Specified by:
createBlankNodein interfaceRdfTermFactory- Parameters:
value- the value of the blank node (usually a string identifier)- Returns:
RdfResourcerepresenting the blank node
-
createIRI
public RdfResource createIRI(java.lang.String value)
Description copied from interface:RdfTermFactoryCreates an IRI (Internationalized Resource Identifier) with the specified value.An IRI is a globally unique identifier used to refer to a resource.
- Specified by:
createIRIin interfaceRdfTermFactory- Parameters:
value- the value of the IRI (usually a URI string)- Returns:
RdfResourcerepresenting the IRI
-
createTriple
public RdfTriple createTriple(RdfResource subject, RdfResource predicate, RdfTerm object)
Description copied from interface:RdfTermFactoryCreates a triple consisting of a subject, predicate, and object.A triple is the core structure of RDF data, consisting of a subject, predicate, and object.
- Specified by:
createTriplein interfaceRdfTermFactory- Parameters:
subject- the subject of the triple, must be aRdfResourcepredicate- the predicate of the triple, must be aRdfResourceobject- the object of the triple, can be anyRdfTerm- Returns:
RdfTriplerepresenting the RDF triple
-
createQuad
public RdfQuad createQuad(RdfResource subject, RdfResource predicate, RdfTerm object, RdfResource graph)
Description copied from interface:RdfTermFactoryCreates a quad consisting of a subject, predicate, object, and graph.A quad extends the triple structure by including an additional graph name, allowing RDF data to be associated with a specific graph.
- Specified by:
createQuadin interfaceRdfTermFactory- Parameters:
subject- the subject of the quad, must be aRdfResourcepredicate- the predicate of the quad, must be aRdfResourceobject- the object of the quad, can be anyRdfTermgraph- the graph name for the quad, must be aRdfResource- Returns:
RdfQuadrepresenting the RDF quad
-
createLiteral
public RdfLiteral createLiteral(java.lang.String lexicalValue, java.lang.String datatype)
Description copied from interface:RdfTermFactoryCreates an RDF literal with the specified lexical value and datatype.RDF literals are used to represent values like strings, numbers, and dates.
- Specified by:
createLiteralin interfaceRdfTermFactory- Parameters:
lexicalValue- the lexical value of the literal (e.g., "42", "hello")datatype- the datatype of the literal (e.g., xsd:string, xsd:int)- Returns:
RdfLiteralrepresenting the RDF literal
-
createLangString
public RdfLiteral createLangString(java.lang.String lexicalValue, java.lang.String datatype, java.lang.String langTag, RdfLiteral.Direction direction)
Description copied from interface:RdfTermFactoryCreates an RDF language-tagged string with the specified lexical value, datatype, and language tag.Language-tagged strings are literals that also have a language tag, e.g., "hello"@en for English.
- Specified by:
createLangStringin interfaceRdfTermFactory- Parameters:
lexicalValue- the lexical value of the language-tagged stringdatatype- the datatype of the literal (should berdf:langString)langTag- the language tag (e.g., "en", "fr")direction- the text direction of the string (LTR or RTL)- Returns:
RdfLiteralrepresenting the language-tagged string
-
-