Difference between revisions of "Filling Out the File Area Inventory Classes"

From The SBN Wiki
Jump to navigation Jump to search
m (: sorted field attributes to labels order)
(: Update for 1.6.0.0)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
The '''''<File_Area_Inventory>''''' contains a reference to a single physical file, and an ''Inventory'' description detailing the structure in the file.  An ''Inventory'' object is a specific form of delimited table, with predefined columns.
+
The '''''<File_Area_Inventory>''''' contains a reference to a single physical file, and an ''Inventory'' description detailing the structure in the file.  An ''Inventory'' object is a specific form of delimited table, with defined field names and characteristics.
  
 
For additional explanation, see the PDS4 Standards Reference, or contact your PDS node consultant.
 
For additional explanation, see the PDS4 Standards Reference, or contact your PDS node consultant.
Line 21: Line 21:
  
 
# Use ''<Inventory>'' and ''</Inventory>'' in place of ''<Table_Delimiter>'' and ''<Table_Delimited>''.
 
# Use ''<Inventory>'' and ''</Inventory>'' in place of ''<Table_Delimiter>'' and ''<Table_Delimited>''.
# There must be exactly two ''<Field_Delimiter>'' subclasses.
+
# The value of ''<parsing_standard_id>'' must be "PDS DSV 1"
 +
# There must be exactly two ''<Field_Delimited>'' subclasses.
 
# The first ''Field_Delimited'' class must have:
 
# The first ''Field_Delimited'' class must have:
 
## ''<name>'' of "Member_Status"
 
## ''<name>'' of "Member_Status"
Line 31: Line 32:
 
## ''<field_number>'' present and equal to "2"
 
## ''<field_number>'' present and equal to "2"
 
## ''<data_type>'' of "ASCII_LIDVID_LID"
 
## ''<data_type>'' of "ASCII_LIDVID_LID"
 +
## ''<maximum_field_length>'' of 255 bytes
  
In the corresponding data file there must be two columns following the PDS/DSV table standard (still in development as of this writing)The first column must contain either 'P' or 'S', to indicate whether the product is a primary or secondary member, respectively, of the collection.  The second column contains the LID or LIDVID of the product to be included in the collection (using only a LID means that all versions of that product are considered to be members of the given type).
+
:[''Note that until release 1.6.0.0, the ''<maximum_field_length>'' requirement for the ''LIDVID_LID'' field mentioned above was not being enforced.'']
 +
 
 +
In the corresponding data file there must be two columns following the ''PDS DSV 1'' table standard.  That is, your fields may optionally be enclosed in quotes, and you must use whichever one of the standard field delimiters you said you were going to use in the ''field_delimiter'' attribute of your ''<Inventory>'' class. (SBN would prefer it if you used one of the printing character options rather than tabs.)
 +
 
 +
The first column must contain either 'P' or 'S', to indicate whether the product is a primary or secondary member, respectively, of the collection.  The second column contains the LID or LIDVID of the product to be included in the collection (using only a LID means that all versions of that product are considered to be members of the given type).
  
 
A ''secondary member'' is any product that has (or will be) archived as the primary member of another collection.  A product must be a primary member of exactly collection - the one that has the same LID as found in the product's LID.  A product may be a secondary member of many collections. No product may be both a primary and a secondary member of the same collection.
 
A ''secondary member'' is any product that has (or will be) archived as the primary member of another collection.  A product must be a primary member of exactly collection - the one that has the same LID as found in the product's LID.  A product may be a secondary member of many collections. No product may be both a primary and a secondary member of the same collection.

Latest revision as of 12:55, 6 May 2016

The <File_Area_Inventory> contains a reference to a single physical file, and an Inventory description detailing the structure in the file. An Inventory object is a specific form of delimited table, with defined field names and characteristics.

For additional explanation, see the PDS4 Standards Reference, or contact your PDS node consultant.

Following are the attributes and subclasses you'll find in the File_Area_Inventory, in label order.

Note that in the PDS4 master schema, all classes have capitalized names; attributes never do.

<File>

REQUIRED

This class is handled identically in all File_Area_* classes. It is described in detail on the Filling_Out_the_File_Class page.


<Inventory>

REQUIRED

This is a special form of a Table_Delimited data structure. Start by creating a Table_Delimited data structure as described in Filling_Out_the_Table_Delimited_Data_Structure, but using these modifications and constraints:

  1. Use <Inventory> and </Inventory> in place of <Table_Delimiter> and <Table_Delimited>.
  2. The value of <parsing_standard_id> must be "PDS DSV 1"
  3. There must be exactly two <Field_Delimited> subclasses.
  4. The first Field_Delimited class must have:
    1. <name> of "Member_Status"
    2. <field_number> present and set to "1"
    3. <data_type> of "ASCII_String"
    4. <maximum_field_length> of 1 byte
  5. The second Field_Delimited class must have:
    1. <name> of "LIDVID_LID"
    2. <field_number> present and equal to "2"
    3. <data_type> of "ASCII_LIDVID_LID"
    4. <maximum_field_length> of 255 bytes
[Note that until release 1.6.0.0, the <maximum_field_length> requirement for the LIDVID_LID field mentioned above was not being enforced.]

In the corresponding data file there must be two columns following the PDS DSV 1 table standard. That is, your fields may optionally be enclosed in quotes, and you must use whichever one of the standard field delimiters you said you were going to use in the field_delimiter attribute of your <Inventory> class. (SBN would prefer it if you used one of the printing character options rather than tabs.)

The first column must contain either 'P' or 'S', to indicate whether the product is a primary or secondary member, respectively, of the collection. The second column contains the LID or LIDVID of the product to be included in the collection (using only a LID means that all versions of that product are considered to be members of the given type).

A secondary member is any product that has (or will be) archived as the primary member of another collection. A product must be a primary member of exactly collection - the one that has the same LID as found in the product's LID. A product may be a secondary member of many collections. No product may be both a primary and a secondary member of the same collection.

<reference_type>

REQUIRED

This attribute must follow the <Record_Delimited> class, and must have the value inventory_has_member_product.