Skip to content

Commit

Permalink
Added LocationCode row. Corrected library mapping.
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-isaac authored Oct 25, 2017
1 parent 98d6a28 commit 6dc3a01
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
13 changes: 12 additions & 1 deletion Catalog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,19 @@ function BuildItemsGrid()
gridColumn.OptionsColumn.ReadOnly = true;

gridColumn = gridView.Columns:Add();
gridColumn.Caption = "Location Code";
gridColumn.Caption = "Library";
gridColumn.FieldName = "Library";
gridColumn.Name = "gridColumnLibrary";
gridColumn.Visible = false;
gridColumn.OptionsColumn.ReadOnly = true;

gridColumn = gridView.Columns:Add();
gridColumn.Caption = "Location Code";
gridColumn.FieldName = "LocationCode";
gridColumn.Name = "gridColumnLocationCode";
gridColumn.Visible = false;
gridColumn.OptionsColumn.ReadOnly = true;

gridColumn = gridView.Columns:Add();
gridColumn.Caption = "Call Number";
gridColumn.FieldName = "CallNumber";
Expand Down Expand Up @@ -400,6 +407,7 @@ function CreateItemsTable()
itemsTable.Columns:Add("HoldingId");
itemsTable.Columns:Add("Library");
itemsTable.Columns:Add("Location");
itemsTable.Columns:Add("LocationCode");
itemsTable.Columns:Add("CallNumber");

return itemsTable;
Expand Down Expand Up @@ -437,6 +445,9 @@ function BuildItemsDataSource(holdingsXmlDoc, mmsId)
log:DebugFormat("Location = {0}", itemNode["location"].InnerXml);
end

itemRow:set_Item("LocationCode", itemNode["location"].InnerXml);
log:DebugFormat("Location Code = {0}", itemNode["location"].InnerXml);

itemRow:set_Item("Library", itemNode["library"].InnerXml);
log:DebugFormat("Library = {0}", itemNode["library"].InnerXml);

Expand Down
2 changes: 1 addition & 1 deletion Config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>Alma Blacklight Catalog Search</Name>
<Author>Atlas Systems</Author>
<Version>1.0.0</Version>
<Version>1.1.0</Version>
<Active>True</Active>
<Type>Addon</Type>
<Description>Catalog Search and Import Addon that uses Alma as the catalog and Blacklight as the discovery layer</Description>
Expand Down
2 changes: 1 addition & 1 deletion DataMapping.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ DataMapping.ImportFields.Holding["Aeon"] = {
},
{
Field = "SubLocation", MaxSize = 255,
Value = "Library"
Value = "LocationCode"
}
};
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Alma Blacklight Catalog Search

## Versions
**1.0 -** Initial release
**1.0.0 -** Initial release

**1.1.0 -** Added LocationCode row. Corrected library mapping.

## Summary
The addon is located within an item record of an Atlas Product. It is found on the `"Catalog Search"` tab. The addon takes information from the fields in the Atlas Product and searches the catalog in the configured ordered. When the item is found, one selects the desired holding in the *Item Grid* below the browser and clicks *Import*. The addon then makes the necessary API calls to the Alma API and imports the item's information into the Atlas Product.
Expand Down Expand Up @@ -104,12 +106,13 @@ The information within this data mapping is used to perform the bibliographic ap
### Holding Import
The information within this data mapping is used import the correct information from the items grid. The `Field` is the product field that the data will be imported into, `MaxSize` is the maximum character size the data going into the product field can be, and `Value` is the FieldName of the column within the item grid.
| Product Field | Value | Alma API XML Node | Description |
| --------------- | --------------- | ----------------- | ---------------------------------------------- |
| ReferenceNumber | ReferenceNumber | mms_id | The catalog identifier for the record (MMS ID) |
| CallNumber | CallNumber | call_number | The item's call number |
| Location | Location | location | The location of the item |
| Library | Library | library | The library where the item is held |
| Product Field | Value | Alma API XML Node | Description |
| --------------- | --------------- | ------------------- | --------------------------------------------------------------------- |
| ReferenceNumber | ReferenceNumber | mms_id | The catalog identifier for the record (MMS ID) |
| CallNumber | CallNumber | call_number | The item's call number |
| Location | Location | location (expanded) | The location name of the item (Configured in `CustomizedMapping.lua`) |
| Sublocation | LocationCode | location | The location code returned by the Alma API |
| Library | Library | library | The library where the item is held |
> **Note:** The Holding ID can also be imported by adding another table with a Value of `HoldingId`.
Expand All @@ -120,7 +123,7 @@ The `CustomizedMapping.lua` file contains the mappings to variables that are mor
Maps an item's location code to a full name. If a location mapping isn't given, the addon will display the location code. The location code is taken from the `location` node returned by a [Retrieve Holdings List](https://developers.exlibrisgroup.com/alma/apis/bibs/GET/gwPcGly021om4RTvtjbPleCklCGxeYAfEqJOcQOaLEvEGUPgvJFpUQ==/af2fb69d-64f4-42bc-bb05-d8a0ae56936e) API call.
```lua
CustomizedMapping.Locations["{Location Code }"] = "{Full Location Name}"
CustomizedMapping.Locations["{Location Code}"] = "{Full Location Name}"
```

Expand Down Expand Up @@ -152,4 +155,4 @@ Atlas welcomes developers to extend the addon with additional support. All pull

* **AlmaApi.lua** - The AlmaApi file is used to make the API calls against the Alma API.

* **Utility.lua** - The Utility file is used for common lua functions.
* **Utility.lua** - The Utility file is used for common lua functions.

0 comments on commit 6dc3a01

Please sign in to comment.