.
This commit is contained in:
@@ -151,6 +151,12 @@ xsd:unsignedShort rdf:type rdfs:Datatype ;
|
||||
# Classes
|
||||
#################################################################
|
||||
|
||||
### https://graphofliberty.org/2026/04/ont/DerivationMethodology
|
||||
:DerivationMethodology rdf:type owl:Class ;
|
||||
rdfs:comment "The methodology used to derive content. Individuals of this class should provide enough information to replicate the process by which the content was generated. For example, if Whisper was used derive captions for an audio book, the precise model used (e.g. large v3), a link to the source code (e.g. HuggingFace) and/or a paper should be provided."@en ;
|
||||
rdfs:label "Derivation Methodology"@en .
|
||||
|
||||
|
||||
### https://graphofliberty.org/2026/04/ont/Entity
|
||||
:Entity rdf:type owl:Class ;
|
||||
rdfs:comment "An Entity is a first-class citizen of the Graph of Liberty catalog. It is the class of all cultural artifacts which are to be preserved."@en ;
|
||||
|
||||
+19
-1
@@ -70,6 +70,7 @@ pub(crate) enum Message {
|
||||
NavigateBack,
|
||||
NavigateForward,
|
||||
ResetState,
|
||||
SetReadOnly(bool),
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone)]
|
||||
@@ -103,6 +104,7 @@ pub(crate) struct Publisher {
|
||||
url_input_valid: bool,
|
||||
navigator: Navigator<Url>,
|
||||
document: RdfSource<KeyedDataset<RowState>>,
|
||||
show_read_only: bool,
|
||||
hovered_row: Option<QuadKey>,
|
||||
search_state: Option<SearchState>,
|
||||
index: SearchIndex,
|
||||
@@ -161,6 +163,7 @@ impl Publisher {
|
||||
url_input_valid: true,
|
||||
navigator,
|
||||
document,
|
||||
show_read_only: false,
|
||||
hovered_row: None,
|
||||
search_state: None,
|
||||
index,
|
||||
@@ -278,12 +281,13 @@ impl Publisher {
|
||||
self.url_input = value;
|
||||
}
|
||||
Message::URLInputSubmitted => {
|
||||
let url = Url::parse(&self.url_input).expect("Invalid URL");
|
||||
if let Ok(url) = Url::parse(&self.url_input) {
|
||||
if &url != self.navigator.current() {
|
||||
self.navigator.goto(url.clone());
|
||||
}
|
||||
task = Task::done(Message::NavigateTo(url));
|
||||
}
|
||||
}
|
||||
Message::NavigateTo(url) => {
|
||||
task = Task::done(Message::DeleteAllRows)
|
||||
.chain(Task::done(Message::ResetState))
|
||||
@@ -609,6 +613,9 @@ impl Publisher {
|
||||
task = Task::done(Message::URLInputChanged(url.to_string()))
|
||||
.chain(Task::done(Message::NavigateTo(url)));
|
||||
}
|
||||
Message::SetReadOnly(value) => {
|
||||
self.show_read_only = value;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
task
|
||||
@@ -883,6 +890,7 @@ impl Publisher {
|
||||
.document
|
||||
.dataset()
|
||||
.iter_both()
|
||||
.filter(|(_, _, state)| self.show_read_only || !state.read_only)
|
||||
.map(|(key, quad, state)| self.view_row(key, quad, state))
|
||||
.collect();
|
||||
|
||||
@@ -901,6 +909,15 @@ impl Publisher {
|
||||
save_button_base
|
||||
};
|
||||
|
||||
let read_only_toggle = toggler(self.show_read_only)
|
||||
.on_toggle(Message::SetReadOnly);
|
||||
|
||||
let footer = row![
|
||||
space::horizontal(),
|
||||
text("Show Read Only Triples"),
|
||||
read_only_toggle
|
||||
];
|
||||
|
||||
let content = navigation_area(column![
|
||||
row![
|
||||
reindex_ontology_button,
|
||||
@@ -912,6 +929,7 @@ impl Publisher {
|
||||
],
|
||||
scrollable(body),
|
||||
space::vertical(),
|
||||
footer,
|
||||
])
|
||||
.on_back_click(Message::NavigateBack)
|
||||
.on_forward_click(Message::NavigateForward);
|
||||
|
||||
@@ -15,7 +15,8 @@ impl<'a> TermHelper<'a> {
|
||||
match self.term.as_ref() {
|
||||
TermRef::Literal(literal) => literal.value(),
|
||||
TermRef::NamedNode(node) => node.as_str(),
|
||||
_ => unimplemented!(),
|
||||
TermRef::BlankNode(node) => node.as_str(),
|
||||
TermRef::Triple(_) => "«triple»",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,6 +163,7 @@ impl<'a> TermHelperMut<'a> {
|
||||
*self.term = Term::Literal(new_literal)
|
||||
}
|
||||
TermRef::NamedNode(_) => *self.term = Term::NamedNode(NamedNode::new_unchecked(value)),
|
||||
TermRef::BlankNode(_) => *self.term = Term::NamedNode(NamedNode::new_unchecked(value)),
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user