Package ro.sync.ecss.extensions.api.node
Interface AuthorDocumentProvider
@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public interface AuthorDocumentProvider
Use this API to access an "in memory" representation of an author document over a resource and customize the document in
a non visual way using the
AuthorDocumentController
and AuthorDocument
API.- Since:
- 22.1
-
Method Summary
Modifier and TypeMethodDescriptionAccess the author document controller.Create an input stream over the nodes structure.Create a reader over the nodes structure.int[]
getLineColumnMapping
(int offset) Map an offset in the Author model to XML line/column.getStyles
(AuthorNode node) Get the CSS styles which are used to render a particular Author node.void
save()
Saves the content to the original load location.
-
Method Details
-
getAuthorDocumentController
AuthorDocumentController getAuthorDocumentController()Access the author document controller. You can use it to make changes to the structure of nodes, run XPath expressions to identify nodes and much more.- Returns:
- The
AuthorDocumentController
.
-
getContentReader
Reader getContentReader()Create a reader over the nodes structure.- Returns:
- The reader over the created author document.
-
getContentInputStream
Create an input stream over the nodes structure.- Returns:
- The input stream over the created author document.
- Throws:
IOException
- Since:
- 23
-
save
Saves the content to the original load location.- Throws:
IOException
- If saving error occurs.
-
getStyles
Get the CSS styles which are used to render a particular Author node. This method MUST only be used to query styles.- Parameters:
node
- The node for which we want to obtain the styles.- Returns:
- the styles associated with the node or
null
. - Since:
- 24
-
getLineColumnMapping
int[] getLineColumnMapping(int offset) Map an offset in the Author model to XML line/column.- Parameters:
offset
- The offset- Returns:
- The line column mapping or
null
if it could not be computed. The line is 1 based. - Since:
- 27.1
**************************************
EXPERIMENTAL - Subject to change
**************************************
Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
-