Skip to content

Commit

Permalink
updates xpath validator
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolea PLESCO authored and Kolea PLESCO committed Apr 8, 2024
1 parent be2814f commit b0f5ff7
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions ted_sws/notice_validator/adapters/xpath_coverage_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from ted_sws.core.model.notice import Notice
from ted_sws.core.model.transform import MappingXPATH, MappingSuite
from ted_sws.core.model.validation_report import ReportNotice
from ted_sws.data_sampler.services.notice_xml_indexer import index_notice
from ted_sws.mapping_suite_processor.adapters.mapping_suite_reader import MappingSuiteReader
from ted_sws.notice_transformer.services.notice_transformer import transform_report_notices
from ted_sws.notice_validator.resources.templates import TEMPLATE_METADATA_KEY
Expand All @@ -34,12 +33,6 @@ def __init__(self, mapping_suite: MappingSuite):
self.mapping_suite_id = mapping_suite.get_mongodb_id()
self.init_xpath_data(mapping_suite=mapping_suite)

@classmethod
def notice_xpaths(cls, notice: Notice) -> List[str]:
if not notice.xml_metadata or not notice.xml_metadata.unique_xpaths:
notice = index_notice(notice)
return notice.xml_metadata.unique_xpaths

def init_xpath_data(self, mapping_suite: MappingSuite):
for cm_xpath in MappingSuiteReader.read_mapping_suite_xpaths(mapping_suite):
self.conceptual_xpaths.add(cm_xpath.xpath)
Expand Down

0 comments on commit b0f5ff7

Please sign in to comment.