Skip to content

Commit

Permalink
Merge pull request #89 from folio-org/MODINV-72-more-item-properties-…
Browse files Browse the repository at this point in the history
…non-breaking

MODINV-72, more item properties, non breaking
  • Loading branch information
nielserik authored Nov 30, 2018
2 parents 28a1805 + 0a363ed commit 161aa95
Show file tree
Hide file tree
Showing 13 changed files with 786 additions and 222 deletions.
106 changes: 106 additions & 0 deletions ramls/item.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,26 @@
"id": {
"type": "string"
},
"hrid": {
"type": "string",
"description": "The human readable ID, also called eye readable ID. A system-assigned sequential alternate ID"
},
"holdingsRecordId": {
"description": "ID of the holding the item is a member of",
"type": "string"
},
"formerIds": {
"type": "array",
"description": "Previous identifiers assigned to the item",
"items": {
"type": "string"
},
"uniqueItems": true
},
"discoverySuppress": {
"type": "boolean",
"description": "Records the fact that the record should not be displayed in a discovery system"
},
"title": {
"type": "string",
"description": "title of the item (read only, inherited from associated instance)",
Expand All @@ -23,12 +39,42 @@
"barcode": {
"type": "string"
},
"accessionNumber": {
"type": "string",
"description": "Also called inventar number"
},

"itemLevelCallNumber": {
"type": "string"
},
"itemLevelCallNumberPrefix": {
"type": "string"
},
"itemLevelCallNumberSuffix": {
"type": "string"
},
"itemLevelCallNumberTypeId": {
"type": "string"
},
"volume": {
"type": "string"
},
"enumeration": {
"type": "string"
},
"chronology": {
"type": "string"
},
"yearCaption": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"itemIdentifier": {
"type": "string"
},
"copyNumbers": {
"type": "array",
"items": {
Expand All @@ -39,6 +85,24 @@
"numberOfPieces": {
"type": "string"
},
"descriptionOfPieces": {
"type": "string"
},
"numberOfMissingPieces": {
"type": "string"
},
"missingPieces": {
"type": "string"
},
"missingPiecesDate": {
"type": "string"
},
"itemDamagedStatusId": {
"type": "string"
},
"itemDamagedStatusDate": {
"type": "string"
},
"notes": {
"type": "array",
"items": {
Expand All @@ -58,9 +122,11 @@
}
},
"status": {
"description": "The status of the item",
"type": "object",
"properties": {
"name": {
"description": "Name of the status e.g. Available, Checked out, In transit",
"type": "string"
}
},
Expand Down Expand Up @@ -159,6 +225,46 @@
}
}
},
"electronicAccess": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uri": {
"type": "string",
"description": "uniform resource identifier (URI) is a string of characters designed for unambiguous identification of resources"
},
"linkText": {
"type": "string",
"description": "the value of the MARC tag field 856 2nd indicator, where the values are: no information provided, resource, version of resource, related resource, no display constant generated"
},
"materialsSpecification": {
"type": "string",
"description": "materials specified is used to specify to what portion or aspect of the resource the electronic location and access information applies (e.g. a portion or subset of the item is electronic, or a related electronic resource is being linked to the record)"
},
"publicNote": {
"type": "string",
"description": "URL public note to be displayed in the discovery"
},
"relationshipId": {
"type": "string",
"description": "relationship between the electronic resource at the location identified and the item described in the record as a whole"
}
},
"additionalProperties": false,
"required": [
"uri"
]
}
},
"statisticalCodeIds": {
"type": "array",
"description": "List of statistical code IDs",
"items": {
"type": "string"
},
"uniqueItems": true
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package org.folio.inventory.domain.ingest;

import org.folio.inventory.domain.items.Item;
import org.folio.inventory.domain.items.ItemCollection;

import java.lang.invoke.MethodHandles;
import java.util.*;
import java.util.stream.Collectors;
Expand All @@ -15,6 +12,8 @@
import org.folio.inventory.domain.instances.Identifier;
import org.folio.inventory.domain.instances.Instance;
import org.folio.inventory.domain.instances.InstanceCollection;
import org.folio.inventory.domain.items.Item;
import org.folio.inventory.domain.items.ItemCollection;
import org.folio.inventory.resources.ingest.IngestJob;
import org.folio.inventory.resources.ingest.IngestJobState;
import org.folio.inventory.storage.Storage;
Expand Down Expand Up @@ -137,18 +136,16 @@ private void processRecordsMessage(Message<JsonObject> message, final EventBus e
: null;

return new Item(null,
record.getString("barcode"),
null, null, new ArrayList<>(), null,
holdingId, new ArrayList<>(),
holdingId,
"Available",
materialTypes.getString("Book") != null
? materialTypes.getString("Book")
: materialTypes.getString("book"),
null, null,
loanTypes.getString("Can Circulate") != null
? loanTypes.getString("Can Circulate")
: loanTypes.getString("Can circulate"),
null, null);
null)
.setBarcode(record.getString("barcode"));
})
.forEach(item -> itemCollection.add(item, allItems.receive(),
failure -> log.error("Item processing failed: " + failure.getReason()))));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.folio.inventory.domain.instances;

import org.folio.inventory.domain.sharedproperties.ElectronicAccess;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
Expand Down
Loading

0 comments on commit 161aa95

Please sign in to comment.