mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-10 19:43:10 +00:00
DS-3154: more dspace-api fixes, alphabetically through org.dspace.core
This commit is contained in:
@@ -34,6 +34,7 @@ import java.util.*;
|
||||
* are required to have.
|
||||
*
|
||||
* @author kevinvandevelde at atmire.com
|
||||
* @param <T> class type
|
||||
*/
|
||||
public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements DSpaceObjectService<T> {
|
||||
|
||||
@@ -357,6 +358,12 @@ public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements
|
||||
|
||||
/**
|
||||
* Retrieve first metadata field value
|
||||
* @param dso
|
||||
* @param language
|
||||
* @param element
|
||||
* @param schema
|
||||
* @param qualifier
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getMetadataFirstValue(T dso, String schema, String element, String qualifier, String language){
|
||||
@@ -369,6 +376,7 @@ public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements
|
||||
|
||||
/**
|
||||
* Set first metadata field value
|
||||
* @throws SQLException if database error
|
||||
*/
|
||||
@Override
|
||||
public void setMetadataSingleValue(Context context, T dso, String schema, String element, String qualifier, String language, String value) throws SQLException {
|
||||
@@ -384,6 +392,7 @@ public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements
|
||||
* Protected method that deletes all metadata values from the database, should only be called when deleting the item.
|
||||
* @param context the dspaceObject
|
||||
* @param dso the dspaceObject who's metadata we are to delete
|
||||
* @throws SQLException if database error
|
||||
*/
|
||||
protected void deleteMetadata(Context context, T dso) throws SQLException {
|
||||
|
||||
@@ -491,6 +500,8 @@ public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements
|
||||
* The returned array will always have length greater than or equal to 4
|
||||
* <p>
|
||||
* Values in the returned array can be empty or null.
|
||||
* @param fieldName field name
|
||||
* @return array
|
||||
*/
|
||||
protected String[] getElements(String fieldName) {
|
||||
String[] tokens = StringUtils.split(fieldName, ".");
|
||||
@@ -509,6 +520,8 @@ public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements
|
||||
* The returned array will always have length greater than or equal to 4
|
||||
* <p>
|
||||
* When @param fill is true, elements that would be empty or null are replaced by Item.ANY
|
||||
* @param fieldName field name
|
||||
* @return array
|
||||
*/
|
||||
protected String[] getElementsFilled(String fieldName) {
|
||||
String[] elements = getElements(fieldName);
|
||||
|
Reference in New Issue
Block a user