com.knowgate.dataxslt
Class Page

java.lang.Object
  extended by dom.DOMSubDocument
      extended by com.knowgate.dataxslt.Page

public class Page
extends dom.DOMSubDocument

PageSet Page

This class represents a <page></page> section of a PageSet XML definition file.


Field Summary
 
Fields inherited from class dom.DOMSubDocument
oNode
 
Constructor Summary
Page(org.w3c.dom.Node oRefNode, PageSet oPagSet)
           
 
Method Summary
 int[] blockIds()
          Get a list of Block identifiers in source order
 java.util.Vector<Block> blocks()
          Get Page blocks.
 java.util.Vector<Block> blocks(java.lang.String sMetaBlockId, java.lang.String sTag, java.lang.String sZone)
          Get Page blocks matching a given criteria.
 java.lang.String container()
          GUID of Container that describes this Page structure
 java.lang.String filePath()
           
 void filePath(java.lang.String sPath)
          Set path to final document generated after XSL transformation of Page.
 Container getContainer()
          Reference to Container object that describes this Page structure
 PageSet getPaseSet()
          Reference to PageSet object that contains this Page
 java.lang.String getTitle()
           
 java.lang.String guid()
          Value of attribute guid for this Page at PageSet XML file
 java.lang.String nextBlockId()
          Get next free block integer identifier.
 void permute(java.lang.String sMetaBlockId, int[] aPermutation)
          Permute Blocks This method is used for reordering blocks.
 void setTitle(java.lang.String sTitle)
          Set <title>element contents.
 java.lang.String template()
          Get XSL transformer stylesheet name for this Page
 
Methods inherited from class dom.DOMSubDocument
getElement, getElements, getNode, getNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Page

public Page(org.w3c.dom.Node oRefNode,
            PageSet oPagSet)
Parameters:
oRefNode - DOMDocument Node holding <page> element.
oPagSet - Reference to PageSet object that contains this page
Method Detail

getPaseSet

public PageSet getPaseSet()
Reference to PageSet object that contains this Page


getContainer

public Container getContainer()
Reference to Container object that describes this Page structure


template

public java.lang.String template()
                          throws org.w3c.dom.DOMException
Get XSL transformer stylesheet name for this Page

Returns:
<template> value for Container of this Page
Throws:
org.w3c.dom.DOMException

filePath

public java.lang.String filePath()
Returns:
Path to final document generated after XSL transformation of Page. This property is not part of the Page XML file but it is set at runtime and stored appart.

filePath

public void filePath(java.lang.String sPath)
Set path to final document generated after XSL transformation of Page. This property is not part of the Page XML file but it is set at runtime and stored appart.

Parameters:
sPath - Path to generated XHTML (or other) final file.

guid

public java.lang.String guid()
Value of attribute guid for this Page at PageSet XML file

Returns:
GUID of this Page

container

public java.lang.String container()
GUID of Container that describes this Page structure

Returns:
String representing the Container GUID

getTitle

public java.lang.String getTitle()
Returns:
<title>element contents.

setTitle

public void setTitle(java.lang.String sTitle)
Set <title>element contents.

Parameters:
sTitle -

blocks

public java.util.Vector<Block> blocks()
                               throws org.w3c.dom.DOMException
Get Page blocks.

Returns:
Vector containing objects of class Block for this Page.
Returned blocks are always sorted by their metablock id attribute and their block id attribute. The metablock id and the block id are concatenated
Throws:
org.w3c.dom.DOMException - If <blocks> node is not found

blocks

public java.util.Vector<Block> blocks(java.lang.String sMetaBlockId,
                                      java.lang.String sTag,
                                      java.lang.String sZone)
                               throws org.w3c.dom.DOMException
Get Page blocks matching a given criteria.

Parameters:
sMetaBlockId - Identifier of metablock to match
sTag -
sZone -
Returns:
Vector containing objects of class Block for this Page.
Blocks are returned in source order. Independently of their id attribute value.
Throws:
org.w3c.dom.DOMException - If <blocks> node is not found

blockIds

public int[] blockIds()
               throws java.lang.NumberFormatException

Get a list of Block identifiers in source order

Returns:
Array of Block Identifiers in the same order as thay appear in source document.
Throws:
java.lang.NumberFormatException - If any Block Id. is not an integer

nextBlockId

public java.lang.String nextBlockId()
                             throws java.lang.NumberFormatException
Get next free block integer identifier.

Returns:
Left padded next free block identifier (3 characters)
Throws:
java.lang.NumberFormatException - If any of the previous block identifiers is not an integer.

permute

public void permute(java.lang.String sMetaBlockId,
                    int[] aPermutation)
             throws java.lang.ArrayIndexOutOfBoundsException

Permute Blocks

This method is used for reordering blocks.

Parameters:
aPermutation - New order for blocks.
Throws:
java.lang.ArrayIndexOutOfBoundsException