// p.getSampleRecordsDefinition().getCollectionProfile().getCollectionID());
// Objects
Element objects = parent.addElement("objects");
DigitalObject profileObject = collectionProfile.getProfile();
try {
if (profileObject != null && profileObject.isDataExistent()) {
if (!addDigitalObjectData) {
objects.setText(String.valueOf(profileObject.getId()));
} else {
if (profileObject.getData().getData() == null || profileObject.getData().getData().length == 0) {
profileObject = digitalObjectManager.getCopyOfDataFilledDigitalObject(profileObject);
}
C3POProfileParser parser = new C3POProfileParser();
parser.read(new ByteArrayInputStream(profileObject.getData().getData()), false);
List<String> objectIdentifiers = parser.getObjectIdentifiers();
for (String objectIdentifier : objectIdentifiers) {
objects.addElement("object").addAttribute("uid", objectIdentifier);