Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FE
ClassicMayan
METS MODS Mapping
Commits
6f48a84b
Commit
6f48a84b
authored
Dec 05, 2020
by
mbrodhu
Browse files
Merge branch 'release/1.1.12'
parents
628128ef
d7ada4d6
Changes
16
Hide whitespace changes
Inline
Side-by-side
.classpath
View file @
6f48a84b
...
...
@@ -11,14 +11,14 @@
<classpathentry
kind=
"var"
path=
"M2_REPO/org/apache/jena/jena-iri/3.4.0/jena-iri-3.4.0.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/xerces/xercesImpl/2.11.0/xercesImpl-2.11.0.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/commons-cli/commons-cli/1.4/commons-cli-1.4.jar"
sourcepath=
"M2_REPO/commons-cli/commons-cli/1.4/commons-cli-1.4-sources.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/commons-cli/commons-cli/1.4/commons-cli-1.4.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/org/apache/jena/jena-base/3.4.0/jena-base-3.4.0.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/org/apache/jena/jena-shaded-guava/3.4.0/jena-shaded-guava-3.4.0.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/org/apache/commons/commons-csv/1.4/commons-csv-1.4.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar"
sourcepath=
"M2_REPO/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4-sources.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/com/github/andrewoma/dexx/collection/0.7/collection-0.7.jar"
sourcepath=
"M2_REPO/com/github/andrewoma/dexx/collection/0.7/collection-0.7-sources.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/org/apache/httpcomponents/httpclient/4.5.3/httpclient-4.5.3.jar"
sourcepath=
"M2_REPO/org/apache/httpcomponents/httpclient/4.5.3/httpclient-4.5.3-sources.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/org/apache/httpcomponents/httpcore/4.4.6/httpcore-4.4.6.jar"
sourcepath=
"M2_REPO/org/apache/httpcomponents/httpcore/4.4.6/httpcore-4.4.6-sources.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/com/github/andrewoma/dexx/collection/0.7/collection-0.7.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/org/apache/httpcomponents/httpclient/4.5.3/httpclient-4.5.3.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/org/apache/httpcomponents/httpcore/4.4.6/httpcore-4.4.6.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/commons-codec/commons-codec/1.9/commons-codec-1.9.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/com/github/jsonld-java/jsonld-java/0.10.0/jsonld-java-0.10.0.jar"
/>
<classpathentry
kind=
"var"
path=
"M2_REPO/com/fasterxml/jackson/core/jackson-core/2.8.6/jackson-core-2.8.6.jar"
/>
...
...
.settings/org.eclipse.jdt.core.prefs
View file @
6f48a84b
#S
un Nov 15 17
:2
8
:0
5
CET 2020
#S
at Dec 05 21
:2
9
:0
8
CET 2020
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.source=1.8
...
...
pom.xml
View file @
6f48a84b
...
...
@@ -5,7 +5,7 @@
<groupId>
org.classicmayan.tools
</groupId>
<artifactId>
metsModsMapping
</artifactId>
<packaging>
jar
</packaging>
<version>
1.1.1
1
</version>
<version>
1.1.1
2
</version>
<name>
metsModsMapping
</name>
<url>
http://maven.apache.org
</url>
...
...
src/main/java/org/classicmayan/tools/ClassicMayanMetsMods.java
View file @
6f48a84b
package
org.classicmayan.tools
;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -60,7 +61,7 @@ public class ClassicMayanMetsMods {
mods
.
addRecordInfoToMods
(
modsRecordInfo
);
}
public
String
getRecordInfo
()
{
public
String
getRecordInfo
()
throws
ParseException
{
return
modsRecordInfo
.
getRecordInfoXML
();
}
...
...
@@ -210,11 +211,11 @@ public class ClassicMayanMetsMods {
mods
.
addModsAccessCondition
(
modsAccessCondition
);
}
public
String
getMods
()
{
public
String
getMods
()
throws
ParseException
{
return
mods
.
getModsXML
();
}
public
String
getMets
()
{
public
String
getMets
()
throws
ParseException
{
MetsHdr
metsHdr
=
new
MetsHdr
();
metsHdr
.
setMetsHdrCreationDate
(
creationDate
);
mets
.
addMetsHeader
(
metsHdr
);
...
...
src/main/java/org/classicmayan/tools/Mets.java
View file @
6f48a84b
package
org.classicmayan.tools
;
import
java.text.ParseException
;
/**
*
* @author Maximilian Brodhun State- and University Library Goettingen
...
...
@@ -52,7 +54,7 @@ public class Mets {
return
metsStructLink
;
}
public
String
getMetsXML
()
{
public
String
getMetsXML
()
throws
ParseException
{
return
header
+
metsHeader
+
metsHdr
.
getMetsHdrXML
()
+
metsDmdSec
.
getMetsDmdDecXML
()
+
...
...
src/main/java/org/classicmayan/tools/MetsAmdSec.java
View file @
6f48a84b
package
org.classicmayan.tools
;
import
java.text.ParseException
;
/**
*
* @author Maximilian Brodhun State- and University Library Goettingen
...
...
@@ -31,7 +33,7 @@ public class MetsAmdSec {
return
metsDigiProvMD
;
}
public
String
getMetsAmdSecXML
()
{
public
String
getMetsAmdSecXML
()
throws
ParseException
{
return
"<amdSec ID=\""
+
getID
()
+
"\">"
+
metsRightsMD
.
getMetsRightMDXML
()
+
metsDigiProvMD
.
getMetsDigiProvMDXML
()
+
...
...
src/main/java/org/classicmayan/tools/MetsDigiProvMD.java
View file @
6f48a84b
package
org.classicmayan.tools
;
import
java.text.ParseException
;
/**
*
* @author Maximilian Brodhun State- and University Library Goettingen
...
...
@@ -24,7 +26,7 @@ public class MetsDigiProvMD {
return
metsMdWrap
;
}
public
String
getMetsDigiProvMDXML
()
{
public
String
getMetsDigiProvMDXML
()
throws
ParseException
{
return
"<digiprovMD ID=\""
+
getID
()
+
"\">"
+
metsMdWrap
.
getMetsMdWrapXML
()
+
"</digiprovMD>"
;
...
...
src/main/java/org/classicmayan/tools/MetsDmdSec.java
View file @
6f48a84b
package
org.classicmayan.tools
;
import
java.text.ParseException
;
/**
*
* @author Maximilian Brodhun State- and University Library Goettingen
...
...
@@ -26,7 +28,7 @@ public class MetsDmdSec {
return
metsMdWrap
;
}
public
String
getMetsDmdDecXML
()
{
public
String
getMetsDmdDecXML
()
throws
ParseException
{
return
"<dmdSec ID=\""
+
getId
()
+
"\">"
+
metsMdWrap
.
getMetsMdWrapXML
()
+
"</dmdSec>"
;
}
...
...
src/main/java/org/classicmayan/tools/MetsMdWrap.java
View file @
6f48a84b
package
org.classicmayan.tools
;
import
java.text.ParseException
;
/**
*
* @author Maximilian Brodhun State- and University Library Goettingen
...
...
@@ -41,7 +43,7 @@ public class MetsMdWrap {
this
.
otherMdType
=
otherMdType
;
}
public
String
getMetsMdWrapXML
()
{
public
String
getMetsMdWrapXML
()
throws
ParseException
{
if
(
otherMdType
==
null
)
{
return
"<mdWrap MIMETYPE=\""
+
getMimeType
()
+
"\" MDTYPE=\""
+
getMdType
()
+
"\">"
+
metsXmlData
.
getXmlDataXML
()
+
"</mdWrap>"
;
...
...
src/main/java/org/classicmayan/tools/MetsRightsMD.java
View file @
6f48a84b
package
org.classicmayan.tools
;
import
java.text.ParseException
;
/**
*
* @author Maximilian Brodhun State- and University Library Goettingen
...
...
@@ -25,7 +27,7 @@ public class MetsRightsMD {
return
metsMdWrap
;
}
public
String
getMetsRightMDXML
()
{
public
String
getMetsRightMDXML
()
throws
ParseException
{
return
"<rightsMD ID=\""
+
getID
()
+
"\">"
+
metsMdWrap
.
getMetsMdWrapXML
()
+
"</rightsMD>"
;
...
...
src/main/java/org/classicmayan/tools/MetsXmlData.java
View file @
6f48a84b
package
org.classicmayan.tools
;
import
java.text.ParseException
;
/**
*
* @author Maximilian Brodhun State- and University Library Goettingen
...
...
@@ -28,7 +30,7 @@ public class MetsXmlData {
return
metsRights
;
}
public
String
getXmlDataXML
()
{
public
String
getXmlDataXML
()
throws
ParseException
{
if
(
mods
!=
null
)
{
return
"<xmlData>"
+
mods
.
getModsXML
()
+
"</xmlData>"
;
}
else
if
(
metsRights
!=
null
){
...
...
src/main/java/org/classicmayan/tools/Mods.java
View file @
6f48a84b
package
org.classicmayan.tools
;
import
java.text.ParseException
;
/**
*
* @author Maximilian Brodhun State- and University Library Goettingen
...
...
@@ -75,7 +77,7 @@ public class Mods {
return
modsAccessCondition
;
}
public
String
getModsXML
()
{
public
String
getModsXML
()
throws
ParseException
{
/*String recordInfo;
...
...
src/main/java/org/classicmayan/tools/ModsRecordInfo.java
View file @
6f48a84b
package
org.classicmayan.tools
;
import
java.text.ParseException
;
/**
*
* @author Maximilian Brodhun State- and University Library Goettingen
...
...
@@ -33,7 +35,7 @@ public class ModsRecordInfo {
return
rcd
;
}
public
String
getRecordInfoXML
()
{
public
String
getRecordInfoXML
()
throws
ParseException
{
if
(
recordIdentifier
.
getRecordIdentifierXML
()==
null
)
{
return
""
;
...
...
src/main/java/org/classicmayan/tools/RecordChangeDate.java
View file @
6f48a84b
package
org.classicmayan.tools
;
import
java.text.ParseException
;
/**
*
* @author Maximilian Brodhun State- and University Library Goettingen
...
...
@@ -20,7 +22,7 @@ public class RecordChangeDate {
this
.
recordChangeDateValue
=
changeDate
;
}
public
String
getRecordChangeDateXML
()
{
return
"<recordChangeDate encoding=\"iso8601\">"
+
getRecordChangeDateValue
()
+
"</recordChangeDate>"
;
public
String
getRecordChangeDateXML
()
throws
ParseException
{
return
"<recordChangeDate encoding=\"iso8601\">"
+
MetsModsUtilities
.
datestampAsString
(
getRecordChangeDateValue
()
)
+
"</recordChangeDate>"
;
}
}
src/main/java/org/classicmayan/tools/RecordCreationDate.java
View file @
6f48a84b
package
org.classicmayan.tools
;
import
java.text.ParseException
;
/**
*
* @author Maximilian Brodhun State- and University Library Goettingen
...
...
@@ -19,8 +21,8 @@ public class RecordCreationDate {
return
creationDate
;
}
public
String
getRecordCreationDateXML
()
{
return
"<recordCreationDate encoding=\"iso8601\">"
+
getCreationDate
()
+
"</recordCreationDate>"
;
public
String
getRecordCreationDateXML
()
throws
ParseException
{
return
"<recordCreationDate encoding=\"iso8601\">"
+
MetsModsUtilities
.
datestampAsString
(
getCreationDate
()
)
+
"</recordCreationDate>"
;
}
}
src/test/java/org/classicmayan/tools/MetsTest.java
View file @
6f48a84b
package
org.classicmayan.tools
;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -227,7 +228,7 @@ public class MetsTest {
@Test
@Ignore
public
void
testModsRecordCreationDate
()
{
public
void
testModsRecordCreationDate
()
throws
ParseException
{
System
.
out
.
println
(
"------------------------------------------"
);
...
...
@@ -238,7 +239,7 @@ public class MetsTest {
@Test
@Ignore
public
void
testModsRecordChangeDate
()
{
public
void
testModsRecordChangeDate
()
throws
ParseException
{
System
.
out
.
println
(
"------------------------------------------"
);
...
...
@@ -249,7 +250,7 @@ public class MetsTest {
@Test
@Ignore
public
void
testModsRecordInfo
()
{
public
void
testModsRecordInfo
()
throws
ParseException
{
modsRecordInfo
.
addRecordIdenfier
(
ri
);
modsRecordInfo
.
addRecordCreationDate
(
recordCreationDate
);
...
...
@@ -358,7 +359,7 @@ public class MetsTest {
@Test
@Ignore
public
void
testMods
()
{
public
void
testMods
()
throws
ParseException
{
System
.
out
.
println
(
"------------------------------------------"
);
...
...
@@ -379,7 +380,7 @@ public class MetsTest {
@Test
@Ignore
public
void
testMetsDmdSec
(){
public
void
testMetsDmdSec
()
throws
ParseException
{
System
.
out
.
println
(
"------------------------------------------"
);
System
.
out
.
println
(
"Test the XML Output of Mets DmdSec"
);
System
.
out
.
println
(
metsDmdSec
.
getMetsDmdDecXML
());
...
...
@@ -388,7 +389,7 @@ public class MetsTest {
@Test
@Ignore
public
void
testMetsMdWrap
(){
public
void
testMetsMdWrap
()
throws
ParseException
{
System
.
out
.
println
(
"------------------------------------------"
);
System
.
out
.
println
(
"Test the XML Output of Mets MdWrap"
);
System
.
out
.
println
(
metsMdWrap
.
getMetsMdWrapXML
());
...
...
@@ -397,7 +398,7 @@ public class MetsTest {
@Test
@Ignore
public
void
testMetsXmlData
(){
public
void
testMetsXmlData
()
throws
ParseException
{
System
.
out
.
println
(
"------------------------------------------"
);
System
.
out
.
println
(
"Test the XML Output of Mets Xml Data"
);
System
.
out
.
println
(
metsXmlData
.
getXmlDataXML
());
...
...
@@ -406,7 +407,7 @@ public class MetsTest {
@Test
@Ignore
public
void
testMetsAMdSec
(){
public
void
testMetsAMdSec
()
throws
ParseException
{
System
.
out
.
println
(
"------------------------------------------"
);
System
.
out
.
println
(
"Test the XML Output of Mets AmdSec"
);
System
.
out
.
println
(
metsAmdSec
.
getMetsAmdSecXML
());
...
...
@@ -415,7 +416,7 @@ public class MetsTest {
@Test
@Ignore
public
void
testMetsRightsMD
(){
public
void
testMetsRightsMD
()
throws
ParseException
{
System
.
out
.
println
(
"------------------------------------------"
);
System
.
out
.
println
(
"Test the XML Output of Mets RightsMD"
);
System
.
out
.
println
(
metsRightsMD
.
getMetsRightMDXML
());
...
...
@@ -424,7 +425,7 @@ public class MetsTest {
@Test
@Ignore
public
void
testMetsMdWrapForRights
(){
public
void
testMetsMdWrapForRights
()
throws
ParseException
{
System
.
out
.
println
(
"------------------------------------------"
);
System
.
out
.
println
(
"Test the XML Output of Mets MD Wrap for Rights"
);
System
.
out
.
println
(
metsMdWrapWithOtherMdType
.
getMetsMdWrapXML
());
...
...
@@ -434,7 +435,7 @@ public class MetsTest {
@Test
@Ignore
public
void
testMets
(){
public
void
testMets
()
throws
ParseException
{
System
.
out
.
println
(
"------------------------------------------"
);
System
.
out
.
println
(
"Test the XML Output of Mets"
);
...
...
@@ -450,7 +451,7 @@ public class MetsTest {
@Test
@Ignore
public
void
testModsFromTriplestore
()
{
public
void
testModsFromTriplestore
()
throws
ParseException
{
cmmm
.
setTitleInfoData
();
cmmm
.
setTypeOfResource
();
cmmm
.
setRecordInfo
();
...
...
@@ -467,7 +468,7 @@ public class MetsTest {
@Test
@Ignore
public
void
testAllObjects
()
{
public
void
testAllObjects
()
throws
ParseException
{
List
<
String
>
artefactList
=
new
ArrayList
<
String
>();
Queries
queries
=
new
Queries
();
artefactList
=
queries
.
getArtefactList
(
2500
);
...
...
@@ -517,7 +518,7 @@ public class MetsTest {
@Test
//@Ignore
public
void
testMetsFromTriplestore
()
{
public
void
testMetsFromTriplestore
()
throws
ParseException
{
cmmm
.
setTitleInfoData
();
cmmm
.
setTypeOfResource
();
...
...
@@ -534,8 +535,8 @@ public class MetsTest {
@Test
//@Ignore
public
void
testClassicMayanMetsMOds
()
{
ClassicMayanMetsMods
testMetsFile
=
new
ClassicMayanMetsMods
(
"textgrid:2
chbq
"
,
"2016-02-18T11:15:19.899+01:00"
,
"2018-02-02T12:12:34.113+01:00"
);
public
void
testClassicMayanMetsMOds
()
throws
ParseException
{
ClassicMayanMetsMods
testMetsFile
=
new
ClassicMayanMetsMods
(
"textgrid:2
sn2r
"
,
"2016-02-18T11:15:19.899+01:00"
,
"2018-02-02T12:12:34.113+01:00"
);
System
.
out
.
println
(
testMetsFile
.
getMets
());
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment