Update js function to jquery.1.10.x, added logo external bib service image, added mapconverter and configuration

This commit is contained in:
Pascarelli Luigi Andrea
2013-09-27 00:04:46 +02:00
committed by kstamatis
parent eacbe9a458
commit fb2d9e3570
21 changed files with 344 additions and 115 deletions

View File

@@ -0,0 +1,118 @@
package org.dspace.content.crosswalk;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import org.apache.commons.lang.StringUtils;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.SelfNamedPlugin;
public class MapConverter extends SelfNamedPlugin implements IConverter
{
/** Location of config file */
private final String configFilePath = ConfigurationManager
.getProperty("dspace.dir")
+ File.separator
+ "config"
+ File.separator
+ "crosswalks"
+ File.separator;
public final String REGEX_PREFIX = "regex.";
private Properties mapConfig;
private Map<String, String> regexConfig = new HashMap<String, String>();
private synchronized void init()
{
if (mapConfig != null)
return;
FileInputStream fis = null;
try
{
fis = new FileInputStream(configFilePath + "mapConverter-"
+ getPluginInstanceName() + ".properties");
mapConfig = new Properties();
mapConfig.load(fis);
fis.close();
for (Object key : mapConfig.keySet())
{
String keyS = (String)key;
if (keyS.startsWith(REGEX_PREFIX))
{
String regex = keyS.substring(REGEX_PREFIX.length());
String regReplace = mapConfig.getProperty(keyS);
if (regReplace == null)
{
regReplace = "";
}
else if (regReplace.equalsIgnoreCase("@ident@"))
{
regReplace = "$0";
}
regexConfig.put(regex,regReplace);
}
}
}
catch (Exception e)
{
throw new IllegalArgumentException(
"Impossibile leggere la configurazione per il converter "
+ getPluginInstanceName(), e);
}
finally
{
if (fis != null)
{
try
{
fis.close();
}
catch (IOException ioe)
{
// ...
}
}
}
}
public String makeConversion(String value)
{
if (value == null) return null;
init();
String tmp = "";
if (mapConfig.containsKey(value))
{
tmp = mapConfig.getProperty(value, mapConfig
.getProperty("mapConverter.default"));
}
else
{
tmp = mapConfig.getProperty("mapConverter.default");
for (String regex : regexConfig.keySet())
{
if (value != null && value.matches(regex))
{
tmp = value.replaceAll(regex, regexConfig.get(regex));
}
}
}
if ("@@ident@@".equals(tmp))
{
return value;
}
else if (StringUtils.isNotBlank(tmp))
{
return tmp;
}
else
return null;
}
}

View File

@@ -0,0 +1,18 @@
package org.dspace.content.crosswalk;
import org.apache.commons.lang.StringUtils;
public class RemoveLastDotConverter implements IConverter
{
public String makeConversion(String value)
{
if (StringUtils.isNotBlank(value) && value.endsWith("."))
{
return value.substring(0, value.length() - 1);
}
else
{
return value;
}
}
}

View File

@@ -1719,3 +1719,4 @@ jsp.submit.start-lookup-submission.select.collection.defaultoption = Select...
jsp.submit.start-lookup-submission.noresult = No results available!
jsp.submit.start-lookup-submission.js.errormessage = Sorry, an error is occurred. Try again. If this message will show again please, contact administrators and continue to insert the submission manually. Thank you.
jsp.submit.start-lookup-submission.js.detailsbuttonmessage = See details

View File

@@ -121,7 +121,7 @@ public class JSPStartSubmissionLookupStep extends JSPStep
* With no parameters, this servlet prepares for display of the Select
* Collection JSP.
*/
int collectionID = UIUtil.getIntParameter(request, "collection");
int collectionID = UIUtil.getIntParameter(request, "collectionid");
Collection col = null;
if (collectionID != -1)

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -106,7 +106,7 @@ submissionLookupShowResult = function(info){
j('#result-list').html(" ");
for (var i=0;i<info.result.length;i++)
{
var bt = j('<button type="button">').append('Vedi il dettaglio');
var bt = j('<button type="button">').append(j('#jsseedetailsbuttonmessage').text());
var par = j('<p class="sl-result">');
var divImg = j('<div class="submission-lookup-providers">');
par.append(divImg);
@@ -173,7 +173,7 @@ submissionLookupShowDetails = function(info){
});
popup.append(start);
j(document).append(popup);
j('body').append(popup);
popup.dialog({modal: true,width:800,height:600,
close: function( event, ui ) {
j('#hidden-area').append(j('#select-collection-div'));

View File

@@ -55,8 +55,10 @@
List<String> identifiers = (List<String>) request.getAttribute("identifiers");
String uuid = (String) request.getAttribute("s_uuid");
%>
<c:set var="dspace.layout.head" scope="request">
<script type='text/javascript'>var dspaceContextPath = "<%=request.getContextPath()%>";</script>
</c:set>
<c:set var="dspace.layout.head.last" scope="request">
<script type='text/javascript'>var j = jQuery.noConflict(); dspaceContextPath = "<%=request.getContextPath()%>";</script>
<script type="text/javascript" src="<%= request.getContextPath() %>/static/js/submission-lookup.js"></script>
</c:set>
@@ -67,6 +69,7 @@
<h1><fmt:message key="jsp.submit.start-lookup-submission.heading"/></h1>
<div id="jserrormessage" style="display: none"><fmt:message key="jsp.submit.start-lookup-submission.js.errormessage"/></div>
<div id="jsseedetailsbuttonmessage" style="display: none"><fmt:message key="jsp.submit.start-lookup-submission.js.detailsbuttonmessage"/></div>
<% if (collections.length > 0)
{
//if no collection was selected, display an error
@@ -108,6 +111,7 @@
<input type="hidden" id="suuid" name="suuid" value="<%= uuid %>"/>
<input type="hidden" id="iuuid" name="iuuid" value=""/>
<input type="hidden" id="collectionid" name="collectionid" value=""/>
<div id="tabs-search-accordion">
<%
if (searchProviders != null && searchProviders.size() > 0) {
@@ -226,13 +230,13 @@
<a href="<%= request.getContextPath() %>"><fmt:message key="jsp.general.home"/></a><br />
<a href="<%= request.getContextPath() %>/mydspace"><fmt:message key="jsp.general.mydspace" /></a>
</p>
<script type="text/javascript"><!--
<script type="text/javascript"><!--
var j = jQuery.noConflict();
j('#tabs').tabs({
select: function( event, ui ) {
if ('tabs-result' == j(ui.panel).attr('id'))
j("#tabs").tabs({
beforeActivate: function( event, ui ) {
if ('tabs-result' == j(ui.newPanel).attr('id'))
{
j('#manual-submission').appendTo(j(ui.panel));
j('#manual-submission').appendTo(j(ui.newPanel));
}
else
{
@@ -241,10 +245,10 @@
}
});
j('#tabs-search-accordion').accordion({
change: function( event, ui ) {
if ('manual-accordion' == ui.newContent.attr('id'))
beforeActivate: function( event, ui ) {
if ('manual-accordion' == ui.newPanel.attr('id'))
{
j('#manual-submission').appendTo(ui.newContent);
j('#manual-submission').appendTo(ui.newPanel);
}
}
});

View File

@@ -0,0 +1,12 @@
journalRef = journal
doi = doi
authors = authors
comment = note
year = issued
articleTitle = title
summary = abstract
splashPageUrl = url
pdfUrl = fulltextUrl
primaryCategory = arxivCategory(arxivSubject)
category = arxivCategory(arxivSubject)
source = arxivID

View File

@@ -1,17 +0,0 @@
target_collection.default = Articolo su periodico
journalRef = dc.relation.ispartofjournal
doi = dc.identifier.doi
authors = dc.contributor.author
comment = dc.description
year = dc.date.issued
articleTitle = dc.title
summary = dc.description.abstract
splashPageUrl = dc.identifier.url
pdfUrl = dc.description
primaryCategory = dc.subject.keywords(arxivSubject)
category = dc.subject.keywords(arxivSubject)
source = dc.identifier.source(classname)
enhance.dc.description.allauthors = allnames
enhance.dc.description.numberofauthors = countnames
sanitize.dc.contributor.author = drop
sanitize.dc.subject.keywords = allkeywords

View File

@@ -0,0 +1,20 @@
doi = doi
itemType =
issn = jissn
eissn = jeissn
isbn = isbn
seriesTitle = serie
journalTitle = journal
volumeTitle = book
articleTitle = title
authors = authors
editors = editors
translators = translators
chairs = chairs
volume = volume
issue = issue
firstPage = firstpage
lastPage = lastpage
editionNumber = edition
year = issued
publicationType = subtype

View File

@@ -1,57 +0,0 @@
#journal_title
#journal_issue
#journal_volume
#journal_article
#conference_title
#conference_series
#conference_paper
#book_title
#book_series
#book_content
#component
#dissertation
#report-paper_title
#report-paper_series
#report-paper_content
#standard_title
#standard_series
#standard_content
target_collection.default = Articolo su periodico
target_collection.journal_article = Articolo su periodico
target_collection.book_content = Contributo in volume
target_collection.conference_paper = Contributo in volume
target_collection.book_title = Volume
target_collection.unspecified = Volume
doi = dc.identifier.doi
source = dc.identifier.source(classname)
itemType =
issn = dc.relation.issn
eissn = dc.relation.eissn
isbn = dc.relation.isbn
seriesTitle = dc.relation.ispartofseries
journalTitle = dc.relation.ispartofjournal
volumeTitle = dc.relation.ispartof
authors = dc.cilea.author
editors = dc.cilea.editor
translators = dc.cilea.translator
chairs =
volume = dc.relation.volume
issue = dc.relation.issue
firstPage = dc.relation.firstpage
lastPage = dc.relation.lastpage
editionNumber =
year = dc.date.issued
publicationType =
articleTitle = dc.title
Articolo\ su\ periodico.seriesTitle =
Articolo\ su\ periodico.volumeTitle =
Articolo\ su\ periodico.translators =
Contributo\ in\ volume.translators =
Volume.volumeTitle = dc.title
Volume.translators =
Volume.articleTitle =
enhance.dc.description.allauthors = allnames
enhance.dc.description.alleditors = allnames
enhance.dc.description.numberofauthors = countnames
sanitize.dc.cilea.author = drop
sanitize.dc.cilea.editor = drop

View File

@@ -0,0 +1,127 @@
stat.AP= Statistics - Applications
stat.CO = Statistics - Computation
stat.ML = Statistics - Machine Learning
stat.ME = Statistics - Methodology
stat.TH = Statistics - Theory
q-bio.BM = Quantitative Biology - Biomolecules
q-bio.CB = Quantitative Biology - Cell Behavior
q-bio.GN = Quantitative Biology - Genomics
q-bio.MN = Quantitative Biology - Molecular Networks
q-bio.NC = Quantitative Biology - Neurons and Cognition
q-bio.OT = Quantitative Biology - Other
q-bio.PE = Quantitative Biology - Populations and Evolution
q-bio.QM = Quantitative Biology - Quantitative Methods
q-bio.SC = Quantitative Biology - Subcellular Processes
q-bio.TO = Quantitative Biology - Tissues and Organs
cs.AR = Computer Science - Architecture
cs.AI = Computer Science - Artificial Intelligence
cs.CL = Computer Science - Computation and Language
cs.CC = Computer Science - Computational Complexity
cs.CE = Computer Science - Computational Engineering; Finance; and Science
cs.CG = Computer Science - Computational Geometry
cs.GT = Computer Science - Computer Science and Game Theory
cs.CV = Computer Science - Computer Vision and Pattern Recognition
cs.CY = Computer Science - Computers and Society
cs.CR = Computer Science - Cryptography and Security
cs.DS = Computer Science - Data Structures and Algorithms
cs.DB = Computer Science - Databases
cs.DL = Computer Science - Digital Libraries
cs.DM = Computer Science - Discrete Mathematics
cs.DC = Computer Science - Distributed; Parallel; and Cluster Computing
cs.GL = Computer Science - General Literature
cs.GR = Computer Science - Graphics
cs.HC = Computer Science - Human-Computer Interaction
cs.IR = Computer Science - Information Retrieval
cs.IT = Computer Science - Information Theory
cs.LG = Computer Science - Learning
cs.LO = Computer Science - Logic in Computer Science
cs.MS = Computer Science - Mathematical Software
cs.MA = Computer Science - Multiagent Systems
cs.MM = Computer Science - Multimedia
cs.NI = Computer Science - Networking and Internet Architecture
cs.NE = Computer Science - Neural and Evolutionary Computing
cs.NA = Computer Science - Numerical Analysis
cs.OS = Computer Science - Operating Systems
cs.OH = Computer Science - Other
cs.PF = Computer Science - Performance
cs.PL = Computer Science - Programming Languages
cs.RO = Computer Science - Robotics
cs.SE = Computer Science - Software Engineering
cs.SD = Computer Science - Sound
cs.SC = Computer Science - Symbolic Computation
nlin.AO = Nonlinear Sciences - Adaptation and Self-Organizing Systems
nlin.CG = Nonlinear Sciences - Cellular Automata and Lattice Gases
nlin.CD = Nonlinear Sciences - Chaotic Dynamics
nlin.SI = Nonlinear Sciences - Exactly Solvable and Integrable Systems
nlin.PS = Nonlinear Sciences - Pattern Formation and Solitons
math.AG = Mathematics - Algebraic Geometry
math.AT = Mathematics - Algebraic Topology
math.AP = Mathematics - Analysis of PDEs
math.CT = Mathematics - Category Theory
math.CA = Mathematics - Classical Analysis and ODEs
math.CO = Mathematics - Combinatorics
math.AC = Mathematics - Commutative Algebra
math.CV = Mathematics - Complex Variables
math.DG = Mathematics - Differential Geometry
math.DS = Mathematics - Dynamical Systems
math.FA = Mathematics - Functional Analysis
math.GM = Mathematics - General Mathematics
math.GN = Mathematics - General Topology
math.GT = Mathematics - Geometric Topology
math.GR = Mathematics - Group Theory
math.HO = Mathematics - History and Overview
math.IT = Mathematics - Information Theory
math.KT = Mathematics - K-Theory and Homology
math.LO = Mathematics - Logic
math.MP = Mathematics - Mathematical Physics
math.MG = Mathematics - Metric Geometry
math.NT = Mathematics - Number Theory
math.NA = Mathematics - Numerical Analysis
math.OA = Mathematics - Operator Algebras
math.OC = Mathematics - Optimization and Control
math.PR = Mathematics - Probability
math.QA = Mathematics - Quantum Algebra
math.RT = Mathematics - Representation Theory
math.RA = Mathematics - Rings and Algebras
math.SP = Mathematics - Spectral Theory
math.ST = Mathematics - Statistics
math.SG = Mathematics - Symplectic Geometry
astro-ph = Astrophysics
cond-mat.dis-nn = Physics - Disordered Systems and Neural Networks
cond-mat.mes-hall = Physics - Mesoscopic Systems and Quantum Hall Effect
cond-mat.mtrl-sci = Physics - Materials Science
cond-mat.other = Physics - Other
cond-mat.soft = Physics - Soft Condensed Matter
cond-mat.stat-mech = Physics - Statistical Mechanics
cond-mat.str-el = Physics - Strongly Correlated Electrons
cond-mat.supr-con = Physics - Superconductivity
gr-qc = General Relativity and Quantum Cosmology
hep-ex = High Energy Physics - Experiment
hep-lat = High Energy Physics - Lattice
hep-ph = High Energy Physics - Phenomenology
hep-th = High Energy Physics - Theory
math-ph = Mathematical Physics
nucl-ex = Nuclear Experiment
nucl-th = Nuclear Theory
physics.acc-ph = Physics - Accelerator Physics
physics.ao-ph = Physics - Atmospheric and Oceanic Physics
physics.atom-ph = Physics - Atomic Physics
physics.atm-clus = Physics - Atomic and Molecular Clusters
physics.bio-ph = Physics - Biological Physics
physics.chem-ph = Physics - Chemical Physics
physics.class-ph = Physics - Classical Physics
physics.comp-ph = Physics - Computational Physics
physics.data-an = Physics - Data Analysis; Statistics and Probability
physics.flu-dyn = Physics - Fluid Dynamics
physics.gen-ph = Physics - General Physics
physics.geo-ph = Physics - Geophysics
physics.hist-ph = Physics - History of Physics
physics.ins-det = Physics - Instrumentation and Detectors
physics.med-ph = Physics - Medical Physics
physics.optics = Physics - Optics
physics.ed-ph = Physics - Physics Education
physics.soc-ph = Physics - Physics and Society
physics.plasm-ph = Physics - Plasma Physics
physics.pop-ph = Physics - Popular Physics
physics.space-ph = Physics - Space Physics
quant-ph = Quantum Physics

View File

@@ -0,0 +1,3 @@
mapConverter.default = Subjected to Journal
ppublish = Published
epublish = Published

View File

@@ -0,0 +1,21 @@
pubmedID = pmid
doi = doi
issn = issn
eissn = eissn
journalTitle = journal
title = title(removedot)
pubblicationModel =
year = issued
volume = volume
issue = issue
language = language
type = subtype
primaryKeywords = keywords
secondaryKeywords = keywords
primaryMeshHeadings = mesh
secondaryMeshHeadings = mesh
startPage = firstpage
endPage = lastpage
summary = abstract
status = publicationstatus(pubstatusPubmed)
authors = authors

View File

@@ -1,27 +0,0 @@
target_collection.default = Articolo su periodico
pubmedID = dc.identifier.pmid
doi = dc.identifier.doi
issn = dc.relation.issn
eissn = dc.relation.eissn
journalTitle = dc.relation.ispartofjournal
title = dc.title(removedot)
pubblicationModel =
year = dc.date.issued
volume = dc.relation.volume
issue = dc.relation.issue
language = dc.language.iso
type = dc.type.contribution
primaryKeywords = dc.subject
secondaryKeywords = dc.subject
primaryMeshHeadings = dc.subject
secondaryMeshHeadings = dc.subject
startPage = dc.relation.firstpage
endPage = dc.relation.lastpage
summary = dc.description.abstract
status = dc.type.publicationstatus(pubstatusPubmed)
authors = dc.cilea.author
source = dc.identifier.source(classname)
enhance.dc.description.allauthors = allnames
enhance.dc.description.numberofauthors = countnames
sanitize.dc.subject = allkeywords
sanitize.dc.cilea.author = drop

View File

@@ -1781,6 +1781,12 @@ webui.suggest.enable = false
# Take this key (just the UA-XXXXXX-X part) and place it here in this parameter.
# jspui.google.analytics.key=UA-XXXXXX-X
#### Converter for bibliometrics submission importer #####
plugin.named.org.dspace.content.crosswalk.IConverter = \
org.dspace.content.crosswalk.MapConverter = pubstatusPubmed,\
org.dspace.content.crosswalk.MapConverter = arxivSubject,\
org.dspace.content.crosswalk.RemoveLastDotConverter = removedot
#---------------------------------------------------------------#
#--------------XMLUI SPECIFIC CONFIGURATIONS--------------------#