private ContractsReservedSection ParseContractReserved() { //TODO validate logic, find notice with a filled in III.1.5 var contractsReservedTranslation = TedLabelDictionary.GetTranslationFor("contracts_reserved", NoticeLanguage); var restrictedShelteredWorkshopTranslation = TedLabelDictionary.GetTranslationFor("restricted_sheltered_workshop", NoticeLanguage); var restrictedShelteredProgramTranslation = TedLabelDictionary.GetTranslationFor("restricted_sheltered_program", NoticeLanguage); var restrictedShelteredWorkshopMatch = Regex.Match(NoticeContent, $"{restrictedShelteredWorkshopTranslation}", RegexOptions.IgnoreCase); var restrictedShelteredProgramMatch = Regex.Match(NoticeContent, $"{restrictedShelteredProgramTranslation}", RegexOptions.IgnoreCase); var contractReservedSection = new ContractsReservedSection(contractsReservedTranslation) { RestrictedShelteredWorkshop = restrictedShelteredWorkshopMatch.Value, RestrictedShelteredProgram = restrictedShelteredProgramMatch.Value }; return(contractReservedSection); }
private TechnicalCapacitySection ParseTechnicalCapacity() { var technicalCapacityTranslation = TedLabelDictionary.GetTranslationFor("technical_capacity", NoticeLanguage); var infoEvaluatingWethRequirTranslation = TedLabelDictionary.GetTranslationFor("info_evaluating_weth_requir", NoticeLanguage); var minStandardsRequiredTranslation = TedLabelDictionary.GetTranslationFor("min_standards_required", NoticeLanguage); //TODO criteria_selection_docs var sectionText = Regex.Match(NoticeContent, $@"(?<=III\.1\.3\) {technicalCapacityTranslation} )(.*?)\s?(?=III\.1\.5)", RegexOptions.IgnoreCase).Groups[1].Value; var infoEvaluatingWethRequirMatch = Regex.Match(sectionText, $@"(?<={infoEvaluatingWethRequirTranslation}: )(.*?)\s?(?={minStandardsRequiredTranslation})", RegexOptions.IgnoreCase); var minStandardsRequiredMatch = Regex.Match(sectionText, $@"(?<={minStandardsRequiredTranslation}: )(.*?)\s?(?=III\.1\.5)", RegexOptions.IgnoreCase); var infoEvaluatingWethRequirStrings = infoEvaluatingWethRequirMatch.Groups[1].Value.Split(", -", StringSplitOptions.RemoveEmptyEntries).Select(str => str.Trim(' ', ',', '-')).ToArray(); var minStandardsRequiredStrings = minStandardsRequiredMatch.Groups[1].Value.Split("-", StringSplitOptions.RemoveEmptyEntries).Select(str => str.Trim(' ', ',')).ToArray(); var economicFinancialStandingSection = new TechnicalCapacitySection(technicalCapacityTranslation) { InfoEvaluatingWethRequir = infoEvaluatingWethRequirStrings, MinStandardsRequired = minStandardsRequiredStrings }; return(economicFinancialStandingSection); }
private QuantityScopeContract ParseQuantityScopeContract() { var quantityScopeContractTranslation = TedLabelDictionary.GetTranslationFor("quantity_scope_contract", NoticeLanguage); var quantityScopeContractSegment = Regex.Match(NoticeContent, @$ "(?<={quantityScopeContractTranslation} )(.*?)\s?(?=II\.2)", RegexOptions.IgnoreCase).Groups[1].Value; // We want to extract all the text from section II.1 before parsing. We do this to prevent false matches with II.2 var titleContract = ParseTitleContract(quantityScopeContractSegment, "II.1.1"); var cpvCodes = ParseCpvCodes(quantityScopeContractSegment, "II.1.2"); var typeContract = ParseTypeContract(quantityScopeContractSegment); var descriptionShort = ParseDescriptionShort(quantityScopeContractSegment); var valueMagnitudeEstimatedTotal = ParseValueMagnitudeEstimatedTotal(quantityScopeContractSegment, "II.1.5"); var lotsInfo = ParseLotsInfo(quantityScopeContractSegment); var quantityScopeContract = new QuantityScopeContract(quantityScopeContractTranslation, new Section[] { titleContract, cpvCodes, typeContract, descriptionShort, valueMagnitudeEstimatedTotal, lotsInfo }); return(quantityScopeContract); }
public Section Parse() { var conditionsParticipSection = ParseConditionsParticip(); var conditionsContractSection = ParseConditionsContract(); var sectionIii = new Section("Section III", TedLabelDictionary.GetTranslationFor("info_legal", NoticeLanguage), new Section[] { conditionsParticipSection, conditionsContractSection }); return(sectionIii); }
public Section Parse() { var descriptionSection = ParseSectionIvDescriptionSection(); var infoAdminSection = ParseSectionIvInfoAdminSection(); var sectionIv = new Section("Section IV", TedLabelDictionary.GetTranslationFor("procedure", NoticeLanguage), new Section[] { descriptionSection, infoAdminSection }); return(sectionIv); }
private DateDispatchTenderParticipateSection ParseDateDispatchTenderParticipate() { var dateDispatchTenderParticipateTranslation = TedLabelDictionary.GetTranslationFor("date_dispatch_tender_participate", NoticeLanguage); // TODO match date return(new DateDispatchTenderParticipateSection(dateDispatchTenderParticipateTranslation)); }
private Section ParseAppealsProcedureSection() { var appealsBodySection = ParseAppealsBody(); var mediationBodySection = ParseMediationBody(); var appealsLodgingSection = ParseAppealsLodging(); var appealsInfoSection = ParseAppealsInfo(); return(new Section("VI.4", TedLabelDictionary.GetTranslationFor("appeals_procedure", NoticeLanguage), new Section[] { appealsBodySection, mediationBodySection, appealsLodgingSection, appealsInfoSection })); }
private ConditionsContractSection ParseConditionsContract() { var conditionsContractTranslation = TedLabelDictionary.GetTranslationFor("conditions_contract", NoticeLanguage); var particularProfessionInfoSection = ParseParticularProfsessionInfo(); // TODO Find notice with III.2.* filled in return(new ConditionsContractSection(conditionsContractTranslation, new Section[] { particularProfessionInfoSection })); }
private NegotiationInfoSection ParseNegotiationInfo() { var negotiationInfoTranslation = TedLabelDictionary.GetTranslationFor("negotiation_info", NoticeLanguage); var negotiationWithoutTranslation = TedLabelDictionary.GetTranslationFor("negotiation_without", NoticeLanguage); // TODO match negotiation_without. return(new NegotiationInfoSection(negotiationInfoTranslation)); }
private EAuctionInfoSection ParseEAuctionInfo() { var eAuctionInfoTranslation = TedLabelDictionary.GetTranslationFor("eauction_info", NoticeLanguage); var eAuctionWillUsedTranslation = TedLabelDictionary.GetTranslationFor("eauction_will_used", NoticeLanguage); var eAuctionInfoAddit = TedLabelDictionary.GetTranslationFor("eauction_info_addit", NoticeLanguage); // TODO match eauction_will_used, eauction_info_addit return(new EAuctionInfoSection(eAuctionInfoTranslation)); }
private NoticeType ParseNoticeType(string noticeContent, Language noticeLanguage) { var translatedValue = _tedLabelDictionary.GetTranslationFor("notice_contract", noticeLanguage); if (Regex.Match(noticeContent, translatedValue, RegexOptions.IgnoreCase).Success) { return(NoticeType.NoticeContract); } throw new NotImplementedException(); }
public Section Parse() { var recurrenceInfoSection = ParseRecurrenceInfoSection(); var infoEWorkflowSection = ParseInfoEWorkflowSection(); var infoAdditionalSection = ParseInfoAdditionalSection(); var appealsProcedureSection = ParseAppealsProcedureSection(); var dateDispatchSection = ParseDateDispatchSection(); var sectionVi = new Section("Section VI", TedLabelDictionary.GetTranslationFor("info_complement", NoticeLanguage), new Section[] { recurrenceInfoSection, infoEWorkflowSection, infoAdditionalSection, appealsProcedureSection, dateDispatchSection }); return(sectionVi); }
private Section ParseSectionIvDescriptionSection() { var typeProcedureSection = ParseTypeProcedure(); var frameworkContractDpsInfoSection = ParseFrameworkContractDpsInfo(); var reductionDuringDialogueSection = ParseReductionDuringDialogue(); var negotiationInfoSection = ParseNegotiationInfo(); var eAuctionInfoSection = ParseEAuctionInfo(); var gpaInfoSection = ParseGpaInfo(); return(new Section("IV.1", TedLabelDictionary.GetTranslationFor("description", NoticeLanguage), new Section[] { typeProcedureSection, frameworkContractDpsInfoSection, reductionDuringDialogueSection, negotiationInfoSection, eAuctionInfoSection, gpaInfoSection })); }
private Section ParseSectionIvInfoAdminSection() { var pubPreviousSection = ParsePubPrevious(); var limitReceiptTendersReqParSection = ParseLimitReceiptTendersReqPart(); var dateDispatchTenderParticipate = ParseDateDispatchTenderParticipate(); var languagesAllowedSection = ParseLanguagesAllowed(); var minTimeMaintainSection = ParseMinTimeMaintain(); var openingConditionSection = ParseOpeningCondition(); return(new Section("IV.2", TedLabelDictionary.GetTranslationFor("info_admin", NoticeLanguage), new Section[] { pubPreviousSection, limitReceiptTendersReqParSection, dateDispatchTenderParticipate, languagesAllowedSection, minTimeMaintainSection, openingConditionSection })); }
private TypeProcedureSection ParseTypeProcedure() { var typeProcedureTranslation = TedLabelDictionary.GetTranslationFor("type_procedure", NoticeLanguage); var typeProcedureMatch = Regex.Match(NoticeContent, $@"(?<={typeProcedureTranslation} )(.*?)\s?(?=IV)", RegexOptions.IgnoreCase); return(new TypeProcedureSection(typeProcedureTranslation) { TypeProcedure = typeProcedureMatch.Groups[1].Value }); }
public Section Parse() { var sectionIiSections = new List <Section> { ParseQuantityScopeContract() }; sectionIiSections.AddRange(ParseDescriptionSections()); var sectionIi = new Section("Section II", TedLabelDictionary.GetTranslationFor("object", NoticeLanguage), sectionIiSections); return(sectionIi); }
private AppealsBody ParseAppealsBody(string segment) { var nameOfficialTranslation = TedLabelDictionary.GetTranslationFor("name_official", NoticeLanguage); var addressPostalTranslation = TedLabelDictionary.GetTranslationFor("address_postal", NoticeLanguage); var addressTownTranslation = TedLabelDictionary.GetTranslationFor("address_town", NoticeLanguage); var addressPostcodeTranslation = TedLabelDictionary.GetTranslationFor("address_postcode", NoticeLanguage); var addressCountryTranslation = TedLabelDictionary.GetTranslationFor("address_country", NoticeLanguage); var addressEmailTranslation = TedLabelDictionary.GetTranslationFor("address_email", NoticeLanguage); var addressPhoneTranslation = TedLabelDictionary.GetTranslationFor("address_phone", NoticeLanguage); var internetTranslation = TedLabelDictionary.GetTranslationFor("internet", NoticeLanguage); var addressFaxTranslation = TedLabelDictionary.GetTranslationFor("address_fax", NoticeLanguage); var nameOfficial = Regex.Match(segment, $@"(?<={nameOfficialTranslation}: )(.*?)\s(?={addressPostalTranslation})").Groups[1].Value; var addressPostal = Regex.Match(segment, @$ "(?<={addressPostalTranslation}: )(.*?)\s(?={addressTownTranslation})").Groups[1].Value;
private ParticularProfessionInfoSection ParseParticularProfsessionInfo() { var particularProfessionInfoTranslation = TedLabelDictionary.GetTranslationFor("particular_profession_info", NoticeLanguage); var particularProfessionReservedTranslation = TedLabelDictionary.GetTranslationFor("particular_profession_reserved", NoticeLanguage); var refLawLegProvTranslation = TedLabelDictionary.GetTranslationFor("ref_law_reg_prov", NoticeLanguage); // TODO Find a notice with this section filled in. return(new ParticularProfessionInfoSection(particularProfessionInfoTranslation) { ParticularProfessionReserved = "" }); }
private InfoAdditionalSection ParseInfoAdditionalSection() { var infoAdditionalTranslation = TedLabelDictionary.GetTranslationFor("info_additional", NoticeLanguage); var infoAdditionalMatch = Regex.Match(NoticeContent, $@"(?<={infoAdditionalTranslation} )(.*?)\s?(?=VI\.)", RegexOptions.IgnoreCase); //TODO validate info_additional return(new InfoAdditionalSection("VI.3", infoAdditionalTranslation) { InfoAdditional = infoAdditionalMatch.Value }); }
private GpaInfoSection ParseGpaInfo() { var gpaInfoTranslation = TedLabelDictionary.GetTranslationFor("gpa_info", NoticeLanguage); var gpaCoveredTranslation = TedLabelDictionary.GetTranslationFor("gpa_covered", NoticeLanguage); var yesTranslation = TedLabelDictionary.GetTranslationFor("_yes", NoticeLanguage); var gpaCoveredMatch = Regex.Match(NoticeContent, $@"(?<={gpaCoveredTranslation}: )(.*?)\s?(?=IV)", RegexOptions.IgnoreCase); return(new GpaInfoSection(gpaInfoTranslation) { GpaCovered = gpaCoveredMatch.Groups[1].Value == yesTranslation }); }
private AppealsBodySection ParseAppealsBody() { var appealsBodyTranslation = TedLabelDictionary.GetTranslationFor("appeals_body", NoticeLanguage); var appealsBodyMatch = Regex.Match(NoticeContent, $@"(?<={appealsBodyTranslation} )(.*?)\s?(?=VI\.)", RegexOptions.IgnoreCase); var appealsBody = ParseAppealsBody(appealsBodyMatch.Groups[1].Value); return(new AppealsBodySection(appealsBodyTranslation) { AppealsBody = appealsBody }); }
private ReductionDuringDialogueSection ParseReductionDuringDialogue() { var reductionDuringDialogueTranslation = TedLabelDictionary.GetTranslationFor("reduction_during_dialogue", NoticeLanguage); var reductionRecourseTranslation = TedLabelDictionary.GetTranslationFor("reduction_recourse", NoticeLanguage); var reductionRecourseMatch = Regex.Match(NoticeContent, $"{reductionRecourseTranslation}", RegexOptions.IgnoreCase); return(new ReductionDuringDialogueSection(reductionDuringDialogueTranslation) { ReductionRecourse = reductionRecourseMatch.Value }); }
private MediationBodySection ParseMediationBody() { var mediationBodyTranslation = TedLabelDictionary.GetTranslationFor("mediation_body", NoticeLanguage); var mediationBodyMatch = Regex.Match(NoticeContent, $@"(?<={mediationBodyTranslation} )(.*?)\s?(?=VI\.)", RegexOptions.IgnoreCase); var mediationBody = ParseAppealsBody(mediationBodyMatch.Groups[1].Value); //TODO validate mediation_body return(new MediationBodySection(mediationBodyTranslation) { MediationBody = mediationBody }); }
private ConditionsParticipSection ParseConditionsParticip() { var situationPersonalInclSection = ParseSituationPersonalIncl(); var economicFinancialStandingSection = ParseEconomicFinancialStanding(); var technicalCapacitySection = ParseTechnicalCapacity(); var contractReservedSection = ParseContractReserved(); var conditionsParticipSection = new ConditionsParticipSection( TedLabelDictionary.GetTranslationFor("conditions_particip", NoticeLanguage), new Section[] { situationPersonalInclSection, economicFinancialStandingSection, technicalCapacitySection, contractReservedSection }); return(conditionsParticipSection); }
public Section Parse() { var nameAddressSegment = Regex.Match(NoticeContent, @$ "(?<={TedLabelDictionary.GetTranslationFor(" name_address_contact ", NoticeLanguage)} )(.*?)\s(?=I\.2\))", RegexOptions.IgnoreCase).Groups[1].Value; var nameAddressContact = ParseNameAddressContact(nameAddressSegment); var nameAddressContactSection = new NameAddressContactSection(TedLabelDictionary.GetTranslationFor("name_address_contact", NoticeLanguage)) { NameAddressContact = nameAddressContact }; var jointProcurementSection = ParseJointProcurementSectiom(); var communicationSection = ParseCommunicationSection(); var caTypeSection = ParseCaType(); var mainActivity = ParseMainActivity(); var section = new Section("Section I", TedLabelDictionary.GetTranslationFor("ca", NoticeLanguage), new Section[] { nameAddressContactSection, jointProcurementSection, communicationSection, caTypeSection, mainActivity }); return(section); }
private LanguagesAllowedSection ParseLanguagesAllowed() { var languagesAllowedTranslation = TedLabelDictionary.GetTranslationFor("languages_allowed", NoticeLanguage); var languagesAllowedMatch = Regex.Match(NoticeContent, $@"(?<={languagesAllowedTranslation}: )(.*?)\s?(?=IV\.2)", RegexOptions.IgnoreCase); var languageSplits = languagesAllowedMatch.Groups[1].Value.Split("•", StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries); //TODO Validate with multiple languages. return(new LanguagesAllowedSection(languagesAllowedTranslation) { LanguagesAllowed = languageSplits }); }
private NameAddressContact ParseNameAddressContact(string segment) { //TODO Support multiple organizations (joint contract) var nameOfficialTranslation = TedLabelDictionary.GetTranslationFor("name_official", NoticeLanguage); var nationalIdTranslation = TedLabelDictionary.GetTranslationFor("national_id", NoticeLanguage); var addressPostalTranslation = TedLabelDictionary.GetTranslationFor("address_postal", NoticeLanguage); var addressTownTranslation = TedLabelDictionary.GetTranslationFor("address_town", NoticeLanguage); var nutscodeTranslation = TedLabelDictionary.GetTranslationFor("nutscode", NoticeLanguage); var addressPostcodeTranslation = TedLabelDictionary.GetTranslationFor("address_postcode", NoticeLanguage); var addressCountryTranslation = TedLabelDictionary.GetTranslationFor("address_country", NoticeLanguage); var contactpointTranslation = TedLabelDictionary.GetTranslationFor("contactpoint", NoticeLanguage); var addressPhoneTranslation = TedLabelDictionary.GetTranslationFor("address_phone", NoticeLanguage); var addressEmailTranslation = TedLabelDictionary.GetTranslationFor("address_email", NoticeLanguage); var addressFaxTranslation = TedLabelDictionary.GetTranslationFor("address_fax", NoticeLanguage); var urlGeneralTranslation = TedLabelDictionary.GetTranslationFor("url_general", NoticeLanguage); var urlBuyerprofileFaxTranslation = TedLabelDictionary.GetTranslationFor("url_buyerprofile", NoticeLanguage); var nameOfficial = Regex.Match(segment, $@"(?<={nameOfficialTranslation}: )(.*?)\s(?={nationalIdTranslation})").Groups[1].Value; var nationalId = Regex.Match(segment, @$ "(?<={nationalIdTranslation}: )(.*?)\s(?={addressPostalTranslation})").Groups[1].Value;
private RecurrenceInfoSection ParseRecurrenceInfoSection() { var recurrenceInfoTranslation = TedLabelDictionary.GetTranslationFor("recurrence_info", NoticeLanguage); var recurrentProcurementTranslation = TedLabelDictionary.GetTranslationFor("recurrent_procurement", NoticeLanguage); var furtherNoticesTimingTranslation = TedLabelDictionary.GetTranslationFor("further_notices_timing", NoticeLanguage); var yesTranslation = TedLabelDictionary.GetTranslationFor("_yes", NoticeLanguage); var recurrentProcurementMatch = Regex.Match(NoticeContent, $@"(?<={recurrentProcurementTranslation}: )(.*?)\s?(?={furtherNoticesTimingTranslation}|VI\.)", RegexOptions.IgnoreCase); //TODO match further_notices_timing return(new RecurrenceInfoSection(recurrenceInfoTranslation) { RecurrentProcurement = recurrentProcurementMatch.Groups[1].Value == yesTranslation }); }
private InfoEWorkflowSection ParseInfoEWorkflowSection() { var infoEWorkflowTranslation = TedLabelDictionary.GetTranslationFor("info_eworkflow", NoticeLanguage); var eOrderingUsedTranslation = TedLabelDictionary.GetTranslationFor("eordering_used", NoticeLanguage); var eInvoicingUsedTranslation = TedLabelDictionary.GetTranslationFor("einvoicing_used", NoticeLanguage); var ePaymentUsedTranslation = TedLabelDictionary.GetTranslationFor("epayment_used", NoticeLanguage); var eOrderingUsedMatch = Regex.Match(NoticeContent, eOrderingUsedTranslation, RegexOptions.IgnoreCase); var eInvoicingUsedMatch = Regex.Match(NoticeContent, eInvoicingUsedTranslation, RegexOptions.IgnoreCase); var ePaymentUsedMatch = Regex.Match(NoticeContent, ePaymentUsedTranslation, RegexOptions.IgnoreCase); // TODO Validate eordering_used, einvoicing_used, epayment_used return(new InfoEWorkflowSection(infoEWorkflowTranslation) { EOrderingUsed = eOrderingUsedMatch.Value, EInvoicingUsed = eInvoicingUsedMatch.Value, EPaymentUsed = ePaymentUsedMatch.Value }); }
private SituationPersonalInclSection ParseSituationPersonalIncl() { var infoEvaluatingRequirementTranslation = TedLabelDictionary.GetTranslationFor("info_evaluating_requir", NoticeLanguage); var infoEvaluatingRequirementMatch = Regex.Match(NoticeContent, $@"(?<={infoEvaluatingRequirementTranslation}: )(.*?)\s?(?=III\.1)", RegexOptions.IgnoreCase); var requirementStrings = infoEvaluatingRequirementMatch.Groups[1].Value.Split("- ", StringSplitOptions.RemoveEmptyEntries).Select(str => str.Trim(' ', ',')).ToArray(); var situationPersonalInclSection = new SituationPersonalInclSection( TedLabelDictionary.GetTranslationFor("situation_personal_incl", NoticeLanguage)) { Requirements = requirementStrings }; return(situationPersonalInclSection); }