Class TechnicalDataSubmodelTest


  • public abstract class TechnicalDataSubmodelTest
    extends java.lang.Object
    A test for the wrapped technical data submodel.
    Author:
    Holger Eichelberger, SSE
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      private static void assertBuildFail​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)
      Asserts that the submodel cannot be built as incomplete.
      private static void assertEquals​(de.iip_ecosphere.platform.support.aas.LangString expected, de.iip_ecosphere.platform.support.aas.LangString actual)
      Asserts that two LangString objects are equal.
      private static void assertEquals​(java.lang.String id, java.lang.String file, java.lang.String mime, de.iip_ecosphere.platform.support.aas.FileDataElement actual)
      Asserts that a file data element fits expected values.
      private static void assertEquals​(java.lang.String id, java.lang.String classSystem, java.lang.String classSystemVer, java.lang.String classId, de.iip_ecosphere.platform.support.aas.types.technicaldata.ProductClassificationItem actual)
      Asserts whether a ProductClassificationItem has expected information.
      private void assertFurtherInformation​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel tsub)
      Asserts the created properties of the further information submodel.
      private void assertGeneralInformation​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel tsub)
      Asserts the created properties of the further general information submodel.
      private void assertProductClassifications​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel tsub)
      Asserts the created properties of the product classifications submodel.
      private void assertTechnicalProperties​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel tsub)
      Asserts the created properties of the technical properties submodel.
      private void createFurtherInformation​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)
      Creates the further information submodel elements collection.
      private void createGeneralInformation​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)
      Creates the general information submodel elements collection.
      private void createProductClassifications​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)
      Creates the product classifications submodel elements collection.
      private void createTechnicalProperties​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)
      Creates the technical properties submodel elements collection.
      protected abstract java.lang.String getGeneralInformationManufacturerLogoId()
      Returns the Logo short ID of the manufacturer logo in GeneralInformation.
      void testTechnicalDataSubmodel()
      Tests the technical data.
      protected abstract java.lang.String toFurtherInformationStatementId​(java.lang.String id)
      Turns a plain id into an id as used by FurtherInformation.
      protected abstract java.lang.String toGeneralInformationProductImageFileId​(java.lang.String id)
      Turns a plain id into an id as used by GeneralInformation for product images.
      protected abstract java.lang.String toTechnicalPropertiesMainSectionId​(java.lang.String id)
      Turns a plain id into an id as used by TechnicalProperties for main sections.
      protected abstract java.lang.String toTechnicalPropertiesSubSectionId​(java.lang.String id)
      Turns a plain id into an id as used by TechnicalProperties for sub sections.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • cal

        private javax.xml.datatype.XMLGregorianCalendar cal
      • manufacturerName

        private java.lang.String manufacturerName
      • manufacturerPartNumber

        private java.lang.String manufacturerPartNumber
      • manufacturerProductDesignation

        private de.iip_ecosphere.platform.support.aas.LangString manufacturerProductDesignation
      • manufacturerOrderCode

        private java.lang.String manufacturerOrderCode
      • furtherInformationStmt1

        private de.iip_ecosphere.platform.support.aas.LangString furtherInformationStmt1
      • furtherInformationStmt2

        private de.iip_ecosphere.platform.support.aas.LangString furtherInformationStmt2
    • Constructor Detail

      • TechnicalDataSubmodelTest

        public TechnicalDataSubmodelTest()
    • Method Detail

      • toFurtherInformationStatementId

        protected abstract java.lang.String toFurtherInformationStatementId​(java.lang.String id)
        Turns a plain id into an id as used by FurtherInformation. Although defined by standards, implementation my do that ultimately in individual manner.
        Parameters:
        id - the plain id
        Returns:
        the transformed id
      • getGeneralInformationManufacturerLogoId

        protected abstract java.lang.String getGeneralInformationManufacturerLogoId()
        Returns the Logo short ID of the manufacturer logo in GeneralInformation.
        Returns:
        the id
      • toGeneralInformationProductImageFileId

        protected abstract java.lang.String toGeneralInformationProductImageFileId​(java.lang.String id)
        Turns a plain id into an id as used by GeneralInformation for product images. Although defined by standards, implementation my do that ultimately in individual manner.
        Parameters:
        id - the plain id
        Returns:
        the transformed id
      • toTechnicalPropertiesMainSectionId

        protected abstract java.lang.String toTechnicalPropertiesMainSectionId​(java.lang.String id)
        Turns a plain id into an id as used by TechnicalProperties for main sections. Although defined by standards, implementation my do that ultimately in individual manner.
        Parameters:
        id - the plain id
        Returns:
        the transformed id
      • toTechnicalPropertiesSubSectionId

        protected abstract java.lang.String toTechnicalPropertiesSubSectionId​(java.lang.String id)
        Turns a plain id into an id as used by TechnicalProperties for sub sections. Although defined by standards, implementation my do that ultimately in individual manner.
        Parameters:
        id - the plain id
        Returns:
        the transformed id
      • testTechnicalDataSubmodel

        public void testTechnicalDataSubmodel()
                                       throws javax.xml.datatype.DatatypeConfigurationException
        Tests the technical data.
        Throws:
        javax.xml.datatype.DatatypeConfigurationException - if XML gregorian calendar is not available
      • createFurtherInformation

        private void createFurtherInformation​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)
                                       throws javax.xml.datatype.DatatypeConfigurationException
        Creates the further information submodel elements collection.
        Parameters:
        tdSmBuilder - the technical data submodel builder
        Throws:
        javax.xml.datatype.DatatypeConfigurationException - shall not occur
      • createGeneralInformation

        private void createGeneralInformation​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)
        Creates the general information submodel elements collection.
        Parameters:
        tdSmBuilder - the general information submodel builder
      • createProductClassifications

        private void createProductClassifications​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)
        Creates the product classifications submodel elements collection.
        Parameters:
        tdSmBuilder - the product classifications submodel builder
      • createTechnicalProperties

        private void createTechnicalProperties​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)
        Creates the technical properties submodel elements collection.
        Parameters:
        tdSmBuilder - the technical properties submodel builder
      • assertBuildFail

        private static void assertBuildFail​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)
        Asserts that the submodel cannot be built as incomplete.
        Parameters:
        tdSmBuilder - the technical data submodel builder
      • assertFurtherInformation

        private void assertFurtherInformation​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel tsub)
        Asserts the created properties of the further information submodel.
        Parameters:
        tsub - the technical data submodel
      • assertGeneralInformation

        private void assertGeneralInformation​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel tsub)
        Asserts the created properties of the further general information submodel.
        Parameters:
        tsub - the general information submodel
      • assertEquals

        private static void assertEquals​(de.iip_ecosphere.platform.support.aas.LangString expected,
                                         de.iip_ecosphere.platform.support.aas.LangString actual)
        Asserts that two LangString objects are equal.
        Parameters:
        expected - the expected instance
        actual - the actual instance
      • assertEquals

        private static void assertEquals​(java.lang.String id,
                                         java.lang.String file,
                                         java.lang.String mime,
                                         de.iip_ecosphere.platform.support.aas.FileDataElement actual)
        Asserts that a file data element fits expected values.
        Parameters:
        id - the id of the element, if null actual must be null
        file - the file
        mime - the mime type
        actual - the actual file data element to assert
      • assertProductClassifications

        private void assertProductClassifications​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel tsub)
        Asserts the created properties of the product classifications submodel.
        Parameters:
        tsub - the product classifications submodel
      • assertEquals

        private static void assertEquals​(java.lang.String id,
                                         java.lang.String classSystem,
                                         java.lang.String classSystemVer,
                                         java.lang.String classId,
                                         de.iip_ecosphere.platform.support.aas.types.technicaldata.ProductClassificationItem actual)
        Asserts whether a ProductClassificationItem has expected information.
        Parameters:
        id - the id of the element, if null actual must be null
        classSystem - the classification system name
        classSystemVer - the optional classification system version (may be null for not present)
        classId - the classification identifier
        actual - the actual classification item
      • assertTechnicalProperties

        private void assertTechnicalProperties​(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel tsub)
        Asserts the created properties of the technical properties submodel.
        Parameters:
        tsub - the technical properties submodel