Package com.apicatalog.rdf.model
Interface RdfResource
-
- All Superinterfaces:
RdfTerm
- All Known Implementing Classes:
Resource
public interface RdfResource extends RdfTerm
Represents an RDF resource, which can either be an absolute IRI or a blank node identifier.This interface defines methods for working with RDF resources, which are key components in RDF statements (subject, predicate, or object in RDF triples). An RDF resource can either be an IRI or a blank node.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default RdfResourceasResource()Returns this term as anRdfResource.booleanisBlank()Checks whether this resource is a blank node.booleanisIRI()Checks whether this resource is an IRI.default booleanisResource()Indicates whether this term is a resource, which includes absolute IRIs and blank node identifiers.java.lang.Stringvalue()Returns the value of the resource, typically an absolute IRI or blank node identifier.
-
-
-
Method Detail
-
value
java.lang.String value()
Returns the value of the resource, typically an absolute IRI or blank node identifier.- Returns:
- the value of the resource as a
String
-
isBlank
boolean isBlank()
Checks whether this resource is a blank node.A blank node is an anonymous resource that does not have an IRI.
- Returns:
trueif this resource is a blank node,falseif it is an IRI
-
isIRI
boolean isIRI()
Checks whether this resource is an IRI.An IRI (Internationalized Resource Identifier) is a globally unique identifier used to refer to a resource.
- Returns:
trueif this resource is an IRI,falseif it is a blank node
-
isResource
default boolean isResource()
Description copied from interface:RdfTermIndicates whether this term is a resource, which includes absolute IRIs and blank node identifiers.- Specified by:
isResourcein interfaceRdfTerm- Returns:
trueif the term is anRdfResource;falseotherwise.
-
asResource
default RdfResource asResource()
Description copied from interface:RdfTermReturns this term as anRdfResource.- Specified by:
asResourcein interfaceRdfTerm- Returns:
- the
RdfResourcerepresentation of this term.
-
-