You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AFPPageSetup.java 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * Copyright 2006 The Apache Software Foundation.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /* $Id$ */
  17. package org.apache.fop.render.afp.extensions;
  18. import java.io.Serializable;
  19. import org.apache.fop.fo.extensions.ExtensionAttachment;
  20. /**
  21. * This is the pass-through value object for the PostScript extension.
  22. */
  23. public class AFPPageSetup implements ExtensionAttachment, Serializable {
  24. /** The category URI for this extension attachment. */
  25. public static final String CATEGORY = "apache:fop:extensions:afp";
  26. private String elementName;
  27. private String name;
  28. private String value;
  29. /**
  30. * Default constructor.
  31. * @param name the name of the setup code object, may be null
  32. */
  33. public AFPPageSetup(String name) {
  34. this.elementName = name;
  35. }
  36. /** @return the name */
  37. public String getElementName() {
  38. return elementName;
  39. }
  40. /** @return the name */
  41. public String getName() {
  42. return name;
  43. }
  44. /**
  45. * Sets the name of the setup code object.
  46. * @param name The name to set.
  47. */
  48. public void setName(String name) {
  49. this.name = name;
  50. }
  51. /**
  52. * @return the value
  53. */
  54. public String getValue() {
  55. return value;
  56. }
  57. /**
  58. * Sets the value
  59. * @param value The value name to set.
  60. */
  61. public void setValue(String source) {
  62. this.value = source;
  63. }
  64. /** @see org.apache.fop.fo.extensions.ExtensionAttachment#getCategory() */
  65. public String getCategory() {
  66. return CATEGORY;
  67. }
  68. /** @see java.lang.Object#toString() */
  69. public String toString() {
  70. return "AFPPageSetup(element-name=" + getElementName() + " name=" + getName() + ")";
  71. }
  72. }