Skip to content

Commit

Permalink
Added Peppol PINT rules 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Jul 24, 2024
1 parent 0baa691 commit f867b9b
Show file tree
Hide file tree
Showing 8 changed files with 7,325 additions and 14 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ I hope that with the introduction of PINT, the versioning problem will be solved

# News and noteworthy

* v3.1.12 - work in progress
* Added Peppol PINT rules 1.0.2
* v3.1.11 - 2024-07-02
* Added Peppol May 2024 release (Billing 3.0.17 and Upgrade 3.0.13)
* Added Peppol A-NZ-PEPPOL 1.0.11 rules
Expand Down
Binary file not shown.
4 changes: 2 additions & 2 deletions phive-rules-peppol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@
<goal>convert</goal>
</goals>
<configuration>
<schematronDirectory>src/test/resources/external/rule-source/pint/1.0.1</schematronDirectory>
<xsltDirectory>src/main/resources/external/schematron/pint/1.0.1/xslt</xsltDirectory>
<schematronDirectory>src/test/resources/external/rule-source/pint/1.0.2</schematronDirectory>
<xsltDirectory>src/main/resources/external/schematron/pint/1.0.2/xslt</xsltDirectory>
</configuration>
</execution>
-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,34 +41,41 @@
@Immutable
public final class PeppolValidationPINT
{
public static final String GROUP_ID = "org.peppol.pint";
private static final String BASE_PATH = "external/schematron/pint/";

@Nonnull
private static ClassLoader _getCL ()
{
return PeppolValidationPINT.class.getClassLoader ();
}

private static final String BASE_PATH = "external/schematron/pint/";

// 1.0.0
@Deprecated
public static final ClassPathResource RES_OPENPEPPOL_PINT_1_0_0 = new ClassPathResource (BASE_PATH +
"1.0.0/xslt/PINT-UBL-validation-preprocessed.xslt",
_getCL ());
@Deprecated
public static final VESID VID_OPENPEPPOL_PINT_INVOICE_1_0_0 = new VESID ("org.peppol.pint", "invoice", "1.0.0");
public static final VESID VID_OPENPEPPOL_PINT_INVOICE_1_0_0 = new VESID (GROUP_ID, "invoice", "1.0.0");
@Deprecated
public static final VESID VID_OPENPEPPOL_PINT_CREDIT_NOTE_1_0_0 = new VESID ("org.peppol.pint",
"credit-note",
"1.0.0");
public static final VESID VID_OPENPEPPOL_PINT_CREDIT_NOTE_1_0_0 = new VESID (GROUP_ID, "credit-note", "1.0.0");

// 1.0.1
public static final ClassPathResource RES_OPENPEPPOL_PINT_1_0_1 = new ClassPathResource (BASE_PATH +
"1.0.1/xslt/PINT-UBL-validation-preprocessed.xslt",
_getCL ());
public static final VESID VID_OPENPEPPOL_PINT_INVOICE_1_0_1 = new VESID ("org.peppol.pint", "invoice", "1.0.1");
public static final VESID VID_OPENPEPPOL_PINT_CREDIT_NOTE_1_0_1 = new VESID ("org.peppol.pint",
"credit-note",
"1.0.1");
public static final VESID VID_OPENPEPPOL_PINT_INVOICE_1_0_1 = new VESID (GROUP_ID, "invoice", "1.0.1");
public static final VESID VID_OPENPEPPOL_PINT_CREDIT_NOTE_1_0_1 = new VESID (GROUP_ID, "credit-note", "1.0.1");

// 1.0.2
public static final ClassPathResource RES_OPENPEPPOL_PINT_INVOICE_1_0_2 = new ClassPathResource (BASE_PATH +
"1.0.2/xslt/PINT-UBL-validation-preprocessed-inv.xslt",
_getCL ());
public static final ClassPathResource RES_OPENPEPPOL_PINT_CREDIT_NOTE_1_0_2 = new ClassPathResource (BASE_PATH +
"1.0.2/xslt/PINT-UBL-validation-preprocessed-cn.xslt",
_getCL ());
public static final VESID VID_OPENPEPPOL_PINT_INVOICE_1_0_2 = new VESID (GROUP_ID, "invoice", "1.0.2");
public static final VESID VID_OPENPEPPOL_PINT_CREDIT_NOTE_1_0_2 = new VESID (GROUP_ID, "credit-note", "1.0.2");

private PeppolValidationPINT ()
{}
Expand All @@ -94,7 +101,7 @@ public static void init (@Nonnull final IValidationExecutorSetRegistry <IValidat
final boolean bDeprecated = true;
final boolean bNotDeprecated = false;

// 1.0.0
// 1.0.0 - 2023-07-07
{
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_OPENPEPPOL_PINT_INVOICE_1_0_0,
"OpenPeppol PINT Invoice (UBL) 1.0.0",
Expand All @@ -110,7 +117,7 @@ public static void init (@Nonnull final IValidationExecutorSetRegistry <IValidat
aNSCtxCreditNote)));
}

// 1.0.1
// 1.0.1 - November 2023
{
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_OPENPEPPOL_PINT_INVOICE_1_0_1,
"OpenPeppol PINT Invoice (UBL) 1.0.1",
Expand All @@ -125,5 +132,21 @@ public static void init (@Nonnull final IValidationExecutorSetRegistry <IValidat
ValidationExecutorSchematron.createXSLT (RES_OPENPEPPOL_PINT_1_0_1,
aNSCtxCreditNote)));
}

// 1.0.2 - May 2024
{
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_OPENPEPPOL_PINT_INVOICE_1_0_2,
"OpenPeppol PINT Invoice (UBL) 1.0.2",
_createStatus (bNotDeprecated),
ValidationExecutorXSD.create (UBL21Marshaller.getAllInvoiceXSDs ()),
ValidationExecutorSchematron.createXSLT (RES_OPENPEPPOL_PINT_INVOICE_1_0_2,
aNSCtxInvoice)));
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_OPENPEPPOL_PINT_CREDIT_NOTE_1_0_2,
"OpenPeppol PINT Credit Note (UBL) 1.0.2",
_createStatus (bNotDeprecated),
ValidationExecutorXSD.create (UBL21Marshaller.getAllCreditNoteXSDs ()),
ValidationExecutorSchematron.createXSLT (RES_OPENPEPPOL_PINT_CREDIT_NOTE_1_0_2,
aNSCtxCreditNote)));
}
}
}
Loading

0 comments on commit f867b9b

Please sign in to comment.