mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-16 14:33:09 +00:00
[DS-1443] Somebody replaced DC_SCHEMA with DC.getName().
This commit is contained in:
@@ -35,7 +35,7 @@ import org.dspace.authorize.AuthorizeException;
|
|||||||
import org.dspace.content.Collection;
|
import org.dspace.content.Collection;
|
||||||
import org.dspace.content.Community;
|
import org.dspace.content.Community;
|
||||||
import org.dspace.content.Item;
|
import org.dspace.content.Item;
|
||||||
import org.dspace.content.MetadataSchema;
|
import org.dspace.content.MetadataSchemaEnum;
|
||||||
import org.dspace.content.MetadataValue;
|
import org.dspace.content.MetadataValue;
|
||||||
import org.dspace.content.factory.ContentServiceFactory;
|
import org.dspace.content.factory.ContentServiceFactory;
|
||||||
import org.dspace.content.service.CollectionService;
|
import org.dspace.content.service.CollectionService;
|
||||||
@@ -321,16 +321,16 @@ public class StructBuilder {
|
|||||||
element.addContent(new Element("name").setText(community.getName()));
|
element.addContent(new Element("name").setText(community.getName()));
|
||||||
element.addContent(new Element("description")
|
element.addContent(new Element("description")
|
||||||
.setText(communityService.getMetadataFirstValue(community,
|
.setText(communityService.getMetadataFirstValue(community,
|
||||||
MetadataSchema.DC_SCHEMA, "description", "abstract", Item.ANY)));
|
MetadataSchemaEnum.DC.getName(), "description", "abstract", Item.ANY)));
|
||||||
element.addContent(new Element("intro")
|
element.addContent(new Element("intro")
|
||||||
.setText(communityService.getMetadataFirstValue(community,
|
.setText(communityService.getMetadataFirstValue(community,
|
||||||
MetadataSchema.DC_SCHEMA, "description", null, Item.ANY)));
|
MetadataSchemaEnum.DC.getName(), "description", null, Item.ANY)));
|
||||||
element.addContent(new Element("copyright")
|
element.addContent(new Element("copyright")
|
||||||
.setText(communityService.getMetadataFirstValue(community,
|
.setText(communityService.getMetadataFirstValue(community,
|
||||||
MetadataSchema.DC_SCHEMA, "rights", null, Item.ANY)));
|
MetadataSchemaEnum.DC.getName(), "rights", null, Item.ANY)));
|
||||||
element.addContent(new Element("sidebar")
|
element.addContent(new Element("sidebar")
|
||||||
.setText(communityService.getMetadataFirstValue(community,
|
.setText(communityService.getMetadataFirstValue(community,
|
||||||
MetadataSchema.DC_SCHEMA, "description", "tableofcontents", Item.ANY)));
|
MetadataSchemaEnum.DC.getName(), "description", "tableofcontents", Item.ANY)));
|
||||||
|
|
||||||
// Export this Community's Community children.
|
// Export this Community's Community children.
|
||||||
for (Community subCommunity : community.getSubcommunities()) {
|
for (Community subCommunity : community.getSubcommunities()) {
|
||||||
@@ -358,22 +358,22 @@ public class StructBuilder {
|
|||||||
element.addContent(new Element("name").setText(collection.getName()));
|
element.addContent(new Element("name").setText(collection.getName()));
|
||||||
element.addContent(new Element("description")
|
element.addContent(new Element("description")
|
||||||
.setText(collectionService.getMetadataFirstValue(collection,
|
.setText(collectionService.getMetadataFirstValue(collection,
|
||||||
MetadataSchema.DC_SCHEMA, "description", "abstract", Item.ANY)));
|
MetadataSchemaEnum.DC.getName(), "description", "abstract", Item.ANY)));
|
||||||
element.addContent(new Element("intro")
|
element.addContent(new Element("intro")
|
||||||
.setText(collectionService.getMetadataFirstValue(collection,
|
.setText(collectionService.getMetadataFirstValue(collection,
|
||||||
MetadataSchema.DC_SCHEMA, "description", null, Item.ANY)));
|
MetadataSchemaEnum.DC.getName(), "description", null, Item.ANY)));
|
||||||
element.addContent(new Element("copyright")
|
element.addContent(new Element("copyright")
|
||||||
.setText(collectionService.getMetadataFirstValue(collection,
|
.setText(collectionService.getMetadataFirstValue(collection,
|
||||||
MetadataSchema.DC_SCHEMA, "rights", null, Item.ANY)));
|
MetadataSchemaEnum.DC.getName(), "rights", null, Item.ANY)));
|
||||||
element.addContent(new Element("sidebar")
|
element.addContent(new Element("sidebar")
|
||||||
.setText(collectionService.getMetadataFirstValue(collection,
|
.setText(collectionService.getMetadataFirstValue(collection,
|
||||||
MetadataSchema.DC_SCHEMA, "description", "tableofcontents", Item.ANY)));
|
MetadataSchemaEnum.DC.getName(), "description", "tableofcontents", Item.ANY)));
|
||||||
element.addContent(new Element("license")
|
element.addContent(new Element("license")
|
||||||
.setText(collectionService.getMetadataFirstValue(collection,
|
.setText(collectionService.getMetadataFirstValue(collection,
|
||||||
MetadataSchema.DC_SCHEMA, "rights", "license", Item.ANY)));
|
MetadataSchemaEnum.DC.getName(), "rights", "license", Item.ANY)));
|
||||||
// Provenance is special: multivalued
|
// Provenance is special: multivalued
|
||||||
for (MetadataValue value : collectionService.getMetadata(collection,
|
for (MetadataValue value : collectionService.getMetadata(collection,
|
||||||
MetadataSchema.DC_SCHEMA, "provenance", null, Item.ANY)) {
|
MetadataSchemaEnum.DC.getName(), "provenance", null, Item.ANY)) {
|
||||||
element.addContent(new Element("provenance")
|
element.addContent(new Element("provenance")
|
||||||
.setText(value.getValue()));
|
.setText(value.getValue()));
|
||||||
}
|
}
|
||||||
|
@@ -27,7 +27,7 @@ import org.dspace.AbstractIntegrationTest;
|
|||||||
import org.dspace.authorize.AuthorizeException;
|
import org.dspace.authorize.AuthorizeException;
|
||||||
import org.dspace.content.Collection;
|
import org.dspace.content.Collection;
|
||||||
import org.dspace.content.Community;
|
import org.dspace.content.Community;
|
||||||
import org.dspace.content.MetadataSchema;
|
import org.dspace.content.MetadataSchemaEnum;
|
||||||
import org.dspace.content.factory.ContentServiceFactory;
|
import org.dspace.content.factory.ContentServiceFactory;
|
||||||
import org.dspace.content.service.CollectionService;
|
import org.dspace.content.service.CollectionService;
|
||||||
import org.dspace.content.service.CommunityService;
|
import org.dspace.content.service.CommunityService;
|
||||||
@@ -216,11 +216,11 @@ public class StructBuilderIT
|
|||||||
context.turnOffAuthorisationSystem();
|
context.turnOffAuthorisationSystem();
|
||||||
Community community0 = communityService.create(null, context);
|
Community community0 = communityService.create(null, context);
|
||||||
communityService.setMetadataSingleValue(context, community0,
|
communityService.setMetadataSingleValue(context, community0,
|
||||||
MetadataSchema.DC_SCHEMA, "title", null,
|
MetadataSchemaEnum.DC.getName(), "title", null,
|
||||||
null, "Top Community 0");
|
null, "Top Community 0");
|
||||||
Collection collection0_0 = collectionService.create(context, community0);
|
Collection collection0_0 = collectionService.create(context, community0);
|
||||||
collectionService.setMetadataSingleValue(context, collection0_0,
|
collectionService.setMetadataSingleValue(context, collection0_0,
|
||||||
MetadataSchema.DC_SCHEMA, "title", null,
|
MetadataSchemaEnum.DC.getName(), "title", null,
|
||||||
null, "Collection 0.0");
|
null, "Collection 0.0");
|
||||||
|
|
||||||
// Export the current structure.
|
// Export the current structure.
|
||||||
|
Reference in New Issue
Block a user