Package org.apache.fop.apps

Examples of org.apache.fop.apps.FOPException


    public static void handleException(Log log, Exception e, boolean strict) throws FOPException {
        if (strict) {
            if (e instanceof FOPException) {
                throw (FOPException)e;
            }
            throw new FOPException(e);
        }
        log.error(e.getMessage());
    }
View Full Code Here


  throws FOPException {
  super(parent, propertyList);
  this.name = "fo:basic-link";

  if (parent.getName().equals("fo:flow")) {
      throw new FOPException("basic-link can't be directly"
           + " under flow");
  }
    }
View Full Code Here

        {
            linkType=LinkSet.EXTERNAL;
        }
        else
        {
            throw new FOPException("internal-destination or external-destination must be specified in basic-link");
        }

  if (this.marker == START) {
      // initialize id
            String id = this.properties.get("id").getString();
View Full Code Here

    this.name =  "fo:root";
   
    pageSequences = new Vector();
    if (parent != null)
    {
      throw new FOPException("root must be root element");
    }
  }
View Full Code Here

  public void format(AreaTree areaTree) throws FOPException
  {
//  MessageHandler.errorln(" Root[" + marker + "] ");
    if(layoutMasterSet == null)
    {
      throw new FOPException("No layout master set.");
    }
   
    Enumeration e = pageSequences.elements();
    while (e.hasMoreElements())
    {
View Full Code Here

              this.properties.get("white-space-collapse").getEnum();

            this.refId = this.properties.get("ref-id").getString();

            if (this.refId.equals("")) {
                throw new FOPException("page-number-citation must contain \"ref-id\"");
            }

            // create id
            this.id = this.properties.get("id").getString();
            idReferences.createID(id);
View Full Code Here

           + "a master-name and so is being ignored");
      } else {
    this.layoutMasterSet.addSimplePageMaster(this);
      }
  } else {
      throw new FOPException("fo:simple-page-master must be child "
           + "of fo:layout-master-set, not "
           + parent.getName());
  }
  _regions = new Hashtable();
 
View Full Code Here

    protected void addRegion(Region region)
  throws FOPException
    {
  if (_regions.containsKey(region.getRegionClass())) {
      throw new FOPException("Only one region of class "+region.getRegionClass()+" allowed within a simple-page-master.");
  }
  else {
      _regions.put(region.getRegionClass(), region);
  }
    }
View Full Code Here

  else {
      setRegionName(this.properties.get(PROP_REGION_NAME).getString());
      // check that name is OK. Not very pretty.
      if (isReserved(getRegionName()) &&
    !getRegionName().equals(getDefaultRegionName())) {
    throw new FOPException(PROP_REGION_NAME+" '" + _regionName
               + "' for "+this.name+" not permitted.");
      }
  }

  if (parent.getName().equals("fo:simple-page-master")) {
      _layoutMaster = (SimplePageMaster) parent;
      getPageMaster().addRegion(this);
  } else {
      throw new FOPException(getElementName()+" must be child "
           + "of simple-page-master, not "
           + parent.getName());
  }
    }
View Full Code Here

            this.root.addPageSequence(this);
        }
        else
        {
            throw
            new FOPException("page-sequence must be child of root, not "
            + parent.getName());
        }
 
        layoutMasterSet = root.getLayoutMasterSet();

  // best time to run some checks on LayoutMasterSet
        layoutMasterSet.checkRegionNames();

  _flowMap = new Hashtable();

        thisIsFirstPage=true; // we are now on the first page of the page sequence
        String ipnValue= this.properties.get("initial-page-number").getString();

        if ( ipnValue.equals("auto") )
        {
            pageNumberType=AUTO;           
        }
        else if ( ipnValue.equals("auto-even") )
        {
            pageNumberType=AUTO_EVEN;           
        }
        else if ( ipnValue.equals("auto-odd") )
        {
            pageNumberType=AUTO_ODD;           
        }
        else
        {
            pageNumberType=EXPLICIT;           
            try
            {
                int pageStart = new Integer(ipnValue).intValue();
                this.currentPageNumber = (pageStart > 0) ? pageStart - 1 : 0;
            }
            catch ( NumberFormatException nfe )
            {
                throw new FOPException("\""+ipnValue+"\" is not a valid value for initial-page-number");
            }
        }

        masterName = this.properties.get("master-name").getString();
 
View Full Code Here

TOP

Related Classes of org.apache.fop.apps.FOPException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.