Class ClassificationSystemVersion

    • Constructor Detail

      • ClassificationSystemVersion

        public ClassificationSystemVersion()
    • Method Detail

      • toString

        public java.lang.String toString()
        Description copied from class: Item
        Returns the String representation of this item. This is by default the representation of the primary key of this item.
        Overrides:
        toString in class CatalogVersion
        Returns:
        the String representation of this item.
        See Also:
        Object.toString()
      • getFullVersionName

        public java.lang.String getFullVersionName()
        Returns:
        the full classification system version name; that is systemId+"."+version
      • createClassificationAttribute

        public ClassificationAttribute createClassificationAttribute​(java.lang.String code)
                                                              throws ConsistencyCheckException
        Creates a new classification attribute. Ensures that the attribute code is unique within this system.
        Parameters:
        code - the code of the new attribute
        Throws:
        ConsistencyCheckException - in case an attribute exists holding the same code
      • getClassificationAttribute

        @Deprecated
        public ClassificationAttribute getClassificationAttribute​(java.lang.String code)
                                                           throws JaloItemNotFoundException
        Deprecated.
        since ages - use classificationSystemService.getAttributeForCode(systemVersion, code)
        Finds a classification attribute by its (unique) code.
        Parameters:
        code - the attribute code
        Throws:
        JaloItemNotFoundException - if no such attribute exists
      • getClassificationClass

        @Deprecated
        public ClassificationClass getClassificationClass​(java.lang.String code)
                                                   throws JaloItemNotFoundException
        Deprecated.
        since ages - use classificationSystemService.getClassForCode(systemVersion, code)
        Finds a classification class by its (unique) code.
        Parameters:
        code - the class code
        Throws:
        JaloItemNotFoundException - in case there is no such class
      • getClassificationClass

        public ClassificationClass getClassificationClass​(Product product)
                                                   throws JaloInvalidParameterException
        Returns the classification class within this system version which is used to classify the given product, or null if the product is not beeing classified by this system version.

        Please note that the product may be assigned to more than one classification class within this system though this should be rather an exception. In this case a exception is raised.

        Throws:
        JaloInvalidParameterException - if the product is assigned to more than one class of this system version
      • setClassificationClass

        public void setClassificationClass​(Product product,
                                           ClassificationClass classificationClass)
        Changes the class assignment of the given product to the given classification class from this system version without changing its class assignments regarding other systems or system versions.
        Parameters:
        product - the product to change classification for
        classificationClass - the new classification class to assign
      • getClassificationAttributeValue

        @Deprecated
        public ClassificationAttributeValue getClassificationAttributeValue​(java.lang.String code)
                                                                     throws JaloItemNotFoundException
        Deprecated.
        since ages - use classificationSystemService.getAttributeValueForCode(systemVersion, code)
        Finds a attribute value by its (unique) code.
        Parameters:
        code - the value code
        Throws:
        JaloItemNotFoundException - if no such value exists
      • createAttributeUnit

        public ClassificationAttributeUnit createAttributeUnit​(java.lang.String code,
                                                               java.lang.String symbol,
                                                               java.lang.String unitType,
                                                               double conversion)
                                                        throws ConsistencyCheckException,
                                                               JaloInvalidParameterException
        Creates a new attribute unit within this system. By specifying a unit type and a conversion factor this unit may be convertible with other units.
        Parameters:
        code - the unit code
        symbol - the unit symbol
        unitType - the unit type indetifier; all units with the same type are considered as beeing convertible
        conversion - only valid if unitType is set: specifies how values of this unit are measured in comparison to values of other convertible units; must be > 0 !
        Throws:
        ConsistencyCheckException - if a unit with the same code already exists
        JaloInvalidParameterException - if the conversion factor is <= 0
      • getAttributeUnit

        @Deprecated
        public ClassificationAttributeUnit getAttributeUnit​(java.lang.String code)
                                                     throws JaloItemNotFoundException
        Deprecated.
        since ages - use classificationSystemService.getAttributeUnitForCode(systemVersion, code)
        Finds an attribute unit by its unique code.
        Parameters:
        code - the unit code
        Throws:
        JaloItemNotFoundException - in case there is no such unit
      • getAttributeUnits

        @Deprecated
        public java.util.Collection<ClassificationAttributeUnit> getAttributeUnits()
        Deprecated.
        since ages - use classificationSystemService.getAttributeUnitsForSystemVersion(systemVersion)