rdfcrate.vocabs.pav
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.
authoredBy
dataclass
Bases: RdfProperty[RdfType]
authoredOn
dataclass
Bases: RdfProperty[RdfType]
contributedBy
dataclass
Bases: RdfProperty[RdfType]
contributedOn
dataclass
Bases: RdfProperty[RdfType]
createdAt
dataclass
Bases: RdfProperty[RdfType]
createdBy
dataclass
Bases: RdfProperty[RdfType]
createdOn
dataclass
Bases: RdfProperty[RdfType]
createdWith
dataclass
Bases: RdfProperty[RdfType]
curatedBy
dataclass
Bases: RdfProperty[RdfType]
curatedOn
dataclass
Bases: RdfProperty[RdfType]
curates
dataclass
Bases: RdfProperty[RdfType]
derivedFrom
dataclass
Bases: RdfProperty[RdfType]
generalizationOf
dataclass
Bases: RdfProperty[RdfType]
hasCurrentVersion
dataclass
Bases: RdfProperty[RdfType]
hasEarlierVersion
dataclass
Bases: RdfProperty[RdfType]
hasVersion
dataclass
Bases: RdfProperty[RdfType]
importedBy
dataclass
Bases: RdfProperty[RdfType]
importedFrom
dataclass
Bases: RdfProperty[RdfType]
importedOn
dataclass
Bases: RdfProperty[RdfType]
isPrimaryTopicOf
dataclass
Bases: RdfProperty[RdfType]
lastRefreshedOn
dataclass
Bases: RdfProperty[RdfType]
lastUpdateOn
dataclass
Bases: RdfProperty[RdfType]
name
dataclass
Bases: RdfProperty[RdfType]
previousVersion
dataclass
Bases: RdfProperty[RdfType]
providedBy
dataclass
Bases: RdfProperty[RdfType]
retrievedBy
dataclass
Bases: RdfProperty[RdfType]
retrievedFrom
dataclass
Bases: RdfProperty[RdfType]
retrievedOn
dataclass
Bases: RdfProperty[RdfType]
sourceAccessedAt
dataclass
Bases: RdfProperty[RdfType]
sourceAccessedBy
dataclass
Bases: RdfProperty[RdfType]
sourceAccessedOn
dataclass
Bases: RdfProperty[RdfType]
sourceLastAccessedOn
dataclass
Bases: RdfProperty[RdfType]
version
dataclass
Bases: RdfProperty[RdfType]