Skip to content

Commit

Permalink
fixes based on feedback from @syphax-bouazouni in #194
Browse files Browse the repository at this point in the history
  • Loading branch information
mdorf committed Apr 24, 2024
1 parent 604e5cb commit d885010
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions lib/ontologies_linked_data/models/ontology_submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def generate_umls_metrics_file(tr_file_path=nil)
generate_metrics_file(class_count, indiv_count, prop_count, max_depth)
end

def generate_rdf(logger, file_path, reasoning: true)
def generate_rdf(logger, reasoning: true)
mime_type = nil

if self.hasOntologyLanguage.umls?
Expand All @@ -473,10 +473,7 @@ def generate_rdf(logger, file_path, reasoning: true)
logger.info("error deleting owlapi.rdf")
end
end
owlapi = LinkedData::Parser::OWLAPICommand.new(
File.expand_path(file_path),
File.expand_path(self.data_folder.to_s),
master_file: self.masterFileName)
owlapi = owlapi_parser(logger: logger)
owlapi.disable_reasoner unless reasoning
triples_file_path, missing_imports = owlapi.parse

Expand Down Expand Up @@ -1002,9 +999,7 @@ def process_submission(logger, options={})
end
status = LinkedData::Models::SubmissionStatus.find("RDF").first
remove_submission_status(status) #remove RDF status before starting
zip_dst = unzip_submission(logger)
file_path = zip_dst ? zip_dst.to_s : self.uploadFilePath.to_s
generate_rdf(logger, file_path, reasoning: reasoning)
generate_rdf(logger, reasoning: reasoning)
extract_metadata
add_submission_status(status)
self.save
Expand Down

0 comments on commit d885010

Please sign in to comment.