Skip to content

Commit

Permalink
make submission status, description and uri not required
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Feb 19, 2025
1 parent 0e56795 commit b127f59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def extract_metadata
ontology_iri = extract_ontology_iri

self.version = version_info if version_info
self.uri = ontology_iri if ontology_iri
self.uri = RDF::URI.new(ontology_iri) if ontology_iri

end

Expand Down
7 changes: 4 additions & 3 deletions lib/ontologies_linked_data/models/ontology_submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class OntologySubmission < LinkedData::Models::Base
include LinkedData::Concerns::SubmissionProcessable
include LinkedData::Concerns::OntologySubmission::MetadataExtractor
include LinkedData::Concerns::OntologySubmission::Validators
extend LinkedData::Concerns::OntologySubmission::DefaultCallbacks

FLAT_ROOTS_LIMIT = 1000

Expand All @@ -38,10 +39,10 @@ class OntologySubmission < LinkedData::Models::Base

# Ontology metadata
# General metadata
attribute :URI, namespace: :omv, type: :uri, enforce: %i[existence distinct_of_identifier], fuzzy_search: true
attribute :uri, namespace: :omv, type: :uri, enforce: %i[distinct_of_identifier], fuzzy_search: true
attribute :versionIRI, namespace: :owl, type: :uri, enforce: [:distinct_of_URI]
attribute :version, namespace: :omv
attribute :status, namespace: :omv, enforce: %i[existence], default: ->(x) { 'production' }
attribute :status, namespace: :omv, default: ->(x) { 'production' }
attribute :deprecated, namespace: :owl, type: :boolean, default: ->(x) { false }
attribute :hasOntologyLanguage, namespace: :omv, type: :ontology_format, enforce: [:existence]
attribute :hasFormalityLevel, namespace: :omv, type: :uri
Expand All @@ -51,7 +52,7 @@ class OntologySubmission < LinkedData::Models::Base
attribute :identifier, namespace: :dct, type: %i[list uri], enforce: [:distinct_of_URI]

# Description metadata
attribute :description, namespace: :omv, enforce: %i[concatenate existence], fuzzy_search: true
attribute :description, namespace: :omv, enforce: %i[concatenate], fuzzy_search: true
attribute :homepage, namespace: :foaf, type: :uri
attribute :documentation, namespace: :omv, type: :uri
attribute :notes, namespace: :omv, type: :list
Expand Down

0 comments on commit b127f59

Please sign in to comment.