Marmot
|
Logical page. More...
Public Member Functions | |
def | __init__ |
def | setPageNum |
Set page number attribute of current page. | |
def | getPageNum |
See getPageNum. | |
def | setPageType |
Set page type attribute of current page. | |
def | getPageType |
See setPageType. | |
def | setCropBox |
Set display area of current page. | |
def | getCropBox |
See setCropBox. | |
def | getByLid |
Return content with a certain lid. | |
def | getByPid |
Return leaf content with a certain pid. | |
def | getByLabel |
Return contents with a certain label. | |
def | count |
def | create |
Create a new content object. | |
def | delete |
Wipe the object with logical ID lid out of this page. | |
def | attach |
Attach children to parent. | |
def | detach |
Detach children from parent. | |
def | update |
Update a content node. | |
def | lidToPids |
Maps logical ID of an object to physical ID's contained in it. | |
def | labelToPids |
Maps label to pids, no order garanteed. | |
def | lidToAncestors |
Given a logical id, return a content list of its ancestors. |
Logical page.
This class is a container of contents.
lidIndex: {lid: content}
pidIndex: {pid: content}
labelIndex: {label: [lid]}
relations.
def Marmot::Common::Page::Page::setPageNum | ( | self, | |
pgno | |||
) |
Set page number attribute of current page.
def Marmot::Common::Page::Page::getPageNum | ( | self | ) |
See getPageNum.
def Marmot::Common::Page::Page::setPageType | ( | self, | |
pgtype | |||
) |
Set page type attribute of current page.
def Marmot::Common::Page::Page::getPageType | ( | self | ) |
See setPageType.
def Marmot::Common::Page::Page::setCropBox | ( | self, | |
cropbox | |||
) |
Set display area of current page.
def Marmot::Common::Page::Page::getCropBox | ( | self | ) |
See setCropBox.
def Marmot::Common::Page::Page::getByLid | ( | self, | |
lid | |||
) |
Return content with a certain lid.
lid | logical ID of object |
def Marmot::Common::Page::Page::getByPid | ( | self, | |
pid | |||
) |
Return leaf content with a certain pid.
Only for Leaf objects.
pid | physical ID of object |
def Marmot::Common::Page::Page::getByLabel | ( | self, | |
label | |||
) |
Return contents with a certain label.
label | label of the desired contents. |
def Marmot::Common::Page::Page::count | ( | self | ) |
def Marmot::Common::Page::Page::create | ( | self, | |
label, | |||
pid = None , |
|||
lid = None , |
|||
plid = None , |
|||
clids = None , |
|||
box = None |
|||
) |
Create a new content object.
label | Label of new object |
pid | Physical ID of new object |
lid | Logical ID of new object |
plid | Parent's logical ID |
clids | A list of clids children's logical ID's |
box | bounding box of new object |
If the object is created successfully, it can be indexed through its logical ID.
def Marmot::Common::Page::Page::delete | ( | self, | |
lid | |||
) |
Wipe the object with logical ID lid out of this page.
lid | Logical ID of target object |
def Marmot::Common::Page::Page::attach | ( | self, | |
plid, | |||
clids | |||
) |
Attach children to parent.
plid | parent's ID |
clids | children's ID's |
def Marmot::Common::Page::Page::detach | ( | self, | |
plid, | |||
clids | |||
) |
Detach children from parent.
plid | parent's ID. |
clids | children's ID's |
def Marmot::Common::Page::Page::update | ( | self, | |
lid | |||
) |
Update a content node.
lid | logical ID of the node/object |
def Marmot::Common::Page::Page::lidToPids | ( | self, | |
lid | |||
) |
Maps logical ID of an object to physical ID's contained in it.
lid | logical ID of an object |
def Marmot::Common::Page::Page::labelToPids | ( | self, | |
label | |||
) |
Maps label to pids, no order garanteed.
label | label of desired objects |
def Marmot::Common::Page::Page::lidToAncestors | ( | self, | |
lid | |||
) |
Given a logical id, return a content list of its ancestors.
lid | logical ID of an object |