Gets the parents of this book.

        return: (osid.commenting.BookNodeList) - the parents of this
                book
        *compliance: mandatory -- This method must be implemented.*
767768
def get_parent_book_nodes(self):
        
        parent_book_nodes = []
        for node in self._my_map['parentNodes']:
            parent_book_nodes.append(BookNode(
                node._my_map,
                runtime=self._runtime,
                proxy=self._proxy,
                lookup_session=self._lookup_session))
        return BookNodeList(parent_book_nodes)
1258434
def parents(self) -> List[str]:
        
        parents = []
        for p in self._c_object.parents:
            parents.append(p.hexsha)
        return parents
945828
def parent(self):
        
        family = self.repository.get_parent_package_family(self.resource)
        return PackageFamily(family) if family else None
305922
def get_parents_for(self, child_ids):
        
        self._cache_init()
        parent_candidates = []
        for parent, children in self._cache_get_entry(self.CACHE_NAME_PARENTS).items():
            if set(children).intersection(child_ids):
                parent_candidates.append(parent)
        return set(parent_candidates)
1919
def parent(self):
        
        if TextBlockHelper.get_fold_lvl(self._trigger) > 0 and \
                self._trigger.blockNumber():
            block = self._trigger.previous()
            ref_lvl = self.trigger_level - 1
            while (block.blockNumber() and
                    (not TextBlockHelper.is_fold_trigger(block) or
                     TextBlockHelper.get_fold_lvl(block) > ref_lvl)):
                block = block.previous()
            try:
                return FoldScope(block)
            except ValueError:
                return None
        return None
384465
def get_orderbook(self):
        
        if self in self.parent.books.keys():
            return self.parent.books[self]

        return {
            "bid": [0], "bidsize": [0],
            "ask": [0], "asksize": [0]
        }
1276895
def parents(self):
        
        parents = []

        if self.parent is None:
            return []

        category = self
        while category.parent is not None:
            parents.append(category.parent)
            category = category.parent

        return parents[::-1]
1004372
def get_parent_id(self, resource, document):
        
        parent_type = self._get_parent_type(resource)
        if parent_type and document:
            return document.get(parent_type.get('field'))

        return None
50832
def get_books(self):
        
        if self.retrieved:
            raise errors.IllegalState('List has already been retrieved.')
        self.retrieved = True
        return objects.BookList(self._results, runtime=self._runtime)
787347
def parent(self, parent):
        
        if parent is None:
            self._parent = None
        else:
            from rafcon.core.states.state import State
            assert isinstance(parent, State)

            old_parent = self.parent
            self._parent = ref(parent)

            valid, message = self._check_validity()
            if not valid:
                if not old_parent:
                    self._parent = None
                else:
                    self._parent = ref(old_parent)

                class_name = self.__class__.__name__
                if global_config.get_config_value("LIBRARY_RECOVERY_MODE") is True:
                    do_delete_item = True
                    # In case of just the data type is wrong raise an Exception but keep the data flow
                    if "not have matching data types" in message:
                        do_delete_item = False
                        self._parent = ref(parent)
                    raise RecoveryModeException("{0} invalid within state \"{1}\" (id {2}): {3}".format(
                        class_name, parent.name, parent.state_id, message), do_delete_item=do_delete_item)
                else:
                    raise ValueError("{0} invalid within state \"{1}\" (id {2}): {3} {4}".format(
                        class_name, parent.name, parent.state_id, message, self))
235280
def get_parent_bank_nodes(self):
        
        parent_bank_nodes = []
        for node in self._my_map['parentNodes']:
            parent_bank_nodes.append(BankNode(
                node._my_map,
                runtime=self._runtime,
                proxy=self._proxy,
                lookup_session=self._lookup_session))
        return BankNodeList(parent_bank_nodes)
919654
def get_parent_element(self):
        """"""
        return {AUDIT_REF_STATE: self.context.audit_record,
                SIGNATURE_REF_STATE: self.context.signature}[self.ref_state]
542391
def parents(self, p_todo, p_only_direct=False):
        
        parents = self._depgraph.incoming_neighbors(
            hash(p_todo), not p_only_direct)
        return [self._tododict[parent] for parent in parents]
1286336
def get_ancestors(self):
        
        ancestors = []
        if self._meta.proxy_for_model:
            # the current node is a proxy model; our result set
            # should use the same proxy model, so we need to
            # explicitly fetch instances of that model
            # when following the 'parent' relation
            cls = self.__class__
            node = self
            while node.parent_id:
                node = cls.objects.get(pk=node.parent_id)
                ancestors.insert(0, node)
        else:
            node = self.parent
            while node:
                ancestors.insert(0, node)
                node = node.parent
        return ancestors
654894
def parents(self, id, level=None, featuretype=None, order_by=None,
                reverse=False, completely_within=False, limit=None):
        
        return self._relation(
            id, join_on='parent', join_to='child', level=level,
            featuretype=featuretype, order_by=order_by, reverse=reverse,
            limit=limit, completely_within=completely_within)
892500
def get_parent_ids(self):
        
        id_list = []
        from ..id.objects import IdList
        for parent_node in self._my_map['parentNodes']:
            id_list.append(str(parent_node.ident))
        return IdList(id_list)
584888
def get(self):
        
        if len(self.publishers) == 0:
            return Publisher(name=self.name, parent_pool=self)
        else:
            return self.publishers.pop()