gt:         protected String getStringValue(){
context: /*
  
     Licensed to the Apache Software Foundation (ASF) under one or more
     contributor license agreements.  See the NOTICE file distributed with
     this work for additional information regarding copyright ownership.
     The ASF licenses this file to You under the Apache License, Version 2.0
     (the "License"); you may not use this file except in compliance with
     the License.  You may obtain a copy of the License at
  
         http://www.apache.org/licenses/LICENSE-2.0
  
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
  
   */
  package org.apache.batik.dom.svg;
  
  import org.apache.batik.parser.DefaultPathHandler;
  import org.apache.batik.parser.ParseException;
  import org.apache.batik.parser.PathParser;
  import org.w3c.dom.DOMException;
  import org.w3c.dom.svg.SVGException;
  import org.w3c.dom.svg.SVGPathSeg;
  import org.w3c.dom.svg.SVGPathSegArcAbs;
  import org.w3c.dom.svg.SVGPathSegArcRel;
  import org.w3c.dom.svg.SVGPathSegCurvetoCubicAbs;
  import org.w3c.dom.svg.SVGPathSegCurvetoCubicRel;
  import org.w3c.dom.svg.SVGPathSegCurvetoCubicSmoothAbs;
  import org.w3c.dom.svg.SVGPathSegCurvetoCubicSmoothRel;
  import org.w3c.dom.svg.SVGPathSegCurvetoQuadraticAbs;
  import org.w3c.dom.svg.SVGPathSegCurvetoQuadraticRel;
  import org.w3c.dom.svg.SVGPathSegCurvetoQuadraticSmoothAbs;
  import org.w3c.dom.svg.SVGPathSegCurvetoQuadraticSmoothRel;
  import org.w3c.dom.svg.SVGPathSegLinetoAbs;
  import org.w3c.dom.svg.SVGPathSegLinetoHorizontalAbs;
  import org.w3c.dom.svg.SVGPathSegLinetoHorizontalRel;
  import org.w3c.dom.svg.SVGPathSegLinetoRel;
  import org.w3c.dom.svg.SVGPathSegLinetoVerticalAbs;
  import org.w3c.dom.svg.SVGPathSegLinetoVerticalRel;
  import org.w3c.dom.svg.SVGPathSegList;
  import org.w3c.dom.svg.SVGPathSegMovetoAbs;
  import org.w3c.dom.svg.SVGPathSegMovetoRel;
  
  /**
   * This class is the implementation of
   * <code>SVGPathSegList</code>.
   *
   * @author nicolas.socheleau@bitflash.com
   * @version $Id: AbstractSVGPathSegList.java 1664314 2015-03-05 11:45:15Z lbernardo $
   */
  public abstract class AbstractSVGPathSegList
      extends AbstractSVGList
      implements SVGPathSegList,
                 SVGPathSegConstants {
  
      /**
       * Separator for a point list.
       */
      public static final String SVG_PATHSEG_LIST_SEPARATOR
          =" ";
  
      /**
       * Creates a new SVGPathSegList.
       */
      protected AbstractSVGPathSegList() {
          super();
      }
  
      /**
       * Return the separator between segments in the list.
       */
      protected String getItemSeparator(){
          return SVG_PATHSEG_LIST_SEPARATOR;
      }
  
      /**
       * Create an SVGException when the checkItemType fails.
       *
       * @return SVGException
       */
      protected abstract SVGException createSVGException(short type,
                                                         String key,
                                                         Object[] args);
  
  
      /**
       */
      public SVGPathSeg initialize ( SVGPathSeg newItem )
          throws DOMException, SVGException {
  
          return (SVGPathSeg)initializeImpl(newItem);
      }
  
      /**
       */
      public SVGPathSeg getItem ( int index )
          throws DOMException {
  
          return (SVGPathSeg)getItemImpl(index);
      }
  
      /**
       */
      public SVGPathSeg insertItemBefore ( SVGPathSeg newItem, int index )
          throws DOMException, SVGException {
  
          return (SVGPathSeg)insertItemBeforeImpl(newItem,index);
      }
  
      /**
       */
      public SVGPathSeg replaceItem ( SVGPathSeg newItem, int index )
          throws DOMException, SVGException {
  
          return (SVGPathSeg)replaceItemImpl(newItem,index);
      }
  
      /**
       */
      public SVGPathSeg removeItem ( int index )
          throws DOMException {
  
          return (SVGPathSeg)removeItemImpl(index);
      }
  
      /**
       */
      public SVGPathSeg appendItem ( SVGPathSeg newItem )
          throws DOMException, SVGException {
  
          return (SVGPathSeg) appendItemImpl(newItem);
      }
  
      /**
       */
      protected SVGItem createSVGItem(Object newItem){
  
          SVGPathSeg pathSeg = (SVGPathSeg)newItem;
  
          return createPathSegItem(pathSeg);
      }
  
      /**
       * Parse the 'd' attribute.
       *
       * @param value 'd' attribute value
       * @param handler : list handler
       */
      protected void doParse(String value, ListHandler handler)
          throws ParseException{
  
          PathParser pathParser = new PathParser();
  
          PathSegListBuilder builder = new PathSegListBuilder(handler);
  
          pathParser.setPathHandler(builder);
          pathParser.parse(value);
  
      }
  
      /**
       * Check if the item is an SVGPathSeg.
       */
      protected void checkItemType(Object newItem){
          if ( !( newItem instanceof SVGPathSeg ) ){
              createSVGException(SVGException.SVG_WRONG_TYPE_ERR,
                                 "expected SVGPathSeg",
                                 null);
          }
      }
  
      /**
       * create an SVGItem representing this SVGPathSeg.
       */
      protected SVGPathSegItem createPathSegItem(SVGPathSeg pathSeg){
  
          SVGPathSegItem pathSegItem = null;
  
          short type = pathSeg.getPathSegType();
  
          switch(type){
          case SVGPathSeg.PATHSEG_ARC_ABS:
          case SVGPathSeg.PATHSEG_ARC_REL:
              pathSegItem = new SVGPathSegArcItem(pathSeg);
              break;
          case SVGPathSeg.PATHSEG_CLOSEPATH:
              pathSegItem = new SVGPathSegItem(pathSeg);
              break;
          case SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:
          case SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:
              pathSegItem = new SVGPathSegCurvetoCubicItem(pathSeg);
              break;
          case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:
          case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:
              pathSegItem = new SVGPathSegCurvetoCubicSmoothItem(pathSeg);
              break;
          case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:
          case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:
              pathSegItem = new SVGPathSegCurvetoQuadraticItem(pathSeg);
              break;
          case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:
          case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:
              pathSegItem = new SVGPathSegCurvetoQuadraticSmoothItem(pathSeg);
              break;
          case SVGPathSeg.PATHSEG_LINETO_ABS:
          case SVGPathSeg.PATHSEG_LINETO_REL:
          case SVGPathSeg.PATHSEG_MOVETO_ABS:
          case SVGPathSeg.PATHSEG_MOVETO_REL:
              pathSegItem = new SVGPathSegMovetoLinetoItem(pathSeg);
              break;
          case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:
          case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:
              pathSegItem = new SVGPathSegLinetoHorizontalItem(pathSeg);
              break;
          case SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:
          case SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:
              pathSegItem = new SVGPathSegLinetoVerticalItem(pathSeg);
              break;
          default:
          }
          return pathSegItem;
      }
  
      public class SVGPathSegMovetoLinetoItem extends SVGPathSegItem
          implements SVGPathSegMovetoAbs,
                     SVGPathSegMovetoRel,
                     SVGPathSegLinetoAbs,
                     SVGPathSegLinetoRel {
  
          public SVGPathSegMovetoLinetoItem(short type, String letter,
                                            float x, float y){
              super(type,letter);
              this.setX(x);
              this.setY(y);
          }
  
          public SVGPathSegMovetoLinetoItem(SVGPathSeg pathSeg){
              type = pathSeg.getPathSegType();
              switch(type){
              case SVGPathSeg.PATHSEG_LINETO_REL:
                  letter = PATHSEG_LINETO_REL_LETTER;
                  setX(((SVGPathSegLinetoRel)pathSeg).getX());
                  setY(((SVGPathSegLinetoRel)pathSeg).getY());
                  break;
              case SVGPathSeg.PATHSEG_LINETO_ABS:
                  letter = PATHSEG_LINETO_ABS_LETTER;
                  setX(((SVGPathSegLinetoAbs)pathSeg).getX());
                  setY(((SVGPathSegLinetoAbs)pathSeg).getY());
                  break;
              case SVGPathSeg.PATHSEG_MOVETO_REL:
                  letter = PATHSEG_MOVETO_REL_LETTER;
                  setX(((SVGPathSegMovetoRel)pathSeg).getX());
                  setY(((SVGPathSegMovetoRel)pathSeg).getY());
                  break;
              case SVGPathSeg.PATHSEG_MOVETO_ABS:
                  letter = PATHSEG_MOVETO_ABS_LETTER;
                  setX(((SVGPathSegMovetoAbs)pathSeg).getX());
                  setY(((SVGPathSegMovetoAbs)pathSeg).getY());
                  break;
              default:
              }
          }
  
          public void setX(float x){
              super.setX(x);
              resetAttribute();
          }
          public void setY(float y){
              super.setY(y);
              resetAttribute();
          }
  
  