rdfcrate.vocabs.prov
Accept
Bases: Activity
Activity
Bases: RdfClass
ActivityInfluence
Bases: Influence
Agent
Bases: RdfClass
AgentInfluence
Bases: Influence
Association
Bases: AgentInfluence
Attribution
Bases: AgentInfluence
Bundle
Bases: Entity
Collection
Bases: Entity
Communication
Bases: ActivityInfluence
Contribute
Bases: Activity
Contributor
Bases: Role
Copyright
Bases: Activity
Create
Bases: Contribute
Creator
Bases: Contributor
Delegation
Bases: AgentInfluence
Derivation
Bases: EntityInfluence
Dictionary
Bases: RdfClass
DirectQueryService
Bases: SoftwareAgent
EmptyCollection
Bases: Collection
EmptyDictionary
Bases: EmptyCollection
, Dictionary
End
Bases: EntityInfluence
, InstantaneousEvent
Entity
Bases: RdfClass
EntityInfluence
Bases: Influence
Generation
Bases: ActivityInfluence
, InstantaneousEvent
Influence
Bases: RdfClass
Insertion
Bases: Derivation
InstantaneousEvent
Bases: RdfClass
Invalidation
Bases: ActivityInfluence
, InstantaneousEvent
KeyEntityPair
Bases: RdfClass
Location
Bases: RdfClass
Modify
Bases: Activity
Organization
Bases: Agent
Person
Bases: Agent
Plan
Bases: Entity
PrimarySource
Bases: Derivation
Publish
Bases: Activity
Publisher
Bases: Role
Quotation
Bases: Derivation
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.
Removal
Bases: Derivation
Replace
Bases: Activity
Revision
Bases: Derivation
RightsAssignment
Bases: Activity
RightsHolder
Bases: Role
Role
Bases: RdfClass
ServiceDescription
Bases: SoftwareAgent
Start
Bases: EntityInfluence
, InstantaneousEvent
Submit
Bases: Activity
Usage
Bases: EntityInfluence
, InstantaneousEvent
actedOnBehalfOf
dataclass
Bases: RdfProperty[Agent]
activity
dataclass
Bases: RdfProperty[Activity]
agent
dataclass
Bases: RdfProperty[Agent]
alternateOf
dataclass
Bases: RdfProperty[Entity]
aq
dataclass
Bases: RdfProperty[RdfType]
asInBundle
dataclass
Bases: RdfProperty[Bundle]
atLocation
dataclass
Bases: RdfProperty[Location]
atTime
dataclass
Bases: RdfProperty[RdfType]
category
dataclass
Bases: RdfProperty[RdfType]
component
dataclass
Bases: RdfProperty[RdfType]
constraints
dataclass
Bases: RdfProperty[RdfType]
definition
dataclass
Bases: RdfProperty[RdfType]
derivedByInsertionFrom
dataclass
Bases: RdfProperty[Dictionary]
derivedByRemovalFrom
dataclass
Bases: RdfProperty[Dictionary]
describesService
dataclass
Bases: RdfProperty[RdfType]
dictionary
dataclass
Bases: RdfProperty[Dictionary]
dm
dataclass
Bases: RdfProperty[RdfType]
editorialNote
dataclass
Bases: RdfProperty[RdfType]
editorsDefinition
dataclass
Bases: RdfProperty[RdfType]
endedAtTime
dataclass
Bases: RdfProperty[RdfType]
entity
dataclass
Bases: RdfProperty[Entity]
generated
dataclass
Bases: RdfProperty[Entity]
generatedAtTime
dataclass
Bases: RdfProperty[RdfType]
hadActivity
dataclass
Bases: RdfProperty[Activity]
hadDictionaryMember
dataclass
Bases: RdfProperty[KeyEntityPair]
hadGeneration
dataclass
Bases: RdfProperty[Generation]
hadMember
dataclass
Bases: RdfProperty[Entity]
hadPlan
dataclass
Bases: RdfProperty[Plan]
hadPrimarySource
dataclass
Bases: RdfProperty[Entity]
hadRole
dataclass
Bases: RdfProperty[Role]
hadUsage
dataclass
Bases: RdfProperty[Usage]
has_anchor
dataclass
Bases: RdfProperty[RdfType]
has_provenance
dataclass
Bases: RdfProperty[RdfType]
has_query_service
dataclass
Bases: RdfProperty[RdfType]
influenced
dataclass
Bases: RdfProperty[RdfType]
influencer
dataclass
Bases: RdfProperty[Thing]
insertedKeyEntityPair
dataclass
Bases: RdfProperty[KeyEntityPair]
invalidated
dataclass
Bases: RdfProperty[Entity]
invalidatedAtTime
dataclass
Bases: RdfProperty[RdfType]
inverse
dataclass
Bases: RdfProperty[RdfType]
mentionOf
dataclass
Bases: RdfProperty[Entity]
n
dataclass
Bases: RdfProperty[RdfType]
order
dataclass
Bases: RdfProperty[RdfType]
pairEntity
dataclass
Bases: RdfProperty[Entity]
pairKey
dataclass
Bases: RdfProperty[Literal]
pingback
dataclass
Bases: RdfProperty[RdfType]
provenanceUriTemplate
dataclass
Bases: RdfProperty[RdfType]
qualifiedAssociation
dataclass
Bases: RdfProperty[Association]
qualifiedAttribution
dataclass
Bases: RdfProperty[Attribution]
qualifiedCommunication
dataclass
Bases: RdfProperty[Communication]
qualifiedDelegation
dataclass
Bases: RdfProperty[Delegation]
qualifiedDerivation
dataclass
Bases: RdfProperty[Derivation]
qualifiedEnd
dataclass
Bases: RdfProperty[End]
qualifiedForm
dataclass
Bases: RdfProperty[RdfType]
qualifiedGeneration
dataclass
Bases: RdfProperty[Generation]
qualifiedInfluence
dataclass
Bases: RdfProperty[Influence]
qualifiedInsertion
dataclass
Bases: RdfProperty[Insertion]
qualifiedInvalidation
dataclass
Bases: RdfProperty[Invalidation]
qualifiedPrimarySource
dataclass
Bases: RdfProperty[PrimarySource]
qualifiedQuotation
dataclass
Bases: RdfProperty[Quotation]
qualifiedRemoval
dataclass
Bases: RdfProperty[Removal]
qualifiedRevision
dataclass
Bases: RdfProperty[Revision]
qualifiedStart
dataclass
Bases: RdfProperty[Start]
qualifiedUsage
dataclass
Bases: RdfProperty[Usage]
removedKey
dataclass
Bases: RdfProperty[Literal]
sharesDefinitionWith
dataclass
Bases: RdfProperty[RdfType]
specializationOf
dataclass
Bases: RdfProperty[Entity]
startedAtTime
dataclass
Bases: RdfProperty[RdfType]
todo
dataclass
Bases: RdfProperty[RdfType]
unqualifiedForm
dataclass
Bases: RdfProperty[RdfType]
used
dataclass
Bases: RdfProperty[Entity]
value
dataclass
Bases: RdfProperty[RdfType]
wasAssociatedWith
dataclass
Bases: RdfProperty[Agent]
wasAttributedTo
dataclass
Bases: RdfProperty[Agent]
wasDerivedFrom
dataclass
Bases: RdfProperty[Entity]
wasEndedBy
dataclass
Bases: RdfProperty[Entity]
wasGeneratedBy
dataclass
Bases: RdfProperty[Activity]
wasInfluencedBy
dataclass
Bases: RdfProperty[RdfType]
wasInformedBy
dataclass
Bases: RdfProperty[Activity]
wasInvalidatedBy
dataclass
Bases: RdfProperty[Activity]
wasQuotedFrom
dataclass
Bases: RdfProperty[Entity]
wasRevisionOf
dataclass
Bases: RdfProperty[Entity]
wasStartedBy
dataclass
Bases: RdfProperty[Entity]