public class Notebook extends Object implements INotebookChildNode, com.aspose.ms.System.Collections.Generic.IGenericEnumerable<INotebookChildNode>
Represents an Aspose.Note notebook.
Constructor and 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. |
Modifier and Type | Method and Description |
---|---|
INotebookChildNode |
appendChild(INotebookChildNode newChild)
Adds the node to the end of the list.
|
INotebookChildNode |
get_Item(int index)
Gets notebook child node by the given index.
|
<T1 extends Node> |
getChildNodes(Class<T1> typeParameterClass)
Get all child nodes by the node type.
|
Color |
getColor()
Gets or sets the color.
|
int |
getCount()
Gets the number of elements contained in the
Notebook . |
String |
getDisplayName()
Gets or sets the display name.
|
int |
getFileFormat()
Gets file format (OneNote 2010, OneNote Online).
|
UUID |
getGuid()
Gets the object's globally unique id.
|
com.aspose.ms.System.Guid |
getGuidInternal() |
boolean |
isHistoryEnabled()
Gets or sets a value indicating whether the history is enabled.
|
com.aspose.ms.System.Collections.Generic.IGenericEnumerator<INotebookChildNode> |
iterator()
Returns an enumerator that iterates through child nodes of the
Notebook . |
void |
loadChildDocument(InputStream stream)
Adds a child document node.
|
void |
loadChildDocument(InputStream stream,
LoadOptions loadOptions)
Adds a child document node.
|
void |
loadChildDocument(String filePath)
Adds a child document node.
|
void |
loadChildDocument(String filePath,
LoadOptions loadOptions)
Adds a child document node.
|
void |
loadChildNotebook(String filePath)
Adds a child notebook node.
|
void |
loadChildNotebook(String filePath,
NotebookLoadOptions loadOptions)
Adds a child notebook node.
|
INotebookChildNode |
removeChild(INotebookChildNode oldChild)
Removes the child node.
|
void |
save(OutputStream stream)
Saves the OneNote document to a stream.
|
void |
save(OutputStream stream,
int format)
Saves the OneNote document to a stream in the specified format.
|
void |
save(OutputStream stream,
NotebookSaveOptions options)
Saves the OneNote document to a stream using the specified save options.
|
void |
save(String fileName)
Saves the OneNote document to a file.
|
void |
save(String fileName,
int format)
Saves the OneNote document to a file in the specified format.
|
void |
save(String fileName,
NotebookSaveOptions options)
Saves the OneNote document to a file using the specified save options.
|
void |
setColor(Color value)
Gets or sets the color.
|
void |
setDisplayName(String value)
Gets or sets the display name.
|
void |
setHistoryEnabled(boolean value)
Gets or sets a value indicating whether the history is enabled.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public Notebook()
Initializes a new instance of the Notebook
class.
public Notebook(String filePath)
Initializes a new instance of the Notebook
class.
Opens an existing OneNote notebook from a file.
filePath
- The file path.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).
filePath
- The file path.loadOptions
- The load options.public boolean isHistoryEnabled()
Gets or sets a value indicating whether the history is enabled.
public void setHistoryEnabled(boolean value)
Gets or sets a value indicating whether the history is enabled.
public Color getColor()
Gets or sets the color.
getColor
in interface INotebookChildNode
public void setColor(Color value)
Gets or sets the color.
public String getDisplayName()
Gets or sets the display name.
getDisplayName
in interface INotebookChildNode
public void setDisplayName(String value)
Gets or sets the display name.
public UUID getGuid()
Gets the object's globally unique id.
Value: The GUID.getGuid
in interface INotebookChildNode
public com.aspose.ms.System.Guid getGuidInternal()
getGuidInternal
in interface INotebookChildNode
public int getCount()
Gets the number of elements contained in the Notebook
.
public int getFileFormat()
Gets file format (OneNote 2010, OneNote Online).
public INotebookChildNode get_Item(int index)
Gets notebook child node by the given index.
index
- Index to child node.index
position.public com.aspose.ms.System.Collections.Generic.IGenericEnumerator<INotebookChildNode> iterator()
Returns an enumerator that iterates through child nodes of the Notebook
.
iterator
in interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable<INotebookChildNode>
iterator
in interface com.aspose.ms.System.Collections.IEnumerable<INotebookChildNode>
iterator
in interface Iterable<INotebookChildNode>
IEnumerator
.public <T1 extends Node> List<T1> getChildNodes(Class<T1> typeParameterClass)
Get all child nodes by the node type.
T1
: The type of elements in the returned list.
public INotebookChildNode appendChild(INotebookChildNode newChild)
Adds the node to the end of the list.
newChild
- The node to add.public INotebookChildNode removeChild(INotebookChildNode oldChild)
Removes the child node.
oldChild
- The node to remove.public void loadChildDocument(String filePath)
Adds a child document node. Opens an existing OneNote document from a file.
filePath
- The file path.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.
filePath
- The file path.loadOptions
- The load options.public void loadChildDocument(InputStream stream)
Adds a child document node. Opens an existing OneNote document from a stream.
stream
- The stream.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.
stream
- The stream.loadOptions
- The load options.public void loadChildNotebook(String filePath)
Adds a child notebook node. Opens an existing OneNote notebook from a file.
filePath
- The file path.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.
filePath
- The file path.loadOptions
- The load options.public void save(String fileName) throws IOException
Saves the OneNote document to a file.
fileName
- The full name for the file. If a file with the specified full name already exists, the existing file is overwritten.com.aspose.note.infrastructure.IncorrectDocumentStructureException
- The document structure violates specification.com.aspose.note.infrastructure.UnsupportedSaveFormatException
- Requested save format is not supported.IOException
public void save(OutputStream stream) throws IOException
Saves the OneNote document to a stream.
stream
- The stream.com.aspose.note.infrastructure.IncorrectDocumentStructureException
- The document structure violates specification.com.aspose.note.infrastructure.UnsupportedSaveFormatException
- Requested save format is not supported.IOException
public void save(String fileName, int format) throws IOException
Saves the OneNote document to a file in the specified format.
fileName
- The full name for the file. If a file with the specified full name already exists, the existing file is overwritten.format
- The format in which to save the document.com.aspose.note.infrastructure.IncorrectDocumentStructureException
- The document structure violates specification.com.aspose.note.infrastructure.UnsupportedSaveFormatException
- Requested save format is not supported.IOException
public void save(OutputStream stream, int format) throws IOException
Saves the OneNote document to a stream in the specified format.
stream
- The stream.format
- The format in which to save the document.com.aspose.note.infrastructure.IncorrectDocumentStructureException
- The document structure violates specification.com.aspose.note.infrastructure.UnsupportedSaveFormatException
- Requested save format is not supported.IOException
public void save(String fileName, NotebookSaveOptions options) throws IOException
Saves the OneNote document to a file using the specified save options.
fileName
- The full name for the file. If a file with the specified full name already exists, the existing file is overwritten.options
- Specifies the options how the document is saved in file.com.aspose.note.infrastructure.IncorrectDocumentStructureException
- The document structure violates specification.com.aspose.note.infrastructure.UnsupportedSaveFormatException
- Requested save format is not supported.IOException
public void save(OutputStream stream, NotebookSaveOptions options) throws IOException
Saves the OneNote document to a stream using the specified save options.
stream
- The stream.options
- Specifies the options how the document is saved.com.aspose.note.infrastructure.IncorrectDocumentStructureException
- The document structure violates specification.com.aspose.note.infrastructure.UnsupportedSaveFormatException
- Requested save format is not supported.IOException