de.infinityloop.upcast.treeprocess
Class ParagraphInlines

java.lang.Object
  extended by de.infinityloop.upcast.treeprocess.ParagraphInlines

public class ParagraphInlines
extends java.lang.Object

Author:
chris

Constructor Summary
ParagraphInlines(java.util.Stack inlines, java.util.Stack contents)
          constructor.
 
Method Summary
 int getChildrenCount()
          Returns the children of the paragraph element this object describes.
 java.util.Stack getInlinesAtChild(int i)
          Retrieves CSS properties in effect at child index i of this paragraph.
 java.lang.String getTextOfAllDescendants(int i)
          Retrieves the concatenated raw text content of the children objects at this child index of the paragraph.
 java.lang.String getTextOfDescendants(int i)
          Retrieves the concatenated raw text content of the children objects at this child index of the paragraph.
 void setInlinesAtChild(int i, java.util.Stack inlines)
          Set newly calculated inlines you wish to be active at that child index of this paragraph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParagraphInlines

public ParagraphInlines(java.util.Stack inlines,
                        java.util.Stack contents)
constructor. You never should call this.

Parameters:
inlines -
contents -
Method Detail

getChildrenCount

public int getChildrenCount()
Returns the children of the paragraph element this object describes.

Returns:
int

getInlinesAtChild

public java.util.Stack getInlinesAtChild(int i)
Retrieves CSS properties in effect at child index i of this paragraph.

Parameters:
i - child index you are interested in
Returns:
Stack of Pair(key, value)s describing CSS properties in effect at that child index

setInlinesAtChild

public void setInlinesAtChild(int i,
                              java.util.Stack inlines)
Set newly calculated inlines you wish to be active at that child index of this paragraph.

Parameters:
i - the child index
inlines - a Stack of Pair(key, value)s to be active. key is a property name String, value the actual value of the CSS property.

getTextOfAllDescendants

public java.lang.String getTextOfAllDescendants(int i)
Retrieves the concatenated raw text content of the children objects at this child index of the paragraph. This includes also text in contained "sub-documents" like footnotes, annotations etc.

Parameters:
i - child index of the paragraph
Returns:
String the concatenated raw text

getTextOfDescendants

public java.lang.String getTextOfDescendants(int i)
Retrieves the concatenated raw text content of the children objects at this child index of the paragraph. This takes only into account the actual paragraph text and excludes "sub-documents" like footnotes.

Parameters:
i - child index of the paragraph
Returns:
String the concatenated raw text