fop 0.95

org.apache.fop.render.afp.modca
Class Document

java.lang.Object
  extended by org.apache.fop.render.afp.modca.AbstractAFPObject
      extended by org.apache.fop.render.afp.modca.AbstractNamedAFPObject
          extended by org.apache.fop.render.afp.modca.Document

public final class Document
extends AbstractNamedAFPObject

The document is the highest level of the MO:DCA data-stream document component hierarchy. Documents can be made up of pages, and the pages, which are at the intermediate level, can be made up of objects. Objects are at the lowest level, and can be bar codes, graphics, images, and presentation text. At each level of the hierarchy certain sets of MO:DCA data structures, called structured fields, are permissible. The document, pages and objects are bounded by structured fields that define their beginnings and their ends. These structured fields, called begin-end pairs, provide an envelope for the data-stream components. This feature enables a processor of the data stream that is not fully compliant with the architecture to bypass those objects that are beyond its scope, and to process the data stream to the best of its abilities. A presentation document is one that has been formatted and is intended for presentation, usually on a printer or display device. A data stream containing a presentation document should produce the same document content in the same format on different printers or display devices dependent, however, on the capabilities of each of the printers or display devices. A presentation document can reference resources that are to be included as part of the document to be presented.


Field Summary
 
Fields inherited from class org.apache.fop.render.afp.modca.AbstractNamedAFPObject
name, nameBytes
 
Fields inherited from class org.apache.fop.render.afp.modca.AbstractAFPObject
log
 
Constructor Summary
Document()
          Default constructor for the document object.
Document(java.lang.String name)
          Constructor for the document object.
 
Method Summary
 void addPage(PageObject page)
          Adds a page to the document.
 void addPageGroup(PageGroup pageGroup)
          Adds a PageGroup to the document.
 void endDocument()
          Method to mark the end of the page group.
 boolean isComplete()
          Returns an indication if the page group is complete
 void writeDataStream(java.io.OutputStream os)
          Accessor method to write the AFP datastream for document.
 
Methods inherited from class org.apache.fop.render.afp.modca.AbstractAFPObject
writeObjectList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Document

public Document()
Default constructor for the document object.


Document

public Document(java.lang.String name)
Constructor for the document object.

Parameters:
name - The name of the document
Method Detail

addPage

public void addPage(PageObject page)
Adds a page to the document.

Parameters:
page - - the Page object

addPageGroup

public void addPageGroup(PageGroup pageGroup)
Adds a PageGroup to the document.

Parameters:
pageGroup - the PageGroup object

endDocument

public void endDocument()
Method to mark the end of the page group.


isComplete

public boolean isComplete()
Returns an indication if the page group is complete

Returns:
whether or not this page group is complete

writeDataStream

public void writeDataStream(java.io.OutputStream os)
                     throws java.io.IOException
Accessor method to write the AFP datastream for document.

Specified by:
writeDataStream in class AbstractAFPObject
Parameters:
os - The stream to write to
Throws:
java.io.IOException - thrown if an I/O exception of some sort has occurred

fop 0.95

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.