Git Product home page Git Product logo

mod-spine-o-matic's Introduction

mod-spine-o-matic

A middleware module for providing Alma like XML responses for use with SpineOMatic.

Copyright (C) 2018 The Open Library Foundation

This software is distributed under the terms of the Apache License, Version 2.0. See the file "LICENSE" for more information.

API

There is a single endpoint /spine-label?identifier={item barcode|item hrid}.

Sample use with SpineOMatic

Configure Alma Access to mod-spine-o-matic

access

Use default call number parsing

spine

Use custom label

custom

available XML fields

<title>
<call_number_prefix>
<call_number>
<call_number_type_name>
<call_number_type>
<enumeration>
<chronology>
<issue_level_description>
<library_name>
<library_code>
<location_name>
<location_code>
<current_date>
<enum_latest>
<chron_latest>
<enum_n> *
<chron_n> *

* where n is the line number from receiving history (i.e. chron_2)

seperate call number prefix

barcode item hrid
A14839145884

Custom

XML sources:

<call_number_prefix>
%<call_number>

A14839145884

Oversize
PN
6728
A37
M55
2006

enumeration and chronology populated

barcode item hrid
A14811944997 it00000000005
A14814371046 it00000000006
A14812022756 it00000000007

Custom

XML sources:

%<call_number>
<chronology>
<enumeration>

A14811944997

SB
450.9
N45
1987
v.1:no.1-6

A14814371046

SB
450.9
N45
1987
v.1:no.7-12

A14812022756

SB
450.9
N45
1988
v.2

enumeration null, chronology populated

barcode item hrid
A14809369076 it00000663619
A14809369084 it00000663620
A14809369092 it00000663621

Custom

XML sources:

%<call_number>
<chronology>

A14809369076

TK
454.2
I15
1985:v.1

A14809369084

TK
454.2
I15
1985:v.2

A14809369092

TK
454.2
I15
1985:v.3

enumeration populated, chronology null

barcode item hrid
A14809356455 it00000663602
A14809356463 it00000663603
A14809356471 it00000663604

Custom

XML sources:

%<call_number>
<enumeration>

A14809356455

PQ
6089
C37
1982
v.1:pt.a

A14809356463

PQ
6089
C37
1982
v.2

A14809356471

PQ
6089
C37
1982
v.3

barcode is null, so input hrid

barcode item hrid
it00000165900
it00000000042
it00000165904

Spine

SpineOMatic parsing <call_number>

it00000165900

Z
1006
C6

it00000000042

PN
1992.8
S35
J38
1987

it00000165904

Z
1006
C37
1966

enumerations and chronologies from holdings by hrid

barcode holdings hrid
ho00000044908

Custom

XML sources:

%<call_number>
<chron_1>
<enum_1>
<chron_latest>
<enum_latest>

ho00000044908

UG
633
A65
(2021 May)
v. 104, no. 5 
(2020 Jan.-Feb.)
v. 104, no. 1-2 

Additional Information

Other modules.

Other FOLIO Developer documentation is at dev.folio.org.

Docker deployment

When deploying docker, be sure to set the appropriate ports for your environment (make the guest port matches the port specified in src/main/resources/application.yml file). In the example below, the -p 9000:9000 represents -p [host port]:[guest port] with guest referring to the docker image and host referring to the system running docker.

docker build -t folio/mod-spine-o-matic .
docker run -d -p 9000:9000 folio/mod-spine-o-matic

Publish docker image

docker login [docker repo]
docker build -t [docker repo]/folio/mod-spine-o-matic:[version] .
docker push [docker repo]/folio/mod-spine-o-matic:[version]

Issue tracker

See project FOLIO at the FOLIO issue tracker.

mod-spine-o-matic's People

Contributors

rladdusaw avatar wwelling avatar jcreel avatar cmcquistion avatar

Watchers

Michael Nichols avatar James Cloos avatar  avatar Douglas Hahn avatar Jeremy Huff avatar Micah Cooper avatar Devang Mehta avatar  avatar  avatar Rincy Mathew avatar  avatar  avatar

Forkers

mbubaf ebscois

mod-spine-o-matic's Issues

Service to request item from FOLIO

Need to configure the request URL and the subpath for the endpoint. Do this in application.properties.
This service will return a JSON node that is immediately interpretable by the Thymeleaf template.

Call number parsing for custom labels

When the data in the call number field isn't enough to generate the label (i.e. it needs a prefix or location) we need to parse the call number into the <parsed_call_number> field to generate the correct label.

Custom prefix lookup

There is a case for prefixes that are not in FOLIO. These will need to be expressed in a file and loaded on startup.

Print receipt data for checked-in issues.

Example, look at holdings record hrid=ho00000044909, receiving history section. There are 6 lines there -- the operator would need to have location & call number from the holdings record plus be able to select one of those lines, which contain enumeration and chronology, to print on the label.

SpineOMatic isn't printing, gives error message when list of fetched items is of length 0

Error report when using Spine-O-Matic:
Copied item ID from FOLIO it000041933902
Opened spine label program & pasted in it000041933903.
get an error message ***** ERROR ***** Can't retrieve XML file.Error message: The remote server returned an error: (500) Internal Server Error.

Suggestion from William:
Looks like we need some more guard clauses in the okapi service

https://github.com/TAMULib/mod-spine-o-matic/blob/e18780ac19284cd479179c0833273e3a[…]src/main/java/edu/tamu/modspineomatic/service/OkapiService.java

https://github.com/TAMULib/mod-spine-o-matic/blob/e18780ac19284cd479179c0833273e3a[…]src/main/java/edu/tamu/modspineomatic/service/OkapiService.java

https://github.com/TAMULib/mod-spine-o-matic/blob/e18780ac19284cd479179c0833273e3a[…]src/main/java/edu/tamu/modspineomatic/service/OkapiService.java

These are all assuming at least one response and when it grabs the 0 index of empty array it returns null.

Confirm samples work as expected and document Custom XML sources for labels if applicable

Blocked by #22 and #24

All the below should be tested and submit the resulting label for review. If custom label, the XML sources should be documented.

Spine label samples

Both enumeration and chronology populated
   barcode    |     hrid
--------------+---------------
 A14811944997 | it00000000005
 A14814371046 | it00000000006
 A14812022756 | it00000000007

enumeration null, chronology populated
   barcode    |     hrid
--------------+---------------
 A14809369076 | it00000663749
 A14809369084 | it00000663750
 A14809369092 | it00000663751

enumeration populated, chronology null
   barcode    |     hrid
--------------+---------------
 A14809356455 | it00000663732
 A14809356463 | it00000663733
 A14809356471 | it00000663734

barcode is null, so input hrid
 barcode |     hrid
---------+---------------
         | it00000165938
         | it00000000042
         | it00000165945

location requiring special label printing
 A14823400064 | it00000498821 | mtxt,film
 A14823883296 | it00000498822 | mtxt,film
              | it00000831473 | cush,wode
              | it00000748781 | cush,wode
 A14809478998 | it00000667357 | wein
 A14809479009 | it00000667360 | wein
              | it00002821308 | cush,afri
              | it00002821372 | cush,afri
              | it00002821509 | cush,afri
              | it00002933250 | cush,asia
              | it00002933253 | cush,asia
              | it00002690836 | cush,asia

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.