.
This commit is contained in:
+55
-100
@@ -1,7 +1,6 @@
|
||||
use crate::rdf::ontology::{LabeledIri, Ontology};
|
||||
use crate::rdf::term_helper::{TermHelper, TermHelperMut};
|
||||
use crate::rdf::vocab::{gl, rda};
|
||||
use gl_search::{Schema, SearchDocument, SearchIndex, NamedFieldDocument, OwnedValue, doc, IndexWriter};
|
||||
use gl_search::{Schema, SearchDocument, SearchIndex, doc, IndexWriter};
|
||||
use http::StatusCode;
|
||||
use iced::alignment::Horizontal;
|
||||
use iced::widget::button::Style;
|
||||
@@ -9,7 +8,6 @@ use iced::widget::grid::Sizing;
|
||||
use iced::widget::{button, center, column, combo_box, container, grid, mouse_area, opaque, pick_list, row, scrollable, space, stack, table, text, text_input, toggler};
|
||||
use iced::window::Settings;
|
||||
use iced::{Background, Color, Element, Length, Subscription, Task, color, window};
|
||||
use iced::widget::text::Wrapping;
|
||||
use ldp::middleware::BasicAuthMiddleware;
|
||||
use ldp::model::{KeyedDataset, QuadKey};
|
||||
use ldp::reqwest::{Client, Url};
|
||||
@@ -19,10 +17,11 @@ use ldp::{RdfSource, RdfSourceUpdateResponse, ResourceRequestBuilder, Serializat
|
||||
use oxigraph::io::RdfFormat;
|
||||
use oxigraph::model::vocab::{rdf, rdfs};
|
||||
use oxigraph::model::{BaseDirection, Dataset, NamedNode, Quad, Term, TermRef};
|
||||
use tracing::{debug, error, info, info_span, span, Level};
|
||||
use tracing::{debug_span, error, trace};
|
||||
use crate::rdf::conversion;
|
||||
use crate::widget::iri_input::iri_input;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub(crate) enum Message {
|
||||
None,
|
||||
Traverse,
|
||||
@@ -43,7 +42,7 @@ pub(crate) enum Message {
|
||||
HoverRow(QuadKey),
|
||||
UnhoverRow(QuadKey),
|
||||
QueryUpdated(String),
|
||||
SetSearchResults(Vec<NamedFieldDocument>),
|
||||
SetSearchResults(Vec<SearchDocument>),
|
||||
QueryTypeUpdated(NamedNode),
|
||||
SearchResultClicked(NamedNode),
|
||||
DatatypeUpdated(QuadKey, Option<String>),
|
||||
@@ -76,7 +75,7 @@ struct SearchState {
|
||||
action: SearchResultClickAction,
|
||||
query: String,
|
||||
type_: LabeledIri,
|
||||
results: Vec<NamedFieldDocument>,
|
||||
results: Vec<SearchDocument>,
|
||||
}
|
||||
|
||||
pub(crate) struct Publisher {
|
||||
@@ -97,32 +96,31 @@ pub(crate) struct Publisher {
|
||||
|
||||
impl Publisher {
|
||||
pub(crate) fn new() -> (Self, Task<Message>) {
|
||||
let ontology = info_span!("Ontology Creation").in_scope(|| {
|
||||
let ontology = debug_span!("Ontology Creation").in_scope(|| {
|
||||
Ontology::builder()
|
||||
.with_path("/home/alex/.local/share/org.graphofliberty.desktop/ontology")
|
||||
.build()
|
||||
.expect("Failed to build ontology")
|
||||
});
|
||||
|
||||
let index = info_span!("Ontology Indexing").in_scope(|| {
|
||||
let mut index = SearchIndex::builder()
|
||||
//.with_path("/home/alex/.local/share/org.graphofliberty.desktop/index")
|
||||
.build()
|
||||
.expect("Failed to build search index");
|
||||
let index = SearchIndex::builder()
|
||||
//.with_path("/home/alex/.local/share/org.graphofliberty.desktop/index")
|
||||
.build()
|
||||
.expect("Failed to build search index");
|
||||
|
||||
let writer = index.writer().expect("Failed to create search index writer");
|
||||
|
||||
let classes_to_index = [
|
||||
rdf::PROPERTY,
|
||||
rdfs::CLASS,
|
||||
];
|
||||
let classes_to_index = [
|
||||
rdf::PROPERTY,
|
||||
rdfs::CLASS,
|
||||
];
|
||||
|
||||
debug_span!("Ontology Indexing").in_scope(|| {
|
||||
let mut writer = index.writer().expect("Failed to build index writer");
|
||||
for class in &classes_to_index {
|
||||
let class = class.into_owned();
|
||||
if let Some(id) = ontology.catalog_id(&class) {
|
||||
index.remove_all_of_type(id).expect("Failed to remove documents from search index");
|
||||
writer.remove_all_of_type(id).expect("Failed to remove documents from search index");
|
||||
for individual in ontology.individuals(&class) {
|
||||
let info = ontology.info(&individual);
|
||||
let info = ontology.info(&individual, &conversion::english());
|
||||
if info.label.is_some() || info.comment.is_some() {
|
||||
let mut document = doc!(
|
||||
Schema::type_field() => id,
|
||||
@@ -137,13 +135,12 @@ impl Publisher {
|
||||
document.add_text(Schema::field(&field.name), info.comment.unwrap_or_default());
|
||||
}
|
||||
|
||||
writer.add_document(document).expect("Failed to add document to search index");
|
||||
writer.add(document).expect("Failed to add document to search index");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
index
|
||||
writer.commit().expect("Failed to commit changes to search index");
|
||||
});
|
||||
|
||||
let mut abbreviated_datatypes = ontology
|
||||
@@ -187,7 +184,7 @@ impl Publisher {
|
||||
|
||||
pub(crate) fn update(&mut self, message: Message) -> Task<Message> {
|
||||
let mut task = Task::none();
|
||||
debug!(?message);
|
||||
trace!(?message);
|
||||
|
||||
match message {
|
||||
Message::Traverse => {
|
||||
@@ -223,13 +220,14 @@ impl Publisher {
|
||||
}
|
||||
|
||||
if let Some(writer) = &self.index_writer {
|
||||
writer.add_document(document).expect("Unable to add document to search index");
|
||||
writer.add(document).expect("Unable to add document to search index");
|
||||
}
|
||||
}
|
||||
}
|
||||
Message::CommitIndex => {
|
||||
if let Some(writer) = &mut self.index_writer {
|
||||
writer.commit().expect("Unable to commit updates to search index");
|
||||
self.index_writer = None;
|
||||
}
|
||||
}
|
||||
Message::WindowClosed(id) => {
|
||||
@@ -368,15 +366,20 @@ impl Publisher {
|
||||
SearchResultClickAction::URLInput => self.ontology.catalog_id(&search_state.type_.iri),
|
||||
};
|
||||
|
||||
search_state.query = new_query.clone();
|
||||
let index = self.index.clone();
|
||||
task = Task::future(async move {
|
||||
tokio::task::spawn_blocking(move || {
|
||||
let result = index.query(catalog_id, new_query.as_str(), Schema::all_fields())
|
||||
.expect("Error encountered while querying index");
|
||||
Message::SetSearchResults(result)
|
||||
}).await.unwrap()
|
||||
let query = new_query.clone();
|
||||
let search_task = tokio::task::spawn_blocking(move || {
|
||||
index.query(catalog_id, query.as_str(), Schema::all_fields(), 25)
|
||||
});
|
||||
task = Task::future(async {
|
||||
match search_task.await {
|
||||
Ok(Ok(documents)) => Message::SetSearchResults(documents),
|
||||
Ok(Err(err)) => Message::ShowError(err.to_string()),
|
||||
Err(err) => Message::ShowError(err.to_string()),
|
||||
}
|
||||
});
|
||||
|
||||
search_state.query = new_query;
|
||||
};
|
||||
}
|
||||
Message::SetSearchResults(results) => {
|
||||
@@ -551,11 +554,11 @@ impl Publisher {
|
||||
container(space()).width(BUTTON_WIDTH)
|
||||
};
|
||||
|
||||
let property_label = "foo"; /*self
|
||||
let property_label = self
|
||||
.ontology
|
||||
.info(triple.predicate.as_ref())
|
||||
.and_then(|info| info.label.clone())
|
||||
.unwrap_or(self.ontology.abbreviate(triple.predicate.as_ref()));*/
|
||||
.info(&triple.predicate, &conversion::english())
|
||||
.label
|
||||
.unwrap_or(self.ontology.abbreviate(triple.predicate.as_ref()));
|
||||
|
||||
let property: Element<Message> = if state.read_only {
|
||||
text(property_label).into()
|
||||
@@ -572,14 +575,13 @@ impl Publisher {
|
||||
|
||||
let value_label = term.value_as_named_node().and_then(|node| {
|
||||
self.ontology
|
||||
.info(&node.into_owned())
|
||||
.info(&node.into_owned(), &conversion::english())
|
||||
.label
|
||||
.map(|label| container(text(label)))
|
||||
});
|
||||
|
||||
let value = term
|
||||
.value_as_named_node()
|
||||
//.map(|node| self.ontology.abbreviate(node))
|
||||
.map(|node| node.as_str().to_string())
|
||||
.unwrap_or(term.value().to_string());
|
||||
|
||||
@@ -591,7 +593,8 @@ impl Publisher {
|
||||
})
|
||||
.unwrap_or(Horizontal::Left);
|
||||
|
||||
let foo = iri_input(self.ontology.prefixes(), "Object", value.as_str())
|
||||
let object_input = iri_input(self.ontology.prefixes(), "Object", value.as_str())
|
||||
.align_x(value_alignment)
|
||||
.on_input(move |value| Message::ValueUpdated(key, value))
|
||||
.on_control_click(Message::OpenQueryWindow(SearchResultClickAction::Object(key)));
|
||||
|
||||
@@ -608,8 +611,7 @@ impl Publisher {
|
||||
.on_input(move |input| {
|
||||
let value = if input.is_empty() { None } else { Some(input) };
|
||||
Message::DatatypeUpdated(key, value)
|
||||
})
|
||||
.into()
|
||||
}).into()
|
||||
};
|
||||
|
||||
let language_input = match term.datatype() {
|
||||
@@ -647,9 +649,7 @@ impl Publisher {
|
||||
button_area,
|
||||
property,
|
||||
value_label,
|
||||
//value_input,
|
||||
foo,
|
||||
//search_launcher,
|
||||
object_input,
|
||||
datatype_selector,
|
||||
language_input,
|
||||
direction_slider,
|
||||
@@ -668,7 +668,7 @@ impl Publisher {
|
||||
let buttons = entities.map(|entity| {
|
||||
let label = self
|
||||
.ontology
|
||||
.info(&entity)
|
||||
.info(&entity, &conversion::english())
|
||||
.label
|
||||
.unwrap_or(entity.as_str().to_string());
|
||||
button(text(label))
|
||||
@@ -699,17 +699,15 @@ impl Publisher {
|
||||
let mut columns = vec![];
|
||||
for field in self.ontology.fields_for_class(&search_state.type_.iri) {
|
||||
let header_text = field.label.as_ref().unwrap_or(&field.name);
|
||||
columns.push(table::column(text(header_text), |document: &NamedFieldDocument| {
|
||||
let cell_value = document.0
|
||||
.get(&field.name)
|
||||
/*columns.push(table::column(text(header_text), |document: &QueryResult| {
|
||||
let cell_value = document.0.get(&field.name)
|
||||
.and_then(|values| values.first())
|
||||
.map(|value| match value {
|
||||
OwnedValue::Str(string) => string,
|
||||
_ => "???",
|
||||
}).unwrap_or("");
|
||||
|
||||
let iri = document.0
|
||||
.get("iri")
|
||||
let iri = document.get("iri")
|
||||
.and_then(|values| values.first())
|
||||
.map(|value| match value {
|
||||
OwnedValue::Str(string) => string,
|
||||
@@ -719,50 +717,9 @@ impl Publisher {
|
||||
button(text(cell_value).wrapping(Wrapping::Word))
|
||||
.on_press(Message::SearchResultClicked(NamedNode::new_unchecked(iri)))
|
||||
.style(button::text)
|
||||
}).width(Length::Fixed(256.0)));
|
||||
}).width(Length::Fixed(256.0)));*/
|
||||
}
|
||||
|
||||
/*let label_column = table::column("Label", |result: &NamedNode| {
|
||||
let header_text = self
|
||||
.ontology
|
||||
.info(result.as_ref())
|
||||
.and_then(|info| info.label.clone())
|
||||
.unwrap_or("".to_string());
|
||||
|
||||
button(text(header_text))
|
||||
.on_press(Message::SearchResultClicked(result.clone()))
|
||||
.style(button::text)
|
||||
});
|
||||
|
||||
let type_column = table::column("Type", |result: &NamedNode| {
|
||||
let header_text = self
|
||||
.ontology
|
||||
.info(result.as_ref())
|
||||
.and_then(|info| self.ontology.info(info.type_.as_ref()))
|
||||
.and_then(|info| info.label.clone())
|
||||
.unwrap_or("Unknown".to_string());
|
||||
|
||||
button(text(header_text))
|
||||
.on_press(Message::SearchResultClicked(result.clone()))
|
||||
.style(button::text)
|
||||
});
|
||||
|
||||
let description_column = table::column("Description", |result: &NamedNode| {
|
||||
let header_text = self.ontology.info(result.as_ref())
|
||||
.and_then(|info| info.comment.clone())
|
||||
.unwrap_or("Unknown".to_string());
|
||||
|
||||
button(text(header_text))
|
||||
.on_press(Message::SearchResultClicked(result.clone()))
|
||||
.style(button::text)
|
||||
});
|
||||
|
||||
let iri_column = table::column("IRI", |result: &NamedNode| {
|
||||
button(text(result.as_str()))
|
||||
.on_press(Message::SearchResultClicked(result.clone()))
|
||||
.style(button::text)
|
||||
});*/
|
||||
|
||||
let results_table = if columns.is_empty() {
|
||||
None
|
||||
} else {
|
||||
@@ -779,9 +736,10 @@ impl Publisher {
|
||||
|
||||
let index_button = button("Index").on_press(Message::Traverse);
|
||||
|
||||
let search_launcher = button(text("\u{1f50e}"))
|
||||
.on_press(Message::OpenQueryWindow(SearchResultClickAction::URLInput))
|
||||
.style(button::text);
|
||||
let address_input = iri_input(self.ontology.prefixes(), "URL", &self.url_input)
|
||||
.on_input(Message::URLInputChanged)
|
||||
.on_submit(Message::URLInputSubmitted)
|
||||
.on_control_click(Message::OpenQueryWindow(SearchResultClickAction::URLInput));
|
||||
|
||||
let mut rows: Vec<Element<Message>> = vec![];
|
||||
rows = self
|
||||
@@ -812,10 +770,7 @@ impl Publisher {
|
||||
row![
|
||||
add_row_button,
|
||||
index_button,
|
||||
search_launcher,
|
||||
text_input("URL", &self.url_input)
|
||||
.on_input(Message::URLInputChanged)
|
||||
.on_submit(Message::URLInputSubmitted),
|
||||
address_input,
|
||||
save_button,
|
||||
],
|
||||
scrollable(body),
|
||||
|
||||
@@ -24,4 +24,10 @@ pub(crate) enum Error {
|
||||
|
||||
#[error(transparent)]
|
||||
QueryEvaluation(#[from] oxigraph::sparql::QueryEvaluationError),
|
||||
|
||||
#[error(transparent)]
|
||||
UpdateEvaluation(#[from] oxigraph::sparql::UpdateEvaluationError),
|
||||
|
||||
#[error(transparent)]
|
||||
SparqlSyntax(#[from] oxigraph::sparql::SparqlSyntaxError),
|
||||
}
|
||||
|
||||
@@ -1,9 +1,37 @@
|
||||
use oxigraph::model::{NamedNode, Quad, Term};
|
||||
use oxigraph::model::vocab::{rdf, xsd};
|
||||
use tracing::info;
|
||||
use oxilangtag::LanguageTag;
|
||||
|
||||
pub fn quad_to_term(quad: &Quad) -> &Term {
|
||||
&quad.object
|
||||
pub enum LanguageCondition {
|
||||
ExactMatch(LanguageTag<String>),
|
||||
RelaxedMatch(LanguageTag<String>),
|
||||
Untagged,
|
||||
}
|
||||
|
||||
pub fn quad_into_term(quad: Quad) -> Term {
|
||||
quad.object
|
||||
}
|
||||
|
||||
pub fn english() -> LanguageCondition {
|
||||
LanguageCondition::RelaxedMatch(LanguageTag::parse("en".to_string()).unwrap())
|
||||
}
|
||||
|
||||
pub fn language_matches(term: &Term, condition: &LanguageCondition) -> bool {
|
||||
if let Term::Literal(literal) = term {
|
||||
let tag = literal.language()
|
||||
.map(LanguageTag::parse_and_normalize)
|
||||
.and_then(Result::ok);
|
||||
|
||||
match (tag, condition) {
|
||||
(Some(language), LanguageCondition::ExactMatch(expectation)) |
|
||||
(Some(language), LanguageCondition::RelaxedMatch(expectation)) => language == *expectation,
|
||||
(None, LanguageCondition::RelaxedMatch(_)) => true,
|
||||
(None, LanguageCondition::Untagged) => true,
|
||||
_ => false,
|
||||
}
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
pub fn term_to_named_node(term: &Term) -> Option<&NamedNode> {
|
||||
@@ -14,7 +42,11 @@ pub fn term_to_named_node(term: &Term) -> Option<&NamedNode> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn term_to_string(term: &Term) -> Option<&str> {
|
||||
pub fn term_into_string(term: Term) -> Option<String> {
|
||||
term_as_str(&term).map(String::from)
|
||||
}
|
||||
|
||||
pub fn term_as_str(term: &Term) -> Option<&str> {
|
||||
if let Term::Literal(literal) = term {
|
||||
match literal.datatype() {
|
||||
xsd::STRING | xsd::NORMALIZED_STRING | rdf::LANG_STRING | rdf::DIR_LANG_STRING => {
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
use oxigraph::model::{Dataset, GraphName, NamedOrBlankNode, NamedOrBlankNodeRef, Quad, Term};
|
||||
use oxigraph::sparql::{QueryResults, SparqlEvaluator};
|
||||
use oxigraph::model::{Dataset, GraphName, NamedNodeRef, NamedOrBlankNode, NamedOrBlankNodeRef, Term};
|
||||
use oxigraph::sparql::SparqlEvaluator;
|
||||
use oxigraph::store::Store;
|
||||
use tracing::{debug, debug_span};
|
||||
use crate::error;
|
||||
use crate::rdf::vocab::owl;
|
||||
|
||||
const INFERENCE_GRAPH: NamedNodeRef = NamedNodeRef::new_unchecked("https://graphofliberty.org/inference");
|
||||
const RDF_SCHEMA: NamedNodeRef = NamedNodeRef::new_unchecked("http://www.w3.org/2000/01/rdf-schema#");
|
||||
|
||||
pub fn same_as(store: &mut Store) -> error::Result<()> {
|
||||
let span = debug_span!("Materialize owl:sameAs");
|
||||
let _enter = span.enter();
|
||||
|
||||
let additional_quads = store
|
||||
.quads_for_pattern(None, Some(owl::SAME_AS), None, None)
|
||||
.filter_map(Result::ok)
|
||||
@@ -19,6 +26,7 @@ pub fn same_as(store: &mut Store) -> error::Result<()> {
|
||||
None,
|
||||
).filter_map(Result::ok) {
|
||||
quad.subject = NamedOrBlankNode::NamedNode(y.clone());
|
||||
quad.graph_name = GraphName::NamedNode(INFERENCE_GRAPH.into_owned());
|
||||
new_dataset.insert(quad.as_ref());
|
||||
}
|
||||
|
||||
@@ -29,6 +37,7 @@ pub fn same_as(store: &mut Store) -> error::Result<()> {
|
||||
None,
|
||||
).filter_map(Result::ok) {
|
||||
quad.subject = NamedOrBlankNode::NamedNode(x.clone());
|
||||
quad.graph_name = GraphName::NamedNode(INFERENCE_GRAPH.into_owned());
|
||||
new_dataset.insert(quad.as_ref());
|
||||
}
|
||||
}
|
||||
@@ -40,97 +49,70 @@ pub fn same_as(store: &mut Store) -> error::Result<()> {
|
||||
let new_size = store.len()?;
|
||||
|
||||
if new_size > old_size {
|
||||
same_as(store)
|
||||
} else {
|
||||
Ok(())
|
||||
let difference = new_size - old_size;
|
||||
debug!(?old_size, ?new_size, ?difference, "same_as");
|
||||
same_as(store)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn super_classes(store: &mut Store) -> error::Result<()> {
|
||||
let query = SparqlEvaluator::new()
|
||||
.parse_query(
|
||||
r#"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
pub fn super_properties(store: &mut Store) -> error::Result<()> {
|
||||
let span = debug_span!("Materialize rdfs:subPropertyOf");
|
||||
let _enter = span.enter();
|
||||
|
||||
CONSTRUCT {
|
||||
?item a ?parent
|
||||
} WHERE {
|
||||
?item a ?class .
|
||||
?class rdfs:subClassOf ?parent .
|
||||
}"#,
|
||||
)
|
||||
.expect("Unable to parse superclass query");
|
||||
|
||||
let mut additional_quads = Dataset::new();
|
||||
if let QueryResults::Graph(graph) = query.on_store(&store).execute().unwrap()
|
||||
{
|
||||
additional_quads.extend(graph.filter_map(Result::ok).map(|triple| {
|
||||
Quad::new(
|
||||
triple.subject,
|
||||
triple.predicate,
|
||||
triple.object,
|
||||
GraphName::DefaultGraph,
|
||||
)
|
||||
}));
|
||||
let update = SparqlEvaluator::new()
|
||||
.with_prefix("rdfs", RDF_SCHEMA.as_str())?
|
||||
.with_prefix("inference", INFERENCE_GRAPH.as_str())?
|
||||
.parse_update(r#"INSERT {
|
||||
GRAPH inference: {
|
||||
?property rdfs:subPropertyOf ?parent .
|
||||
?subject ?parent ?object .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g1 { ?property rdfs:subPropertyOf+ ?parent }
|
||||
OPTIONAL { GRAPH ?g2 { ?subject ?parent ?object } }
|
||||
}"#)?;
|
||||
|
||||
let old_size = store.len()?;
|
||||
store.extend(&additional_quads)?;
|
||||
update.on_store(&store).execute()?;
|
||||
let new_size = store.len()?;
|
||||
|
||||
if new_size > old_size {
|
||||
super_classes(store)
|
||||
} else {
|
||||
Ok(())
|
||||
let difference = new_size - old_size;
|
||||
debug!(?old_size, ?new_size, ?difference, "super_properties");
|
||||
super_properties(store)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/*fn iri_information(dataset: &Dataset) -> HashMap<NamedNode, IriInformation> {
|
||||
let query = SparqlEvaluator::new()
|
||||
.parse_query(
|
||||
r#"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX gl: <https://graphofliberty.org/2026/04/ont/>
|
||||
pub fn super_classes(store: &mut Store) -> error::Result<()> {
|
||||
let span = debug_span!("Materialize rdfs:subClassOf");
|
||||
let _enter = span.enter();
|
||||
|
||||
SELECT DISTINCT ?class ?subject ?label ?comment ?read_only {
|
||||
VALUES ?class { rdf:Property rdfs:Class }
|
||||
?subject a ?class .
|
||||
OPTIONAL {
|
||||
?subject rdfs:label ?label
|
||||
FILTER (langMATCHES(LANG(?label), "en") || !hasLANG(?label))
|
||||
let update = SparqlEvaluator::new()
|
||||
.with_prefix("rdfs", RDF_SCHEMA.as_str())?
|
||||
.with_prefix("inference", INFERENCE_GRAPH.as_str())?
|
||||
.parse_update(r#"INSERT {
|
||||
GRAPH inference: {
|
||||
?class rdfs:subClassOf ?parent .
|
||||
?item a ?parent .
|
||||
}
|
||||
OPTIONAL {
|
||||
?subject rdfs:comment ?comment
|
||||
FILTER (langMATCHES(LANG(?label), "en") || !hasLANG(?comment))
|
||||
}
|
||||
OPTIONAL { ?subject gl:readOnly ?read_only }
|
||||
}"#,
|
||||
)
|
||||
.expect("Unable to parse property query");
|
||||
} WHERE {
|
||||
GRAPH ?g1 { ?item a ?class }
|
||||
GRAPH ?g2 { ?class rdfs:subClassOf+ ?parent }
|
||||
}"#)?;
|
||||
|
||||
let mut results = HashMap::new();
|
||||
if let QueryResults::Solutions(solutions) =
|
||||
query.on_queryable_dataset(dataset).execute().unwrap()
|
||||
{
|
||||
for solution in solutions.filter_map(Result::ok) {
|
||||
let type_ = solution.get("class").and_then(crate::rdf::ontology::term_to_named_node);
|
||||
let subject = solution.get("subject").and_then(crate::rdf::ontology::term_to_named_node);
|
||||
let label = solution.get("label").and_then(crate::rdf::ontology::term_to_string);
|
||||
let comment = solution.get("comment").and_then(crate::rdf::ontology::term_to_string);
|
||||
let read_only = solution
|
||||
.get("read_only")
|
||||
.and_then(crate::rdf::ontology::term_to_boolean)
|
||||
.unwrap_or(false);
|
||||
let old_size = store.len()?;
|
||||
update.on_store(&store).execute()?;
|
||||
let new_size = store.len()?;
|
||||
|
||||
if let Some(subject) = subject && let Some(type_) = type_ {
|
||||
let info = IriInformation {
|
||||
type_: type_.clone(),
|
||||
label: label.map(String::from),
|
||||
comment: comment.map(String::from),
|
||||
read_only,
|
||||
};
|
||||
results.insert(subject.to_owned(), info);
|
||||
}
|
||||
}
|
||||
if new_size > old_size {
|
||||
let difference = new_size - old_size;
|
||||
debug!(?old_size, ?new_size, ?difference, "super_classes");
|
||||
super_classes(store)?;
|
||||
}
|
||||
results
|
||||
}*/
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -1,154 +0,0 @@
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
||||
@prefix dc: <http://purl.org/dc/elements/1.1/> .
|
||||
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#> a owl:Ontology ;
|
||||
dc:title "The RDF Concepts Vocabulary (RDF)" ;
|
||||
dc:date "2019-12-16" ;
|
||||
dc:description "This is the RDF Schema for the RDF vocabulary terms in the RDF Namespace, defined in RDF 1.1 Concepts." .
|
||||
|
||||
rdf:HTML a rdfs:Datatype ;
|
||||
rdfs:subClassOf rdfs:Literal ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:seeAlso <http://www.w3.org/TR/rdf11-concepts/#section-html> ;
|
||||
rdfs:label "HTML" ;
|
||||
rdfs:comment "The datatype of RDF literals storing fragments of HTML content" .
|
||||
|
||||
rdf:langString a rdfs:Datatype ;
|
||||
rdfs:subClassOf rdfs:Literal ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:seeAlso <http://www.w3.org/TR/rdf11-concepts/#section-Graph-Literal> ;
|
||||
rdfs:label "langString" ;
|
||||
rdfs:comment "The datatype of language-tagged string values" .
|
||||
|
||||
rdf:PlainLiteral a rdfs:Datatype ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:subClassOf rdfs:Literal ;
|
||||
rdfs:seeAlso <http://www.w3.org/TR/rdf-plain-literal/> ;
|
||||
rdfs:label "PlainLiteral" ;
|
||||
rdfs:comment "The class of plain (i.e. untyped) literal values, as used in RIF and OWL 2" .
|
||||
|
||||
rdf:type a rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:label "type" ;
|
||||
rdfs:comment "The subject is an instance of a class." ;
|
||||
rdfs:range rdfs:Class ;
|
||||
rdfs:domain rdfs:Resource .
|
||||
|
||||
rdf:Property a rdfs:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:label "Property" ;
|
||||
rdfs:comment "The class of RDF properties." ;
|
||||
rdfs:subClassOf rdfs:Resource .
|
||||
|
||||
rdf:Statement a rdfs:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:label "Statement" ;
|
||||
rdfs:subClassOf rdfs:Resource ;
|
||||
rdfs:comment "The class of RDF statements." .
|
||||
|
||||
rdf:subject a rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:label "subject" ;
|
||||
rdfs:comment "The subject of the subject RDF statement." ;
|
||||
rdfs:domain rdf:Statement ;
|
||||
rdfs:range rdfs:Resource .
|
||||
|
||||
rdf:predicate a rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:label "predicate" ;
|
||||
rdfs:comment "The predicate of the subject RDF statement." ;
|
||||
rdfs:domain rdf:Statement ;
|
||||
rdfs:range rdfs:Resource .
|
||||
|
||||
rdf:object a rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:label "object" ;
|
||||
rdfs:comment "The object of the subject RDF statement." ;
|
||||
rdfs:domain rdf:Statement ;
|
||||
rdfs:range rdfs:Resource .
|
||||
|
||||
rdf:Bag a rdfs:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:label "Bag" ;
|
||||
rdfs:comment "The class of unordered containers." ;
|
||||
rdfs:subClassOf rdfs:Container .
|
||||
|
||||
rdf:Seq a rdfs:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:label "Seq" ;
|
||||
rdfs:comment "The class of ordered containers." ;
|
||||
rdfs:subClassOf rdfs:Container .
|
||||
|
||||
rdf:Alt a rdfs:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:label "Alt" ;
|
||||
rdfs:comment "The class of containers of alternatives." ;
|
||||
rdfs:subClassOf rdfs:Container .
|
||||
|
||||
rdf:value a rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:label "value" ;
|
||||
rdfs:comment "Idiomatic property used for structured values." ;
|
||||
rdfs:domain rdfs:Resource ;
|
||||
rdfs:range rdfs:Resource .
|
||||
|
||||
rdf:List a rdfs:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:label "List" ;
|
||||
rdfs:comment "The class of RDF Lists." ;
|
||||
rdfs:subClassOf rdfs:Resource .
|
||||
|
||||
rdf:nil a rdf:List ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:label "nil" ;
|
||||
rdfs:comment "The empty list, with no items in it. If the rest of a list is nil then the list has no more items in it." .
|
||||
|
||||
rdf:first a rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:label "first" ;
|
||||
rdfs:comment "The first item in the subject RDF list." ;
|
||||
rdfs:domain rdf:List ;
|
||||
rdfs:range rdfs:Resource .
|
||||
|
||||
rdf:rest a rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:label "rest" ;
|
||||
rdfs:comment "The rest of the subject RDF list after the first item." ;
|
||||
rdfs:domain rdf:List ;
|
||||
rdfs:range rdf:List .
|
||||
|
||||
rdf:XMLLiteral a rdfs:Datatype ;
|
||||
rdfs:subClassOf rdfs:Literal ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:label "XMLLiteral" ;
|
||||
rdfs:comment "The datatype of XML literal values." .
|
||||
|
||||
rdf:JSON a rdfs:Datatype ;
|
||||
rdfs:label "JSON" ;
|
||||
rdfs:comment "The datatype of RDF literals storing JSON content." ;
|
||||
rdfs:subClassOf rdfs:Literal ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:seeAlso <https://www.w3.org/TR/json-ld11/#the-rdf-json-datatype> .
|
||||
|
||||
rdf:CompoundLiteral a rdfs:Class ;
|
||||
rdfs:label "CompoundLiteral" ;
|
||||
rdfs:comment "A class representing a compound literal." ;
|
||||
rdfs:subClassOf rdfs:Resource ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:seeAlso <https://www.w3.org/TR/json-ld11/#the-rdf-compoundliteral-class-and-the-rdf-language-and-rdf-direction-properties> .
|
||||
|
||||
rdf:language a rdf:Property ;
|
||||
rdfs:label "language" ;
|
||||
rdfs:comment "The language component of a CompoundLiteral." ;
|
||||
rdfs:domain rdf:CompoundLiteral ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:seeAlso <https://www.w3.org/TR/json-ld11/#the-rdf-compoundliteral-class-and-the-rdf-language-and-rdf-direction-properties> .
|
||||
|
||||
rdf:direction a rdf:Property ;
|
||||
rdfs:label "direction" ;
|
||||
rdfs:comment "The base direction component of a CompoundLiteral." ;
|
||||
rdfs:domain rdf:CompoundLiteral ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
|
||||
rdfs:seeAlso <https://www.w3.org/TR/json-ld11/#the-rdf-compoundliteral-class-and-the-rdf-language-and-rdf-direction-properties> .
|
||||
@@ -1,515 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet type="text/xsl" href="owl2html.xsl"?>
|
||||
|
||||
<!DOCTYPE rdf:RDF [
|
||||
<!ENTITY owl "http://www.w3.org/2002/07/owl#" >
|
||||
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
|
||||
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
|
||||
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
|
||||
]>
|
||||
|
||||
|
||||
<rdf:RDF xmlns="http://fedora.info/definitions/v4/repository#"
|
||||
xml:base="http://fedora.info/definitions/v4/repository"
|
||||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
|
||||
xmlns:owl="http://www.w3.org/2002/07/owl#"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
<owl:Ontology rdf:about="http://fedora.info/definitions/v4/repository#">
|
||||
<rdfs:label xml:lang="en">Fedora Commons Repository Ontology</rdfs:label>
|
||||
<rdfs:comment xml:lang="en">Ontology for the Fedora data model, intended primarily to make it possible to expose Fedora-curated RDF predicates via de-reference-able URIs.</rdfs:comment>
|
||||
<owl:versionInfo>v4/2016/10/18</owl:versionInfo>
|
||||
<owl:priorVersion rdf:resource="http://fedora.info/definitions/v4/2016/03/01/repository" />
|
||||
</owl:Ontology>
|
||||
|
||||
|
||||
<!--
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Data properties
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#computedChecksum -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#computedChecksum">
|
||||
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#computedSize -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#computedSize">
|
||||
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#couldNotStoreProperty -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#couldNotStoreProperty">
|
||||
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#created -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#created">
|
||||
<rdfs:range rdf:resource="&xsd;dateTime"/>
|
||||
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#createdBy -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#createdBy">
|
||||
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#hasLocation -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#hasLocation">
|
||||
<rdfs:range rdf:resource="&xsd;anyURI"/>
|
||||
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#hasVersionLabel -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#hasVersionLabel">
|
||||
<rdfs:range rdf:resource="&xsd;string"/>
|
||||
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#isCheckedOut -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#isCheckedOut">
|
||||
<rdfs:range rdf:resource="&xsd;boolean"/>
|
||||
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#lastModified -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#lastModified">
|
||||
<rdfs:range rdf:resource="&xsd;dateTime"/>
|
||||
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#lastModifiedBy -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#lastModifiedBy">
|
||||
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#numFixityChecks -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#numFixityChecks">
|
||||
<rdfs:range rdf:resource="&xsd;nonNegativeInteger"/>
|
||||
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#numFixityErrors -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#numFixityErrors">
|
||||
<rdfs:range rdf:resource="&xsd;nonNegativeInteger"/>
|
||||
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#numFixityRepaired -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#numFixityRepaired">
|
||||
<rdfs:range rdf:resource="&xsd;nonNegativeInteger"/>
|
||||
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#numberOfChildren -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#numberOfChildren">
|
||||
<rdfs:range rdf:resource="&xsd;nonNegativeInteger"/>
|
||||
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#objectCount -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#objectCount">
|
||||
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#objectSize -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#objectSize">
|
||||
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Object Properties
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#baseVersion -->
|
||||
|
||||
<owl:ObjectProperty rdf:about="http://fedora.info/definitions/v4/repository#baseVersion">
|
||||
<rdf:type rdf:resource="&owl;FunctionalProperty"/>
|
||||
<rdfs:label xml:lang="en">base version</rdfs:label>
|
||||
<rdfs:domain rdf:resource="http://fedora.info/definitions/v4/repository#Container"/>
|
||||
<rdfs:range rdf:resource="http://fedora.info/definitions/v4/repository#Version"/>
|
||||
</owl:ObjectProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#hasChild -->
|
||||
|
||||
<owl:ObjectProperty rdf:about="http://fedora.info/definitions/v4/repository#hasChild">
|
||||
<rdf:type rdf:resource="&owl;InverseFunctionalProperty"/>
|
||||
<rdfs:label xml:lang="en">has child</rdfs:label>
|
||||
<rdfs:domain rdf:resource="http://fedora.info/definitions/v4/repository#Container"/>
|
||||
<rdfs:range>
|
||||
<owl:Class>
|
||||
<owl:unionOf rdf:parseType="Collection">
|
||||
<rdf:Description rdf:about="http://fedora.info/definitions/v4/repository#NonRdfSourceDescription"/>
|
||||
<rdf:Description rdf:about="http://fedora.info/definitions/v4/repository#Container"/>
|
||||
</owl:unionOf>
|
||||
</owl:Class>
|
||||
</rdfs:range>
|
||||
</owl:ObjectProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#hasContent -->
|
||||
|
||||
<owl:ObjectProperty rdf:about="http://fedora.info/definitions/v4/repository#hasContent">
|
||||
<rdfs:label xml:lang="en">has content</rdfs:label>
|
||||
<rdfs:comment xml:lang="en">Indicates a binary in which content is stored for this datastream.</rdfs:comment>
|
||||
<rdfs:range rdf:resource="http://fedora.info/definitions/v4/repository#Binary"/>
|
||||
<rdfs:domain rdf:resource="http://fedora.info/definitions/v4/repository#NonRdfSourceDescription"/>
|
||||
</owl:ObjectProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#hasMember -->
|
||||
|
||||
<owl:ObjectProperty rdf:about="http://fedora.info/definitions/v4/repository#hasMember">
|
||||
<rdfs:label xml:lang="en">has member</rdfs:label>
|
||||
<rdfs:comment xml:lang="en">Links to a newly-minted identifier which can be used to create a repository resource.</rdfs:comment>
|
||||
<rdfs:range rdf:resource="&xsd;anyURI"/>
|
||||
</owl:ObjectProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#hasParent -->
|
||||
|
||||
<owl:ObjectProperty rdf:about="http://fedora.info/definitions/v4/repository#hasParent">
|
||||
<rdf:type rdf:resource="&owl;FunctionalProperty"/>
|
||||
<rdfs:label xml:lang="en">has parent</rdfs:label>
|
||||
<rdfs:range rdf:resource="http://fedora.info/definitions/v4/repository#Container"/>
|
||||
<rdfs:domain rdf:resource="http://fedora.info/definitions/v4/repository#Resource"/>
|
||||
</owl:ObjectProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#hasResultsMember -->
|
||||
|
||||
<owl:ObjectProperty rdf:about="http://fedora.info/definitions/v4/repository#hasResultsMember">
|
||||
<rdfs:label xml:lang="en">has results member</rdfs:label>
|
||||
<rdfs:range rdf:resource="http://fedora.info/definitions/v4/repository#Resource"/>
|
||||
</owl:ObjectProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#hasVersion -->
|
||||
|
||||
<owl:ObjectProperty rdf:about="http://fedora.info/definitions/v4/repository#hasVersion">
|
||||
<rdfs:label xml:lang="en">has version</rdfs:label>
|
||||
<rdfs:domain rdf:resource="http://fedora.info/definitions/v4/repository#Container"/>
|
||||
<rdfs:range rdf:resource="http://fedora.info/definitions/v4/repository#Version"/>
|
||||
</owl:ObjectProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#isContentOf -->
|
||||
|
||||
<owl:ObjectProperty rdf:about="http://fedora.info/definitions/v4/repository#isContentOf">
|
||||
<rdf:type rdf:resource="&owl;InverseFunctionalProperty"/>
|
||||
<rdfs:label xml:lang="en">is content of</rdfs:label>
|
||||
<rdfs:comment xml:lang="en">Indicates a datastream for which this resource contains the content. </rdfs:comment>
|
||||
<rdfs:domain rdf:resource="http://fedora.info/definitions/v4/repository#Binary"/>
|
||||
<rdfs:range rdf:resource="http://fedora.info/definitions/v4/repository#NonRdfSourceDescription"/>
|
||||
</owl:ObjectProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#predecessors -->
|
||||
|
||||
<owl:ObjectProperty rdf:about="http://fedora.info/definitions/v4/repository#predecessors">
|
||||
<rdfs:label xml:lang="en">predecessors</rdfs:label>
|
||||
<rdfs:range rdf:resource="http://fedora.info/definitions/v4/repository#Version"/>
|
||||
<rdfs:domain rdf:resource="http://fedora.info/definitions/v4/repository#Version"/>
|
||||
</owl:ObjectProperty>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Classes
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#AnnotatedResource -->
|
||||
|
||||
<owl:Class rdf:about="http://fedora.info/definitions/v4/repository#AnnotatedResource">
|
||||
<rdfs:label xml:lang="en">annotated resource</rdfs:label>
|
||||
<rdfs:subClassOf rdf:resource="http://fedora.info/definitions/v4/repository#Resource"/>
|
||||
<rdfs:comment xml:lang="en">A Resource that maintains properties in its own right.</rdfs:comment>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#Binary -->
|
||||
|
||||
<owl:Class rdf:about="http://fedora.info/definitions/v4/repository#Binary">
|
||||
<rdfs:label xml:lang="en">binary</rdfs:label>
|
||||
<rdfs:subClassOf rdf:resource="http://fedora.info/definitions/v4/repository#Resource"/>
|
||||
<owl:disjointWith rdf:resource="http://fedora.info/definitions/v4/repository#NonRdfSourceDescription"/>
|
||||
<owl:disjointWith rdf:resource="http://fedora.info/definitions/v4/repository#Container"/>
|
||||
<rdfs:comment xml:lang="en">A bitstream, with no further data properties.</rdfs:comment>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#RepositoryRoot -->
|
||||
|
||||
<owl:Class rdf:about="http://fedora.info/definitions/v4/repository#RepositoryRoot">
|
||||
<rdfs:label xml:lang="en">repository root</rdfs:label>
|
||||
<owl:subClassOf rdf:resource="http://fedora.info/definitions/v4/repository#Container"/>
|
||||
<rdfs:comment xml:lang="en">A repository root.</rdfs:comment>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#Skolem -->
|
||||
|
||||
<owl:Class rdf:about="http://fedora.info/definitions/v4/repository#Skolem">
|
||||
<rdfs:label xml:lang="en">skolem</rdfs:label>
|
||||
<rdfs:subClassOf rdf:resource="http://fedora.info/definitions/v4/repository#Thing"/>
|
||||
<rdfs:comment xml:lang="en">An entity that is a representation of an RDF Skolem node.</rdfs:comment>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#Configuration -->
|
||||
|
||||
<owl:Class rdf:about="http://fedora.info/definitions/v4/repository#Configuration">
|
||||
<rdfs:label xml:lang="en">Fedora configuration</rdfs:label>
|
||||
<rdfs:subClassOf rdf:resource="http://fedora.info/definitions/v4/repository#Thing"/>
|
||||
<rdfs:comment xml:lang="en">A container for a Fedora configuration.</rdfs:comment>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#NonRdfSourceDescription -->
|
||||
|
||||
<owl:Class rdf:about="http://fedora.info/definitions/v4/repository#NonRdfSourceDescription">
|
||||
<rdfs:label xml:lang="en">Fedora NonRdfSourceDescription</rdfs:label>
|
||||
<rdfs:subClassOf rdf:resource="http://fedora.info/definitions/v4/repository#AnnotatedResource"/>
|
||||
<owl:disjointWith rdf:resource="http://fedora.info/definitions/v4/repository#Container"/>
|
||||
<rdfs:comment xml:lang="en">A container for a bitstream and associated properties.</rdfs:comment>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#EmbedResources -->
|
||||
|
||||
<owl:Class rdf:about="http://fedora.info/definitions/v4/repository#EmbedResources">
|
||||
<rdfs:label xml:lang="en">embed resources</rdfs:label>
|
||||
<rdfs:subClassOf rdf:resource="http://fedora.info/definitions/v4/repository#Thing"/>
|
||||
<rdfs:comment xml:lang="en">The set of triples representing child resources of a given resource.</rdfs:comment>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#InboundReferences -->
|
||||
|
||||
<owl:Class rdf:about="http://fedora.info/definitions/v4/repository#InboundReferences">
|
||||
<rdfs:label xml:lang="en">inbound references</rdfs:label>
|
||||
<rdfs:subClassOf rdf:resource="http://fedora.info/definitions/v4/repository#Thing"/>
|
||||
<rdfs:comment xml:lang="en">The set of triples representing other repository resources which link to a given resource.</rdfs:comment>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#Container -->
|
||||
|
||||
<owl:Class rdf:about="http://fedora.info/definitions/v4/repository#Container">
|
||||
<rdfs:label xml:lang="en">Fedora Container</rdfs:label>
|
||||
<rdfs:subClassOf rdf:resource="http://fedora.info/definitions/v4/repository#AnnotatedResource"/>
|
||||
<rdfs:comment xml:lang="en">A Fedora Container: the fundamental quantum of durable content in a Fedora repository.</rdfs:comment>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#Pairtree -->
|
||||
|
||||
<owl:Class rdf:about="http://fedora.info/definitions/v4/repository#Pairtree">
|
||||
<rdfs:label xml:lang="en">pair tree</rdfs:label>
|
||||
<rdfs:subClassOf rdf:resource="http://fedora.info/definitions/v4/repository#Thing"/>
|
||||
<rdfs:comment xml:lang="en">An entity that is a an intermediary node created in a PairTree hierarchy.</rdfs:comment>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#Relations -->
|
||||
|
||||
<owl:Class rdf:about="http://fedora.info/definitions/v4/repository#Relations">
|
||||
<rdfs:subClassOf rdf:resource="http://fedora.info/definitions/v4/repository#Thing"/>
|
||||
<rdfs:comment xml:lang="en">An entity that may be related to other repository entities.</rdfs:comment>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#Resource -->
|
||||
|
||||
<owl:Class rdf:about="http://fedora.info/definitions/v4/repository#Resource">
|
||||
<rdfs:label xml:lang="en">Fedora resource</rdfs:label>
|
||||
<rdfs:subClassOf rdf:resource="http://fedora.info/definitions/v4/repository#Thing"/>
|
||||
<rdfs:comment xml:lang="en">An entity that has been committed to the repository for safekeeping. For example, Fedora objects and datastreams are resources. A Fixity is not, because the provenance of the instance is entirely internal to the repository.</rdfs:comment>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#ServerManaged -->
|
||||
|
||||
<owl:Class rdf:about="http://fedora.info/definitions/v4/repository#ServerManaged">
|
||||
<rdfs:label xml:lang="en">server managed</rdfs:label>
|
||||
<rdfs:subClassOf rdf:resource="http://fedora.info/definitions/v4/repository#Thing"/>
|
||||
<rdfs:comment xml:lang="en">The system-generated triples for a given resource (as opposed to explicity-declared properties).</rdfs:comment>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#Thing -->
|
||||
|
||||
<owl:Class rdf:about="http://fedora.info/definitions/v4/repository#Thing">
|
||||
<rdfs:label xml:lang="en">Fedora thing</rdfs:label>
|
||||
<rdfs:comment xml:lang="en">Something that is contemplated in the Fedora repository model.</rdfs:comment>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#Tombstone -->
|
||||
|
||||
<owl:Class rdf:about="http://fedora.info/definitions/v4/repository#Tombstone">
|
||||
<rdfs:label xml:lang="en">tombstone</rdfs:label>
|
||||
<rdfs:comment xml:lang="en">An entity that is a marker for a deleted node.</rdfs:comment>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#Version -->
|
||||
|
||||
<owl:Class rdf:about="http://fedora.info/definitions/v4/repository#Version">
|
||||
<rdfs:label xml:lang="en">A snapshot of a Fedora object at a given point in time.</rdfs:label>
|
||||
<rdfs:subClassOf rdf:resource="http://fedora.info/definitions/v4/repository#Container"/>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
<!--
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Individuals
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
-->
|
||||
|
||||
<!-- http://fedora.info/definitions/v4/repository#inaccessibleResource -->
|
||||
|
||||
<owl:NamedIndividual rdf:about="http://fedora.info/definitions/v4/repository#inaccessibleResource">
|
||||
<rdfs:label xml:lang="en">inaccessible resource</rdfs:label>
|
||||
<rdfs:comment xml:lang="en">A Fedora resource that is inaccessible.</rdfs:comment>
|
||||
</owl:NamedIndividual>
|
||||
|
||||
|
||||
<!--
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// REST API
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<owl:ObjectProperty rdf:about="http://fedora.info/definitions/v4/repository#hasAccessRoles">
|
||||
<rdfs:label xml:lang="en">has access roles</rdfs:label>
|
||||
</owl:ObjectProperty>
|
||||
<owl:ObjectProperty rdf:about="http://fedora.info/definitions/v4/repository#hasFixityService">
|
||||
<rdfs:label xml:lang="en">has fixity service</rdfs:label>
|
||||
</owl:ObjectProperty>
|
||||
<owl:ObjectProperty rdf:about="http://fedora.info/definitions/v4/repository#hasNamespaces">
|
||||
<rdfs:label xml:lang="en">has namespaces</rdfs:label>
|
||||
</owl:ObjectProperty>
|
||||
<owl:ObjectProperty rdf:about="http://fedora.info/definitions/v4/repository#hasVersions">
|
||||
<rdfs:label xml:lang="en">has versions</rdfs:label>
|
||||
</owl:ObjectProperty>
|
||||
<owl:ObjectProperty rdf:about="http://fedora.info/definitions/v4/repository#sparql">
|
||||
<rdfs:label xml:lang="en">has sparql service</rdfs:label>
|
||||
</owl:ObjectProperty>
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#hasMoreResults">
|
||||
<rdfs:label xml:lang="en">has more results</rdfs:label>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
|
||||
</owl:DatatypeProperty>
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#hasTransactionProvider">
|
||||
<rdfs:label xml:lang="en">has transaction provider</rdfs:label>
|
||||
</owl:DatatypeProperty>
|
||||
<owl:DatatypeProperty rdf:about="http://fedora.info/definitions/v4/repository#writable">
|
||||
<rdfs:label xml:lang="en">writable</rdfs:label>
|
||||
<rdfs:comment>Whether or not the resource with this representation could have been altered by the same agent that received this representation if the request that retrieved this representation had been a mutating request.</rdfs:comment>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
</rdf:RDF>
|
||||
|
||||
|
||||
|
||||
<!-- Generated by the OWL API (version 3.4.2) http://owlapi.sourceforge.net -->
|
||||
|
||||
@@ -1,264 +0,0 @@
|
||||
# See details within this document for linkage to specification and purpose.
|
||||
# This ontology file is a non-normative supporting document.
|
||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
|
||||
@prefix owl: <http://www.w3.org/2002/07/owl#>.
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
|
||||
@prefix dcterms: <http://purl.org/dc/terms/>.
|
||||
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#> .
|
||||
@prefix vann: <http://purl.org/vocab/vann/> .
|
||||
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
||||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
|
||||
@prefix : <http://www.w3.org/ns/ldp#>.
|
||||
|
||||
:
|
||||
a owl:Ontology;
|
||||
dcterms:description "Vocabulary URIs defined in the Linked Data Platform (LDP) namespace.";
|
||||
dcterms:title "The W3C Linked Data Platform (LDP) Vocabulary";
|
||||
rdfs:label "W3C Linked Data Platform (LDP)";
|
||||
rdfs:comment "This ontology provides an informal representation of the concepts and terms as defined in the LDP specification. Consult the LDP specification for normative reference.";
|
||||
dcterms:publisher <http://www.w3.org/data#W3C>;
|
||||
dcterms:creator [foaf:name "Steve Speicher"], [foaf:name "John Arwe"], [foaf:name "Ashok Malhotra"];
|
||||
foaf:maker [foaf:homepage <http://www.w3.org/2012/ldp>];
|
||||
dcterms:created "2015-02-26"^^xsd:date;
|
||||
vann:preferredNamespaceUri "http://www.w3.org/ns/ldp#";
|
||||
vann:preferredNamespacePrefix "ldp";
|
||||
rdfs:seeAlso <http://www.w3.org/2012/ldp>,
|
||||
<http://www.w3.org/TR/ldp-ucr/>,
|
||||
<http://www.w3.org/TR/ldp/>,
|
||||
<http://www.w3.org/TR/ldp-paging/>,
|
||||
<http://www.w3.org/2011/09/LinkedData/>.
|
||||
|
||||
:Resource
|
||||
a rdfs:Class;
|
||||
rdfs:comment "A HTTP-addressable resource whose lifecycle is managed by a LDP server.";
|
||||
vs:term_status "stable";
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "Resource".
|
||||
|
||||
:RDFSource
|
||||
a rdfs:Class;
|
||||
rdfs:subClassOf :Resource;
|
||||
rdfs:comment "A Linked Data Platform Resource (LDPR) whose state is represented as RDF.";
|
||||
vs:term_status "stable";
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "RDFSource".
|
||||
|
||||
:NonRDFSource
|
||||
a rdfs:Class;
|
||||
rdfs:subClassOf :Resource;
|
||||
rdfs:comment "A Linked Data Platform Resource (LDPR) whose state is NOT represented as RDF.";
|
||||
vs:term_status "stable";
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "NonRDFSource".
|
||||
|
||||
:Container
|
||||
a rdfs:Class;
|
||||
rdfs:subClassOf :RDFSource;
|
||||
rdfs:comment "A Linked Data Platform RDF Source (LDP-RS) that also conforms to additional patterns and conventions for managing membership. Readers should refer to the specification defining this ontology for the list of behaviors associated with it.";
|
||||
vs:term_status "stable";
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "Container".
|
||||
|
||||
:BasicContainer
|
||||
a rdfs:Class;
|
||||
rdfs:subClassOf :Container;
|
||||
rdfs:comment "An LDPC that uses a predefined predicate to simply link to its contained resources.";
|
||||
vs:term_status "stable";
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "BasicContainer".
|
||||
|
||||
:DirectContainer
|
||||
a rdfs:Class;
|
||||
rdfs:subClassOf :Container;
|
||||
rdfs:comment "An LDPC that is similar to a LDP-DC but it allows an indirection with the ability to list as member a resource, such as a URI representing a real-world object, that is different from the resource that is created.";
|
||||
vs:term_status "stable";
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "DirectContainer".
|
||||
|
||||
:IndirectContainer
|
||||
a rdfs:Class;
|
||||
rdfs:subClassOf :Container;
|
||||
rdfs:comment "An LDPC that has the flexibility of choosing what form the membership triples take.";
|
||||
vs:term_status "stable";
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "IndirectContainer".
|
||||
|
||||
:hasMemberRelation
|
||||
a rdf:Property;
|
||||
rdfs:comment "Indicates which predicate is used in membership triples, and that the membership triple pattern is < membership-constant-URI , object-of-hasMemberRelation, member-URI >.";
|
||||
vs:term_status "stable";
|
||||
rdfs:domain :Container;
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "hasMemberRelation";
|
||||
rdfs:range rdf:Property.
|
||||
|
||||
:isMemberOfRelation
|
||||
a rdf:Property;
|
||||
rdfs:comment "Indicates which predicate is used in membership triples, and that the membership triple pattern is < member-URI , object-of-isMemberOfRelation, membership-constant-URI >.";
|
||||
vs:term_status "stable";
|
||||
rdfs:domain :Container;
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "isMemmberOfRelation";
|
||||
rdfs:range rdf:Property.
|
||||
|
||||
:membershipResource
|
||||
a rdf:Property;
|
||||
rdfs:comment "Indicates the membership-constant-URI in a membership triple. Depending upon the membership triple pattern a container uses, as indicated by the presence of ldp:hasMemberRelation or ldp:isMemberOfRelation, the membership-constant-URI might occupy either the subject or object position in membership triples.";
|
||||
vs:term_status "stable";
|
||||
rdfs:domain :Container;
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "membershipResource";
|
||||
rdfs:range rdfs:Resource.
|
||||
|
||||
:insertedContentRelation
|
||||
a rdf:Property;
|
||||
rdfs:comment "Indicates which triple in a creation request should be used as the member-URI value in the membership triple added when the creation request is successful.";
|
||||
vs:term_status "stable";
|
||||
rdfs:domain :Container;
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "insertedContentRelation";
|
||||
rdfs:range rdf:Property.
|
||||
|
||||
:member
|
||||
a rdf:Property;
|
||||
rdfs:comment "LDP servers should use this predicate as the membership predicate if there is no obvious predicate from an application vocabulary to use.";
|
||||
vs:term_status "stable";
|
||||
rdfs:domain :Resource;
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "member";
|
||||
rdfs:range rdfs:Resource.
|
||||
|
||||
:contains
|
||||
a rdf:Property;
|
||||
rdfs:comment "Links a container with resources created through the container.";
|
||||
vs:term_status "stable";
|
||||
rdfs:domain :Container;
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "contains";
|
||||
rdfs:range rdfs:Resource.
|
||||
|
||||
:MemberSubject
|
||||
a owl:Individual;
|
||||
rdfs:comment "Used to indicate default and typical behavior for ldp:insertedContentRelation, where the member-URI value in the membership triple added when a creation request is successful is the URI assigned to the newly created resource.";
|
||||
vs:term_status "stable";
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "MemberSubject".
|
||||
|
||||
:PreferContainment
|
||||
a owl:Individual;
|
||||
rdfs:comment "URI identifying a LDPC's containment triples, for example to allow clients to express interest in receiving them.";
|
||||
vs:term_status "stable";
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "PreferContainment".
|
||||
|
||||
:PreferMembership
|
||||
a owl:Individual;
|
||||
rdfs:comment "URI identifying a LDPC's membership triples, for example to allow clients to express interest in receiving them.";
|
||||
vs:term_status "stable";
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "PreferMembership".
|
||||
|
||||
:PreferEmptyContainer
|
||||
a owl:Individual;
|
||||
rdfs:comment "Archaic alias for ldp:PreferMinimalContainer";
|
||||
vs:term_status "archaic";
|
||||
rdfs:isDefinedBy :;
|
||||
owl:equivalentProperty :PreferMinimalContainer;
|
||||
rdfs:seeAlso :PreferMinimalContainer;
|
||||
rdfs:label "PreferEmptyContainer".
|
||||
|
||||
:PreferMinimalContainer
|
||||
a owl:Individual;
|
||||
rdfs:comment "URI identifying the subset of a LDPC's triples present in an empty LDPC, for example to allow clients to express interest in receiving them. Currently this excludes containment and membership triples, but in the future other exclusions might be added. This definition is written to automatically exclude those new classes of triples.";
|
||||
vs:term_status "stable";
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "PreferMinimalContainer".
|
||||
|
||||
:constrainedBy
|
||||
a rdf:Property;
|
||||
rdfs:comment "Links a resource with constraints that the server requires requests like creation and update to conform to.";
|
||||
vs:term_status "stable";
|
||||
rdfs:domain :Resource;
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "constrainedBy";
|
||||
rdfs:range rdfs:Resource.
|
||||
|
||||
:pageSortCriteria
|
||||
a rdf:Property;
|
||||
rdfs:comment "Link to the list of sorting criteria used by the server in a representation. Typically used on Link response headers as an extension link relation URI in the rel= parameter.";
|
||||
vs:term_status "testing";
|
||||
rdfs:domain :Page;
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "pageSortCriteria";
|
||||
rdfs:range rdf:List.
|
||||
|
||||
:PageSortCriterion
|
||||
a rdfs:Class;
|
||||
rdfs:comment "Element in the list of sorting criteria used by the server to assign container members to pages.";
|
||||
vs:term_status "testing";
|
||||
rdfs:label "PageSortCriterion";
|
||||
rdfs:isDefinedBy :.
|
||||
|
||||
:pageSortPredicate
|
||||
a rdf:Property;
|
||||
rdfs:comment "Predicate used to specify the order of the members across a page sequence's in-sequence page resources; it asserts nothing about the order of members in the representation of a single page.";
|
||||
vs:term_status "testing";
|
||||
rdfs:domain :PageSortCriterion;
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "pageSortPredicate";
|
||||
rdfs:range rdf:Property.
|
||||
|
||||
:pageSortOrder
|
||||
a rdf:Property;
|
||||
rdfs:comment "The ascending/descending/etc order used to order the members across pages in a page sequence.";
|
||||
vs:term_status "testing";
|
||||
rdfs:domain :PageSortCriterion;
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "pageSortOrder";
|
||||
rdfs:range rdf:Resource.
|
||||
|
||||
:pageSortCollation
|
||||
a rdf:Property;
|
||||
rdfs:comment "The collation used to order the members across pages in a page sequence when comparing strings.";
|
||||
vs:term_status "testing";
|
||||
rdfs:domain :PageSortCriterion;
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "pageSortCollation";
|
||||
rdfs:range rdf:Property.
|
||||
|
||||
:Ascending
|
||||
a owl:Individual;
|
||||
rdfs:comment "Ascending order.";
|
||||
vs:term_status "testing";
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "Ascending".
|
||||
|
||||
:Descending
|
||||
a owl:Individual;
|
||||
rdfs:comment "Descending order.";
|
||||
vs:term_status "testing";
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "Descending".
|
||||
|
||||
:Page
|
||||
a rdfs:Class;
|
||||
rdfs:comment "URI signifying that the resource is an in-sequence page resource, as defined by LDP Paging. Typically used on Link rel='type' response headers.";
|
||||
vs:term_status "testing";
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "Page".
|
||||
|
||||
:pageSequence
|
||||
a rdf:Property;
|
||||
rdfs:comment "Link to a page sequence resource, as defined by LDP Paging. Typically used to communicate the sorting criteria used to allocate LDPC members to pages.";
|
||||
vs:term_status "testing";
|
||||
rdfs:isDefinedBy :;
|
||||
rdfs:label "Page".
|
||||
|
||||
:inbox
|
||||
a rdf:Property;
|
||||
rdfs:comment "Links a resource to a container where notifications for the resource can be created and discovered.";
|
||||
vs:term_status "stable";
|
||||
rdfs:isDefinedBy <https://www.w3.org/TR/ldn/>;
|
||||
rdfs:label "inbox";
|
||||
dcterms:issued "2016-09-29"^^xsd:date;
|
||||
dcterms:creator <http://csarven.ca/#i>, <https://rhiaro.co.uk/#me>.
|
||||
@@ -15,6 +15,7 @@
|
||||
@prefix rdaw: <http://rdaregistry.info/Elements/w/> .
|
||||
@prefix rdax: <http://rdaregistry.info/Elements/x/> .
|
||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
|
||||
@prefix fedora: <http://fedora.info/definitions/v4/repository#> .
|
||||
@base <https://graphofliberty.org/2026/04/ont/> .
|
||||
|
||||
@@ -212,6 +213,14 @@ fedora:lastModifiedBy rdf:type owl:NamedIndividual ;
|
||||
:readOnly "true"^^xsd:boolean .
|
||||
|
||||
|
||||
### http://rdaregistry.info/Elements/x/P00028
|
||||
rdax:P00028 rdf:type owl:NamedIndividual ;
|
||||
:associatedProperty rdfs:label ,
|
||||
skos:definition ;
|
||||
:catalogId "2"^^xsd:nonNegativeInteger ;
|
||||
rdfs:label "has related entity of RDA entity"@en .
|
||||
|
||||
|
||||
### http://www.w3.org/1999/02/22-rdf-syntax-ns#Property
|
||||
rdf:Property rdf:type owl:NamedIndividual ;
|
||||
:associatedProperty rdfs:comment ,
|
||||
@@ -228,12 +237,17 @@ rdfs:Class rdf:type owl:NamedIndividual ;
|
||||
|
||||
### http://www.w3.org/2000/01/rdf-schema#comment
|
||||
rdfs:comment rdf:type owl:NamedIndividual ;
|
||||
:indexedByField :comment .
|
||||
:indexedByField :Comment .
|
||||
|
||||
|
||||
### http://www.w3.org/2000/01/rdf-schema#label
|
||||
rdfs:label rdf:type owl:NamedIndividual ;
|
||||
:indexedByField :label .
|
||||
:indexedByField :Label .
|
||||
|
||||
|
||||
### http://www.w3.org/2004/02/skos/core#definition
|
||||
skos:definition rdf:type owl:NamedIndividual ;
|
||||
:indexedByField :Definition .
|
||||
|
||||
|
||||
### http://www.w3.org/ns/ldp#BasicContainer
|
||||
@@ -261,16 +275,24 @@ ldp:contains rdf:type owl:NamedIndividual ;
|
||||
:readOnly "true"^^xsd:boolean .
|
||||
|
||||
|
||||
### https://graphofliberty.org/2026/04/ont/comment
|
||||
:comment rdf:type owl:NamedIndividual ,
|
||||
### https://graphofliberty.org/2026/04/ont/Comment
|
||||
:Comment rdf:type owl:NamedIndividual ,
|
||||
:IndexDocumentField ;
|
||||
:fieldLabel "Comment"@en ;
|
||||
:fieldName "comment" ;
|
||||
rdfs:label "Comment Field"@en .
|
||||
|
||||
|
||||
### https://graphofliberty.org/2026/04/ont/label
|
||||
:label rdf:type owl:NamedIndividual ,
|
||||
### https://graphofliberty.org/2026/04/ont/Definition
|
||||
:Definition rdf:type owl:NamedIndividual ,
|
||||
:IndexDocumentField ;
|
||||
:fieldLabel "Definition"@en ;
|
||||
:fieldName "definition" ;
|
||||
rdfs:label "Definition Field"@en .
|
||||
|
||||
|
||||
### https://graphofliberty.org/2026/04/ont/Label
|
||||
:Label rdf:type owl:NamedIndividual ,
|
||||
:IndexDocumentField ;
|
||||
:fieldLabel "Label"@en ;
|
||||
:fieldName "label" ;
|
||||
|
||||
@@ -1,552 +0,0 @@
|
||||
@prefix dc: <http://purl.org/dc/elements/1.1/> .
|
||||
@prefix grddl: <http://www.w3.org/2003/g/data-view#> .
|
||||
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
|
||||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
||||
|
||||
<http://www.w3.org/2002/07/owl> a owl:Ontology ;
|
||||
dc:title "The OWL 2 Schema vocabulary (OWL 2)" ;
|
||||
rdfs:comment """
|
||||
This ontology partially describes the built-in classes and
|
||||
properties that together form the basis of the RDF/XML syntax of OWL 2.
|
||||
The content of this ontology is based on Tables 6.1 and 6.2
|
||||
in Section 6.4 of the OWL 2 RDF-Based Semantics specification,
|
||||
available at http://www.w3.org/TR/owl2-rdf-based-semantics/.
|
||||
Please note that those tables do not include the different annotations
|
||||
(labels, comments and rdfs:isDefinedBy links) used in this file.
|
||||
Also note that the descriptions provided in this ontology do not
|
||||
provide a complete and correct formal description of either the syntax
|
||||
or the semantics of the introduced terms (please see the OWL 2
|
||||
recommendations for the complete and normative specifications).
|
||||
Furthermore, the information provided by this ontology may be
|
||||
misleading if not used with care. This ontology SHOULD NOT be imported
|
||||
into OWL ontologies. Importing this file into an OWL 2 DL ontology
|
||||
will cause it to become an OWL 2 Full ontology and may have other,
|
||||
unexpected, consequences.
|
||||
""" ;
|
||||
rdfs:isDefinedBy
|
||||
<http://www.w3.org/TR/owl2-mapping-to-rdf/>,
|
||||
<http://www.w3.org/TR/owl2-rdf-based-semantics/>,
|
||||
<http://www.w3.org/TR/owl2-syntax/> ;
|
||||
rdfs:seeAlso <http://www.w3.org/TR/owl2-rdf-based-semantics/#table-axiomatic-classes>,
|
||||
<http://www.w3.org/TR/owl2-rdf-based-semantics/#table-axiomatic-properties> ;
|
||||
owl:imports <http://www.w3.org/2000/01/rdf-schema> ;
|
||||
owl:versionIRI <http://www.w3.org/2002/07/owl> ;
|
||||
owl:versionInfo "$Date: 2009/11/15 10:54:12 $" ;
|
||||
grddl:namespaceTransformation <http://dev.w3.org/cvsweb/2009/owl-grddl/owx2rdf.xsl> .
|
||||
|
||||
|
||||
owl:AllDifferent a rdfs:Class ;
|
||||
rdfs:label "AllDifferent" ;
|
||||
rdfs:comment "The class of collections of pairwise different individuals." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf rdfs:Resource .
|
||||
|
||||
owl:AllDisjointClasses a rdfs:Class ;
|
||||
rdfs:label "AllDisjointClasses" ;
|
||||
rdfs:comment "The class of collections of pairwise disjoint classes." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf rdfs:Resource .
|
||||
|
||||
owl:AllDisjointProperties a rdfs:Class ;
|
||||
rdfs:label "AllDisjointProperties" ;
|
||||
rdfs:comment "The class of collections of pairwise disjoint properties." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf rdfs:Resource .
|
||||
|
||||
owl:Annotation a rdfs:Class ;
|
||||
rdfs:label "Annotation" ;
|
||||
rdfs:comment "The class of annotated annotations for which the RDF serialization consists of an annotated subject, predicate and object." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf rdfs:Resource .
|
||||
|
||||
owl:AnnotationProperty a rdfs:Class ;
|
||||
rdfs:label "AnnotationProperty" ;
|
||||
rdfs:comment "The class of annotation properties." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf rdf:Property .
|
||||
|
||||
owl:AsymmetricProperty a rdfs:Class ;
|
||||
rdfs:label "AsymmetricProperty" ;
|
||||
rdfs:comment "The class of asymmetric properties." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf owl:ObjectProperty .
|
||||
|
||||
owl:Axiom a rdfs:Class ;
|
||||
rdfs:label "Axiom" ;
|
||||
rdfs:comment "The class of annotated axioms for which the RDF serialization consists of an annotated subject, predicate and object." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf rdfs:Resource .
|
||||
|
||||
owl:Class a rdfs:Class ;
|
||||
rdfs:label "Class" ;
|
||||
rdfs:comment "The class of OWL classes." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf rdfs:Class .
|
||||
|
||||
owl:DataRange a rdfs:Class ;
|
||||
rdfs:label "DataRange" ;
|
||||
rdfs:comment "The class of OWL data ranges, which are special kinds of datatypes. Note: The use of the IRI owl:DataRange has been deprecated as of OWL 2. The IRI rdfs:Datatype SHOULD be used instead." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf rdfs:Datatype .
|
||||
|
||||
owl:DatatypeProperty a rdfs:Class ;
|
||||
rdfs:label "DatatypeProperty" ;
|
||||
rdfs:comment "The class of data properties." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf rdf:Property .
|
||||
|
||||
owl:DeprecatedClass a rdfs:Class ;
|
||||
rdfs:label "DeprecatedClass" ;
|
||||
rdfs:comment "The class of deprecated classes." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf rdfs:Class .
|
||||
|
||||
owl:DeprecatedProperty a rdfs:Class ;
|
||||
rdfs:label "DeprecatedProperty" ;
|
||||
rdfs:comment "The class of deprecated properties." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf rdf:Property .
|
||||
|
||||
owl:FunctionalProperty a rdfs:Class ;
|
||||
rdfs:label "FunctionalProperty" ;
|
||||
rdfs:comment "The class of functional properties." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf rdf:Property .
|
||||
|
||||
owl:InverseFunctionalProperty a rdfs:Class ;
|
||||
rdfs:label "InverseFunctionalProperty" ;
|
||||
rdfs:comment "The class of inverse-functional properties." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf owl:ObjectProperty .
|
||||
|
||||
owl:IrreflexiveProperty a rdfs:Class ;
|
||||
rdfs:label "IrreflexiveProperty" ;
|
||||
rdfs:comment "The class of irreflexive properties." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf owl:ObjectProperty .
|
||||
|
||||
owl:NamedIndividual a rdfs:Class ;
|
||||
rdfs:label "NamedIndividual" ;
|
||||
rdfs:comment "The class of named individuals." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf owl:Thing .
|
||||
|
||||
owl:NegativePropertyAssertion a rdfs:Class ;
|
||||
rdfs:label "NegativePropertyAssertion" ;
|
||||
rdfs:comment "The class of negative property assertions." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf rdfs:Resource .
|
||||
|
||||
owl:Nothing a owl:Class ;
|
||||
rdfs:label "Nothing" ;
|
||||
rdfs:comment "This is the empty class." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf owl:Thing .
|
||||
|
||||
owl:ObjectProperty a rdfs:Class ;
|
||||
rdfs:label "ObjectProperty" ;
|
||||
rdfs:comment "The class of object properties." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf rdf:Property .
|
||||
|
||||
owl:Ontology a rdfs:Class ;
|
||||
rdfs:label "Ontology" ;
|
||||
rdfs:comment "The class of ontologies." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf rdfs:Resource .
|
||||
|
||||
owl:OntologyProperty a rdfs:Class ;
|
||||
rdfs:label "OntologyProperty" ;
|
||||
rdfs:comment "The class of ontology properties." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf rdf:Property .
|
||||
|
||||
owl:ReflexiveProperty a rdfs:Class ;
|
||||
rdfs:label "ReflexiveProperty" ;
|
||||
rdfs:comment "The class of reflexive properties." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf owl:ObjectProperty .
|
||||
|
||||
owl:Restriction a rdfs:Class ;
|
||||
rdfs:label "Restriction" ;
|
||||
rdfs:comment "The class of property restrictions." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf owl:Class .
|
||||
|
||||
owl:SymmetricProperty a rdfs:Class ;
|
||||
rdfs:label "SymmetricProperty" ;
|
||||
rdfs:comment "The class of symmetric properties." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf owl:ObjectProperty .
|
||||
|
||||
owl:TransitiveProperty a rdfs:Class ;
|
||||
rdfs:label "TransitiveProperty" ;
|
||||
rdfs:comment "The class of transitive properties." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:subClassOf owl:ObjectProperty .
|
||||
|
||||
owl:Thing a owl:Class ;
|
||||
rdfs:label "Thing" ;
|
||||
rdfs:comment "The class of OWL individuals." ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> .
|
||||
|
||||
owl:allValuesFrom a rdf:Property ;
|
||||
rdfs:label "allValuesFrom" ;
|
||||
rdfs:comment "The property that determines the class that a universal property restriction refers to." ;
|
||||
rdfs:domain owl:Restriction ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdfs:Class .
|
||||
|
||||
owl:annotatedProperty a rdf:Property ;
|
||||
rdfs:label "annotatedProperty" ;
|
||||
rdfs:comment "The property that determines the predicate of an annotated axiom or annotated annotation." ;
|
||||
rdfs:domain rdfs:Resource ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdfs:Resource .
|
||||
|
||||
owl:annotatedSource a rdf:Property ;
|
||||
rdfs:label "annotatedSource" ;
|
||||
rdfs:comment "The property that determines the subject of an annotated axiom or annotated annotation." ;
|
||||
rdfs:domain rdfs:Resource ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdfs:Resource .
|
||||
|
||||
owl:annotatedTarget a rdf:Property ;
|
||||
rdfs:label "annotatedTarget" ;
|
||||
rdfs:comment "The property that determines the object of an annotated axiom or annotated annotation." ;
|
||||
rdfs:domain rdfs:Resource ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdfs:Resource .
|
||||
|
||||
owl:assertionProperty a rdf:Property ;
|
||||
rdfs:label "assertionProperty" ;
|
||||
rdfs:comment "The property that determines the predicate of a negative property assertion." ;
|
||||
rdfs:domain owl:NegativePropertyAssertion ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdf:Property .
|
||||
|
||||
owl:backwardCompatibleWith a owl:AnnotationProperty, owl:OntologyProperty ;
|
||||
rdfs:label "backwardCompatibleWith" ;
|
||||
rdfs:comment "The annotation property that indicates that a given ontology is backward compatible with another ontology." ;
|
||||
rdfs:domain owl:Ontology ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range owl:Ontology .
|
||||
|
||||
owl:bottomDataProperty a owl:DatatypeProperty ;
|
||||
rdfs:label "bottomDataProperty" ;
|
||||
rdfs:comment "The data property that does not relate any individual to any data value." ;
|
||||
rdfs:domain owl:Thing ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdfs:Literal .
|
||||
|
||||
owl:bottomObjectProperty a owl:ObjectProperty ;
|
||||
rdfs:label "bottomObjectProperty" ;
|
||||
rdfs:comment "The object property that does not relate any two individuals." ;
|
||||
rdfs:domain owl:Thing ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range owl:Thing .
|
||||
|
||||
owl:cardinality a rdf:Property ;
|
||||
rdfs:label "cardinality" ;
|
||||
rdfs:comment "The property that determines the cardinality of an exact cardinality restriction." ;
|
||||
rdfs:domain owl:Restriction ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range xsd:nonNegativeInteger .
|
||||
|
||||
owl:complementOf a rdf:Property ;
|
||||
rdfs:label "complementOf" ;
|
||||
rdfs:comment "The property that determines that a given class is the complement of another class." ;
|
||||
rdfs:domain owl:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range owl:Class .
|
||||
|
||||
owl:datatypeComplementOf a rdf:Property ;
|
||||
rdfs:label "datatypeComplementOf" ;
|
||||
rdfs:comment "The property that determines that a given data range is the complement of another data range with respect to the data domain." ;
|
||||
rdfs:domain rdfs:Datatype ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdfs:Datatype .
|
||||
|
||||
owl:deprecated a owl:AnnotationProperty ;
|
||||
rdfs:label "deprecated" ;
|
||||
rdfs:comment "The annotation property that indicates that a given entity has been deprecated." ;
|
||||
rdfs:domain rdfs:Resource ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdfs:Resource .
|
||||
|
||||
owl:differentFrom a rdf:Property ;
|
||||
rdfs:label "differentFrom" ;
|
||||
rdfs:comment "The property that determines that two given individuals are different." ;
|
||||
rdfs:domain owl:Thing ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range owl:Thing .
|
||||
|
||||
owl:disjointUnionOf a rdf:Property ;
|
||||
rdfs:label "disjointUnionOf" ;
|
||||
rdfs:comment "The property that determines that a given class is equivalent to the disjoint union of a collection of other classes." ;
|
||||
rdfs:domain owl:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdf:List .
|
||||
|
||||
owl:disjointWith a rdf:Property ;
|
||||
rdfs:label "disjointWith" ;
|
||||
rdfs:comment "The property that determines that two given classes are disjoint." ;
|
||||
rdfs:domain owl:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range owl:Class .
|
||||
|
||||
owl:distinctMembers a rdf:Property ;
|
||||
rdfs:label "distinctMembers" ;
|
||||
rdfs:comment "The property that determines the collection of pairwise different individuals in a owl:AllDifferent axiom." ;
|
||||
rdfs:domain owl:AllDifferent ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdf:List .
|
||||
|
||||
owl:equivalentClass a rdf:Property ;
|
||||
rdfs:label "equivalentClass" ;
|
||||
rdfs:comment "The property that determines that two given classes are equivalent, and that is used to specify datatype definitions." ;
|
||||
rdfs:domain rdfs:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdfs:Class .
|
||||
|
||||
owl:equivalentProperty a rdf:Property ;
|
||||
rdfs:label "equivalentProperty" ;
|
||||
rdfs:comment "The property that determines that two given properties are equivalent." ;
|
||||
rdfs:domain rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdf:Property .
|
||||
|
||||
owl:hasKey a rdf:Property ;
|
||||
rdfs:label "hasKey" ;
|
||||
rdfs:comment "The property that determines the collection of properties that jointly build a key." ;
|
||||
rdfs:domain owl:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdf:List .
|
||||
|
||||
owl:hasSelf a rdf:Property ;
|
||||
rdfs:label "hasSelf" ;
|
||||
rdfs:comment "The property that determines the property that a self restriction refers to." ;
|
||||
rdfs:domain owl:Restriction ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdfs:Resource .
|
||||
|
||||
owl:hasValue a rdf:Property ;
|
||||
rdfs:label "hasValue" ;
|
||||
rdfs:comment "The property that determines the individual that a has-value restriction refers to." ;
|
||||
rdfs:domain owl:Restriction ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdfs:Resource .
|
||||
|
||||
owl:imports a owl:OntologyProperty ;
|
||||
rdfs:label "imports" ;
|
||||
rdfs:comment "The property that is used for importing other ontologies into a given ontology." ;
|
||||
rdfs:domain owl:Ontology ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range owl:Ontology .
|
||||
|
||||
owl:incompatibleWith a owl:AnnotationProperty, owl:OntologyProperty ;
|
||||
rdfs:label "incompatibleWith" ;
|
||||
rdfs:comment "The annotation property that indicates that a given ontology is incompatible with another ontology." ;
|
||||
rdfs:domain owl:Ontology ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range owl:Ontology .
|
||||
|
||||
owl:intersectionOf a rdf:Property ;
|
||||
rdfs:label "intersectionOf" ;
|
||||
rdfs:comment "The property that determines the collection of classes or data ranges that build an intersection." ;
|
||||
rdfs:domain rdfs:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdf:List .
|
||||
|
||||
owl:inverseOf a rdf:Property ;
|
||||
rdfs:label "inverseOf" ;
|
||||
rdfs:comment "The property that determines that two given properties are inverse." ;
|
||||
rdfs:domain owl:ObjectProperty ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range owl:ObjectProperty .
|
||||
|
||||
owl:maxCardinality a rdf:Property ;
|
||||
rdfs:label "maxCardinality" ;
|
||||
rdfs:comment "The property that determines the cardinality of a maximum cardinality restriction." ;
|
||||
rdfs:domain owl:Restriction ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range xsd:nonNegativeInteger .
|
||||
|
||||
owl:maxQualifiedCardinality a rdf:Property ;
|
||||
rdfs:label "maxQualifiedCardinality" ;
|
||||
rdfs:comment "The property that determines the cardinality of a maximum qualified cardinality restriction." ;
|
||||
rdfs:domain owl:Restriction ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range xsd:nonNegativeInteger .
|
||||
|
||||
owl:members a rdf:Property ;
|
||||
rdfs:label "members" ;
|
||||
rdfs:comment "The property that determines the collection of members in either a owl:AllDifferent, owl:AllDisjointClasses or owl:AllDisjointProperties axiom." ;
|
||||
rdfs:domain rdfs:Resource ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdf:List .
|
||||
|
||||
owl:minCardinality a rdf:Property ;
|
||||
rdfs:label "minCardinality" ;
|
||||
rdfs:comment "The property that determines the cardinality of a minimum cardinality restriction." ;
|
||||
rdfs:domain owl:Restriction ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range xsd:nonNegativeInteger .
|
||||
|
||||
owl:minQualifiedCardinality a rdf:Property ;
|
||||
rdfs:label "minQualifiedCardinality" ;
|
||||
rdfs:comment "The property that determines the cardinality of a minimum qualified cardinality restriction." ;
|
||||
rdfs:domain owl:Restriction ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range xsd:nonNegativeInteger .
|
||||
|
||||
owl:onClass a rdf:Property ;
|
||||
rdfs:label "onClass" ;
|
||||
rdfs:comment "The property that determines the class that a qualified object cardinality restriction refers to." ;
|
||||
rdfs:domain owl:Restriction ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range owl:Class .
|
||||
|
||||
owl:onDataRange a rdf:Property ;
|
||||
rdfs:label "onDataRange" ;
|
||||
rdfs:comment "The property that determines the data range that a qualified data cardinality restriction refers to." ;
|
||||
rdfs:domain owl:Restriction ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdfs:Datatype .
|
||||
|
||||
owl:onDatatype a rdf:Property ;
|
||||
rdfs:label "onDatatype" ;
|
||||
rdfs:comment "The property that determines the datatype that a datatype restriction refers to." ;
|
||||
rdfs:domain rdfs:Datatype ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdfs:Datatype .
|
||||
|
||||
owl:oneOf a rdf:Property ;
|
||||
rdfs:label "oneOf" ;
|
||||
rdfs:comment "The property that determines the collection of individuals or data values that build an enumeration." ;
|
||||
rdfs:domain rdfs:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdf:List .
|
||||
|
||||
owl:onProperties a rdf:Property ;
|
||||
rdfs:label "onProperties" ;
|
||||
rdfs:comment "The property that determines the n-tuple of properties that a property restriction on an n-ary data range refers to." ;
|
||||
rdfs:domain owl:Restriction ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdf:List .
|
||||
|
||||
owl:onProperty a rdf:Property ;
|
||||
rdfs:label "onProperty" ;
|
||||
rdfs:comment "The property that determines the property that a property restriction refers to." ;
|
||||
rdfs:domain owl:Restriction ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdf:Property .
|
||||
|
||||
owl:priorVersion a owl:AnnotationProperty, owl:OntologyProperty ;
|
||||
rdfs:label "priorVersion" ;
|
||||
rdfs:comment "The annotation property that indicates the predecessor ontology of a given ontology." ;
|
||||
rdfs:domain owl:Ontology ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range owl:Ontology .
|
||||
|
||||
owl:propertyChainAxiom a rdf:Property ;
|
||||
rdfs:label "propertyChainAxiom" ;
|
||||
rdfs:comment "The property that determines the n-tuple of properties that build a sub property chain of a given property." ;
|
||||
rdfs:domain owl:ObjectProperty ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdf:List .
|
||||
|
||||
owl:propertyDisjointWith a rdf:Property ;
|
||||
rdfs:label "propertyDisjointWith" ;
|
||||
rdfs:comment "The property that determines that two given properties are disjoint." ;
|
||||
rdfs:domain rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdf:Property .
|
||||
|
||||
owl:qualifiedCardinality a rdf:Property ;
|
||||
rdfs:label "qualifiedCardinality" ;
|
||||
rdfs:comment "The property that determines the cardinality of an exact qualified cardinality restriction." ;
|
||||
rdfs:domain owl:Restriction ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range xsd:nonNegativeInteger .
|
||||
|
||||
owl:sameAs a rdf:Property ;
|
||||
rdfs:label "sameAs" ;
|
||||
rdfs:comment "The property that determines that two given individuals are equal." ;
|
||||
rdfs:domain owl:Thing ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range owl:Thing .
|
||||
|
||||
owl:someValuesFrom a rdf:Property ;
|
||||
rdfs:label "someValuesFrom" ;
|
||||
rdfs:comment "The property that determines the class that an existential property restriction refers to." ;
|
||||
rdfs:domain owl:Restriction ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdfs:Class .
|
||||
|
||||
owl:sourceIndividual a rdf:Property ;
|
||||
rdfs:label "sourceIndividual" ;
|
||||
rdfs:comment "The property that determines the subject of a negative property assertion." ;
|
||||
rdfs:domain owl:NegativePropertyAssertion ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range owl:Thing .
|
||||
|
||||
owl:targetIndividual a rdf:Property ;
|
||||
rdfs:label "targetIndividual" ;
|
||||
rdfs:comment "The property that determines the object of a negative object property assertion." ;
|
||||
rdfs:domain owl:NegativePropertyAssertion ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range owl:Thing .
|
||||
|
||||
owl:targetValue a rdf:Property ;
|
||||
rdfs:label "targetValue" ;
|
||||
rdfs:comment "The property that determines the value of a negative data property assertion." ;
|
||||
rdfs:domain owl:NegativePropertyAssertion ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdfs:Literal .
|
||||
|
||||
owl:topDataProperty a owl:DatatypeProperty ;
|
||||
rdfs:label "topDataProperty" ;
|
||||
rdfs:comment "The data property that relates every individual to every data value." ;
|
||||
rdfs:domain owl:Thing ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdfs:Literal .
|
||||
|
||||
owl:topObjectProperty a owl:ObjectProperty ;
|
||||
rdfs:label "topObjectProperty" ;
|
||||
rdfs:comment "The object property that relates every two individuals." ;
|
||||
rdfs:domain owl:Thing ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range owl:Thing .
|
||||
|
||||
owl:unionOf a rdf:Property ;
|
||||
rdfs:label "unionOf" ;
|
||||
rdfs:comment "The property that determines the collection of classes or data ranges that build a union." ;
|
||||
rdfs:domain rdfs:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdf:List .
|
||||
|
||||
owl:versionInfo a owl:AnnotationProperty ;
|
||||
rdfs:label "versionInfo" ;
|
||||
rdfs:comment "The annotation property that provides version information for an ontology or another OWL construct." ;
|
||||
rdfs:domain rdfs:Resource ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdfs:Resource .
|
||||
|
||||
owl:versionIRI a owl:OntologyProperty ;
|
||||
rdfs:label "versionIRI" ;
|
||||
rdfs:comment "The property that identifies the version IRI of an ontology." ;
|
||||
rdfs:domain owl:Ontology ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range owl:Ontology .
|
||||
|
||||
owl:withRestrictions a rdf:Property ;
|
||||
rdfs:label "withRestrictions" ;
|
||||
rdfs:comment "The property that determines the collection of facet-value pairs that define a datatype restriction." ;
|
||||
rdfs:domain rdfs:Datatype ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
|
||||
rdfs:range rdf:List .
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
||||
@prefix dc: <http://purl.org/dc/elements/1.1/> .
|
||||
|
||||
<http://www.w3.org/2000/01/rdf-schema#> a owl:Ontology ;
|
||||
dc:title "The RDF Schema vocabulary (RDFS)" .
|
||||
|
||||
rdfs:Resource a rdfs:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2000/01/rdf-schema#> ;
|
||||
rdfs:label "Resource" ;
|
||||
rdfs:comment "The class resource, everything." .
|
||||
|
||||
rdfs:Class a rdfs:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2000/01/rdf-schema#> ;
|
||||
rdfs:label "Class" ;
|
||||
rdfs:comment "The class of classes." ;
|
||||
rdfs:subClassOf rdfs:Resource .
|
||||
|
||||
rdfs:subClassOf a rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2000/01/rdf-schema#> ;
|
||||
rdfs:label "subClassOf" ;
|
||||
rdfs:comment "The subject is a subclass of a class." ;
|
||||
rdfs:range rdfs:Class ;
|
||||
rdfs:domain rdfs:Class .
|
||||
|
||||
rdfs:subPropertyOf a rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2000/01/rdf-schema#> ;
|
||||
rdfs:label "subPropertyOf" ;
|
||||
rdfs:comment "The subject is a subproperty of a property." ;
|
||||
rdfs:range rdf:Property ;
|
||||
rdfs:domain rdf:Property .
|
||||
|
||||
rdfs:comment a rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2000/01/rdf-schema#> ;
|
||||
rdfs:label "comment" ;
|
||||
rdfs:comment "A description of the subject resource." ;
|
||||
rdfs:domain rdfs:Resource ;
|
||||
rdfs:range rdfs:Literal .
|
||||
|
||||
rdfs:label a rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2000/01/rdf-schema#> ;
|
||||
rdfs:label "label" ;
|
||||
rdfs:comment "A human-readable name for the subject." ;
|
||||
rdfs:domain rdfs:Resource ;
|
||||
rdfs:range rdfs:Literal .
|
||||
|
||||
rdfs:domain a rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2000/01/rdf-schema#> ;
|
||||
rdfs:label "domain" ;
|
||||
rdfs:comment "A domain of the subject property." ;
|
||||
rdfs:range rdfs:Class ;
|
||||
rdfs:domain rdf:Property .
|
||||
|
||||
rdfs:range a rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2000/01/rdf-schema#> ;
|
||||
rdfs:label "range" ;
|
||||
rdfs:comment "A range of the subject property." ;
|
||||
rdfs:range rdfs:Class ;
|
||||
rdfs:domain rdf:Property .
|
||||
|
||||
rdfs:seeAlso a rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2000/01/rdf-schema#> ;
|
||||
rdfs:label "seeAlso" ;
|
||||
rdfs:comment "Further information about the subject resource." ;
|
||||
rdfs:range rdfs:Resource ;
|
||||
rdfs:domain rdfs:Resource .
|
||||
|
||||
rdfs:isDefinedBy a rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2000/01/rdf-schema#> ;
|
||||
rdfs:subPropertyOf rdfs:seeAlso ;
|
||||
rdfs:label "isDefinedBy" ;
|
||||
rdfs:comment "The definition of the subject resource." ;
|
||||
rdfs:range rdfs:Resource ;
|
||||
rdfs:domain rdfs:Resource .
|
||||
|
||||
rdfs:Literal a rdfs:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2000/01/rdf-schema#> ;
|
||||
rdfs:label "Literal" ;
|
||||
rdfs:comment "The class of literal values, eg. textual strings and integers." ;
|
||||
rdfs:subClassOf rdfs:Resource .
|
||||
|
||||
rdfs:Container a rdfs:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2000/01/rdf-schema#> ;
|
||||
rdfs:label "Container" ;
|
||||
rdfs:subClassOf rdfs:Resource ;
|
||||
rdfs:comment "The class of RDF containers." .
|
||||
|
||||
rdfs:ContainerMembershipProperty a rdfs:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2000/01/rdf-schema#> ;
|
||||
rdfs:label "ContainerMembershipProperty" ;
|
||||
rdfs:comment """The class of container membership properties, rdf:_1, rdf:_2, ..., all of which are sub-properties of 'member'.""" ;
|
||||
rdfs:subClassOf rdf:Property .
|
||||
|
||||
rdfs:member a rdf:Property ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2000/01/rdf-schema#> ;
|
||||
rdfs:label "member" ;
|
||||
rdfs:comment "A member of the subject resource." ;
|
||||
rdfs:domain rdfs:Resource ;
|
||||
rdfs:range rdfs:Resource .
|
||||
|
||||
rdfs:Datatype a rdfs:Class ;
|
||||
rdfs:isDefinedBy <http://www.w3.org/2000/01/rdf-schema#> ;
|
||||
rdfs:label "Datatype" ;
|
||||
rdfs:comment "The class of RDF datatypes." ;
|
||||
rdfs:subClassOf rdfs:Class .
|
||||
|
||||
<http://www.w3.org/2000/01/rdf-schema#> rdfs:seeAlso <http://www.w3.org/2000/01/rdf-schema-more> .
|
||||
+26
-20
@@ -1,16 +1,16 @@
|
||||
use crate::error;
|
||||
use crate::rdf::vocab::{gl, owl, rda};
|
||||
use oxigraph::io::{RdfFormat, RdfParser};
|
||||
use crate::rdf::vocab::gl;
|
||||
use oxigraph::model::vocab::{rdf, rdfs, xsd};
|
||||
use oxigraph::model::{Dataset, GraphName, LiteralRef, NamedNode, NamedNodeRef, NamedOrBlankNode, NamedOrBlankNodeRef, Quad, Term, TermRef, Triple, TripleRef};
|
||||
use oxigraph::model::{LiteralRef, NamedNode, NamedNodeRef, NamedOrBlankNode, NamedOrBlankNodeRef, Term, TermRef, Triple, TripleRef};
|
||||
use oxigraph::sparql::{QueryResults, SparqlEvaluator};
|
||||
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
|
||||
use std::collections::{BTreeMap, HashMap, HashSet};
|
||||
use std::fmt::Display;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::LazyLock;
|
||||
use oxigraph::store::Store;
|
||||
use tracing::{info, instrument};
|
||||
use tracing::debug_span;
|
||||
use crate::rdf::{conversion, materialize};
|
||||
use crate::rdf::conversion::LanguageCondition;
|
||||
|
||||
static PREFIXES: LazyLock<BTreeMap<String, String>> = LazyLock::new(|| {
|
||||
BTreeMap::from_iter([
|
||||
@@ -70,8 +70,9 @@ impl OntologyBuilder {
|
||||
.collect::<HashMap<String, String>>();
|
||||
|
||||
materialize::same_as(&mut store)?;
|
||||
materialize::super_properties(&mut store)?;
|
||||
materialize::super_classes(&mut store)?;
|
||||
store.optimize()?;
|
||||
debug_span!("Optimize Ontology").in_scope(|| store.optimize())?;
|
||||
|
||||
// Full-text search index field names
|
||||
let fields = Self::fields(&store)?;
|
||||
@@ -82,12 +83,16 @@ impl OntologyBuilder {
|
||||
.filter_map(Result::ok) {
|
||||
let label = store.quads_for_pattern(Some(quad.subject.as_ref().into()), Some(rdfs::LABEL), None, None)
|
||||
.filter_map(Result::ok)
|
||||
.filter_map(|quad| conversion::term_to_string(&quad.object).map(String::from))
|
||||
.map(conversion::quad_into_term)
|
||||
.filter(|term| conversion::language_matches(term, &conversion::english()))
|
||||
.filter_map(conversion::term_into_string)
|
||||
.next();
|
||||
|
||||
let comment = store.quads_for_pattern(Some(quad.subject.as_ref().into()), Some(rdfs::COMMENT), None, None)
|
||||
.filter_map(Result::ok)
|
||||
.filter_map(|quad| conversion::term_to_string(&quad.object).map(String::from))
|
||||
.map(conversion::quad_into_term)
|
||||
.filter(|term| conversion::language_matches(term, &conversion::english()))
|
||||
.filter_map(conversion::term_into_string)
|
||||
.next();
|
||||
|
||||
if let Some(catalog_id) = conversion::term_to_u64(&quad.object) &&
|
||||
@@ -130,28 +135,25 @@ impl OntologyBuilder {
|
||||
|
||||
fn fields(store: &Store) -> error::Result<HashMap<NamedNode, IndexField>> {
|
||||
let query = SparqlEvaluator::new()
|
||||
.with_prefix("rdfs", "http://www.w3.org/2000/01/rdf-schema#")?
|
||||
.with_prefix("gl", "https://graphofliberty.org/2026/04/ont/")?
|
||||
.parse_query(
|
||||
r#"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX gl: <https://graphofliberty.org/2026/04/ont/>
|
||||
|
||||
SELECT DISTINCT ?subject ?name ?label {
|
||||
r#"SELECT DISTINCT ?subject ?name ?label {
|
||||
GRAPH ?graph {
|
||||
?subject a gl:IndexDocumentField ;
|
||||
gl:fieldName ?name ;
|
||||
gl:fieldLabel ?label .
|
||||
FILTER (langMATCHES(LANG(?label), "en") || !hasLANG(?label))
|
||||
}
|
||||
}"#,
|
||||
)
|
||||
.expect("Unable to parse field query");
|
||||
}"#)?;
|
||||
|
||||
let mut results = HashMap::new();
|
||||
if let QueryResults::Solutions(solutions) = query.on_store(store).execute()?
|
||||
{
|
||||
for solution in solutions.filter_map(Result::ok) {
|
||||
let subject = solution.get("subject").and_then(conversion::term_to_named_node);
|
||||
let name = solution.get("name").and_then(conversion::term_to_string);
|
||||
let label = solution.get("label").and_then(conversion::term_to_string);
|
||||
let name = solution.get("name").and_then(conversion::term_as_str);
|
||||
let label = solution.get("label").and_then(conversion::term_as_str);
|
||||
|
||||
if let Some(subject) = subject && let Some(name) = name {
|
||||
let field = IndexField {
|
||||
@@ -306,15 +308,19 @@ impl Ontology {
|
||||
} else { None })
|
||||
}
|
||||
|
||||
pub fn info(&self, iri: &NamedNode) -> LabeledIri {
|
||||
pub fn info(&self, iri: &NamedNode, language: &LanguageCondition) -> LabeledIri {
|
||||
let label = self.store.quads_for_pattern(Some(iri.as_ref().into()), Some(rdfs::LABEL), None, None)
|
||||
.filter_map(Result::ok)
|
||||
.filter_map(|quad| conversion::term_to_string(&quad.object).map(String::from))
|
||||
.map(conversion::quad_into_term)
|
||||
.filter(|term| conversion::language_matches(term, language))
|
||||
.filter_map(conversion::term_into_string)
|
||||
.next();
|
||||
|
||||
let comment = self.store.quads_for_pattern(Some(iri.as_ref().into()), Some(rdfs::COMMENT), None, None)
|
||||
.filter_map(Result::ok)
|
||||
.filter_map(|quad| conversion::term_to_string(&quad.object).map(String::from))
|
||||
.map(conversion::quad_into_term)
|
||||
.filter(|term| conversion::language_matches(term, language))
|
||||
.filter_map(conversion::term_into_string)
|
||||
.next();
|
||||
|
||||
LabeledIri {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use std::collections::BTreeMap;
|
||||
use iced::{keyboard, widget, Element, Event, Length, Rectangle, Size};
|
||||
use iced::{alignment, keyboard, widget, Element, Event, Length, Rectangle, Size};
|
||||
use iced::advanced::{mouse, text, Shell};
|
||||
use iced::advanced::layout::{Limits, Node};
|
||||
use iced::advanced::renderer::Style;
|
||||
@@ -53,6 +53,12 @@ where
|
||||
text_input,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn align_x(mut self, alignment: impl Into<alignment::Horizontal>) -> Self {
|
||||
self.text_input = self.text_input.align_x(alignment);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn on_control_click(mut self, on_control_click: Message) -> Self {
|
||||
self.on_control_click = Some(on_control_click);
|
||||
self
|
||||
@@ -67,6 +73,11 @@ where
|
||||
self.text_input = self.text_input.on_input(wrapped);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn on_submit(mut self, message: Message) -> Self {
|
||||
self.text_input = self.text_input.on_submit(message);
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, Message, Theme, Renderer> From<IriInput<'a, Message, Theme, Renderer>>
|
||||
|
||||
Reference in New Issue
Block a user