Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Sep 16, 2024
1 parent ecccf2b commit d19ae2c
Show file tree
Hide file tree
Showing 70 changed files with 212 additions and 211 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.helger.commons.io.resource.IReadableResource;
import com.helger.phive.api.EValidationType;
import com.helger.phive.api.artefact.IValidationArtefact;
import com.helger.phive.api.execute.IValidationExecutor;
import com.helger.phive.api.executor.IValidationExecutor;
import com.helger.phive.xml.source.IValidationSourceXML;
import com.helger.schematron.pure.SchematronResourcePure;
import com.helger.schematron.sch.SchematronResourceSCH;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.junit.Test;

import com.helger.commons.io.resource.IReadableResource;
import com.helger.phive.api.execute.IValidationExecutor;
import com.helger.phive.api.executor.IValidationExecutor;
import com.helger.phive.api.executorset.IValidationExecutorSet;
import com.helger.phive.cii.mock.CTestFiles;
import com.helger.phive.rules.api.PhiveRulesTestHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import com.helger.phive.api.execute.ValidationExecutionManager;
import com.helger.phive.api.executorset.IValidationExecutorSet;
import com.helger.phive.api.mock.TestFile;
import com.helger.phive.api.mock.PhiveTestFile;
import com.helger.phive.api.result.ValidationResultList;
import com.helger.phive.api.validity.IValidityDeterminator;
import com.helger.phive.cii.mock.CTestFiles;
Expand All @@ -44,7 +44,7 @@ public final class ValidationExecutionManagerFuncTest
@Test
public void testApplyCompleteValidation ()
{
for (final TestFile aTestFile : CTestFiles.getAllTestFiles ())
for (final PhiveTestFile aTestFile : CTestFiles.getAllTestFiles ())
{
final IValidationExecutorSet <IValidationSourceXML> aExecutors = CTestFiles.VES_REGISTRY.getOfID (aTestFile.getVESID ());
assertNotNull (aExecutors);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import com.helger.commons.io.resource.IReadableResource;
import com.helger.diver.api.coord.DVRCoordinate;
import com.helger.phive.api.executorset.ValidationExecutorSetRegistry;
import com.helger.phive.api.mock.TestFile;
import com.helger.phive.api.mock.PhiveTestFile;
import com.helger.phive.cii.CIIValidation;
import com.helger.phive.xml.source.IValidationSourceXML;

Expand All @@ -48,14 +48,14 @@ private CTestFiles ()

@Nonnull
@ReturnsMutableCopy
public static ICommonsList <TestFile> getAllTestFiles ()
public static ICommonsList <PhiveTestFile> getAllTestFiles ()
{
final ICommonsList <TestFile> ret = new CommonsArrayList <> ();
final ICommonsList <PhiveTestFile> ret = new CommonsArrayList <> ();
for (final DVRCoordinate aESID : new DVRCoordinate [] { CIIValidation.VID_CII_D16B_CROSSINDUSTRYINVOICE })
for (final IReadableResource aRes : getAllMatchingTestFiles (aESID))
{
assertTrue ("Not existing test file: " + aRes.getPath (), aRes.exists ());
ret.add (TestFile.createGoodCase (aRes, aESID));
ret.add (PhiveTestFile.createGoodCase (aRes, aESID));
}
return ret;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.junit.Test;

import com.helger.commons.io.resource.IReadableResource;
import com.helger.phive.api.execute.IValidationExecutor;
import com.helger.phive.api.executor.IValidationExecutor;
import com.helger.phive.api.executorset.IValidationExecutorSet;
import com.helger.phive.ciuspt.mock.CTestFiles;
import com.helger.phive.rules.api.PhiveRulesTestHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

import com.helger.phive.api.execute.ValidationExecutionManager;
import com.helger.phive.api.executorset.IValidationExecutorSet;
import com.helger.phive.api.mock.TestFile;
import com.helger.phive.api.mock.PhiveTestFile;
import com.helger.phive.api.result.ValidationResultList;
import com.helger.phive.api.validity.IValidityDeterminator;
import com.helger.phive.ciuspt.mock.CTestFiles;
Expand All @@ -46,7 +46,7 @@ public final class ValidationExecutionManagerFuncTest
@Test
public void testApplyCompleteValidation ()
{
for (final TestFile aTestFile : CTestFiles.getAllTestFiles ())
for (final PhiveTestFile aTestFile : CTestFiles.getAllTestFiles ())
{
final IValidationExecutorSet <IValidationSourceXML> aExecutors = CTestFiles.VES_REGISTRY.getOfID (aTestFile.getVESID ());
assertNotNull (aExecutors);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import com.helger.commons.io.resource.IReadableResource;
import com.helger.diver.api.coord.DVRCoordinate;
import com.helger.phive.api.executorset.ValidationExecutorSetRegistry;
import com.helger.phive.api.mock.TestFile;
import com.helger.phive.api.mock.PhiveTestFile;
import com.helger.phive.ciuspt.CIUS_PTValidation;
import com.helger.phive.xml.source.IValidationSourceXML;

Expand All @@ -48,17 +48,17 @@ private CTestFiles ()

@Nonnull
@ReturnsMutableCopy
public static ICommonsList <TestFile> getAllTestFiles ()
public static ICommonsList <PhiveTestFile> getAllTestFiles ()
{
final ICommonsList <TestFile> ret = new CommonsArrayList <> ();
final ICommonsList <PhiveTestFile> ret = new CommonsArrayList <> ();
for (final DVRCoordinate aESID : new DVRCoordinate [] { CIUS_PTValidation.VID_CIUS_PT_UBL_CREDITNOTE_200,
CIUS_PTValidation.VID_CIUS_PT_UBL_INVOICE_200,
CIUS_PTValidation.VID_CIUS_PT_UBL_CREDITNOTE_211,
CIUS_PTValidation.VID_CIUS_PT_UBL_INVOICE_211 })
for (final IReadableResource aRes : getAllMatchingTestFiles (aESID))
{
assertTrue ("Not existing test file: " + aRes.getPath (), aRes.exists ());
ret.add (TestFile.createGoodCase (aRes, aESID));
ret.add (PhiveTestFile.createGoodCase (aRes, aESID));
}
return ret;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,6 @@ public final class CIUS_ROValidation
"ubl-invoice",
"1.0.8");

@Deprecated
private static final ClassPathResource RES_103 = new ClassPathResource ("/external/schematron/1.0.3/ROeFactura-UBL-validation-Invoice_v1.0.3.xslt",
_getCL ());

@Deprecated
private static final ClassPathResource RES_104 = new ClassPathResource ("/external/schematron/1.0.4/ROeFactura-UBL-validation-Invoice_v1.0.4.xslt",
_getCL ());

private static final ClassPathResource RES_108 = new ClassPathResource ("/external/schematron/1.0.8/ROeFactura-UBL-validation-Invoice_v1.0.8.xslt",
_getCL ());

private CIUS_ROValidation ()
{}

Expand All @@ -103,45 +92,57 @@ public static void initCIUS_RO (@Nonnull final IValidationExecutorSetRegistry <I
final boolean bNotDeprecated = false;

// V1.0.3 referencing the underlying EN rules
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.createDerived (aRegistry.getOfID (EN16931Validation.VID_UBL_CREDIT_NOTE_137),
VID_CIUS_RO_UBL_CREDITNOTE_103,
"CIUS-RO UBL Credit Note " +
VID_CIUS_RO_UBL_CREDITNOTE_103.getVersionString (),
PhiveRulesHelper.createSimpleStatus (bDeprecated),
PhiveRulesUBLHelper.createXSLT_UBL21 (RES_103)));
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.createDerived (aRegistry.getOfID (EN16931Validation.VID_UBL_INVOICE_137),
VID_CIUS_RO_UBL_INVOICE_103,
"CIUS-RO UBL Invoice " +
VID_CIUS_RO_UBL_INVOICE_103.getVersionString (),
PhiveRulesHelper.createSimpleStatus (bDeprecated),
PhiveRulesUBLHelper.createXSLT_UBL21 (RES_103)));
{
final ClassPathResource RES_103 = new ClassPathResource ("/external/schematron/1.0.3/ROeFactura-UBL-validation-Invoice_v1.0.3.xslt",
_getCL ());
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.createDerived (aRegistry.getOfID (EN16931Validation.VID_UBL_CREDIT_NOTE_137),
VID_CIUS_RO_UBL_CREDITNOTE_103,
"CIUS-RO UBL Credit Note " +
VID_CIUS_RO_UBL_CREDITNOTE_103.getVersionString (),
PhiveRulesHelper.createSimpleStatus (bDeprecated),
PhiveRulesUBLHelper.createXSLT_UBL21 (RES_103)));
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.createDerived (aRegistry.getOfID (EN16931Validation.VID_UBL_INVOICE_137),
VID_CIUS_RO_UBL_INVOICE_103,
"CIUS-RO UBL Invoice " +
VID_CIUS_RO_UBL_INVOICE_103.getVersionString (),
PhiveRulesHelper.createSimpleStatus (bDeprecated),
PhiveRulesUBLHelper.createXSLT_UBL21 (RES_103)));
}

// V1.0.4 referencing the underlying EN rules
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.createDerived (aRegistry.getOfID (EN16931Validation.VID_UBL_CREDIT_NOTE_137),
VID_CIUS_RO_UBL_CREDITNOTE_104,
"CIUS-RO UBL Credit Note " +
VID_CIUS_RO_UBL_CREDITNOTE_104.getVersionString (),
PhiveRulesHelper.createSimpleStatus (bDeprecated),
PhiveRulesUBLHelper.createXSLT_UBL21 (RES_104)));
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.createDerived (aRegistry.getOfID (EN16931Validation.VID_UBL_INVOICE_137),
VID_CIUS_RO_UBL_INVOICE_104,
"CIUS-RO UBL Invoice " +
VID_CIUS_RO_UBL_INVOICE_104.getVersionString (),
PhiveRulesHelper.createSimpleStatus (bDeprecated),
PhiveRulesUBLHelper.createXSLT_UBL21 (RES_104)));
{
final ClassPathResource RES_104 = new ClassPathResource ("/external/schematron/1.0.4/ROeFactura-UBL-validation-Invoice_v1.0.4.xslt",
_getCL ());
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.createDerived (aRegistry.getOfID (EN16931Validation.VID_UBL_CREDIT_NOTE_137),
VID_CIUS_RO_UBL_CREDITNOTE_104,
"CIUS-RO UBL Credit Note " +
VID_CIUS_RO_UBL_CREDITNOTE_104.getVersionString (),
PhiveRulesHelper.createSimpleStatus (bDeprecated),
PhiveRulesUBLHelper.createXSLT_UBL21 (RES_104)));
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.createDerived (aRegistry.getOfID (EN16931Validation.VID_UBL_INVOICE_137),
VID_CIUS_RO_UBL_INVOICE_104,
"CIUS-RO UBL Invoice " +
VID_CIUS_RO_UBL_INVOICE_104.getVersionString (),
PhiveRulesHelper.createSimpleStatus (bDeprecated),
PhiveRulesUBLHelper.createXSLT_UBL21 (RES_104)));
}

// V1.0.8 referencing the underlying EN rules, valid per 27.12.2022
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.createDerived (aRegistry.getOfID (EN16931Validation.VID_UBL_CREDIT_NOTE_138),
VID_CIUS_RO_UBL_CREDITNOTE_108,
"CIUS-RO UBL Credit Note " +
VID_CIUS_RO_UBL_CREDITNOTE_108.getVersionString (),
PhiveRulesHelper.createSimpleStatus (bNotDeprecated),
PhiveRulesUBLHelper.createXSLT_UBL21 (RES_108)));
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.createDerived (aRegistry.getOfID (EN16931Validation.VID_UBL_INVOICE_138),
VID_CIUS_RO_UBL_INVOICE_108,
"CIUS-RO UBL Invoice " +
VID_CIUS_RO_UBL_INVOICE_108.getVersionString (),
PhiveRulesHelper.createSimpleStatus (bNotDeprecated),
PhiveRulesUBLHelper.createXSLT_UBL21 (RES_108)));
{
final ClassPathResource RES_108 = new ClassPathResource ("/external/schematron/1.0.8/ROeFactura-UBL-validation-Invoice_v1.0.8.xslt",
_getCL ());
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.createDerived (aRegistry.getOfID (EN16931Validation.VID_UBL_CREDIT_NOTE_138),
VID_CIUS_RO_UBL_CREDITNOTE_108,
"CIUS-RO UBL Credit Note " +
VID_CIUS_RO_UBL_CREDITNOTE_108.getVersionString (),
PhiveRulesHelper.createSimpleStatus (bNotDeprecated),
PhiveRulesUBLHelper.createXSLT_UBL21 (RES_108)));
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.createDerived (aRegistry.getOfID (EN16931Validation.VID_UBL_INVOICE_138),
VID_CIUS_RO_UBL_INVOICE_108,
"CIUS-RO UBL Invoice " +
VID_CIUS_RO_UBL_INVOICE_108.getVersionString (),
PhiveRulesHelper.createSimpleStatus (bNotDeprecated),
PhiveRulesUBLHelper.createXSLT_UBL21 (RES_108)));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.junit.Test;

import com.helger.commons.io.resource.IReadableResource;
import com.helger.phive.api.execute.IValidationExecutor;
import com.helger.phive.api.executor.IValidationExecutor;
import com.helger.phive.api.executorset.IValidationExecutorSet;
import com.helger.phive.ciusro.mock.CTestFiles;
import com.helger.phive.rules.api.PhiveRulesTestHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

import com.helger.phive.api.execute.ValidationExecutionManager;
import com.helger.phive.api.executorset.IValidationExecutorSet;
import com.helger.phive.api.mock.TestFile;
import com.helger.phive.api.mock.PhiveTestFile;
import com.helger.phive.api.result.ValidationResultList;
import com.helger.phive.api.validity.IValidityDeterminator;
import com.helger.phive.ciusro.mock.CTestFiles;
Expand All @@ -46,7 +46,7 @@ public final class ValidationExecutionManagerFuncTest
@Test
public void testApplyCompleteValidation ()
{
for (final TestFile aTestFile : CTestFiles.getAllTestFiles ())
for (final PhiveTestFile aTestFile : CTestFiles.getAllTestFiles ())
{
final IValidationExecutorSet <IValidationSourceXML> aExecutors = CTestFiles.VES_REGISTRY.getOfID (aTestFile.getVESID ());
assertNotNull (aExecutors);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import com.helger.commons.io.resource.IReadableResource;
import com.helger.diver.api.coord.DVRCoordinate;
import com.helger.phive.api.executorset.ValidationExecutorSetRegistry;
import com.helger.phive.api.mock.TestFile;
import com.helger.phive.api.mock.PhiveTestFile;
import com.helger.phive.ciusro.CIUS_ROValidation;
import com.helger.phive.en16931.EN16931Validation;
import com.helger.phive.xml.source.IValidationSourceXML;
Expand All @@ -50,9 +50,9 @@ private CTestFiles ()

@Nonnull
@ReturnsMutableCopy
public static ICommonsList <TestFile> getAllTestFiles ()
public static ICommonsList <PhiveTestFile> getAllTestFiles ()
{
final ICommonsList <TestFile> ret = new CommonsArrayList <> ();
final ICommonsList <PhiveTestFile> ret = new CommonsArrayList <> ();
for (final DVRCoordinate aESID : new DVRCoordinate [] { CIUS_ROValidation.VID_CIUS_RO_UBL_CREDITNOTE_103,
CIUS_ROValidation.VID_CIUS_RO_UBL_INVOICE_103,

Expand All @@ -64,7 +64,7 @@ public static ICommonsList <TestFile> getAllTestFiles ()
for (final IReadableResource aRes : getAllMatchingTestFiles (aESID))
{
assertTrue ("Not existing test file: " + aRes.getPath (), aRes.exists ());
ret.add (TestFile.createGoodCase (aRes, aESID));
ret.add (PhiveTestFile.createGoodCase (aRes, aESID));
}
return ret;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.junit.Test;

import com.helger.commons.io.resource.IReadableResource;
import com.helger.phive.api.execute.IValidationExecutor;
import com.helger.phive.api.executor.IValidationExecutor;
import com.helger.phive.api.executorset.IValidationExecutorSet;
import com.helger.phive.ebinterface.mock.CTestFiles;
import com.helger.phive.rules.api.PhiveRulesTestHelper;
Expand Down
Loading

0 comments on commit d19ae2c

Please sign in to comment.