comet.idtype¶
The comet.idtype module provides factory functions for creating CIDType
objects aswell as helper functions for processing unbound ID values.
See also
- Class
CIDType
Instances of IDType objects
Methods¶
- comet.idtype.create(ID1, ID2=0, ID3=0, stringID='')¶
Create a new
CIDType
object from the provided values- Parameters:
- Returns:
The new ID object
- Return type:
- Raises:
TypeError – When parameter types are invalid
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- Examples:
Create an IDType
myID = comet.idtype.create(1, 0, 0, '1234#myGroupID#product#Bucket#5678#myParentGroupID#category#Bucket#')
- comet.idtype.getRecordID(stringID)¶
Get the RecordID part of a StringID.
- Returns:
StringID in the PublishingServer schema
- Return type:
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameter stringID is empty
- Available:
InDesign® comet_pdf® Illustrator®
- See also:
- CScript:
- Examples:
Get the recordID part of a string ID.
stringID = '1234#myGroupID#product#Bucket#5678#myParentGroupID#category#Bucket#' value = comet.idtype.getRecordID(stringID) comet.wlog(value) #logs '1234'
- comet.idtype.getGroupID(stringID)¶
Get the GroupID part of a StringID.
- Returns:
StringID in the PublishingServer schema
- Return type:
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameter stringID is empty
- Available:
InDesign® comet_pdf® Illustrator®
- See also:
- CScript:
- Examples:
Get the group ID part of a string ID.
stringID = '1234#myGroupID#product#Bucket#5678#myParentGroupID#category#Bucket#' value = comet.idtype.getGroupID(stringID) comet.wlog(value) #logs 'myGroupID'
- comet.idtype.getEntityID(stringID)¶
Get the EntityID part of a StringID.
- Returns:
StringID in the PublishingServer schema
- Return type:
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameter stringID is empty
- Available:
InDesign® comet_pdf® Illustrator®
- See also:
- CScript:
- Examples:
Get the entity ID part of a string ID.
stringID = '1234#myGroupID#product#Bucket#5678#myParentGroupID#category#Bucket#' value = comet.idtype.getEntityID(stringID) comet.wlog(value) #logs 'product'
- comet.idtype.getEntityClass(stringID)¶
Get the EntityClass part of a StringID.
- Returns:
StringID in the PublishingServer schema
- Return type:
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameter stringID is empty
- Available:
InDesign® comet_pdf® Illustrator®
- See also:
- CScript:
- Examples:
Get the entity class part of a string ID.
stringID = '1234#myGroupID#product#Bucket#5678#myParentGroupID#category#Bucket#' value = comet.idtype.getEntityClass(stringID) comet.wlog(value) #logs 'Bucket'
- comet.idtype.getParentRecordID(stringID)¶
Get the Parent RecordID part of a StringID.
- Returns:
StringID in the PublishingServer schema
- Return type:
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameter stringID is empty
- Available:
InDesign® comet_pdf® Illustrator®
- See also:
- CScript:
- Examples:
Get the parent record ID part of a string ID.
stringID = '1234#myGroupID#product#Bucket#5678#myParentGroupID#category#Bucket#' value = comet.idtype.getParentRecordID(stringID) comet.wlog(value) #logs '5678'
- comet.idtype.getParentGroupID(stringID)¶
Get the Parent GroupID part of a StringID.
- Returns:
StringID in the PublishingServer schema
- Return type:
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameter stringID is empty
- Available:
InDesign® comet_pdf® Illustrator®
- See also:
- CScript:
- Examples:
Get the parent group ID part of a string ID.
stringID = '1234#myGroupID#product#Bucket#5678#myParentGroupID#category#Bucket#' value = comet.idtype.getParentGroupID(stringID) comet.wlog(value) #logs '5678'
- comet.idtype.getParentEntityID(stringID)¶
Get the Parent EntityID part of a StringID.
- Returns:
StringID in the PublishingServer schema
- Return type:
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameter stringID is empty
- Available:
InDesign® comet_pdf® Illustrator®
- See also:
- CScript:
- Examples:
Get the parent entity ID part of a string ID.
stringID = '1234#myGroupID#product#Bucket#5678#myParentGroupID#category#Bucket#' value = comet.idtype.getParentEntityID(stringID) comet.wlog(value) #logs 'category'
- comet.idtype.getParentEntityClass(stringID)¶
Get the Parent EntityClass part of a StringID.
- Returns:
StringID in the PublishingServer schema
- Return type:
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameter stringID is empty
- Available:
InDesign® comet_pdf® Illustrator®
- See also:
- CScript:
- Examples:
Get the parent entity class part of a string ID.
stringID = '1234#myGroupID#product#Bucket#5678#myParentGroupID#category#Bucket#' value = comet.idtype.getParentEntityClass(stringID) comet.wlog(value) #logs 'Bucket'