/*
FILE:     CifDefs.h
*/
/*
VERSION:  4
*/
/*
DATE:     6/17/2002
*/
/*
  Comments and Questions to: sw-help@rcsb.rutgers.edu
*/
/*
COPYRIGHT 1999-2002 Rutgers - The State University of New Jersey

This software is provided WITHOUT WARRANTY OF MERCHANTABILITY OR
FITNESS FOR A PARTICULAR PURPOSE OR ANY OTHER WARRANTY, EXPRESS OR
IMPLIED.  RUTGERS MAKE NO REPRESENTATION OR WARRANTY THAT THE
SOFTWARE WILL NOT INFRINGE ANY PATENT, COPYRIGHT OR OTHER
PROPRIETARY RIGHT.

The user of this software shall indemnify, hold harmless and defend
Rutgers, its governors, trustees, officers, employees, students,
agents and the authors against any and all claims, suits,
losses, liabilities, damages, costs, fees, and expenses including
reasonable attorneys' fees resulting from or arising out of the
use of this software.  This indemnification shall include, but is
not limited to, any and all claims alleging products liability.
*/
/*
               PDB SOFTWARE LICENSE AGREEMENT

BY CLICKING THE ACCEPTANCE BUTTON OR INSTALLING OR USING 
THIS "SOFTWARE, THE INDIVIDUAL OR ENTITY LICENSING THE  
SOFTWARE ("LICENSEE") IS CONSENTING TO BE BOUND BY AND IS 
BECOMING A PARTY TO THIS AGREEMENT.  IF LICENSEE DOES NOT 
AGREE TO ALL OF THE TERMS OF THIS AGREEMENT
THE LICENSEE MUST NOT INSTALL OR USE THE SOFTWARE.

1. LICENSE AGREEMENT

This is a license between you ("Licensee") and the Protein Data Bank (PDB) 
at Rutgers, The State University of New Jersey (hereafter referred to 
as "RUTGERS").   The software is owned by RUTGERS and protected by 
copyright laws, and some elements are protected by laws governing 
trademarks, trade dress and trade secrets, and may be protected by 
patent laws. 

2. LICENSE GRANT

RUTGERS grants you, and you hereby accept, non-exclusive, royalty-free 
perpetual license to install, use, modify, prepare derivative works, 
incorporate into other computer software, and distribute in binary 
and source code format, or any derivative work thereof, together with 
any associated media, printed materials, and on-line or electronic 
documentation (if any) provided by RUTGERS (collectively, the "SOFTWARE"), 
subject to the following terms and conditions: (i) any distribution 
of the SOFTWARE shall bind the receiver to the terms and conditions 
of this Agreement; (ii) any distribution of the SOFTWARE in modified 
form shall clearly state that the SOFTWARE has been modified from 
the version originally obtained from RUTGERS.  

2. COPYRIGHT; RETENTION OF RIGHTS.  

The above license grant is conditioned on the following: (i) you must 
reproduce all copyright notices and other proprietary notices on any 
copies of the SOFTWARE and you must not remove such notices; (ii) in 
the event you compile the SOFTWARE, you will include the copyright 
notice with the binary in such a manner as to allow it to be easily 
viewable; (iii) if you incorporate the SOFTWARE into other code, you 
must provide notice that the code contains the SOFTWARE and include 
a copy of the copyright notices and other proprietary notices.  All 
copies of the SOFTWARE shall be subject to the terms of this Agreement.  

3. NO MAINTENANCE OR SUPPORT; TREATMENT OF ENHANCEMENTS 

RUTGERS is under no obligation whatsoever to: (i) provide maintenance 
or support for the SOFTWARE; or (ii) to notify you of bug fixes, patches, 
or upgrades to the features, functionality or performance of the 
SOFTWARE ("Enhancements") (if any), whether developed by RUTGERS 
or third parties.  If, in its sole discretion, RUTGERS makes an 
Enhancement available to you and RUTGERS does not separately enter 
into a written license agreement with you relating to such bug fix, 
patch or upgrade, then it shall be deemed incorporated into the SOFTWARE 
and subject to this Agreement. You are under no obligation whatsoever 
to provide any Enhancements to RUTGERS or the public that you may 
develop over time; however, if you choose to provide your Enhancements 
to RUTGERS, or if you choose to otherwise publish or distribute your 
Enhancements, in source code form without contemporaneously requiring 
end users or RUTGERS to enter into a separate written license agreement 
for such Enhancements, then you hereby grant RUTGERS a non-exclusive,
royalty-free perpetual license to install, use, modify, prepare
derivative works, incorporate into the SOFTWARE or other computer
software, distribute, and sublicense your Enhancements or derivative
works thereof, in binary and source code form.

4. FEES.  There is no license fee for the SOFTWARE.  If Licensee
wishes to receive the SOFTWARE on media, there may be a small charge
for the media and for shipping and handling.  Licensee is
responsible for any and all taxes.

5. TERMINATION.  Without prejudice to any other rights, Licensor
may terminate this Agreement if Licensee breaches any of its terms
and conditions.  Upon termination, Licensee shall destroy all
copies of the SOFTWARE.

6. PROPRIETARY RIGHTS.  Title, ownership rights, and intellectual
property rights in the Product shall remain with RUTGERS.  Licensee 
acknowledges such ownership and intellectual property rights and will 
not take any action to jeopardize, limit or interfere in any manner 
with RUTGERS' ownership of or rights with respect to the SOFTWARE.  
The SOFTWARE is protected by copyright and other intellectual 
property laws and by international treaties.  Title and related 
rights in the content accessed through the SOFTWARE is the property 
of the applicable content owner and is protected by applicable law.  
The license granted under this Agreement gives Licensee no rights to such
content.

7. DISCLAIMER OF WARRANTY.  THE SOFTWARE IS PROVIDED FREE OF 
CHARGE, AND, THEREFORE, ON AN "AS IS" BASIS, WITHOUT WARRANTY OF 
ANY KIND, INCLUDING WITHOUT LIMITATION THE WARRANTIES THAT IT 
IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE 
OR NON-INFRINGING.  THE ENTIRE RISK AS TO THE QUALITY AND 
PERFORMANCE OF THE SOFTWARE IS BORNE BY LICENSEE.  SHOULD THE 
SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, THE LICENSEE AND NOT 
LICENSOR ASSUMES THE ENTIRE COST OF ANY SERVICE AND REPAIR.  
THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF 
THIS AGREEMENT.  NO USE OF THE PRODUCT IS AUTHORIZED HEREUNDER 
EXCEPT UNDER THIS DISCLAIMER.

8. LIMITATION OF LIABILITY.  TO THE MAXIMUM EXTENT PERMITTED BY
APPLICABLE LAW,  IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY 
INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 
OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, INCLUDING, 
WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK 
STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL 
OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF ADVISED OF THE
POSSIBILITY THEREOF. 
*/

#ifndef H_CIFDEFS
#define H_CIFDEFS

#define    TRUE                      1
#define    FALSE                     0
#define    SUCCEED                   1
#define    FAILURE                   0

#define    CIF_ITEM_NAME                          101
#define    CIF_KEYWORD_GLOBAL                           102
#define    CIF_KEYWORD_DATA                             103
#define    CIF_KEYWORD_SAVE_TRUE                        104
#define    CIF_KEYWORD_SAVE_FALSE                       105
#define    CIF_DEFINITION_CATEGORY                         106
#define    CIF_DEFINITION_ITEM                             107
#define    CIF_KEYWORD_INCLUDE                          108
#define    CIF_KEYWORD_ALIAS                            109
#define    CIF_KEYWORD_LOOP                             110

#define    CIF_STRING_VALUE                               1
#define    CIF_INTEGER_VALUE                              2
#define    CIF_DOUBLE_VALUE                               3
/*
#define    CIF_INTEGER_VALUE                              2
#define    CIF_DOUBLE_VALUE                               3
#define    CIF_CHAR_VALUE                                 4
#define    CIF_CODE_VALUE                                 5
#define    CIF_TEXT_VALUE                                 6
#define    CIF_NAME_VALUE                                 7
#define    CIF_IDNAME_VALUE                               8
#define    CIF_DATE_VALUE                                 9
#define    CIF_STRUCTURE_ONE_VALUE_ITEM                   0
#define    CIF_STRUCTURE_VECTOR_ITEM                      1
#define    CIF_STRUCTURE_MATRIX_ITEM                      2
*/

#define    CIF_NO_VERIFICATION                            0
#define    CIF_VERIFICATION_SET_FLAG                      1
#define    CIF_VERIFICATION_CASCADING                     2

#define    CIF_STRUCTURE_ROW_WISE                         0
#define    CIF_STRUCTURE_COLUMN_WISE                      1

#define    CIF_MAXSTRLEN                                 80
#define    CIF_ARRAY_INCREMENT_SIZE                      16

#define    CIF_LINE_LENGTH                               80
#define    CIF_MAX_STR_LEN                               80


#define    CIF_DDL_TEMP_ITEM_CATEGORY_ID                 "temp.category_id"
#define    CIF_DDL_TEMP_ITEM_ITEM                        "temp.name"

#define    CIF_DDL_NAME_CATEGORY_ID                      "_category.id"
#define    CIF_DDL_NAME_ITEM_NAME                        "_item.name"


#define    CIF_DDL_CATEGORY_BLOCK                        "datablock"
#define    CIF_DDL_CATEGORY_DATABLOCK                    "datablock"
#define    CIF_DDL_CATEGORY_DATABLOCK_METHODS            "datablock_methods"
#define    CIF_DDL_CATEGORY_ITEM                         "item"
#define    CIF_DDL_CATEGORY_ITEM_LINKED                  "item_linked"
#define    CIF_DDL_CATEGORY_CATEGORY                     "category"
#define    CIF_DDL_CATEGORY_CATEGORY_EXAMPLES            "category_examples"
#define    CIF_DDL_CATEGORY_NDB_CATEGORY_EXAMPLES        "ndb_category_examples"
#define    CIF_DDL_CATEGORY_CATEGORY_KEY                 "category_key"
#define    CIF_DDL_CATEGORY_CATEGORY_GROUP               "category_group"
#define    CIF_DDL_CATEGORY_CATEGORY_GROUP_LIST          "category_group_list"
#define    CIF_DDL_CATEGORY_CATEGORY_METHODS             "category_methods"
#define    CIF_DDL_CATEGORY_SUB_CATEGORY                 "sub_category"
#define    CIF_DDL_CATEGORY_SUB_CATEGORY_EXAMPLES        "sub_category_examples"
#define    CIF_DDL_CATEGORY_SUB_CATEGORY_METHODS         "sub_category_methods"
#define    CIF_DDL_CATEGORY_ITEM_SUB_CATEGORY            "item_sub_category"
#define    CIF_DDL_CATEGORY_ITEM_TYPE                    "item_type"
#define    CIF_DDL_CATEGORY_ITEM_TYPE_CONDITIONS         "item_type_conditions"
#define    CIF_DDL_CATEGORY_ITEM_METHODS                 "item_methods"
#define    CIF_DDL_CATEGORY_ITEM_TYPE_LIST               "item_type_list"
#define    CIF_DDL_CATEGORY_ITEM_STRUCTURE               "item_structure"
#define    CIF_DDL_CATEGORY_ITEM_STRUCTURE_LIST          "item_structure_list"
#define    CIF_DDL_CATEGORY_ITEM_DESCRIPTION             "item_description"
#define    CIF_DDL_CATEGORY_NDB_ITEM_DESCRIPTION         "ndb_item_description"
#define    CIF_DDL_CATEGORY_NDB_CATEGORY_DESCRIPTION     "ndb_category_description"
#define    CIF_DDL_CATEGORY_ITEM_EXAMPLES                "item_examples"
#define    CIF_DDL_CATEGORY_NDB_ITEM_EXAMPLES            "ndb_item_examples"
#define    CIF_DDL_CATEGORY_ITEM_DEPENDENT               "item_dependent"
#define    CIF_DDL_CATEGORY_ITEM_RELATED                 "item_related"
#define    CIF_DDL_CATEGORY_ITEM_RANGE                   "item_range"
#define    CIF_DDL_CATEGORY_ITEM_ENUMERATION             "item_enumeration"
#define    CIF_DDL_CATEGORY_NDB_ITEM_ENUMERATION         "ndb_item_enumeration"
#define    CIF_DDL_CATEGORY_ITEM_DEFAULT                 "item_default"
#define    CIF_DDL_CATEGORY_ITEM_ALIASES                 "item_aliases"
#define    CIF_DDL_CATEGORY_DICTIONARY                   "dictionary"
#define    CIF_DDL_CATEGORY_DICTIONARY_HISTORY           "dictionary_history"
#define    CIF_DDL_CATEGORY_ITEM_UNITS                   "item_units"
#define    CIF_DDL_CATEGORY_ITEM_UNITS_LIST              "item_units_list"
#define    CIF_DDL_CATEGORY_ITEM_UNITS_CONVERSION        "item_units_conversion"
#define    CIF_DDL_CATEGORY_METHOD_LIST                  "method_list"

#define    CIF_DDL_ITEM_ID                               "id"
#define    CIF_DDL_ITEM_CATEGORY_ID                      "category_id"
#define    CIF_DDL_ITEM_SUB_CATEGORY_ID                  "sub_category_id"
#define    CIF_DDL_ITEM_METHOD_ID                        "method_id"
#define    CIF_DDL_ITEM_PARENT_NAME                      "parent_name"
#define    CIF_DDL_ITEM_CHILD_NAME                       "child_name"
#define    CIF_DDL_ITEM_ALIAS_NAME                       "alias_name"
#define    CIF_DDL_ITEM_DICTIONARY                       "dictionary"
#define    CIF_DDL_ITEM_TITLE                            "title"
#define    CIF_DDL_ITEM_VERSION                          "version"
#define    CIF_DDL_ITEM_NAME                             "name"
#define    CIF_DDL_ITEM_CODE                             "code"
#define    CIF_DDL_ITEM_PRIMITIVE_CODE                   "primitive_code"
#define    CIF_DDL_ITEM_CONSTRUCT                        "construct"
#define    CIF_DDL_ITEM_ORGANIZATION                     "organization"
#define    CIF_DDL_ITEM_INDEX                            "index"
#define    CIF_DDL_ITEM_DIMENSION                        "dimension"
#define    CIF_DDL_ITEM_DATABLOCK_ID                     "datablock_id"
#define    CIF_DDL_ITEM_DESCRIPTION                      "description"
#define    CIF_DDL_ITEM_NDB_DESCRIPTION                  "ndb_description"
#define    CIF_DDL_ITEM_CASE                             "case"
#define    CIF_DDL_ITEM_MANDATORY_CODE                   "mandatory_code"
#define    CIF_DDL_ITEM_DETAIL                           "detail"
#define    CIF_DDL_ITEM_MAXIMUM                          "maximum"
#define    CIF_DDL_ITEM_MINIMUM                          "minimum"
#define    CIF_DDL_ITEM_VALUE                            "value"
#define    CIF_DDL_ITEM_DEPENDENT_NAME                   "dependent_name"
#define    CIF_DDL_ITEM_RELATED_NAME                     "related_name"
#define    CIF_DDL_ITEM_FUNCTION_CODE                    "function_code"
#define    CIF_DDL_ITEM_OFFSET                           "file_offset"
#define    CIF_DDL_ITEM_OPERATOR                         "operator"
#define    CIF_DDL_ITEM_FACTOR                           "factor"
#define    CIF_DDL_ITEM_FROM_CODE                        "from_code"
#define    CIF_DDL_ITEM_TO_CODE                          "to_code"
#define    CIF_DDL_ITEM_UPDATE                           "update"
#define    CIF_DDL_ITEM_REVISION                         "revision"
#define    CIF_DDL_ITEM_INLINE                           "item_inline"
#define    CIF_DDL_ITEM_LANGUAGE                         "item_language"
#define    CIF_DDL_ITEM_PARENT_ID                        "parent_id"

#define    CIF_DDL_ITEM_DATA_TYPE                        "data_type"
#define    CIF_DDL_ITEM_CASE_SENSITIVE                   "case_sensitive"
#define    CIF_DDL_ITEM_STRUCTURE_INDEX                  "structure_index"
#define    CIF_DDL_ITEM_STRUCTURE_ORGANIZATION           "structure_organization"
#define    CIF_DDL_ITEM_STRUCTURE_DIMENSION              "structure_dimension"
#define    CIF_DDL_ITEM_STRUCTURE_NVALUES                "structure_nvalues"
#define    CIF_DDL_ITEM_CONSTRUCT_INDEX                  "construct_index"

#define    CIF_DDL_NON_CASE_SENSITIVE_TERM               "uchar"
#define    CIF_DDL_CODE_TERM                             "code"
#define    CIF_DDL_ID_NAME_TERM                          "idname"
#define    CIF_DDL_NAME_TERM                             "name"
#define    CIF_INTEGER_TERM                              "int"
#define    CIF_INT_TERM                                  "integer"
#define    CIF_DOUBLE_TERM                               "double"
#define    CIF_FLOAT_TERM                                "float"
#define    CIF_REAL_TERM                                 "real"
#define    CIF_IMPLICIT_TERM                             "implicit"
#define    CIF_YES_TERM                                  "yes"
#define    CIF_NO_TERM                                   "no"
#define    CIF_RELATED_ITEM_FUNCTION_ASSOCIATED_ESD      "associated_esd"
#define    CIF_RELATED_ITEM_FUNCTION_ASSOCIATED_VALUE    "associated_value"

#define    CIF_DDL_CATEGORY_LINKAGE                      "item_linked"
#define    CIF_DDL_ITEM_LINKAGE_PARENT                   "parent_name"
#define    CIF_DDL_ITEM_LINKAGE_CHILD                    "child_name"

#define    CIF_RESERVED_KEYWORD_GLOBAL                   "global_"
#define    CIF_RESERVED_KEYWORD_DATA                     "data_"
#define    CIF_RESERVED_KEYWORD_SAVE                     "save_"
#define    CIF_RESERVED_KEYWORD_LOOP                     "loop_"
#define    CIF_RESERVED_KEYWORD_INCLUDE                  "include_"

#define    CIF_NONSENSE_DOUBLE                           1999999999.0 
#define    CIF_NONSENSE_INTEGER                          65530

#define    CIF_INTEGER_SPACE                             20
#define    CIF_DOUBLE_SPACE                              40

#define    CIF_DATA_PREFIX_CHARACTER                     '_'
#define    CIF_DATA_JOIN_CHARACTER                       '.'

#define    CIF_DATA_PREFIX_CHAR                          "_"
#define    CIF_DATA_JOIN_CHAR                            "."

#define    CIF_DATA_NULL_CHARACTER                       '?'
#define    CIF_DATA_NOT_APPROPRIATE_CHARACTER            '.'

#define    CIF_DATA_NULL_CHAR                            "?"
#define    CIF_DATA_NOT_APPROPRIATE_CHAR                 "."

#define    CIF_PERMANENT_FILE_APPENDIX                   ".cifsav"
#define    CIF_PERMANENT_FILE_DIRECTORY                  ".ciflib"

#endif



