pub struct ResourceTypeDetail {
pub name: String,
pub iri: String,
pub label: Option<String>,
pub data_model: String,
pub representation: Option<Representation>,
pub super_types: Vec<String>,
pub fields: Vec<Field>,
}Expand description
The full detail of a resource-type, as surfaced by dsp vre resource-type describe.
The describe projection: identity (name + iri), server-supplied label,
the resource-type’s own data_model name (the baseline for cross-DM field
tagging and the prose Data-model: header), an optional representation
kind (for asset types), the project/external superclass local names
(super_types), and the full field list. No serde derive: wire
deserialization stays in src/client/http.rs. See ADR-0001 / ADR-0008
and the CONTEXT.md “Resource Type” / “Field” / “Cardinality” /
“Representation” entries.
Fields§
§name: StringShort name of the resource-type (e.g. manuscript), derived from the IRI fragment.
iri: StringFull IRI of the resource-type
(e.g. http://api.dasch.swiss/ontology/0801/beol/v2#manuscript).
label: Option<String>Server-supplied human label (rdfs:label), if any.
data_model: StringShort name of the resource-type’s own data-model (e.g. beol). Used as
the prose Data-model: header line and as the baseline when the renderer
tags cross-DM fields ([from <dm>]). Derived from the data-model IRI at
the client boundary — not a wire field.
representation: Option<Representation>Representation kind, if the resource-type is a file representation
(still-image, moving-image, audio, document, archive, text). Detected from
the presence of the corresponding knora-api file-value restriction in the
class’s flattened owl:Restriction set (Decision 5 — transitive-safe;
see the plan). None for non-asset resource-types.
super_types: Vec<String>Project and external (non-system) superclass local names. Derived from the
non-Restriction {"@id":…} entries in rdfs:subClassOf (Decision 6).
Excludes knora-api / system supers. Empty if the type extends only system
classes or has no explicit non-system superclass.
fields: Vec<Field>Full field list. Includes both project-defined and built-in (system)
fields; the action layer filters built-ins unless --include-builtins is
set. Sorted by salsah-gui:guiOrder then by name at the client boundary.
Trait Implementations§
Source§impl Clone for ResourceTypeDetail
impl Clone for ResourceTypeDetail
Source§fn clone(&self) -> ResourceTypeDetail
fn clone(&self) -> ResourceTypeDetail
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResourceTypeDetail
impl Debug for ResourceTypeDetail
impl Eq for ResourceTypeDetail
Source§impl PartialEq for ResourceTypeDetail
impl PartialEq for ResourceTypeDetail
impl StructuralPartialEq for ResourceTypeDetail
Auto Trait Implementations§
impl Freeze for ResourceTypeDetail
impl RefUnwindSafe for ResourceTypeDetail
impl Send for ResourceTypeDetail
impl Sync for ResourceTypeDetail
impl Unpin for ResourceTypeDetail
impl UnsafeUnpin for ResourceTypeDetail
impl UnwindSafe for ResourceTypeDetail
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.