예제 #1
0
    def publisher(self):
        """
        Get the publisher.

        Returns: str
        """

        return clean_field(self.record.publisher())
예제 #2
0
    def date(self):
        """
        Get the date.

        Returns: str
        """

        return clean_field(self.record.pubyear())
예제 #3
0
    def control_number(self):
        """
        Get the control number.

        Returns: str
        """

        return clean_field(self.record['001'].format_field())
예제 #4
0
    def title(self):
        """
        Get the title.

        Returns: str
        """

        return clean_field(self.record.title())
예제 #5
0
    def surname(self):
        """
        Extract a surname.

        Returns: surname
        """

        author = clean_field(self.record.author())
        return author.split(',')[0] if author else None
예제 #6
0
    def authors(self):
        """
        Get the author array.

        Returns: list
        """

        author = clean_field(self.record.author())
        return [author] if author else []
    def date(self):

        """
        Get the date.

        Returns: str
        """

        return clean_field(self.record.pubyear())
    def publisher(self):

        """
        Get the publisher.

        Returns: str
        """

        return clean_field(self.record.publisher())
    def title(self):

        """
        Get the title.

        Returns: str
        """

        return clean_field(self.record.title())
    def control_number(self):

        """
        Get the control number.

        Returns: str
        """

        return clean_field(self.record['001'].format_field())
    def surname(self):

        """
        Extract a surname.

        Returns: surname
        """

        author = clean_field(self.record.author())
        return author.split(',')[0] if author else None
    def authors(self):

        """
        Get the author array.

        Returns: list
        """

        author = clean_field(self.record.author())
        return [author] if author else []
def test_clean_field(raw, clean, mock_hlom):
    assert clean_field(raw) == clean