# Path: inspire_schemas/builders/literature.py
# def is_citeable(publication_info):
#     """Check some fields in order to define if the article is citeable.
# 
#     :param publication_info: publication_info field
#     already populated
#     :type publication_info: list
#     """
# 
#     def _item_has_pub_info(item):
#         return all(
#             key in item for key in (
#                 'journal_title', 'journal_volume'
#             )
#         )
# 
#     def _item_has_page_or_artid(item):
#         return any(
#             key in item for key in (
#                 'page_start', 'artid'
#             )
#         )
# 
#     has_pub_info = any(
#         _item_has_pub_info(item) for item in publication_info
#     )
#     has_page_or_artid = any(
#         _item_has_page_or_artid(item) for item in publication_info
#     )
# 
#     return has_pub_info and has_page_or_artid


from itertools import chain
from six import text_type
from inspire_schemas.builders.literature import is_citeable
from inspire_utils.helpers import force_list
from inspire_utils.record import get_value
            self.record,
            'publication_info.year[0]',
            default=''
        ))

    @property
    def is_published(self):
        """Return True if a record is published.

        We say that a record is published if it is citeable, which means that
        it has enough information in a ``publication_info``, or if we know its
        DOI and a ``journal_title``, which means it is in press.

        Returns:
            bool: whether the record is published.

        Examples:
            >>> record = {
            ...     'dois': [
            ...         {'value': '10.1016/0029-5582(61)90469-2'},
            ...     ],
            ...     'publication_info': [
            ...         {'journal_title': 'Nucl.Phys.'},
            ...     ],
            ... }
            >>> LiteratureReader(record).is_published
            True

        """
        citeable = 'publication_info' in self.record and \

# Path: inspire_schemas/builders/literature.py
# def is_citeable(publication_info):
#     """Check some fields in order to define if the article is citeable.
# 
#     :param publication_info: publication_info field
#     already populated
#     :type publication_info: list
#     """
# 
#     def _item_has_pub_info(item):
#         return all(
#             key in item for key in (
#                 'journal_title', 'journal_volume'
#             )
#         )
# 
#     def _item_has_page_or_artid(item):
#         return any(
#             key in item for key in (
#                 'page_start', 'artid'
#             )
#         )
# 
#     has_pub_info = any(
#         _item_has_pub_info(item) for item in publication_info
#     )
#     has_page_or_artid = any(
#         _item_has_page_or_artid(item) for item in publication_info
#     )
# 
#     return has_pub_info and has_page_or_artid


# Path: inspire_schemas/readers/literature.py
from itertools import chain
from six import text_type
from inspire_schemas.builders.literature import is_citeable
from inspire_utils.helpers import force_list
from inspire_utils.record import get_value

            self.record,
            'publication_info.year[0]',
            default=''
        ))

    @property
    def is_published(self):
        """Return True if a record is published.

        We say that a record is published if it is citeable, which means that
        it has enough information in a ``publication_info``, or if we know its
        DOI and a ``journal_title``, which means it is in press.

        Returns:
            bool: whether the record is published.

        Examples:
            >>> record = {
            ...     'dois': [
            ...         {'value': '10.1016/0029-5582(61)90469-2'},
            ...     ],
            ...     'publication_info': [
            ...         {'journal_title': 'Nucl.Phys.'},
            ...     ],
            ... }
            >>> LiteratureReader(record).is_published
            True

        """
        citeable = 'publication_info' in self.record and \

            is_citeable(self.record['publication_info'])