BookContent

A document added to a book.

Methods:

addEventListener, extractLabel, getElements, insertLabel, move, preflight, remove, removeEventListener, replace, synchronize, toSource, toSpecifier

Objects:

BookContentStatus, Boolean, Date, EventListeners, Events, File, Number, Object, String

Property Listing

Property

Type

Access

Description

date

Date

readonly

The date and time the BookContent was created.

documentPageRange

String

readonly

The page range of the book content object within the book.

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

filePath

File

readonly

The full path to the file.

fullName

File

readonly

The full path to the BookContent, including the name of the BookContent.

id

Number

readonly

The unique ID of the BookContent.

index

Number

readonly

The index of the BookContent within its containing object.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

label

String

read/write

A property that can be set to any string.

name

String

readonly

The name of the BookContent.

parent

Book

readonly

The parent of the BookContent (a Book).

properties

Object

read/write

A property that allows setting of several properties at the same time.

size

Number

readonly

The size of the BookContent file.

status

BookContentStatus

BookContentStatus.DOCUMENT_IN_USE

BookContentStatus.DOCUMENT_IS_OPEN

BookContentStatus.DOCUMENT_OUT_OF_DATE

BookContentStatus.MISSING_DOCUMENT

BookContentStatus.NORMAL

readonly

The status of the book content object file.

Method Listing

EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Adds an event listener.

Parameter

Type

Description

eventType

String

The event type.

handler

File

JavaScriptFunction

The event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

String extractLabel (key:String)

Gets the label value associated with the specified key.

Parameter

Type

Description

key

String

The key.

BookContent getElements ()

Resolves the object specifier, creating an array of object references.

undefined insertLabel (key:String, value:String)

Sets the label to the value associated with the specified key.

Parameter

Type

Description

key

String

The key.

value

String

The value.

BookContent move ([to:LocationOptions=LocationOptions], reference:BookContent)

Moves the book content object.

Parameter

Type

Description

to

LocationOptions

LocationOptions.AFTER

LocationOptions.AT_BEGINNING

LocationOptions.AT_END

LocationOptions.BEFORE

LocationOptions.UNKNOWN

The location relative to the reference object or within the book. (Optional)

(default: LocationOptions.AT_END)

reference

BookContent

The reference object. Note: Required when the to parameter specifies before or after. (Optional)

undefined preflight (to:File, [autoOpen:Boolean=Boolean])

Preflight a book content object and optionally save the resulting report.

Parameter

Type

Description

to

File

The preflight report to save to. (Optional)

autoOpen

Boolean

If true, automatically open the report after creation. (Optional)

(default: false)

undefined remove ()

Deletes the BookContent.

Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Removes the event listener.

Parameter

Type

Description

eventType

String

The registered event type.

handler

File

JavaScriptFunction

The registered event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

BookContent replace (using:File)

Replaces a book content object with a new file. Note: If the new file replaces the current style source document, the new file becomes the style source document.

Parameter

Type

Description

using

File

The full path name of the new book content object.

undefined synchronize ()

Matches the formatting of the book content object to the style source document.

String toSource ()

Generates a string which, if executed, will return the BookContent.

String toSpecifier ()

Retrieves the object specifier.

Object of

Book.styleSourceDocument

Event.parent

EventListener.parent

MutationEvent.parent

Return

BookContents.add()

BookContent.move()

BookContent.replace()

BookContent.getElements()

BookContents.anyItem()

BookContents.everyItem()

BookContents.nextItem()

BookContents.previousItem()

BookContents.itemByID()

BookContents.item()

BookContents.[]()

BookContents.itemByName()

BookContents.itemByRange()

BookContents.firstItem()

BookContents.lastItem()

BookContents.middleItem()