Skip to content

Instantly share code, notes, and snippets.

@cwardzala
Last active October 8, 2015 15:03
Show Gist options
  • Save cwardzala/8ebd8dcfc1eb5113e676 to your computer and use it in GitHub Desktop.
Save cwardzala/8ebd8dcfc1eb5113e676 to your computer and use it in GitHub Desktop.

Grid Template Manifest

Living Document

Findaway Working Draft 1 September 2015

Abstract

This specification defines a JSON-based manifest that provides developers with a centralized place to put metadata associated with ILS grid ordering templates. This includes, but is not limited to, the ILS system to be used, and vendor identifier. The manifest allows declaration of default grids with default values. Additionally this manifest declares the column names, and potential values. which can be used to populate the rows of a grid template.

Using this metadata, applications can implement a cross compatible system for reading and writing grid templates. Additionally this can be used to define a format to import and export grid template metadata.

1 Usage Examples

This section is non-normative.

This section shows how developers can make use of the various features of this specification.

1.1 Example Manifest

{
    "ils_system": "",
    "vendor_id": "",
    "columns": [
        {
            "name": "branch",
            "values": [
                {
                    "code": "EAST",
                    "desc": "East Campus"
                },
                {
                    "code": "MAIN",
                    "desc": "Main Campus"
                },
                {
                    "code": "WEST",
                    "desc": "West Campus"
                }
            ]
        },
        {
            "name": "collection",
            "values": [
                {
                    "code": "",
                    "desc": ""
                }
            ]
        },
        {
            "name": "fund",
            "values": [
                {
                    "code": "FIC2015",
                    "desc": "Fiction 2015"
                },
                {
                    "code": "YA2015",
                    "desc": "Young Adult 2015"
                }
            ]
        },
        {
            "name": "holding_code",
            "values": [
                {
                    "code": "",
                    "desc": ""
                }
            ]
        },
        {
            "name": "item_type",
            "values": [
                {
                    "code": "PW",
                    "desc": "Playaway"
                },
                {
                    "code": "LP",
                    "desc": "Playaway Launchpad"
                }
            ]
        },
        {
            "name": "location",
            "values": [
                {
                    "code": "",
                    "desc": ""
                }
            ]
        }

    ],
    "templates": [
        {
            "name": "Example Template",
            "desc": "Example ILS template",
            "rows": [
                {
                    "branch": "EAST",
                    "collection": null,
                    "fund": "YA2015",
                    "holding_code": null,
                    "item_type": null,
                    "location": null,
                    "qty": 1
                },
                {
                    "branch": "WEST",
                    "collection": null,
                    "fund": "FIC2015",
                    "holding_code": null,
                    "item_type": null,
                    "location": null,
                    "qty": 1
                }
            ]
        }
    ]
}

2 Manifest and its members

A mainfest is a JSON document that contains column and template data. A manifest consists of a top-level object that contains zero or more members. Each of the members are defined below.

2.2 ils_system member

The ils_system member is a string that represents the name of the users's ILS system.

2.3 vendor_id member

The vendor_id member is a string that represents the user's unique vendor identifier.

2.4 columns member

The columns member is an array containing zero or more column_objects.

2.5 templates member

The templates member is an array of template_objects that defines a grid template.

3 Column Object and its members

Each Column Object represents a named column in the grid template.

3.1 name member

The name member is a string that represents the name of the column and is used as the key in an allocation_row.

3.2 values member

The values member of a Column Object is an array containing zero or more value_objects.

4 Value Object and its members

4.1 code member

The code member of a Value Object is a string that represents a unique code that will be used as the value in the allocation_row.

4.2 desc member

The desc member of a Value Object provides an explanation of what the code member represents.

5 Template Object and its members

Each Template Object represents a predefined ILS grid template used during checkout.

5.1 name member

The name member is a string that represents the name of the template and is usually displayed to the user (e.g., amongst a list of other applications, or as a label for an icon).

5.2 desc member

The desc member of a Template Object is a string that represents a description.

5.3 rows member

The rows member of a Template Object is an array of allocation_rows that define default allocation values.

6 Allocation Row and its members

An Allocation Row is an object that represents a single line in an ILS ordering grid.

The Allocation Row contains a single entry for each column defined in the manifest columns member represented by the name member of the column_object as the key. Along with each column there is a single member for qty that defines the default quantity for that row.

The value for each column key in the Allocation Row is the code from the user selected value_object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment