com.acesoft.aceoffix.wordreader
Class DataRegion

java.lang.Object
  extended by com.acesoft.aceoffix.wordreader.DataRegion

public class DataRegion
extends java.lang.Object

DataRegion class represents a DataRegion.

Representing a DataRegion, DataRegion class is used to extract data from the DataRegion. You can only call the WordDocument.openDataRegion method to get the DataRegion object.

In Word document, developer can define any range of selection as a DataRegion object by inserting a bookmark with the prefix name "ACE_". In other words, the DataRegion is a bookmark object whose name begins with "ACE_" in Word document.

Version:
5.0
Author:
Acesoft Corporation

Method Summary
 byte[] getFileBytes()
          Gets the content fragment contained in DataRegion in Word binary format.
 java.lang.String getName()
          Gets the name of the DataRegion.
 java.util.ArrayList<Shape> getShapes()
          Gets the Shape collection contained in DataRegion.
 java.util.ArrayList<Table> getTables()
          Gets the Table collection contained in DataRegion.
 java.lang.String getValue()
          Gets the value of the DataRegion.
 Shape openShape(int index)
          Opens the specified shape and returns a Shape object.
 Table openTable(int index)
          Opens the specified table and returns a Table object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()
                         throws java.io.IOException
Gets the name of the DataRegion.

Throws:
java.io.IOException

getValue

public java.lang.String getValue()
Gets the value of the DataRegion.


getFileBytes

public byte[] getFileBytes()
Gets the content fragment contained in DataRegion in Word binary format.


getTables

public java.util.ArrayList<Table> getTables()
                                     throws java.io.IOException,
                                            java.lang.Exception
Gets the Table collection contained in DataRegion.

Throws:
java.io.IOException
java.lang.Exception

getShapes

public java.util.ArrayList<Shape> getShapes()
                                     throws java.io.IOException,
                                            java.lang.Exception
Gets the Shape collection contained in DataRegion.

Throws:
java.io.IOException
java.lang.Exception

openTable

public Table openTable(int index)
                throws java.lang.Exception
Opens the specified table and returns a Table object.

If the specified Table exists, this method will return the Table object.

Parameters:
index - The index of the Table. It is the same as the Table index defined in Microsoft Word. Both of them start from "1".
Returns:
Returns the Table object.
Throws:
java.lang.Exception

openShape

public Shape openShape(int index)
                throws java.lang.Exception
Opens the specified shape and returns a Shape object.

If the specified Shape exists, this method will return the Shape object.

Parameters:
index - The index of the Shape. It is the same as the Table index defined in Microsoft Word. Both of them start from "1".
Returns:
Returns the Shape object.
Throws:
java.lang.Exception