Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract the parsing step "append triples to the store" from the "generate_rdf" step #32

Closed
syphax-bouazzouni opened this issue Jul 5, 2022 · 1 comment
Assignees

Comments

@syphax-bouazzouni
Copy link

syphax-bouazzouni commented Jul 5, 2022

Currently, we append the triples to the store each time we generate the RDF file to be always sync

    def generate_rdf(logger, reasoning: true, user_params: {})
        mime_type = nil
        user_params = {} if user_params.nil?

        if self.hasOntologyLanguage.umls?
          triples_file_path = self.triples_file_path
          logger.info("Using UMLS turtle file found, skipping OWLAPI parse")
          logger.flush
          mime_type = LinkedData::MediaTypes.media_type_from_base(LinkedData::MediaTypes::TURTLE)
          generate_umls_metrics_file(triples_file_path)
        else
          output_rdf = self.rdf_path

          if File.exist?(output_rdf)
            logger.info("deleting old owlapi.xrdf ..")
            deleted = FileUtils.rm(output_rdf)

            if deleted.length > 0
              logger.info("deleted")
            else
              logger.info("error deleting owlapi.rdf")
            end
          end
          owlapi = owlapi_parser(logger: nil)

        end
        delete_and_append(triples_file_path, logger, mime_type)
       .....
      end

The feature request is to have the possibility with ncbo_cron to do only the "append" without re-parsing the submission file

@syphax-bouazzouni
Copy link
Author

done in #132

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant