Package jadex.xml

Class AttributeConverter

  • All Implemented Interfaces:
    jadex.commons.transformation.IObjectStringConverter, jadex.commons.transformation.IStringObjectConverter, IAttributeConverter

    public class AttributeConverter
    extends java.lang.Object
    implements IAttributeConverter
    Converter for attributes. Consist of a string-object and a object-string converter. The first for reading the second for writing.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected jadex.commons.transformation.IObjectStringConverter osconv
      The object string converter.
      protected jadex.commons.transformation.IStringObjectConverter soconv
      The string object converter.
    • Constructor Summary

      Constructors 
      Constructor Description
      AttributeConverter​(jadex.commons.transformation.IStringObjectConverter soconv, jadex.commons.transformation.IObjectStringConverter osconv)
      Create a new attribute converter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String convertObject​(java.lang.Object val, java.lang.Object context)
      Convert a value to a string type.
      java.lang.Object convertString​(java.lang.String val, java.lang.Object context)
      Convert a string value to another type.
      • Methods inherited from class java.lang.Object

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

      • soconv

        protected jadex.commons.transformation.IStringObjectConverter soconv
        The string object converter.
      • osconv

        protected jadex.commons.transformation.IObjectStringConverter osconv
        The object string converter.
    • Constructor Detail

      • AttributeConverter

        public AttributeConverter​(jadex.commons.transformation.IStringObjectConverter soconv,
                                  jadex.commons.transformation.IObjectStringConverter osconv)
        Create a new attribute converter.
    • Method Detail

      • convertString

        public java.lang.Object convertString​(java.lang.String val,
                                              java.lang.Object context)
                                       throws java.lang.Exception
        Convert a string value to another type.
        Specified by:
        convertString in interface jadex.commons.transformation.IStringObjectConverter
        Parameters:
        val - The value to convert.
        Throws:
        java.lang.Exception
      • convertObject

        public java.lang.String convertObject​(java.lang.Object val,
                                              java.lang.Object context)
        Convert a value to a string type.
        Specified by:
        convertObject in interface jadex.commons.transformation.IObjectStringConverter
        Parameters:
        val - The value to convert.