Skip to content

Commit

Permalink
Added EN 16931 rules 1.3.12; deprecated 1.3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Apr 10, 2024
1 parent 3435682 commit 87830c9
Show file tree
Hide file tree
Showing 37 changed files with 36,996 additions and 21 deletions.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public final class EN16931Validation
private static final String VERSION_139 = "1.3.9";
private static final String VERSION_1310 = "1.3.10";
private static final String VERSION_1311 = "1.3.11";
private static final String VERSION_1312 = "1.3.12";

// CII
@Deprecated
Expand Down Expand Up @@ -98,8 +99,10 @@ public final class EN16931Validation
public static final VESID VID_CII_138 = new VESID (GROUP_ID, "cii", VERSION_138);
@Deprecated
public static final VESID VID_CII_139 = new VESID (GROUP_ID, "cii", VERSION_139);
@Deprecated
public static final VESID VID_CII_1310 = new VESID (GROUP_ID, "cii", VERSION_1310);
public static final VESID VID_CII_1311 = new VESID (GROUP_ID, "cii", VERSION_1311);
public static final VESID VID_CII_1312 = new VESID (GROUP_ID, "cii", VERSION_1312);

// UBL
@Deprecated
Expand Down Expand Up @@ -134,8 +137,10 @@ public final class EN16931Validation
public static final VESID VID_UBL_INVOICE_138 = new VESID (GROUP_ID, "ubl", VERSION_138);
@Deprecated
public static final VESID VID_UBL_INVOICE_139 = new VESID (GROUP_ID, "ubl", VERSION_139);
@Deprecated
public static final VESID VID_UBL_INVOICE_1310 = new VESID (GROUP_ID, "ubl", VERSION_1310);
public static final VESID VID_UBL_INVOICE_1311 = new VESID (GROUP_ID, "ubl", VERSION_1311);
public static final VESID VID_UBL_INVOICE_1312 = new VESID (GROUP_ID, "ubl", VERSION_1312);

@Deprecated
public static final VESID VID_UBL_CREDIT_NOTE_100 = new VESID (GROUP_ID, "ubl-creditnote", VERSION_100);
Expand Down Expand Up @@ -169,8 +174,10 @@ public final class EN16931Validation
public static final VESID VID_UBL_CREDIT_NOTE_138 = new VESID (GROUP_ID, "ubl-creditnote", VERSION_138);
@Deprecated
public static final VESID VID_UBL_CREDIT_NOTE_139 = new VESID (GROUP_ID, "ubl-creditnote", VERSION_139);
@Deprecated
public static final VESID VID_UBL_CREDIT_NOTE_1310 = new VESID (GROUP_ID, "ubl-creditnote", VERSION_1310);
public static final VESID VID_UBL_CREDIT_NOTE_1311 = new VESID (GROUP_ID, "ubl-creditnote", VERSION_1311);
public static final VESID VID_UBL_CREDIT_NOTE_1312 = new VESID (GROUP_ID, "ubl-creditnote", VERSION_1312);

@Nonnull
private static ClassLoader _getCL ()
Expand Down Expand Up @@ -246,12 +253,16 @@ private static ClassLoader _getCL ()
public static final IReadableResource INVOICE_CII_139_XSLT = new ClassPathResource (PREFIX +
"1.3.9/cii/EN16931-CII-validation.xslt",
_getCL ());
@Deprecated
public static final IReadableResource INVOICE_CII_1310_XSLT = new ClassPathResource (PREFIX +
"1.3.10/cii/EN16931-CII-validation.xslt",
_getCL ());
public static final IReadableResource INVOICE_CII_1311_XSLT = new ClassPathResource (PREFIX +
"1.3.11/cii/EN16931-CII-validation.xslt",
_getCL ());
public static final IReadableResource INVOICE_CII_1312_XSLT = new ClassPathResource (PREFIX +
"1.3.12/cii/EN16931-CII-validation.xslt",
_getCL ());

// UBL
@Deprecated
Expand Down Expand Up @@ -319,12 +330,16 @@ private static ClassLoader _getCL ()
public static final IReadableResource INVOICE_UBL_139_XSLT = new ClassPathResource (PREFIX +
"1.3.9/ubl/EN16931-UBL-validation.xslt",
_getCL ());
@Deprecated
public static final IReadableResource INVOICE_UBL_1310_XSLT = new ClassPathResource (PREFIX +
"1.3.10/ubl/EN16931-UBL-validation.xslt",
_getCL ());
public static final IReadableResource INVOICE_UBL_1311_XSLT = new ClassPathResource (PREFIX +
"1.3.11/ubl/EN16931-UBL-validation.xslt",
_getCL ());
public static final IReadableResource INVOICE_UBL_1312_XSLT = new ClassPathResource (PREFIX +
"1.3.12/ubl/EN16931-UBL-validation.xslt",
_getCL ());

private EN16931Validation ()
{}
Expand Down Expand Up @@ -464,7 +479,7 @@ public static void initEN16931 (@Nonnull final IValidationExecutorSetRegistry <I
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_CII_1310,
"EN 16931 CII " +
VID_CII_1310.getVersionString (),
bNotDeprecated,
bDeprecated,
ValidationExecutorXSD.create (CCIID16B.getXSDResource ()),
ValidationExecutorSchematron.createXSLT (INVOICE_CII_1310_XSLT,
CIID16BNamespaceContext.getInstance ())));
Expand All @@ -475,6 +490,13 @@ public static void initEN16931 (@Nonnull final IValidationExecutorSetRegistry <I
ValidationExecutorXSD.create (CCIID16B.getXSDResource ()),
ValidationExecutorSchematron.createXSLT (INVOICE_CII_1311_XSLT,
CIID16BNamespaceContext.getInstance ())));
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_CII_1312,
"EN 16931 CII " +
VID_CII_1312.getVersionString (),
bNotDeprecated,
ValidationExecutorXSD.create (CCIID16B.getXSDResource ()),
ValidationExecutorSchematron.createXSLT (INVOICE_CII_1312_XSLT,
CIID16BNamespaceContext.getInstance ())));
}

// UBL
Expand Down Expand Up @@ -739,14 +761,14 @@ public static void initEN16931 (@Nonnull final IValidationExecutorSetRegistry <I
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_UBL_INVOICE_1310,
"EN 16931 UBL Invoice " +
VID_UBL_INVOICE_1310.getVersionString (),
bNotDeprecated,
bDeprecated,
ValidationExecutorXSD.create (UBL21Marshaller.getAllInvoiceXSDs ()),
ValidationExecutorSchematron.createXSLT (INVOICE_UBL_1310_XSLT,
UBL21NamespaceContext.getInstance ())));
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_UBL_CREDIT_NOTE_1310,
"EN 16931 UBL Credit Note " +
VID_UBL_CREDIT_NOTE_1310.getVersionString (),
bNotDeprecated,
bDeprecated,
ValidationExecutorXSD.create (UBL21Marshaller.getAllCreditNoteXSDs ()),
ValidationExecutorSchematron.createXSLT (INVOICE_UBL_1310_XSLT,
UBL21NamespaceContext.getInstance ())));
Expand All @@ -766,6 +788,22 @@ public static void initEN16931 (@Nonnull final IValidationExecutorSetRegistry <I
ValidationExecutorXSD.create (UBL21Marshaller.getAllCreditNoteXSDs ()),
ValidationExecutorSchematron.createXSLT (INVOICE_UBL_1311_XSLT,
UBL21NamespaceContext.getInstance ())));

// 1.3.12
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_UBL_INVOICE_1312,
"EN 16931 UBL Invoice " +
VID_UBL_INVOICE_1312.getVersionString (),
bNotDeprecated,
ValidationExecutorXSD.create (UBL21Marshaller.getAllInvoiceXSDs ()),
ValidationExecutorSchematron.createXSLT (INVOICE_UBL_1312_XSLT,
UBL21NamespaceContext.getInstance ())));
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_UBL_CREDIT_NOTE_1312,
"EN 16931 UBL Credit Note " +
VID_UBL_CREDIT_NOTE_1312.getVersionString (),
bNotDeprecated,
ValidationExecutorXSD.create (UBL21Marshaller.getAllCreditNoteXSDs ()),
ValidationExecutorSchematron.createXSLT (INVOICE_UBL_1312_XSLT,
UBL21NamespaceContext.getInstance ())));
}
}
}
Loading

0 comments on commit 87830c9

Please sign in to comment.