Example #1
0
    def Source(self):
        """ the default preprint server source format
        """
        try:
            return self.PreprintSource()
        except AttributeError:
            source = "Preprint"
            preprint_server = self.getPreprint_server()
            if preprint_server:
                if ':' in preprint_server:
                    text, link = preprint_server.split(':', 1)
                    if text != 'None':
                        source += ' at <a href="%s">%s</a>' % (link, text)
                else:
                    source += " at %s" % preprint_server
            return source + "."

    security.declareProtected(View, 'getCoinsDict')

    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.genre'] = "document"
        coinsData['rft.btitle'] = self.Title()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"
        return coinsData


registerType(PreprintReference, PROJECTNAME)
TCEvent_schema['creation_date'].widget.visible={'edit':'visible', 'view':'invisible'}
##/code-section after-schema

class ITCEvent(Interface):
    """ """

class TCEvent(ATFolder,ATEvent):
    """
    """
    security = ClassSecurityInfo()

    implements(ITCEvent)

    meta_type = 'TCEvent'
    _at_rename_after_creation = True

    schema = TCEvent_schema

    ##code-section class-header #fill in your manual code here
    ##/code-section class-header

    # Methods

registerType(TCEvent, PROJECTNAME)

##code-section module-footer #fill in your manual code here
##/code-section module-footer



            isbn = self.getIsbn()

            if publication_type:
                source = publication_type
            else:
                source = 'PhD thesis'
            if school: source += ', %s' % school
            if address: source += ', %s' % address
            if source and (source[-1] != '.'):
                source += '.'
            if isbn: source += ' (ISBN: %s).' % isbn

            if source and (source[-1] not in '.!?'):
                source += '.'

            return source

    security.declareProtected(View, 'getCoinsDict')

    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.aucorp'] = self.getSchool()
        coinsData['rft.genre'] = "document"
        coinsData['rft.btitle'] = self.Title()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"
        return coinsData


registerType(PhdthesisReference, PROJECTNAME)
    security = ClassSecurityInfo()
    archetype_name = "Booklet Reference"
    source_fields = ('howpublished',)

    schema = BookletSchema

    security.declareProtected(View, 'Source')
    def Source(self):
        """ the default booklet source format
        """
        try:
            return self.BookletSource()

        except AttributeError:
            howpublished = self.getHowpublished()
            source = 'Booklet'
            if howpublished: source += ', %s' % howpublished
            return source + '.'

    security.declareProtected(View, 'getCoinsDict')
    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.genre'] = "book"
        coinsData['rft.btitle'] = self.Title()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"
        return coinsData
        
registerType(BookletReference, PROJECTNAME)
            booktitle        = self.getBooktitle()
            volume           = self.getVolume()
            number           = self.getNumber()
            series           = self.getSeries()
            pages            = self.getPages()
            address          = self.getAddress()
            organization     = self.getOrganization()
            publisher        = self.getPublisher()

            source = 'In: %s' % booktitle
            if volume:
                source += ', vol. %s' % volume
                if number: source += '(%s)' % number
            if pages: source += ', pp. %s' % pages
            if address: source += ', ' + address
            if organization: source += ', %s' % organization
            if publisher: source += ', %s' % publisher
            if series: source += '. %s' % series

            return source + '.'

    security.declareProtected(View, 'getCoinsDict')
    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = InbookReference.getCoinsDict(self)
        coinsData['rft.aucorp'] = self.getOrganization()
        coinsData['rft.genre'] = "conference"
        return coinsData
        
registerType(ConferenceReference, PROJECTNAME)
    'view': 'invisible',
    'edit': 'invisible',
}

finalizeATCTSchema(UnpublishedSchema)


class UnpublishedReference(BaseEntry):
    """Content type to make reference to a unpublished document.
    """

    implements(IUnpublishedReference)

    archetype_name = "Unpublished Reference"
    security = ClassSecurityInfo()

    schema = UnpublishedSchema

    security.declareProtected(View, 'getCoinsDict')

    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.genre'] = "document"
        coinsData['rft.btitle'] = self.Title()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"
        return coinsData


registerType(UnpublishedReference, PROJECTNAME)
    def Source(self):
        """ the default misc source format
        """
        try:

            return self.MiscSource()

        except AttributeError:

            howpublished = self.getHowpublished()

            source = "Miscellaneous publication"
            if howpublished:
                source += ", %s" % howpublished

            return source + "."

    security.declareProtected(View, "getCoinsDict")

    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData["rft.genre"] = "document"
        coinsData["rft.btitle"] = self.Title()
        coinsData["rft_val_fmt"] = "info:ofi/fmt:kev:mtx:book"
        return coinsData


registerType(MiscReference, PROJECTNAME)
            school              = self.getSchool()
            address             = self.getAddress()
            isbn                = self.getIsbn()

            if publication_type:
                source = publication_type
            else:
                source = 'PhD thesis'
            if school: source += ', %s' % school
            if address: source += ', %s' % address
            if source and (source[-1] != '.'):
                source += '.'
            if isbn: source += ' (ISBN: %s).' % isbn

            if source and (source[-1] not in '.!?'):
                source += '.'

            return source

    security.declareProtected(View, 'getCoinsDict')
    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.aucorp'] = self.getSchool()
        coinsData['rft.genre'] = "document"
        coinsData['rft.btitle'] = self.Title()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"
        return coinsData

registerType(PhdthesisReference, PROJECTNAME)
        try:

            return self.TechreportSource()

        except AttributeError:

            institution                 = self.getInstitution()
            publication_type            = self.getPublication_type()
            number                      = self.getNumber()
            address                     = self.getAddress()

            source = institution
            if publication_type:
                source += ', %s' % publication_type
                if number: source += '(%s)' % number
            if address: source += ', %s' % address

            return source + '.'

    security.declareProtected(View, 'getCoinsDict')
    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.genre'] = "report"
        coinsData['rft.aucorp'] = self.getInstitution()
        coinsData['rft.btitle'] = self.Title()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"
        return coinsData

registerType(TechreportReference, PROJECTNAME)
Example #10
0
                source += '%s' % address
                if edition: source += ', '
            if edition:
                if bs_tool:
                    source += '%s' % bs_tool.formatEdition(edition,
                                                           abbreviate=True)
                else:
                    source += '%s ed.' % edition
            if source and (source[-1] != '.'):
                source += '.'
            if isbn: source += ' (ISBN: %s).' % isbn

            if source and (source[-1] not in '.!?'): source += '.'

            return source

    security.declareProtected(View, 'getCoinsDict')

    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.edition'] = self.getEdition()
        coinsData['rft.aucorp'] = self.getOrganization()
        coinsData['rft.genre'] = "document"
        coinsData['rft.btitle'] = self.Title()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"
        return coinsData


registerType(ManualReference, PROJECTNAME)
            number  = self.getNumber()
            pages   = self.getPages()
            source = ''
            if journal:
                source += journal
            if volume:
                source += ', %s' % volume
            if number:
                source += '(%s)' % number
            if pages:
                source += ':%s' % pages
            return source + '.'


    security.declareProtected(View, 'getCoinsDict')
    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.part'] = self.getNumber()
        coinsData['rft.volume'] = self.getVolume()
        coinsData['rft.pages'] = self.getPages()
        coinsData['rft.genre'] = "article"
        coinsData['rft.atitle'] = self.Title()
        coinsData['rft.title'] = self.getJournal()
        coinsData['rft.jtitle'] = self.getJournal()

        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:journal"
        return coinsData

registerType(ArticleReference, PROJECTNAME)
Example #12
0
)


class MyType(  # MyBase,   # (add later, after solution for factory problem)
        ATCTContent, ):
    """
    My content type which appears in the types tool,
    but currently can't be added
    """
    security = ClassSecurityInfo()

    implements(IMyType)

    meta_type = 'MyType'
    _at_rename_after_creation = True

    schema = MyType_schema

    ##code-section class-header #fill in your manual code here
    ##/code-section class-header

    # Methods


# set_trace()
registerType(MyType, PROJECTNAME)
# end of class UnitraccFile

##code-section module-footer #fill in your manual code here
##/code-section module-footer
        try:

            return self.MastersthesisSource()

        except AttributeError:

            school              = self.getSchool()
            publication_type    = self.getPublication_type()
            address             = self.getAddress()

            if publication_type:
                source = publication_type
            else:
                source = 'Master thesis'
            if school: source += ', %s' % school
            if address: source += ', %s' % address

            return source + '.'

    security.declareProtected(View, 'getCoinsDict')
    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.aucorp'] = self.getSchool()
        coinsData['rft.genre'] = "document"
        coinsData['rft.btitle'] = self.Title()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"
        return coinsData

registerType(MastersthesisReference, PROJECTNAME)
            if volume:
                source += ', vol. %s' % volume
                if number: source += '(%s)' % number
            if organization: source += ', %s' % organization

            if source: source = source[2:]
            if series: source += ' %s.' % series
            if isbn: source += ' (ISBN: %s).' % isbn

            if source and (source[-1] not in '.!?'):
                source += '.'

            return source

    security.declareProtected(View, 'getCoinsDict')

    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.pub'] = self.getPublisher()
        coinsData['rft.place'] = self.getAddress()
        coinsData['rft.series'] = self.getSeries()
        coinsData['rft.genre'] = "proceeding"
        coinsData['rft.aucorp'] = self.getOrganization()
        coinsData['rft.btitle'] = self.Title()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"
        return coinsData


registerType(ProceedingsReference, PROJECTNAME)
            if source and (source[-1] not in ".!?"):
                source += "."

            return source

    security.declareProtected(View, "getCoinsDict")

    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """

        coinsData = BaseEntry.getCoinsDict(self)
        coinsData["rft.atitle"] = self.Title()
        coinsData["rft.btitle"] = self.getBooktitle()
        coinsData["rft.pages"] = self.getPages()
        coinsData["rft.genre"] = "bookitem"
        coinsData["rft.pub"] = self.getPublisher()
        coinsData["rft.place"] = self.getAddress()
        coinsData["rft.series"] = self.getSeries()
        coinsData["rft_val_fmt"] = "info:ofi/fmt:kev:mtx:book"

        # Why do we have fields in the superclass that aren't in the subclasses?
        schema = self.schema.keys()
        coinsData["rft.edition"] = ("edition" in schema) and self.getEdition() or ""
        coinsData["rft.chapter"] = ("chapter" in schema) and self.getChapter() or ""

        return coinsData


registerType(InbookReference, PROJECTNAME)
            publication_type = self.getPublication_type()
            publisher        = self.getPublisher()
            address          = self.getAddress()
            chapter          = self.getChapter()
            pages            = self.getPages()
            series           = self.getSeries()
            isbn             = self.getIsbn()

            source = 'In: %s' % booktitle
            if editor: source += ', ed. by %s' % editor
            if volume:
                source += ', vol. %s' % volume
                if number: source += '(%s)' % number
            if chapter: source += ', chap. %s' % chapter
            if pages: source += ', pp. %s' % pages
            if publisher: source += ', ' + publisher
            if address: source += ', ' + address
            if publication_type: source += ', %s' % publication_type

            if source and (source[-1] not in '.!?'): source += '.' 

            if series: source += ' %s.' % series 
            if isbn: source += ' (ISBN: %s).' % isbn

            if source and (source[-1] not in '.!?'):
                source += '.'

            return source

registerType(IncollectionReference, PROJECTNAME)
Example #17
0
            return self.TechreportSource()

        except AttributeError:

            institution = self.getInstitution()
            publication_type = self.getPublication_type()
            number = self.getNumber()
            address = self.getAddress()

            source = institution
            if publication_type:
                source += ', %s' % publication_type
                if number: source += '(%s)' % number
            if address: source += ', %s' % address

            return source + '.'

    security.declareProtected(View, 'getCoinsDict')

    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.genre'] = "report"
        coinsData['rft.aucorp'] = self.getInstitution()
        coinsData['rft.btitle'] = self.Title()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"
        return coinsData


registerType(TechreportReference, PROJECTNAME)
            field = self.getField('image')
            image = None
            if name == 'image':
                image = field.getScale(self)
            else:
                scalename = name[len('image_'):]
                if scalename in field.getAvailableSizes(self):
                    image = field.getScale(self, scale=scalename)
            if image is not None and not isinstance(image, basestring):
                # image might be None or '' for empty images
                return image

        return ATFolder.__bobo_traverse__(self, REQUEST, name)

    security.declareProtected('View', 'tag')
    def tag(self, **kwargs):
        """Generate image tag using the api of the ImageField
        """
        return self.getField('image').tag(self, **kwargs)

    def has_binary(self):
        """ """
        if self.getImage():
            return True

registerType(TCTeaser, PROJECTNAME)
# end of class Teaser

##code-section module-footer #fill in your manual code here
##/code-section module-footer
            edition = self.getEdition()
            isbn    = self.getIsbn()

            source = ''
            if address:
                source += '%s' % address
                if edition: source += ', '
            if edition:
                if bs_tool: source += '%s' % bs_tool.formatEdition(edition, abbreviate=True)
                else: source += '%s ed.' % edition
            if source and (source[-1] != '.'):
                source += '.'
            if isbn: source += ' (ISBN: %s).' % isbn

            if source and (source[-1] not in '.!?'): source += '.'

            return source

    security.declareProtected(View, 'getCoinsDict')
    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.edition'] = self.getEdition()
        coinsData['rft.aucorp'] = self.getOrganization()
        coinsData['rft.genre'] = "document"
        coinsData['rft.btitle'] = self.Title()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"
        return coinsData
        
registerType(ManualReference, PROJECTNAME)
Example #20
0
        ),
    )

))

# Set storage on fields copied from ATContentTypeSchema, making sure they work
# well with the python bridge properties. (I have no idea what this means, and
# why annotation storage is used, but it got copied over from the old site by
# mistake, and I think it's too late to change now, as content already exists
# that use annotation storage. Sorry. //regebro)

PromotionSchema['title'].storage = atapi.AnnotationStorage()
PromotionSchema['description'].storage = atapi.AnnotationStorage()
PromotionSchema['description'].required = True
PromotionSchema['effectiveDate'].language_independent = True
PromotionSchema['expirationDate'].language_independent = True

schemata.finalizeATCTSchema(PromotionSchema, moveDiscussion=False)

class Promotion(base.ATCTContent):
    """Promotion"""
    implements(IPromotion)

    portal_type = archetype_name = "Promotion"
    schema = PromotionSchema

    title = atapi.ATFieldProperty('title')
    description = atapi.ATFieldProperty('description')

base.registerType(Promotion, PROJECTNAME)
            pages = self.getPages()
            source = ''
            if journal:
                source += journal
            if volume:
                source += ', %s' % volume
            if number:
                source += '(%s)' % number
            if pages:
                source += ':%s' % pages
            return source + '.'

    security.declareProtected(View, 'getCoinsDict')

    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.part'] = self.getNumber()
        coinsData['rft.volume'] = self.getVolume()
        coinsData['rft.pages'] = self.getPages()
        coinsData['rft.genre'] = "article"
        coinsData['rft.atitle'] = self.Title()
        coinsData['rft.title'] = self.getJournal()
        coinsData['rft.jtitle'] = self.getJournal()

        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:journal"
        return coinsData


registerType(ArticleReference, PROJECTNAME)
    security.declareProtected(View, 'Source')
    def Source(self):
        """ the default webpublished source format
        """
        try:

            return self.BookSource()

        except AttributeError:

            url = self.getPublication_url()

            source = 'Webpublished'
            if url: source += ', %s' % url
            if source and (source[-1] not in  '.!?'):
                source += '.'

            return source

    security.declareProtected(View, 'getCoinsDict')
    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.genre'] = "document"
        coinsData['rft.btitle'] = self.Title()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"
        return coinsData

registerType(WebpublishedReference, PROJECTNAME)
Example #23
0
    # Methods
    def __bobo_traverse__(self, REQUEST, name):
        """Transparent access to image scales
        """
        if name.startswith('image'):
            field = self.getField('image')
            image = None
            if name == 'image':
                image = field.getScale(self)
            else:
                scalename = name[len('image_'):]
                if scalename in field.getAvailableSizes(self):
                    image = field.getScale(self, scale=scalename)
            if image is not None and not isinstance(image, basestring):
                # image might be None or '' for empty images
                return image

        return ATFolder.__bobo_traverse__(self, REQUEST, name)

    security.declareProtected('View', 'tag')
    def tag(self, **kwargs):
        """Generate image tag using the api of the ImageField
        """
        return self.getField('image').tag(self, **kwargs)


registerType(TCNews, PROJECTNAME)

##code-section module-footer #fill in your manual code here
##/code-section module-footer
}
##/code-section after-schema


class ITCEvent(Interface):
    """ """


class TCEvent(ATFolder, ATEvent):
    """
    """
    security = ClassSecurityInfo()

    implements(ITCEvent)

    meta_type = 'TCEvent'
    _at_rename_after_creation = True

    schema = TCEvent_schema

    ##code-section class-header #fill in your manual code here
    ##/code-section class-header

    # Methods


registerType(TCEvent, PROJECTNAME)

##code-section module-footer #fill in your manual code here
##/code-section module-footer
Example #25
0
            publisher = self.getPublisher()
            address = self.getAddress()
            chapter = self.getChapter()
            pages = self.getPages()
            series = self.getSeries()
            isbn = self.getIsbn()

            source = 'In: %s' % booktitle
            if editor: source += ', ed. by %s' % editor
            if volume:
                source += ', vol. %s' % volume
                if number: source += '(%s)' % number
            if chapter: source += ', chap. %s' % chapter
            if pages: source += ', pp. %s' % pages
            if publisher: source += ', ' + publisher
            if address: source += ', ' + address
            if publication_type: source += ', %s' % publication_type

            if source and (source[-1] not in '.!?'): source += '.'

            if series: source += ' %s.' % series
            if isbn: source += ' (ISBN: %s).' % isbn

            if source and (source[-1] not in '.!?'):
                source += '.'

            return source


registerType(IncollectionReference, PROJECTNAME)
    source_fields = ('howpublished', )

    schema = BookletSchema

    security.declareProtected(View, 'Source')

    def Source(self):
        """ the default booklet source format
        """
        try:
            return self.BookletSource()

        except AttributeError:
            howpublished = self.getHowpublished()
            source = 'Booklet'
            if howpublished: source += ', %s' % howpublished
            return source + '.'

    security.declareProtected(View, 'getCoinsDict')

    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.genre'] = "book"
        coinsData['rft.btitle'] = self.Title()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"
        return coinsData


registerType(BookletReference, PROJECTNAME)
            number = self.getNumber()
            series = self.getSeries()
            pages = self.getPages()
            address = self.getAddress()
            organization = self.getOrganization()
            publisher = self.getPublisher()

            source = 'In: %s' % booktitle
            if volume:
                source += ', vol. %s' % volume
                if number: source += '(%s)' % number
            if pages: source += ', pp. %s' % pages
            if address: source += ', ' + address
            if organization: source += ', %s' % organization
            if publisher: source += ', %s' % publisher
            if series: source += '. %s' % series

            return source + '.'

    security.declareProtected(View, 'getCoinsDict')

    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = InbookReference.getCoinsDict(self)
        coinsData['rft.aucorp'] = self.getOrganization()
        coinsData['rft.genre'] = "conference"
        return coinsData


registerType(ConferenceReference, PROJECTNAME)
Example #28
0
    # Methods
    def __bobo_traverse__(self, REQUEST, name):
        """Transparent access to image scales
        """
        if name.startswith('image'):
            field = self.getField('image')
            image = None
            if name == 'image':
                image = field.getScale(self)
            else:
                scalename = name[len('image_'):]
                if scalename in field.getAvailableSizes(self):
                    image = field.getScale(self, scale=scalename)
            if image is not None and not isinstance(image, basestring):
                # image might be None or '' for empty images
                return image

        return ATFolder.__bobo_traverse__(self, REQUEST, name)

    security.declareProtected('View', 'tag')

    def tag(self, **kwargs):
        """Generate image tag using the api of the ImageField
        """
        return self.getField('image').tag(self, **kwargs)


registerType(TCNews, PROJECTNAME)

##code-section module-footer #fill in your manual code here
##/code-section module-footer
            return self.MastersthesisSource()

        except AttributeError:

            school = self.getSchool()
            publication_type = self.getPublication_type()
            address = self.getAddress()

            if publication_type:
                source = publication_type
            else:
                source = 'Master thesis'
            if school: source += ', %s' % school
            if address: source += ', %s' % address

            return source + '.'

    security.declareProtected(View, 'getCoinsDict')

    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.aucorp'] = self.getSchool()
        coinsData['rft.genre'] = "document"
        coinsData['rft.btitle'] = self.Title()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"
        return coinsData


registerType(MastersthesisReference, PROJECTNAME)
    security.declareProtected(View, 'Source')

    def Source(self):
        """ the default misc source format
        """
        try:

            return self.MiscSource()

        except AttributeError:

            howpublished = self.getHowpublished()

            source = 'Miscellaneous publication'
            if howpublished: source += ', %s' % howpublished

            return source + '.'

    security.declareProtected(View, 'getCoinsDict')

    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.genre'] = "document"
        coinsData['rft.btitle'] = self.Title()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"
        return coinsData


registerType(MiscReference, PROJECTNAME)
    def Source(self):
        """ the default preprint server source format
        """
        try:
            return self.PreprintSource()
        except AttributeError:
            source = "Preprint"
            preprint_server = self.getPreprint_server()
            if preprint_server:
                if ":" in preprint_server:
                    text, link = preprint_server.split(":", 1)
                    if text != "None":
                        source += ' at <a href="%s">%s</a>' % (link, text)
                else:
                    source += " at %s" % preprint_server
            return source + "."

    security.declareProtected(View, "getCoinsDict")

    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData["rft.genre"] = "document"
        coinsData["rft.btitle"] = self.Title()
        coinsData["rft_val_fmt"] = "info:ofi/fmt:kev:mtx:book"
        return coinsData


registerType(PreprintReference, PROJECTNAME)
            if publisher: source = ', %s' % publisher
            if address: source += ', ' + address
            if volume:
                source += ', vol. %s' % volume
                if number: source += '(%s)' % number
            if organization: source += ', %s' % organization

            if source: source = source[2:]
            if series: source += ' %s.' % series
            if isbn: source += ' (ISBN: %s).' % isbn

            if source and (source[-1] not in '.!?'):
                source += '.'

            return source

    security.declareProtected(View, 'getCoinsDict')
    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """
        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.pub'] = self.getPublisher()
        coinsData['rft.place'] = self.getAddress()
        coinsData['rft.series'] = self.getSeries()
        coinsData['rft.genre'] = "proceeding"
        coinsData['rft.aucorp'] = self.getOrganization()
        coinsData['rft.btitle'] = self.Title()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"
        return coinsData

registerType(ProceedingsReference, PROJECTNAME)
                source += '.'

            return source

    security.declareProtected(View, 'getCoinsDict')

    def getCoinsDict(self):
        """ Select which values to display in the COinS tag for this item """

        coinsData = BaseEntry.getCoinsDict(self)
        coinsData['rft.atitle'] = self.Title()
        coinsData['rft.btitle'] = self.getBooktitle()
        coinsData['rft.pages'] = self.getPages()
        coinsData['rft.genre'] = "bookitem"
        coinsData['rft.pub'] = self.getPublisher()
        coinsData['rft.place'] = self.getAddress()
        coinsData['rft.series'] = self.getSeries()
        coinsData['rft_val_fmt'] = "info:ofi/fmt:kev:mtx:book"

        # Why do we have fields in the superclass that aren't in the subclasses?
        schema = self.schema.keys()
        coinsData['rft.edition'] = ('edition'
                                    in schema) and self.getEdition() or ""
        coinsData['rft.chapter'] = ('chapter'
                                    in schema) and self.getChapter() or ""

        return coinsData


registerType(InbookReference, PROJECTNAME)