Skip to content

Commit

Permalink
reapply overwritten changes made in 629aa39
Browse files Browse the repository at this point in the history
commit 629aa39
  • Loading branch information
alexskr committed May 10, 2024
1 parent d25ce99 commit 91444a6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/ontologies_linked_data/diff/bubastis_diff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class BubastisDiffCommand < DiffTool
# Loading one file locally and one from the web and outputting results to plain text:
# java -jar bubastis_1_2.jar -ontology1 "H://disease_ontology_version_1.owl" -ontology2 "http://www.disease.org/diseaseontology_latest.owl" -output "C://my_diff.txt"

def initialize(old_file_path, new_file_path)
def initialize(old_file_path, new_file_path, output_repo)
@bubastis_jar_path = LinkedData.bindir + "/bubastis.jar"
@input_fileOld = old_file_path
@input_fileNew = new_file_path
@output_repo = File.expand_path(@input_fileNew).gsub(File.basename(@input_fileNew),'')
@output_repo = output_repo
@file_diff_path = nil
@java_heap_size = LinkedData.settings.java_max_heap_size
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ def diff(logger, older)
# accepts another submission in 'older' (it should be an 'older' ontology version)
def init_diff_tool(older)
@submission.bring(:uploadFilePath)
older.bring(:uploadFilePath)
older.bring(:uploadFilePath) if older.bring? :uploadFilePath

LinkedData::Diff::BubastisDiffCommand.new(
File.expand_path(older.uploadFilePath),
File.expand_path(@submission.uploadFilePath))
File.expand_path(@submission.uploadFilePath),
@submission.data_folder
)
end

def process_diff(logger)
Expand Down Expand Up @@ -61,11 +63,10 @@ def process_diff(logger)
end
end


def generate_diff(logger, diff_tool)
begin
@submission.bring_remaining
@submission.bring(:diffFilePath)
@submission.bring(:diffFilePath) if @submission.bring? :diffFilePath

LinkedData::Diff.logger = logger
@submission.diffFilePath = diff_tool.diff
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def process_rdf(logger, reasoning)

status = LinkedData::Models::SubmissionStatus.find('OBSOLETE').first
begin
generate_obsolete_classes(logger, file_path)
generate_obsolete_classes(logger, @submission.uploadFilePath.to_s)
@submission.add_submission_status(status)
@submission.save
rescue Exception => e
Expand Down

0 comments on commit 91444a6

Please sign in to comment.