Notebook
Inheritance: java.lang.Object
All Implemented Interfaces: com.aspose.note.INotebookChildNode, com.aspose.ms.System.Collections.Generic.IGenericEnumerable
public class Notebook implements INotebookChildNode, System.Collections.Generic.IGenericEnumerable<INotebookChildNode>
Represents an Aspose.Note notebook.
Constructors
Constructor | Description |
---|---|
Notebook() | Initializes a new instance of the Notebook class. |
Notebook(String filePath) | Initializes a new instance of the Notebook class. |
Notebook(String filePath, NotebookLoadOptions loadOptions) | Initializes a new instance of the Notebook class. |
Methods
Method | Description |
---|---|
isHistoryEnabled() | Gets or sets a value indicating whether the history is enabled. |
setHistoryEnabled(boolean value) | Gets or sets a value indicating whether the history is enabled. |
getColor() | Gets or sets the color. |
setColor(Color value) | Gets or sets the color. |
getDisplayName() | Gets or sets the display name. |
setDisplayName(String value) | Gets or sets the display name. |
getGuid() | Gets the object’s globally unique id. |
getGuidInternal() | |
getCount() | Gets the number of elements contained in the Notebook . |
getFileFormat() | Gets file format (OneNote 2010, OneNote Online). |
get_Item(int index) | Gets notebook child node by the given index. |
iterator() | Returns an enumerator that iterates through child nodes of the Notebook . |
Get all child nodes by the node type. | |
appendChild(INotebookChildNode newChild) | Adds the node to the end of the list. |
removeChild(INotebookChildNode oldChild) | Removes the child node. |
loadChildDocument(String filePath) | Adds a child document node. |
loadChildDocument(String filePath, LoadOptions loadOptions) | Adds a child document node. |
loadChildDocument(InputStream stream) | Adds a child document node. |
loadChildDocument(InputStream stream, LoadOptions loadOptions) | Adds a child document node. |
loadChildNotebook(String filePath) | Adds a child notebook node. |
loadChildNotebook(String filePath, NotebookLoadOptions loadOptions) | Adds a child notebook node. |
save(String fileName) | Saves the OneNote document to a file. |
save(OutputStream stream) | Saves the OneNote document to a stream. |
save(String fileName, int format) | Saves the OneNote document to a file in the specified format. |
save(OutputStream stream, int format) | Saves the OneNote document to a stream in the specified format. |
save(String fileName, NotebookSaveOptions options) | Saves the OneNote document to a file using the specified save options. |
save(OutputStream stream, NotebookSaveOptions options) | Saves the OneNote document to a stream using the specified save options. |
Notebook()
public Notebook()
Initializes a new instance of the Notebook class.
Notebook(String filePath)
public Notebook(String filePath)
Initializes a new instance of the Notebook class. Opens an existing OneNote notebook from a file.
Parameters:
Parameter | Type | Description |
---|---|---|
filePath | java.lang.String | The file path. |
Notebook(String filePath, NotebookLoadOptions loadOptions)
public Notebook(String filePath, NotebookLoadOptions loadOptions)
Initializes a new instance of the Notebook class. Opens an existing OneNote notebook from a file. Allows to specify additional options such as a children loading strategy (“lazy”/instant).
Parameters:
Parameter | Type | Description |
---|---|---|
filePath | java.lang.String | The file path. |
loadOptions | NotebookLoadOptions | The load options. |
isHistoryEnabled()
public boolean isHistoryEnabled()
Gets or sets a value indicating whether the history is enabled.
Returns: boolean
setHistoryEnabled(boolean value)
public void setHistoryEnabled(boolean value)
Gets or sets a value indicating whether the history is enabled.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
getColor()
public Color getColor()
Gets or sets the color.
Returns: java.awt.Color
setColor(Color value)
public void setColor(Color value)
Gets or sets the color.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.awt.Color |
getDisplayName()
public String getDisplayName()
Gets or sets the display name.
Returns: java.lang.String
setDisplayName(String value)
public void setDisplayName(String value)
Gets or sets the display name.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
getGuid()
public UUID getGuid()
Gets the object’s globally unique id.
Value: The GUID.
Returns: java.util.UUID
getGuidInternal()
public System.Guid getGuidInternal()
Returns: com.aspose.ms.System.Guid
getCount()
public int getCount()
Gets the number of elements contained in the Notebook .
Returns: int
getFileFormat()
public int getFileFormat()
Gets file format (OneNote 2010, OneNote Online).
Returns: int
get_Item(int index)
public INotebookChildNode get_Item(int index)
Gets notebook child node by the given index.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Index to child node. |
Returns: INotebookChildNode - The child node on the index position.
iterator()
public System.Collections.Generic.IGenericEnumerator<INotebookChildNode> iterator()
Returns an enumerator that iterates through child nodes of the Notebook .
Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.note.INotebookChildNode> - A IEnumerator .
getChildNodes(Class typeParameterClass)
public List<T1> <T1>getChildNodes(Class<T1> typeParameterClass)
Get all child nodes by the node type.
Parameters:
Parameter | Type | Description |
---|---|---|
typeParameterClass | java.lang.Class |
Returns:
java.util.List
T1 : The type of elements in the returned list.
appendChild(INotebookChildNode newChild)
public INotebookChildNode appendChild(INotebookChildNode newChild)
Adds the node to the end of the list.
Parameters:
Parameter | Type | Description |
---|---|---|
newChild | INotebookChildNode | The node to add. |
Returns: INotebookChildNode - The added node.
removeChild(INotebookChildNode oldChild)
public INotebookChildNode removeChild(INotebookChildNode oldChild)
Removes the child node.
Parameters:
Parameter | Type | Description |
---|---|---|
oldChild | INotebookChildNode | The node to remove. |
Returns: INotebookChildNode - The removed node.
loadChildDocument(String filePath)
public void loadChildDocument(String filePath)
Adds a child document node. Opens an existing OneNote document from a file.
Parameters:
Parameter | Type | Description |
---|---|---|
filePath | java.lang.String | The file path. |
loadChildDocument(String filePath, LoadOptions loadOptions)
public void loadChildDocument(String filePath, LoadOptions loadOptions)
Adds a child document node. Opens an existing OneNote document from a file. Allows to specify additional load options.
Parameters:
Parameter | Type | Description |
---|---|---|
filePath | java.lang.String | The file path. |
loadOptions | LoadOptions | The load options. |
loadChildDocument(InputStream stream)
public void loadChildDocument(InputStream stream)
Adds a child document node. Opens an existing OneNote document from a stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.InputStream | The stream. |
loadChildDocument(InputStream stream, LoadOptions loadOptions)
public void loadChildDocument(InputStream stream, LoadOptions loadOptions)
Adds a child document node. Opens an existing OneNote document from a stream. Allows to specify additional load options.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.InputStream | The stream. |
loadOptions | LoadOptions | The load options. |
loadChildNotebook(String filePath)
public void loadChildNotebook(String filePath)
Adds a child notebook node. Opens an existing OneNote notebook from a file.
Parameters:
Parameter | Type | Description |
---|---|---|
filePath | java.lang.String | The file path. |
loadChildNotebook(String filePath, NotebookLoadOptions loadOptions)
public void loadChildNotebook(String filePath, NotebookLoadOptions loadOptions)
Adds a child notebook node. Opens an existing OneNote notebook from a file. Allows to specify additional load options.
Parameters:
Parameter | Type | Description |
---|---|---|
filePath | java.lang.String | The file path. |
loadOptions | NotebookLoadOptions | The load options. |
save(String fileName)
public void save(String fileName)
Saves the OneNote document to a file.
Parameters:
Parameter | Type | Description |
---|---|---|
fileName | java.lang.String | The full name for the file. If a file with the specified full name already exists, the existing file is overwritten. |
save(OutputStream stream)
public void save(OutputStream stream)
Saves the OneNote document to a stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | The stream. |
save(String fileName, int format)
public void save(String fileName, int format)
Saves the OneNote document to a file in the specified format.
Parameters:
Parameter | Type | Description |
---|---|---|
fileName | java.lang.String | The full name for the file. If a file with the specified full name already exists, the existing file is overwritten. |
format | int | The format in which to save the document. |
save(OutputStream stream, int format)
public void save(OutputStream stream, int format)
Saves the OneNote document to a stream in the specified format.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | The stream. |
format | int | The format in which to save the document. |
save(String fileName, NotebookSaveOptions options)
public void save(String fileName, NotebookSaveOptions options)
Saves the OneNote document to a file using the specified save options.
Parameters:
Parameter | Type | Description |
---|---|---|
fileName | java.lang.String | The full name for the file. If a file with the specified full name already exists, the existing file is overwritten. |
options | NotebookSaveOptions | Specifies the options how the document is saved in file. |
save(OutputStream stream, NotebookSaveOptions options)
public void save(OutputStream stream, NotebookSaveOptions options)
Saves the OneNote document to a stream using the specified save options.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | The stream. |
options | NotebookSaveOptions | Specifies the options how the document is saved. |