Skip to content

Commit

Permalink
moving library code to library, profile updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kirkhess committed Mar 21, 2018
1 parent 699608a commit 06b3010
Show file tree
Hide file tree
Showing 25 changed files with 244 additions and 2,358 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,6 +2,7 @@ tmp
examples
node_modules
static/js/config-jodi.js
builds/bfe.dev.js.typeahead
jodi.html
static/profiles/bibframe/Test profile (jodiw).json

Expand Down
2 changes: 1 addition & 1 deletion Gruntfile.js
Expand Up @@ -8,7 +8,7 @@ module.exports = function(grunt) {
},
dist: {
files: {
'builds/bfe.js' : ['build_support/mini_require.js','src/bfe.js','src/lib/lodash.min.js','src/lib/typeahead.jquery.min.js','src/bfestore.js','src/bfelogging.js','src/bfelookups.js','src/lib/aceconfig.js'],
'builds/bfe.js' : ['build_support/mini_require.js','src/bfe.js','src/bfestore.js','src/bfelogging.js','src/bfelookups.js','src/lib/aceconfig.js'],
'builds/bfe.css' : ['src/css/bootstrap.css', 'src/css/typeahead.css'],
}
},
Expand Down
2,277 changes: 110 additions & 2,167 deletions builds/bfe.dev.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions development.html
Expand Up @@ -30,6 +30,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/jsonld/0.3.15/jsonld.js"></script>

<script src="static/js/short-uuid.min.js"></script>
<script src="static/js/twitter-typeahead-0.10.2.js"></script>
<script src="static/js/lodash.min.js"></script>

<script type="text/javascript" src="static/js/n3-browser.min.js"></script>

Expand Down
56 changes: 0 additions & 56 deletions src/lib/lodash.min.js

This file was deleted.

7 changes: 0 additions & 7 deletions src/lib/typeahead.jquery.min.js

This file was deleted.

5 changes: 3 additions & 2 deletions static/js/config-dev.js
Expand Up @@ -77,7 +77,7 @@
});
}

function publish(data, rdfxml, bfelog){
function publish(data, rdfxml, bfelog, callback){
var $messagediv = $('<div>', {id: "bfeditor-messagediv", class:"col-md-10 main"});

//var url = "http://mlvlp04.loc.gov:8201/bibrecs/bfe2mets.xqy";
Expand All @@ -100,6 +100,8 @@
$messagediv.insertBefore('#bfeditor-previewPanel');
$('#bfeditor-previewPanel').remove();
bfeditor.bfestore.store = [];
callback(true, data.name);

}).fail(function (XMLHttpRequest, textStatus, errorThrown){
bfelog.addMsg(new Error(), "ERROR", "FAILED to save");
bfelog.addMsg(new Error(), "ERROR", "Request status: " + textStatus + "; Error msg: " + errorThrown);
Expand Down Expand Up @@ -194,7 +196,6 @@
"static/profiles/bibframe/BIBFRAME 2.0 Edition Information.json",
"static/profiles/bibframe/BIBFRAME 2.0 Series Information.json",
"static/profiles/bibframe/BIBFRAME 2.0 DDC.json",
"static/profiles/bibframe/BIBFRAME 2.0 LCCN.json",
"static/profiles/bibframe/BIBFRAME 2.0 Item.json",
"static/profiles/bibframe/BIBFRAME 2.0 Identifiers.json",
"static/profiles/bibframe/BIBFRAME 2.0 Note.json",
Expand Down
Empty file modified static/js/jsonld-vis.js 100644 → 100755
Empty file.
Empty file modified static/js/n3-browser.min.js 100644 → 100755
Empty file.
Empty file modified static/js/short-uuid.min.js 100644 → 100755
Empty file.
20 changes: 13 additions & 7 deletions static/profiles/bibframe/BIBFRAME 2.0 Cartographic.json
Expand Up @@ -32,7 +32,9 @@
"type": "resource",
"valueConstraint": {
"useValuesFrom": [],
"valueDataType": {},
"valueDataType": {
"dataTypeURI": "http://id.loc.gov/ontologies/bflc/PrimaryContribution"
},
"valueTemplateRefs": [
"profile:bflc:Agents:PrimaryContribution"
]
Expand Down Expand Up @@ -245,7 +247,7 @@
"valueDataType": {}
},
"propertyURI": "http://id.loc.gov/ontologies/bibframe/hasInstance",
"propertyLabel": "Related Instance (BIBFRAME)",
"propertyLabel": "Has BIBFRAME Instance",
"remark": ""
},
{
Expand Down Expand Up @@ -809,7 +811,7 @@
"valueConstraint": {
"valueTemplateRefs": [],
"useValuesFrom": [
"http://mlvlp04.loc.gov:8080/vocabulary/mmaterial"
"http://id.loc.gov/vocabulary/mmaterial"
],
"valueDataType": {
"dataTypeURI": "http://id.loc.gov/ontologies/bibframe/BaseMaterial"
Expand All @@ -822,12 +824,16 @@
{
"mandatory": "false",
"repeatable": "true",
"type": "literal",
"type": "resource",
"resourceTemplates": [],
"valueConstraint": {
"valueTemplateRefs": [],
"useValuesFrom": [],
"valueDataType": {}
"useValuesFrom": [
"http://id.loc.gov/vocabulary/mlayout"
],
"valueDataType": {
"dataTypeURI": "http://id.loc.gov/ontologies/bibframe/Layout"
}
},
"propertyLabel": "Layout (RDA 3.11)",
"remark": "http://access.rdatoolkit.org/3.11.html",
Expand All @@ -841,7 +847,7 @@
"valueConstraint": {
"valueTemplateRefs": [],
"useValuesFrom": [
"http://mlvlp04.loc.gov:8080/vocabulary/mpolarity"
"http://id.loc.gov/vocabulary/mpolarity"
],
"valueDataType": {
"dataTypeLabel": "Polarity",
Expand Down
4 changes: 2 additions & 2 deletions static/profiles/bibframe/BIBFRAME 2.0 DDC.json
Expand Up @@ -38,12 +38,12 @@
}
],
"id": "profile:bf2:DDC",
"resourceLabel": "Dewey Decimal Classification (unused)",
"resourceLabel": "Dewey Decimal Classification",
"resourceURI": "http://id.loc.gov/ontologies/bibframe/ClassificationDdc"
}
],
"id": "profile:bf2:DDC",
"description": "Dewey Decimal Classification (unused)",
"description": "Dewey Decimal Classification",
"title": "BIBFRAME 2.0 DDC",
"date": "2017-07-28",
"contact": "NDMSO"
Expand Down
27 changes: 22 additions & 5 deletions static/profiles/bibframe/BIBFRAME 2.0 Identifiers.json
Expand Up @@ -563,7 +563,7 @@
}
],
"id": "profile:bf2:TestProfile:ISRC",
"resourceURI": "http://id.loc.gov/ontologies/bibframe/Is",
"resourceURI": "http://id.loc.gov/ontologies/bibframe/Isrc",
"resourceLabel": "ISRC"
},
{
Expand Down Expand Up @@ -1200,12 +1200,16 @@
{
"mandatory": "false",
"repeatable": "true",
"type": "literal",
"type": "resource",
"resourceTemplates": [],
"valueConstraint": {
"valueTemplateRefs": [],
"useValuesFrom": [],
"valueDataType": {}
"useValuesFrom": [
"http://id.loc.gov/vocabulary/mstatus"
],
"valueDataType": {
"dataTypeURI": "http://id.loc.gov/ontologies/bibframe/Status"
}
},
"propertyURI": "http://www.w3.org/2000/01/rdf-schema#label",
"propertyLabel": "Invalid/Incorrect/ Canceled?"
Expand Down Expand Up @@ -1288,7 +1292,20 @@
"valueDataType": {}
},
"propertyURI": "http://www.w3.org/1999/02/22-rdf-syntax-ns#value",
"propertyLabel": "Accession or copy number"
"propertyLabel": "Accession number"
},
{
"mandatory": "false",
"repeatable": "true",
"type": "literal",
"resourceTemplates": [],
"valueConstraint": {
"valueTemplateRefs": [],
"useValuesFrom": [],
"valueDataType": {}
},
"propertyURI": "http://www.w3.org/1999/02/22-rdf-syntax-ns#value",
"propertyLabel": "Copy number"
}
],
"resourceURI": "http://id.loc.gov/ontologies/bibframe/ShelfMark",
Expand Down
2 changes: 1 addition & 1 deletion static/profiles/bibframe/BIBFRAME 2.0 LCC.json
Expand Up @@ -24,7 +24,7 @@
],
"id": "profile:bf2:LCC",
"title": "BIBFRAME 2.0 LCC",
"description": "LC Classification/Call Number (unused)",
"description": "LC Classification/Call Number",
"date": "2017-05-13",
"contact": "NDMSO"
}
Expand Down
46 changes: 0 additions & 46 deletions static/profiles/bibframe/BIBFRAME 2.0 LCCN.json

This file was deleted.

8 changes: 5 additions & 3 deletions static/profiles/bibframe/BIBFRAME 2.0 Monograph.json
Expand Up @@ -321,7 +321,7 @@
"valueDataType": {}
},
"propertyURI": "http://id.loc.gov/ontologies/bibframe/hasInstance",
"propertyLabel": "Related Instance (BIBFRAME)"
"propertyLabel": "Has BIBFRAME Instance"
},
{
"propertyLabel": "Contents (LC-PCC PS 25.1)",
Expand Down Expand Up @@ -1427,8 +1427,10 @@
"useValuesFrom": [
"http://id.loc.gov/vocabulary/mcolor"
],
"valueDataType": {},
"valueLanguage": "http://id.loc.gov/ontologies/bibframe/ColorContent"
"valueDataType": {
"dataTypeURI": "http://id.loc.gov/ontologies/bibframe/ColorContent"
},
"valueLanguage": ""
},
"propertyURI": "http://www.w3.org/1999/02/22-rdf-syntax-ns#value",
"propertyLabel": "Color Content (RDA 7.17)",
Expand Down
Expand Up @@ -1635,11 +1635,13 @@
{
"mandatory": "false",
"repeatable": "true",
"type": "literal",
"type": "resource",
"resourceTemplates": [],
"valueConstraint": {
"valueTemplateRefs": [],
"useValuesFrom": [],
"useValuesFrom": [
"http://id.loc.gov/vocabulary/msoundcontent"
],
"valueDataType": {
"dataTypeURI": "http://id.loc.gov/ontologies/bibframe/SoundContent"
}
Expand Down Expand Up @@ -1739,20 +1741,6 @@
"propertyURI": "http://id.loc.gov/ontologies/bibframe/note",
"propertyLabel": "Details of Sound Characteristic (RDA 3.16.1.4)",
"remark": "http://access.rdatoolkit.org/3.16.1.4.html"
},
{
"mandatory": "false",
"repeatable": "true",
"type": "literal",
"resourceTemplates": [],
"valueConstraint": {
"valueTemplateRefs": [],
"useValuesFrom": [],
"valueDataType": {}
},
"propertyURI": "http://id.loc.gov/ontologies/bibframe/PlaybackCharacteristic",
"propertyLabel": "Special Playback Characteristic (RDA 3.16.9)",
"remark": "http://access.rdatoolkit.org/3.16.9.html"
}
],
"id": "profile:bf2:16mmFeatureFilm:Sound",
Expand Down
Expand Up @@ -1705,11 +1705,13 @@
{
"mandatory": "false",
"repeatable": "true",
"type": "literal",
"type": "resource",
"resourceTemplates": [],
"valueConstraint": {
"valueTemplateRefs": [],
"useValuesFrom": [],
"useValuesFrom": [
"http://id.loc.gov/vocabulary/msoundcontent"
],
"valueDataType": {
"dataTypeURI": "http://id.loc.gov/ontologies/bibframe/SoundContent"
}
Expand Down
43 changes: 24 additions & 19 deletions static/profiles/bibframe/BIBFRAME 2.0 Moving Image: BluRay DVD.json
Expand Up @@ -32,7 +32,9 @@
"profile:bflc:Agents:PrimaryContribution"
],
"useValuesFrom": [],
"valueDataType": {}
"valueDataType": {
"dataTypeURI": "http://id.loc.gov/ontologies/bflc/PrimaryContribution"
}
},
"propertyLabel": "Creator of Work (RDA 19.2)",
"propertyURI": "http://id.loc.gov/ontologies/bibframe/contribution",
Expand Down Expand Up @@ -1206,21 +1208,6 @@
"propertyLabel": "Source Consulted (RDA 5.8.1.3)",
"remark": "http://access.rdatoolkit.org/5.8.1.3.html"
},
{
"mandatory": "false",
"repeatable": "true",
"type": "resource",
"resourceTemplates": [],
"valueConstraint": {
"valueTemplateRefs": [
"profile:bf2:MIBluRayDVD:Contents"
],
"useValuesFrom": [],
"valueDataType": {}
},
"propertyURI": "http://id.loc.gov/ontologies/bibframe/tableOfContents",
"propertyLabel": "Contents (LC-PCC PS 25.1)"
},
{
"propertyLabel": "Uniform Resource Locator",
"propertyURI": "http://id.loc.gov/ontologies/bibframe/supplementaryContent",
Expand Down Expand Up @@ -2026,11 +2013,13 @@
{
"mandatory": "false",
"repeatable": "true",
"type": "literal",
"type": "resource",
"resourceTemplates": [],
"valueConstraint": {
"valueTemplateRefs": [],
"useValuesFrom": [],
"useValuesFrom": [
"http://id.loc.gov/vocabulary/msoundcontent"
],
"valueDataType": {
"dataTypeURI": "http://id.loc.gov/ontologies/bibframe/SoundContent"
}
Expand Down Expand Up @@ -2112,7 +2101,8 @@
"http://id.loc.gov/vocabulary/mplayback"
],
"valueDataType": {
"dataTypeURI": "http://id.loc.gov/ontologies/bibframe/PlaybackChannels"
"dataTypeURI": "http://id.loc.gov/ontologies/bibframe/PlaybackChannels",
"remark": ""
}
},
"propertyURI": "http://www.w3.org/1999/02/22-rdf-syntax-ns#value",
Expand Down Expand Up @@ -2159,6 +2149,21 @@
"propertyURI": "http://www.w3.org/1999/02/22-rdf-syntax-ns#value",
"propertyLabel": "Special Playback Characteristic (RDA 3.16.9)",
"remark": "http://access.rdatoolkit.org/3.16.9.html"
},
{
"mandatory": "false",
"repeatable": "true",
"type": "resource",
"resourceTemplates": [],
"valueConstraint": {
"valueTemplateRefs": [
"profile:bf2:Note"
],
"useValuesFrom": [],
"valueDataType": {}
},
"propertyURI": "http://id.loc.gov/ontologies/bibframe/note",
"propertyLabel": "Note on Playback Characteristic"
}
],
"id": "profile:bf2:MIBluRayDVD:Sound2",
Expand Down

0 comments on commit 06b3010

Please sign in to comment.