from Products.CMFBibliographyAT.config import PROJECTNAME
from Products.CMFBibliographyAT.content.base import BaseEntry
from Products.CMFBibliographyAT.content.schemata \
    import HeaderSchema, AuthorSchema, CoreSchema, TrailingSchema
from Products.CMFBibliographyAT.content.fields \
    import schoolField, addressField, typeField, isbnField


SourceSchema = Schema((
    typeField,
    schoolField,
    addressField,
    isbnField,
     ))

PhdthesisSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
                  SourceSchema.copy() + TrailingSchema.copy()
PhdthesisSchema.get('authors').required = 1
PhdthesisSchema.get('school').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
PhdthesisSchema.get('description').widget.visible = {'view': 'invisible', 'edit': 'invisible', }

finalizeATCTSchema(PhdthesisSchema)

class PhdthesisReference(BaseEntry):
    """ content type to make reference to a PhD thesis.
    """

    implements(IPhdthesisReference)
from Products.CMFBibliographyAT.content.fields \
    import publisherField, addressField, editionField, volumeField, \
           numberField, seriesField, editor_flagField, isbnField

AuthorTrailingSchema = Schema((editor_flagField, ))

SourceSchema = Schema((
    publisherField,
    addressField,
    editionField,
    volumeField,
    numberField,
    seriesField,
    isbnField,
))
BookSchema = HeaderSchema.copy() + AuthorSchema.copy() + AuthorTrailingSchema.copy() + \
             CoreSchema.copy() + SourceSchema.copy() + TrailingSchema.copy()
BookSchema.get('authors').required = 1
BookSchema.get('publication_year').required = 1
BookSchema.get('publisher').required = 1

# the default AT 'description' field shall be invisible, it is kept in
# sync with the 'abstract' field
BookSchema.get('description').widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
}

finalizeATCTSchema(BookSchema)

            searchable=1,
            required=0,
            vocabulary="PreprintServers",
            widget=SelectionWidget(
                label="Preprint server",
                label_msgid="label_preprint_server",
                description="If the preprint is available from one of the following preprint servers, you can indicate that here. Contact the site's admin if you want a server to be added to the list.",
                description_msgid="help_preprint_server",
                i18n_domain="cmfbibliographyat",
            ),
        ),
    )
)

PreprintSchema = (
    HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() + SourceSchema.copy() + TrailingSchema.copy()
)

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
PreprintSchema.get("description").widget.visible = {"view": "invisible", "edit": "invisible"}

finalizeATCTSchema(PreprintSchema)


class PreprintReference(BaseEntry):
    """ content type to make reference to a preprint
    """

    implements(IPreprintReference)

    security = ClassSecurityInfo()
    'editor_flag'].widget.description = 'Leave this checked unless the people specified above are not the editors of this proceedings volume.'
ThisAuthorTrailingSchema[
    'editor_flag'].widget.description_msgid = 'help_editor_flag_checked'
ThisAuthorTrailingSchema['editor_flag'].mode = 'r'

SourceSchema = Schema((
    publisherField,
    addressField,
    volumeField,
    numberField,
    organizationField,
    seriesField,
    isbnField,
))

ProceedingsSchema = HeaderSchema.copy() + AuthorSchema.copy() + ThisAuthorTrailingSchema.copy() + \
                    CoreSchema.copy() + SourceSchema.copy() + TrailingSchema.copy()
ProceedingsSchema.get('authors').required = 0
ProceedingsSchema.get('publication_year').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
ProceedingsSchema.get('description').widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
}

finalizeATCTSchema(ProceedingsSchema)


class ProceedingsReference(BaseEntry):
    """ content type to make reference to a book.
SourceSchema = Schema((
    booktitleField,
    editorField,
    volumeField,
    numberField,
    typeField,
    publisherField,
    addressField,
    editionField,
    seriesField,
    chapterField,
    pagesField,
    isbnField,
))

IncollectionSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
                     SourceSchema.copy() + TrailingSchema.copy()
IncollectionSchema.get('authors').required = 1
IncollectionSchema.get('publication_year').required = 1
IncollectionSchema.get('booktitle').required = 1
IncollectionSchema.get('publisher').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
IncollectionSchema.get('description').widget.visible = {'view': 'invisible', 'edit': 'invisible', }

finalizeATCTSchema(IncollectionSchema)

class IncollectionReference(InbookReference):
    """ content type to make reference to a chapter within a collection volume.
    """
from Products.ATContentTypes.content.base import registerATCT as registerType
from Products.ATContentTypes.content.schemata import finalizeATCTSchema

from Products.CMFBibliographyAT.content.base import BaseEntry
from Products.CMFBibliographyAT.config import PROJECTNAME
from Products.CMFBibliographyAT.content.schemata \
    import HeaderSchema, AuthorSchema, CoreSchema, TrailingSchema
from Products.CMFBibliographyAT.content.fields import howpublishedField


howpublishedspecificField = howpublishedField.copy()
howpublishedspecificField.default = 'Booklet'
SourceSchema = Schema((
    howpublishedspecificField,
    ))
BookletSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
                SourceSchema.copy() + TrailingSchema.copy()
BookletSchema.get('authors').required = 0
# normally the publication_year for BookletReferences is optional, but
# in CMFBAT we better force the user to enter something here (better not
# irritate portal_catalog...).
BookletSchema.get('publication_year').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
BookletSchema.get('description').widget.visible = {'view': 'invisible', 'edit': 'invisible', }

finalizeATCTSchema(BookletSchema)

class BookletReference(BaseEntry):
    """ content type to make reference to a booklet (a book without publisher).
    """
Esempio n. 7
0
SourceSchema = Schema((StringField(
    'preprint_server',
    searchable=1,
    required=0,
    vocabulary="PreprintServers",
    widget=SelectionWidget(
        label="Preprint server",
        label_msgid="label_preprint_server",
        description=
        "If the preprint is available from one of the following preprint servers, you can indicate that here. Contact the site's admin if you want a server to be added to the list.",
        description_msgid="help_preprint_server",
        i18n_domain="cmfbibliographyat",
    ),
), ))

PreprintSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
                 SourceSchema.copy() + TrailingSchema.copy()

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
PreprintSchema.get('description').widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
}

finalizeATCTSchema(PreprintSchema)


class PreprintReference(BaseEntry):
    """ content type to make reference to a preprint
    """
Esempio n. 8
0
SourceSchema = Schema((
    booktitleField,
    editorField,
    volumeField,
    numberField,
    chapterField,
    pagesField,
    publisherField,
    organizationField,
    addressField,
    editionField,
    seriesField,
    isbnField,
))

InproceedingsSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
               SourceSchema.copy() + TrailingSchema.copy()
InproceedingsSchema.get('authors').required = 1
InproceedingsSchema.get('booktitle').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
InproceedingsSchema.get('description').widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
}

finalizeATCTSchema(InproceedingsSchema)


class InproceedingsReference(InbookReference):
    """ content type to make reference to a chapter within a proceedings volume.
Esempio n. 9
0
from Products.CMFBibliographyAT.config import PROJECTNAME
from Products.CMFBibliographyAT.content.base import BaseEntry
from Products.CMFBibliographyAT.content.schemata \
    import HeaderSchema, AuthorSchema, CoreSchema, TrailingSchema
from Products.CMFBibliographyAT.content.fields \
    import institutionField, typeField, numberField, addressField

SourceSchema = Schema((
    institutionField,
    typeField,
    numberField,
    addressField,
))

TechreportSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
                   SourceSchema.copy() + TrailingSchema.copy()
TechreportSchema.get('authors').required = 1
TechreportSchema.get('publication_year').required = 1
TechreportSchema.get('institution').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
TechreportSchema.get('description').widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
}

finalizeATCTSchema(TechreportSchema)


class TechreportReference(BaseEntry):

AuthorTrailingSchema = Schema((
    editor_flagField,
    ))

SourceSchema = Schema((
    publisherField,
    addressField,
    editionField,
    volumeField,
    numberField,
    seriesField,
    isbnField,
))
BookSchema = HeaderSchema.copy() + AuthorSchema.copy() + AuthorTrailingSchema.copy() + \
             CoreSchema.copy() + SourceSchema.copy() + TrailingSchema.copy()
BookSchema.get('authors').required = 1
BookSchema.get('publication_year').required = 1
BookSchema.get('publisher').required = 1

# the default AT 'description' field shall be invisible, it is kept in 
# sync with the 'abstract' field
BookSchema.get('description').widget.visible = {'view': 'invisible',
                                                'edit': 'invisible', }

finalizeATCTSchema(BookSchema)


class BookReference(BaseEntry):
    """ content type to make reference to a book.
SourceSchema = Schema((
   booktitleField,
   editorField,
   volumeField,
   numberField,
   chapterField,
   pagesField,
   publisherField,
   organizationField,
   addressField,
   editionField,
   seriesField,
   isbnField,
))

InproceedingsSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
               SourceSchema.copy() + TrailingSchema.copy()
InproceedingsSchema.get('authors').required = 1
InproceedingsSchema.get('booktitle').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
InproceedingsSchema.get('description').widget.visible = {'view': 'invisible', 'edit': 'invisible', }

finalizeATCTSchema(InproceedingsSchema)

class InproceedingsReference(InbookReference):
    """ content type to make reference to a chapter within a proceedings volume.
    """

    implements(IInProceedingsReference)
Esempio n. 12
0
from Products.CMFBibliographyAT.config import PROJECTNAME
from Products.CMFBibliographyAT.content.base import BaseEntry
from Products.CMFBibliographyAT.content.schemata \
    import HeaderSchema, AuthorSchema, CoreSchema, TrailingSchema
from Products.CMFBibliographyAT.content.fields \
    import organizationField, addressField, editionField, isbnField

SourceSchema = Schema((
    organizationField,
    addressField,
    editionField,
    isbnField,
))

ManualSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
               SourceSchema.copy() + TrailingSchema.copy()
ManualSchema.get('authors').required = 0
# normally the publication_year for ManualReferences is optional, but
# in CMFBAT we better force the user to enter something here (better not
# irritate portal_catalog...).
ManualSchema.get('publication_year').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
ManualSchema.get('description').widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
}

finalizeATCTSchema(ManualSchema)
from Products.CMFBibliographyAT.config import PROJECTNAME
from Products.CMFBibliographyAT.content.base import BaseEntry
from Products.CMFBibliographyAT.content.schemata \
    import HeaderSchema, AuthorSchema, CoreSchema, TrailingSchema
from Products.CMFBibliographyAT.content.fields \
    import institutionField, typeField, numberField, addressField


SourceSchema = Schema((
    institutionField,
    typeField,
    numberField,
    addressField,
    ))

TechreportSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
                   SourceSchema.copy() + TrailingSchema.copy()
TechreportSchema.get('authors').required = 1
TechreportSchema.get('publication_year').required = 1
TechreportSchema.get('institution').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
TechreportSchema.get('description').widget.visible = {'view': 'invisible', 'edit': 'invisible', }

finalizeATCTSchema(TechreportSchema)


class TechreportReference(BaseEntry):
    """ content type to make reference to a technical report.
    """
    ),
    StringField('DOI',
        is_duplicates_criterion=True,
        widget=StringWidget(label="DOI",
            label_msgid="label_doi",
            description="The reference's digital object identifier.",
            description_msgid="help_doi",
            i18n_domain="cmfbibliographyat",
            visible = {'view': 'invisible',
                       'edit': 'invisible', }
        ),
    ),
))

ArticleSchema = HeaderSchema.copy() + \
                AuthorSchema.copy() + CoreSchema.copy() +  \
                SourceSchema.copy() + TrailingSchema.copy()

ArticleSchema.get('authors').required = 1
ArticleSchema.get('publication_year').required = 1
ArticleSchema.get('journal').required = 1

# the default AT 'description' field shall be invisible, 
# it is kept in sync with the 'abstract' field
ArticleSchema.get('description').widget.visible = {'view': 'invisible',
                                                   'edit': 'invisible', }

finalizeATCTSchema(ArticleSchema)

class ArticleReference(BaseEntry):
    """ content type to make reference to a (scientific) article.
    import booktitleField, volumeField, numberField, \
           publisherField, organizationField, addressField, \
           seriesField, pagesField

SourceSchema = Schema((
   booktitleField,
   volumeField,
   numberField,
   seriesField,
   pagesField,
   addressField,
   organizationField,
   publisherField,
))

ConferenceSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
               SourceSchema.copy() + TrailingSchema.copy()
ConferenceSchema.get('authors').required = 1
ConferenceSchema.get('booktitle').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
ConferenceSchema.get('description').widget.visible = {'view': 'invisible', 'edit': 'invisible', }

finalizeATCTSchema(ConferenceSchema)

class ConferenceReference(InbookReference):
    """ content type to make reference to a conference volume.
    """

    implements(IConferenceReference)
from Products.CMFBibliographyAT.config import PROJECTNAME
from Products.CMFBibliographyAT.content.base import BaseEntry
from Products.CMFBibliographyAT.content.schemata \
    import HeaderSchema, AuthorSchema, CoreSchema, TrailingSchema
from Products.CMFBibliographyAT.content.fields \
    import organizationField, addressField, editionField, isbnField


SourceSchema = Schema((
    organizationField,
    addressField,
    editionField,
    isbnField,
     ))

ManualSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
               SourceSchema.copy() + TrailingSchema.copy()
ManualSchema.get('authors').required = 0
# normally the publication_year for ManualReferences is optional, but
# in CMFBAT we better force the user to enter something here (better not
# irritate portal_catalog...).
ManualSchema.get('publication_year').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
ManualSchema.get('description').widget.visible = {'view': 'invisible', 'edit': 'invisible', }

finalizeATCTSchema(ManualSchema)

class ManualReference(BaseEntry):
    """ content type to make reference to a manual.
    """
from Products.CMFBibliographyAT.config import PROJECTNAME
from Products.CMFBibliographyAT.content.base import BaseEntry
from Products.CMFBibliographyAT.content.schemata \
    import HeaderSchema, AuthorSchema, CoreSchema, TrailingSchema
from Products.CMFBibliographyAT.content.fields \
    import schoolField, addressField, typeField, isbnField

SourceSchema = Schema((
    typeField,
    schoolField,
    addressField,
    isbnField,
))

PhdthesisSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
                  SourceSchema.copy() + TrailingSchema.copy()
PhdthesisSchema.get('authors').required = 1
PhdthesisSchema.get('school').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
PhdthesisSchema.get('description').widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
}

finalizeATCTSchema(PhdthesisSchema)


class PhdthesisReference(BaseEntry):
    """ content type to make reference to a PhD thesis.
        is_duplicates_criterion=True,
        widget=StringWidget(
            label="DOI",
            label_msgid="label_doi",
            description="The reference's digital object identifier.",
            description_msgid="help_doi",
            i18n_domain="cmfbibliographyat",
            visible={
                'view': 'invisible',
                'edit': 'invisible',
            }),
    ),
))

ArticleSchema = HeaderSchema.copy() + \
                AuthorSchema.copy() + CoreSchema.copy() +  \
                SourceSchema.copy() + TrailingSchema.copy()

ArticleSchema.get('authors').required = 1
ArticleSchema.get('publication_year').required = 1
ArticleSchema.get('journal').required = 1

# the default AT 'description' field shall be invisible,
# it is kept in sync with the 'abstract' field
ArticleSchema.get('description').widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
}

finalizeATCTSchema(ArticleSchema)
else:
    from Products.Archetypes.public import Schema

from Products.ATContentTypes.content.base import registerATCT as registerType
from Products.ATContentTypes.content.schemata import finalizeATCTSchema

from Products.CMFBibliographyAT.content.base import BaseEntry
from Products.CMFBibliographyAT.config import PROJECTNAME
from Products.CMFBibliographyAT.content.schemata \
    import HeaderSchema, AuthorSchema, CoreSchema, TrailingSchema
from Products.CMFBibliographyAT.content.fields import howpublishedField

howpublishedspecificField = howpublishedField.copy()
howpublishedspecificField.default = 'Booklet'
SourceSchema = Schema((howpublishedspecificField, ))
BookletSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
                SourceSchema.copy() + TrailingSchema.copy()
BookletSchema.get('authors').required = 0
# normally the publication_year for BookletReferences is optional, but
# in CMFBAT we better force the user to enter something here (better not
# irritate portal_catalog...).
BookletSchema.get('publication_year').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
BookletSchema.get('description').widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
}

finalizeATCTSchema(BookletSchema)
Esempio n. 20
0
SourceSchema = Schema((
    booktitleField,
    editorField,
    volumeField,
    numberField,
    typeField,
    publisherField,
    addressField,
    editionField,
    seriesField,
    chapterField,
    pagesField,
    isbnField,
))

IncollectionSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
                     SourceSchema.copy() + TrailingSchema.copy()
IncollectionSchema.get('authors').required = 1
IncollectionSchema.get('publication_year').required = 1
IncollectionSchema.get('booktitle').required = 1
IncollectionSchema.get('publisher').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
IncollectionSchema.get('description').widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
}

finalizeATCTSchema(IncollectionSchema)

Esempio n. 21
0
    from Products.Archetypes.public import Schema

from Products.ATContentTypes.content.base import registerATCT as registerType
from Products.ATContentTypes.content.schemata import finalizeATCTSchema

from Products.CMFBibliographyAT.config import PROJECTNAME
from Products.CMFBibliographyAT.content.base import BaseEntry
from Products.CMFBibliographyAT.content.schemata \
    import HeaderSchema, AuthorSchema, CoreSchema, TrailingSchema
from Products.CMFBibliographyAT.content.fields import howpublishedField

howpublishedspecificField = howpublishedField.copy()
howpublishedspecificField.default = ''
SourceSchema = Schema((howpublishedspecificField, ))

MiscSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
             SourceSchema.copy() + TrailingSchema.copy()
MiscSchema.get('authors').required = 0
# normally the publication_year for MiscReferences is optional, but
# in CMFBAT we better force the user to enter something here (better not
# irritate portal_catalog...).
MiscSchema.get('publication_year').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
MiscSchema.get('description').widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
}

finalizeATCTSchema(MiscSchema)
    import booktitleField, volumeField, numberField, \
           publisherField, organizationField, addressField, \
           seriesField, pagesField

SourceSchema = Schema((
    booktitleField,
    volumeField,
    numberField,
    seriesField,
    pagesField,
    addressField,
    organizationField,
    publisherField,
))

ConferenceSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
               SourceSchema.copy() + TrailingSchema.copy()
ConferenceSchema.get('authors').required = 1
ConferenceSchema.get('booktitle').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
ConferenceSchema.get('description').widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
}

finalizeATCTSchema(ConferenceSchema)


class ConferenceReference(InbookReference):
    """ content type to make reference to a conference volume.
ThisAuthorTrailingSchema['editor_flag'].default=1
ThisAuthorTrailingSchema['editor_flag'].widget.description='Leave this checked unless the people specified above are not the editors of this proceedings volume.'
ThisAuthorTrailingSchema['editor_flag'].widget.description_msgid='help_editor_flag_checked'
ThisAuthorTrailingSchema['editor_flag'].mode='r'

SourceSchema = Schema((
    publisherField,
    addressField,
    volumeField,
    numberField,
    organizationField,
    seriesField,
    isbnField,
    ))

ProceedingsSchema = HeaderSchema.copy() + AuthorSchema.copy() + ThisAuthorTrailingSchema.copy() + \
                    CoreSchema.copy() + SourceSchema.copy() + TrailingSchema.copy()
ProceedingsSchema.get('authors').required = 0
ProceedingsSchema.get('publication_year').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
ProceedingsSchema.get('description').widget.visible = {'view': 'invisible', 'edit': 'invisible', }

finalizeATCTSchema(ProceedingsSchema)

class ProceedingsReference(BaseEntry):
    """ content type to make reference to a book.
    """

    implements(IProceedingsReference)
           editionField, volumeField, seriesField, chapterField, pagesField, isbnField

SourceSchema = Schema((
    booktitleField,
    editorField,
    publisherField,
    addressField,
    editionField,
    volumeField,
    seriesField,
    chapterField,
    pagesField,
    isbnField,
))

InbookSchema = HeaderSchema.copy() + AuthorSchema.copy() + CoreSchema.copy() +  \
               SourceSchema.copy() + TrailingSchema.copy()
InbookSchema.get('authors').required = 1
InbookSchema.get('publication_year').required = 1
InbookSchema.get('chapter').required = 1
InbookSchema.get('booktitle').required = 1
InbookSchema.get('pages').required = 1
InbookSchema.get('publisher').required = 1
InbookSchema.get('editor').required = 1

# the default AT 'description' field shall be invisible, it is kept in sync with the 'abstract' field
InbookSchema.get('description').widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
}