psdi.iface.bidi.core

Class BidiTransformer

  • java.lang.Object
    • psdi.iface.bidi.core.BidiTransformer


  • public class BidiTransformer
    extends java.lang.Object
    This class is used to perform Bidi layout transformation between two sets of Bidi attributes stored in two instances of the class BidiAttributes
    • Constructor Summary

      Constructors 
      Constructor and Description
      BidiTransformer(BidiAttributes inAttrs, BidiAttributes outAttrs)
      Set the input and output Bidi attributes of the {@link BidiAttributes)
      BidiTransformer(BidiAttributes inAttrs, BidiAttributes outAttrs, boolean exceptIfEqual)
      Set the input and output Bidi attributes of the {@link BidiAttributes)
      BidiTransformer(java.lang.String inFormat, java.lang.String outFormat)
      Set the input and output Bidi attributes of the {@link BidiAttributes)
      BidiTransformer(java.lang.String inFormat, java.lang.String outFormat, boolean exceptIfEqual)
      Set the input and output Bidi attributes of the {@link BidiAttributes)
    • Constructor Detail

      • BidiTransformer

        public BidiTransformer(BidiAttributes inAttrs,
                               BidiAttributes outAttrs)
                        throws BidiTransformationException
        Set the input and output Bidi attributes of the {@link BidiAttributes)
        Parameters:
        inAttrs - attributes for the input text. inAttr Can't be null.
        outAttrs - attributes for the transformed text. outAttr Can't be null. exceptIfEqual is passed by false to disable throwing exception if the in & out attributes are equal For default attributes initialization call getDefaultBidiAttributes()
        Throws:
        BidiTransformationException
      • BidiTransformer

        public BidiTransformer(BidiAttributes inAttrs,
                               BidiAttributes outAttrs,
                               boolean exceptIfEqual)
                        throws BidiTransformationException
        Set the input and output Bidi attributes of the {@link BidiAttributes)
        Parameters:
        inAttrs - attributes for the input text. inAttr Can't be null.
        outAttrs - attributes for the transformed text. outAttr Can't be null.
        exceptIfEqual - direct the transformer to throw exception if equal in & out attributes For default attributes initialization call getDefaultBidiAttributes()
        Throws:
        BidiTransformationException
      • BidiTransformer

        public BidiTransformer(java.lang.String inFormat,
                               java.lang.String outFormat)
                        throws BidiTransformationException
        Set the input and output Bidi attributes of the {@link BidiAttributes)
        Parameters:
        inFormat - flag-set attributes for the input text. Can't be null.
        outFormat - flag-set attributes for the transformed text. Can't be null. exceptIfEqual is passed by false to disable throwing exception if the in & out attributes are equal
        Throws:
        BidiTransformationException
      • BidiTransformer

        public BidiTransformer(java.lang.String inFormat,
                               java.lang.String outFormat,
                               boolean exceptIfEqual)
                        throws BidiTransformationException
        Set the input and output Bidi attributes of the {@link BidiAttributes)
        Parameters:
        inFormat - flag-set attributes for the input text. Can't be null.
        outFormat - flag-set attributes for the transformed text. Can't be null.
        exceptIfEqual - direct the transformer to throw exception if equal in & out attributes
        Throws:
        BidiTransformationException
    • Method Detail

      • transform

        public java.lang.String transform(java.lang.String text)
                                   throws BidiTransformationException
        Perform Bidi transformation based on input and output attributes
        Parameters:
        text - to be transformed according to the previously initialized in & out attributes
        Returns:
        the transformed Bidi text if the transformer is initialized, or the passed text if not The transformer will be null in case of equal in & out attributes are passed to it.
        Throws:
        BidiTransformationException - enclosing ArabicShapingException