1 51 package org.apache.fop.extensions; 52 53 import org.apache.fop.apps.FOPException; 54 import org.apache.fop.fo.FObj; 55 import org.apache.fop.fo.PropertyList; 56 57 64 65 public class Destination extends ExtensionObj { 66 67 private String internalDestination; 68 private String destinationName; 69 70 public static class Maker extends FObj.Maker { 71 public FObj make(FObj parent, PropertyList propertyList, 72 String systemId, int line, int column) 73 throws FOPException { 74 return new Destination(parent, propertyList, 75 systemId, line, column); 76 } 77 } 78 79 public static FObj.Maker maker() { 80 return new Destination.Maker(); 81 } 82 83 public Destination(FObj parent, PropertyList propertyList, 84 String systemId, int line, int column) { 85 super(parent, propertyList, systemId, line, column); 86 internalDestination = properties.get("internal-destination").getString(); 87 if (internalDestination.equals("")) { 88 log.warn("fox:destination requires an internal-destination."); 89 } 90 destinationName = properties.get("destination-name").getString(); 91 } 92 93 96 public String getDestinationName() { 97 return !"".equals(destinationName) ? destinationName : internalDestination; 100 } 101 102 106 public String getInternalDestination() { 107 return internalDestination; 108 } 109 110 public String getName() { 111 return "fox:destination"; 112 } 113 114 } 115 | Popular Tags |