-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crosswalk-embargo #821
crosswalk-embargo #821
Changes from 5 commits
ed04982
57e785e
4e0e7a4
d92e27d
33f3260
f209b4b
58f8c15
6f432bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* The contents of this file are subject to the license and copyright | ||
* detailed in the LICENSE and NOTICE files at the root of the source | ||
* tree and available online at | ||
* | ||
* http://www.dspace.org/license/ | ||
*/ | ||
package org.dspace.xoai.services.impl.resources.functions; | ||
|
||
import org.dspace.utils.SpecialItemService; | ||
|
||
/** | ||
* The GetAvailableFn class extends the StringXSLFunction to provide a custom function | ||
* that retrieves the availability status of an item based on its identifier. | ||
* It uses the SpecialItemService to fetch the available information. | ||
* This function is intended to be used in XSL transformations where the | ||
* "getAvailable" function is called with an item's identifier as a parameter. | ||
* | ||
* @author Michaela Paurikova(michaela.paurikova at dataquest.sk) | ||
*/ | ||
public class GetAvailableFn extends StringXSLFunction { | ||
@Override | ||
protected String getFnName() { | ||
return "getAvailable"; | ||
} | ||
|
||
@Override | ||
protected String getStringResult(String param) { | ||
return SpecialItemService.getAvailable(param); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,6 @@ final public XdmValue call(XdmValue[] xdmValues) throws SaxonApiException { | |
log.warn("Empty value in call of function of StringXslFunction type"); | ||
val = ""; | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks better :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added line but I got checkstyle violation so I had to remove it again.... |
||
return new XdmAtomicValue(checks(getStringResult(val))); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicity of this: https://github.com/dataquest-dev/DSpace/blob/dtq-dev/dspace-api/src/main/java/org/dspace/content/service/clarin/ClarinItemService.java#L46