Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F84674778
bibrecord_config.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Sep 24, 06:56
Size
2 KB
Mime Type
text/x-python
Expires
Thu, Sep 26, 06:56 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
21068905
Attached To
R3600 invenio-infoscience
bibrecord_config.py
View Options
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## CDS Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with CDS Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
### CONFIGURATION OPTIONS FOR BIBRECORD LIBRARY
"""BibRecord configuration file.
This file sets a list of errors that can be generated by BibRecord, the
default behaviours for the parsers used and the parsers available."""
from
invenio.config
import
CFG_ETCDIR
# location of the MARC21 DTD file:
CFG_MARC21_DTD
=
"
%s
/bibedit/MARC21slim.dtd"
%
CFG_ETCDIR
# internal dictionary of warning messages:
CFG_BIBRECORD_WARNING_MSGS
=
{
0
:
""
,
1
:
"WARNING: tag missing for field(s)
\n
Value stored with tag '000'"
,
2
:
"WARNING: bad range for tags (tag must be in range 001-999)
\n
Value stored with tag '000'"
,
3
:
"WARNING: Missing atribute 'code' for subfield
\n
Value stored with code ''"
,
4
:
"WARNING: Missing attribute 'ind1'
\n
Value stored with ind1 = ''"
,
5
:
"WARNING: Missing attribute 'ind2'
\n
Value stored with ind2 = ''"
,
6
:
"Import Error"
,
7
:
"WARNING: value expected of type string."
,
8
:
"WARNING: empty datafield"
,
98
:
"WARNING: problems importing invenio"
,
99
:
"Document not well formed"
,
}
# verbose level to be used when creating records from XML: (0=least, ..., 9=most)
CFG_BIBRECORD_DEFAULT_VERBOSE_LEVEL
=
0
# correction level to be used when creating records from XML: (0=no, 1=yes)
CFG_BIBRECORD_DEFAULT_CORRECT
=
0
# XML parsers available:
CFG_BIBRECORD_PARSERS_AVAILABLE
=
[
'pyrxp'
,
'4suite'
,
'minidom'
]
# Exceptions
class
InvenioBibRecordGenericParsingError
(
Exception
):
"""A generic parsing exception for all available parsers."""
pass
class
InvenioBibRecordFieldError
(
Exception
):
"""An error raised when an invalid field is encountered."""
pass
Event Timeline
Log In to Comment