mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-13 13:03:11 +00:00
Refactored the usages of MetadataSchema.DC to use the enum instead
This commit is contained in:
@@ -122,7 +122,8 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return getBitstreamService().getMetadataFirstValue(this, MetadataSchema.DC_SCHEMA, "title", null, Item.ANY);
|
||||
return getBitstreamService().getMetadataFirstValue(this, MetadataSchemaEnum.DC.getName(),
|
||||
"title", null, Item.ANY);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,7 +134,8 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport
|
||||
* @throws SQLException if database error
|
||||
*/
|
||||
public void setName(Context context, String n) throws SQLException {
|
||||
getBitstreamService().setMetadataSingleValue(context, this, MetadataSchema.DC_SCHEMA, "title", null, null, n);
|
||||
getBitstreamService().setMetadataSingleValue(context, this, MetadataSchemaEnum.DC.getName(),
|
||||
"title", null, null, n);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -144,7 +146,8 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport
|
||||
* @return the source of the bitstream
|
||||
*/
|
||||
public String getSource() {
|
||||
return getBitstreamService().getMetadataFirstValue(this, MetadataSchema.DC_SCHEMA, "source", null, Item.ANY);
|
||||
return getBitstreamService().getMetadataFirstValue(this, MetadataSchemaEnum.DC.getName(),
|
||||
"source", null, Item.ANY);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -155,7 +158,8 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport
|
||||
* @throws SQLException if database error
|
||||
*/
|
||||
public void setSource(Context context, String n) throws SQLException {
|
||||
getBitstreamService().setMetadataSingleValue(context, this, MetadataSchema.DC_SCHEMA, "source", null, null, n);
|
||||
getBitstreamService().setMetadataSingleValue(context, this, MetadataSchemaEnum.DC.getName(),
|
||||
"source", null, null, n);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -166,7 +170,8 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport
|
||||
*/
|
||||
public String getDescription() {
|
||||
return getBitstreamService()
|
||||
.getMetadataFirstValue(this, MetadataSchema.DC_SCHEMA, "description", null, Item.ANY);
|
||||
.getMetadataFirstValue(this, MetadataSchemaEnum.DC.getName(), "description",
|
||||
null, Item.ANY);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -178,7 +183,7 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport
|
||||
*/
|
||||
public void setDescription(Context context, String n) throws SQLException {
|
||||
getBitstreamService()
|
||||
.setMetadataSingleValue(context, this, MetadataSchema.DC_SCHEMA, "description", null, null, n);
|
||||
.setMetadataSingleValue(context, this, MetadataSchemaEnum.DC.getName(), "description", null, null, n);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -227,7 +232,8 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport
|
||||
* @return the user's format description.
|
||||
*/
|
||||
public String getUserFormatDescription() {
|
||||
return getBitstreamService().getMetadataFirstValue(this, MetadataSchema.DC_SCHEMA, "format", null, Item.ANY);
|
||||
return getBitstreamService().getMetadataFirstValue(this, MetadataSchemaEnum.DC.getName(),
|
||||
"format", null, Item.ANY);
|
||||
}
|
||||
|
||||
protected BitstreamFormat getBitstreamFormat() {
|
||||
|
Reference in New Issue
Block a user