|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.render.afp.modca.AFPDataStream
A data stream is a continuous ordered stream of data elements and objects conforming to a given format. Application programs can generate data streams destined for a presentation service, archive library, presentation device or another application program. The strategic presentation data stream architectures used is Mixed Object Document Content Architecture (MO:DCA�). The MO:DCA architecture defines the data stream used by applications to describe documents and object envelopes for interchange with other applications and application services. Documents defined in the MO:DCA format may be archived in a database, then later retrieved, viewed, annotated and printed in local or distributed systems environments. Presentation fidelity is accommodated by including resource objects in the documents that reference them.
Field Summary | |
protected static org.apache.commons.logging.Log |
LOGGER
Static logging instance |
Constructor Summary | |
AFPDataStream()
Default constructor for the AFPDataStream. |
Method Summary | |
void |
createFont(byte fontReference,
java.lang.String fontFamily,
java.lang.String weight,
java.lang.String style,
int size)
Helper method to create a map coded font object on the current page, this method delegates the construction of the map coded font object to the active environment group on the current page. |
void |
createIncludePageOverlay(java.lang.String name,
int orientation)
Helper method which allows creation of the MPO object, via the AEG. |
void |
createIncludePageSegment(java.lang.String name,
int xCoor,
int yCoor)
Creates an IncludePageSegment on the current page. |
void |
createLine(int x1,
int y1,
int x2,
int y2,
int thickness)
Method to create a line on the current page. |
void |
createPageGroupTagLogicalElement(TagLogicalElementBean[] attributes)
Creates a TagLogicalElement on the current page group. |
void |
createPageTagLogicalElement(TagLogicalElementBean[] attributes)
Creates a TagLogicalElement on the current page. |
void |
createShading(int x,
int y,
int w,
int h,
int red,
int green,
int blue)
This method will create shading on the page using the specified ooordinates (the shading contrast is controlled via the red, green blue parameters, by converting this to grey scale). |
void |
createText(int fontNumber,
int x,
int y,
byte[] data)
Helper method to create text on the current page, this method delegates to the current presentation text object in order to construct the text. |
void |
endDocument()
The document is ended by invoking this method which creates an instance of the AFP Document object and registers the start with a validation map which ensures that methods are not invoked out of the correct sequence. |
void |
endPage()
Helper method to mark the end of the current page. |
void |
endPageGroup()
Helper method to mark the end of the page group. |
void |
setLandscapeRotation(int rotation)
Sets the rotation to be used for landsacpe pages, valid values are 0, 90, 180, 270 (default). |
void |
setPortraitRotation(int rotation)
Sets the rotation to be used for portrait pages, valid values are 0 (default), 90, 180, 270. |
void |
setProducer(java.lang.String producer)
Sets the application producing the AFP. |
void |
startDocument()
The document is started by invoking this method which creates an instance of the AFP Document object. |
void |
startPage(int pageWidth,
int pageHeight)
Start a new page. |
void |
startPageGroup(java.lang.String name)
Start a new page group. |
void |
write(java.io.OutputStream outputstream)
Write the document data to the output stream, this will invoke getDataStream on the document, which is then invoked recursively on child AFPObject's to construct the full data stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final org.apache.commons.logging.Log LOGGER
Constructor Detail |
public AFPDataStream()
Method Detail |
public void startDocument()
public void endDocument()
public void startPage(int pageWidth, int pageHeight)
endPage()
method must be invoked to mark the page ending.
pageWidth
- the width of the pagepageHeight
- the height of the pagepublic void endPage()
public void createFont(byte fontReference, java.lang.String fontFamily, java.lang.String weight, java.lang.String style, int size)
fontReference
- the font number used as the resource identifierfontFamily
- the font family identifies the font nameweight
- the weight of the font (e.g. normal, bold)style
- the style of the font (e.g. normal, italics)size
- the point size of the fontpublic void createText(int fontNumber, int x, int y, byte[] data)
fontNumber
- the font number used as the resource identifierx
- the x coordinate of the texty
- the y coordinate of the textdata
- the text data to createpublic void createLine(int x1, int y1, int x2, int y2, int thickness)
x1
- the first x coordinate of the liney1
- the first y coordinate of the linex2
- the second x coordinate of the liney2
- the second y coordinate of the linethickness
- the thickness of the linepublic void setProducer(java.lang.String producer)
producer
- the application producing the AFP datastreampublic void createShading(int x, int y, int w, int h, int red, int green, int blue)
x
- the x coordinate of the shadingy
- the y coordinate of the shadingw
- the width of the shaded areah
- the height of the shaded areared
- the red valuegreen
- the green valueblue
- the blue valuepublic void write(java.io.OutputStream outputstream) throws java.io.IOException
outputstream
- the output stream to which data is written
java.io.IOException.
java.io.IOException
public void createIncludePageOverlay(java.lang.String name, int orientation)
name
- the name of the static overlayorientation
- the orientation for the overlay (0, 90, 180, 270)public void createIncludePageSegment(java.lang.String name, int xCoor, int yCoor)
name
- the name of the include page segmentxCoor
- the x coordinate for the overlayyCoor
- the y coordinate for the overlaypublic void createPageTagLogicalElement(TagLogicalElementBean[] attributes)
attributes
- the array of key value pairs.public void createPageGroupTagLogicalElement(TagLogicalElementBean[] attributes)
attributes
- the array of key value pairs.public void startPageGroup(java.lang.String name)
endPageGroup()
method must be invoked to mark the page
group ending.
name
- the name of the page grouppublic void endPageGroup()
public void setPortraitRotation(int rotation)
rotation
- The rotation in degrees.public void setLandscapeRotation(int rotation)
rotation
- The rotation in degrees.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |