rdfcrate.vocabs.dc
Agent
Bases: RdfClass
AgentClass
Bases: Class
BibliographicResource
Bases: RdfClass
Box
Bases: RdfClass
FileFormat
Bases: MediaType
Frequency
Bases: RdfClass
ISO3166
Bases: RdfClass
ISO639_2
Bases: RdfClass
ISO639_3
Bases: RdfClass
Jurisdiction
Bases: LocationPeriodOrJurisdiction
LicenseDocument
Bases: RightsStatement
LinguisticSystem
Bases: RdfClass
Location
Bases: LocationPeriodOrJurisdiction
LocationPeriodOrJurisdiction
Bases: RdfClass
MediaType
Bases: MediaTypeOrExtent
MediaTypeOrExtent
Bases: RdfClass
MethodOfAccrual
Bases: RdfClass
MethodOfInstruction
Bases: RdfClass
Period
Bases: RdfClass
PeriodOfTime
Bases: LocationPeriodOrJurisdiction
PhysicalMedium
Bases: MediaType
PhysicalResource
Bases: RdfClass
Point
Bases: RdfClass
Policy
Bases: RdfClass
ProvenanceStatement
Bases: RdfClass
RFC1766
Bases: RdfClass
RFC3066
Bases: RdfClass
RFC4646
Bases: RdfClass
RFC5646
Bases: RdfClass
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.
RightsStatement
Bases: RdfClass
SizeOrDuration
Bases: MediaTypeOrExtent
Standard
Bases: RdfClass
URI
Bases: RdfClass
W3CDTF
Bases: RdfClass
abstract
dataclass
Bases: RdfProperty[RdfType]
accessRights
dataclass
Bases: RdfProperty[RightsStatement]
accrualMethod
dataclass
Bases: RdfProperty[MethodOfAccrual]
accrualPeriodicity
dataclass
Bases: RdfProperty[Frequency]
accrualPolicy
dataclass
Bases: RdfProperty[Policy]
alternative
dataclass
Bases: RdfProperty[Literal]
audience
dataclass
Bases: RdfProperty[AgentClass]
available
dataclass
Bases: RdfProperty[Literal]
bibliographicCitation
dataclass
Bases: RdfProperty[Literal]
conformsTo
dataclass
Bases: RdfProperty[Standard]
contributor
dataclass
Bases: RdfProperty[Agent]
coverage
dataclass
Bases: RdfProperty[Jurisdiction | Location | Period]
created
dataclass
Bases: RdfProperty[Literal]
creator
dataclass
Bases: RdfProperty[Agent]
date
dataclass
Bases: RdfProperty[Literal]
dateAccepted
dataclass
Bases: RdfProperty[Literal]
dateCopyrighted
dataclass
Bases: RdfProperty[Literal]
dateSubmitted
dataclass
Bases: RdfProperty[Literal]
description
dataclass
Bases: RdfProperty[RdfType]
educationLevel
dataclass
Bases: RdfProperty[AgentClass]
extent
dataclass
Bases: RdfProperty[SizeOrDuration]
format
dataclass
Bases: RdfProperty[MediaType]
hasFormat
dataclass
Bases: RdfProperty[RdfType]
hasPart
dataclass
Bases: RdfProperty[RdfType]
hasVersion
dataclass
Bases: RdfProperty[RdfType]
identifier
dataclass
Bases: RdfProperty[Literal]
instructionalMethod
dataclass
Bases: RdfProperty[MethodOfInstruction]
isFormatOf
dataclass
Bases: RdfProperty[RdfType]
isPartOf
dataclass
Bases: RdfProperty[RdfType]
isReferencedBy
dataclass
Bases: RdfProperty[RdfType]
isReplacedBy
dataclass
Bases: RdfProperty[RdfType]
isRequiredBy
dataclass
Bases: RdfProperty[RdfType]
isVersionOf
dataclass
Bases: RdfProperty[RdfType]
issued
dataclass
Bases: RdfProperty[Literal]
language
dataclass
Bases: RdfProperty[LinguisticSystem]
license
dataclass
Bases: RdfProperty[LicenseDocument]
mediator
dataclass
Bases: RdfProperty[AgentClass]
medium
dataclass
Bases: RdfProperty[PhysicalMedium]
modified
dataclass
Bases: RdfProperty[Literal]
provenance
dataclass
Bases: RdfProperty[ProvenanceStatement]
publisher
dataclass
Bases: RdfProperty[Agent]
references
dataclass
Bases: RdfProperty[RdfType]
relation
dataclass
Bases: RdfProperty[RdfType]
replaces
dataclass
Bases: RdfProperty[RdfType]
requires
dataclass
Bases: RdfProperty[RdfType]
rights
dataclass
Bases: RdfProperty[RightsStatement]
rightsHolder
dataclass
Bases: RdfProperty[Agent]
source
dataclass
Bases: RdfProperty[RdfType]
spatial
dataclass
Bases: RdfProperty[Location]
subject
dataclass
Bases: RdfProperty[RdfType]
tableOfContents
dataclass
Bases: RdfProperty[RdfType]
temporal
dataclass
Bases: RdfProperty[PeriodOfTime]
title
dataclass
Bases: RdfProperty[Literal]
type
dataclass
Bases: RdfProperty[RdfType]
valid
dataclass
Bases: RdfProperty[Literal]