rdfcrate.vocabs.geo
Feature
Bases: SpatialObject
FeatureCollection
Bases: SpatialObjectCollection
Geometry
Bases: SpatialObject
GeometryCollection
Bases: SpatialObjectCollection
RdfClass
Bases: RdfType
An RDF entity that has a URI (or blank node).
Typically these are instance of rdfs:Class
or owl:Class
.
add(*args: EntityArgs, graph: ContextGraph | None = None) -> ContextGraph
Adds triples to a graph with this entity as the subject.
If the graph is not provided, an empty one will be created and returned.
Example
from rdfcrate import ContextGraph, rdfs, sdo
graph = ContextGraph() sdo.Thing("http://example.org/thing").add( sdo.name("My Thing"), sdo.description("An example thing"), graph=graph )
adhoc(term: RdfTerm) -> type[Self]
classmethod
Makes an ad-hoc type class from a term.
to_type_property() -> rdf.type
classmethod
Converts this class wrapper to an instance of RdfProperty
that can be used to tag entities with this type.
update(*args: EntityArgs, graph: ContextGraph | None = None) -> ContextGraph
Updates this entity with the given properties, in a graph.
If the graph is not provided, an empty one will be created and returned.
with_term_label(label: str) -> type[RdfClass]
classmethod
Creates a new instance of this class with the given label. This is useful in cases where the term label is already defined by another vocabulary
RdfProperty
dataclass
Bases: PropertyProtocol
, Generic[T]
Represents the double of (predicate, object), with the subject being the class this is attached to.
This is the normal way properties will be defined As a user, you will typically use this class by instantiating subclasses from the vocabs module and attaching them to entities. If you want to define custom vocabulary, you can first subclass this and then create instances of that subclass.
adhoc(term: RdfTerm, object: T) -> RdfProperty
staticmethod
Makes an ad-hoc property class from a term.
If you want to use the property multiple times, you should define a subclass instead.
reverse(subject: RdfType) -> ReverseProperty
classmethod
Utility for when you want to make the current entity the object of a property, rather than the subject.
with_term_label(label: str) -> type[RdfProperty[T]]
classmethod
Creates a new instance of this property with the given label. This is useful in cases where the term label is already defined by another vocabulary
RdfTerm
Wrapper for a term with a label and URI. This is needed because RO-Crate bans the use of full URIs in JSON-LD.
RdfType
An entity within the RDF graph.
This is a thin wrapper around a rdflib
Identifier
such as a URIRef
or BNode
, but which allows for static type checking.
as_object(graph: ContextGraph, subject: Subject, predicate: Predicate) -> Object
Converts this entity to an Object
that can be used in triples.
as_subject(graph: ContextGraph, predicate: Predicate, object: Object) -> Subject
Converts this entity to a Subject
that can be used in triples.
SpatialObject
Bases: RdfClass
SpatialObjectCollection
Bases: Container
asDGGS
dataclass
Bases: RdfProperty[dggsLiteral]
asGML
dataclass
Bases: RdfProperty[gmlLiteral]
asGeoJSON
dataclass
Bases: RdfProperty[geoJSONLiteral]
asKML
dataclass
Bases: RdfProperty[kmlLiteral]
asWKT
dataclass
Bases: RdfProperty[wktLiteral]
coordinateDimension
dataclass
Bases: RdfProperty[RdfType]
defaultGeometry
dataclass
Bases: RdfProperty[Geometry]
dggsLiteral
Bases: RdfClass
dimension
dataclass
Bases: RdfProperty[RdfType]
ehContains
dataclass
Bases: RdfProperty[SpatialObject]
ehCoveredBy
dataclass
Bases: RdfProperty[SpatialObject]
ehCovers
dataclass
Bases: RdfProperty[SpatialObject]
ehDisjoint
dataclass
Bases: RdfProperty[SpatialObject]
ehEquals
dataclass
Bases: RdfProperty[SpatialObject]
ehInside
dataclass
Bases: RdfProperty[SpatialObject]
ehMeet
dataclass
Bases: RdfProperty[SpatialObject]
ehOverlap
dataclass
Bases: RdfProperty[SpatialObject]
geoJSONLiteral
Bases: RdfClass
gmlLiteral
Bases: RdfClass
hasArea
dataclass
Bases: RdfProperty[RdfType]
hasBoundingBox
dataclass
Bases: RdfProperty[Geometry]
hasCentroid
dataclass
Bases: RdfProperty[Geometry]
hasDefaultGeometry
dataclass
Bases: RdfProperty[Geometry]
hasGeometry
dataclass
Bases: RdfProperty[Geometry]
hasLength
dataclass
Bases: RdfProperty[RdfType]
hasMetricArea
dataclass
Bases: RdfProperty[RdfType]
hasMetricLength
dataclass
Bases: RdfProperty[RdfType]
hasMetricPerimeterLength
dataclass
Bases: RdfProperty[RdfType]
hasMetricSize
dataclass
Bases: RdfProperty[RdfType]
hasMetricSpatialAccuracy
dataclass
Bases: RdfProperty[RdfType]
hasMetricSpatialResolution
dataclass
Bases: RdfProperty[RdfType]
hasMetricVolume
dataclass
Bases: RdfProperty[RdfType]
hasPerimeterLength
dataclass
Bases: RdfProperty[RdfType]
hasSerialization
dataclass
Bases: RdfProperty[Literal]
hasSize
dataclass
Bases: RdfProperty[RdfType]
hasSpatialAccuracy
dataclass
Bases: RdfProperty[RdfType]
hasSpatialResolution
dataclass
Bases: RdfProperty[RdfType]
hasVolume
dataclass
Bases: RdfProperty[RdfType]
isEmpty
dataclass
Bases: RdfProperty[RdfType]
isSimple
dataclass
Bases: RdfProperty[RdfType]
kmlLiteral
Bases: RdfClass
rcc8dc
dataclass
Bases: RdfProperty[SpatialObject]
rcc8ec
dataclass
Bases: RdfProperty[SpatialObject]
rcc8eq
dataclass
Bases: RdfProperty[SpatialObject]
rcc8ntpp
dataclass
Bases: RdfProperty[SpatialObject]
rcc8ntppi
dataclass
Bases: RdfProperty[SpatialObject]
rcc8po
dataclass
Bases: RdfProperty[SpatialObject]
rcc8tpp
dataclass
Bases: RdfProperty[SpatialObject]
rcc8tppi
dataclass
Bases: RdfProperty[SpatialObject]
sfContains
dataclass
Bases: RdfProperty[SpatialObject]
sfCrosses
dataclass
Bases: RdfProperty[SpatialObject]
sfDisjoint
dataclass
Bases: RdfProperty[SpatialObject]
sfEquals
dataclass
Bases: RdfProperty[SpatialObject]
sfIntersects
dataclass
Bases: RdfProperty[SpatialObject]
sfOverlaps
dataclass
Bases: RdfProperty[SpatialObject]
sfTouches
dataclass
Bases: RdfProperty[SpatialObject]
sfWithin
dataclass
Bases: RdfProperty[SpatialObject]
spatialDimension
dataclass
Bases: RdfProperty[RdfType]
wktLiteral
Bases: RdfClass