private void processRoot(Collection<BaseArtifactType> derivedArtifacts, BaseArtifactType artifact,
Element rootElement, XPath xpath) throws XPathExpressionException {
NodeList nodes = (NodeList) this.query(xpath, rootElement, "./credit", XPathConstants.NODESET);
for (int idx = 0; idx < nodes.getLength(); idx++) {
Element node = (Element) nodes.item(idx);
ExtendedArtifactType credit = new ExtendedArtifactType();
credit.setArtifactType(BaseArtifactEnum.EXTENDED_ARTIFACT_TYPE);
credit.setUuid(UUID.randomUUID().toString());
String type = node.getAttribute("type");
String name = node.getAttribute("name");
String part = node.getAttribute("part");
String year = node.getAttribute("year");
credit.setExtendedType(StringUtils.capitalize(type) + "Credit");
credit.setName(name);
SrampModelUtils.setCustomProperty(credit, "part", part);
SrampModelUtils.setCustomProperty(credit, "year", year);
derivedArtifacts.add(credit);
credit.setUuid(UUID.randomUUID().toString());
SrampModelUtils.addGenericRelationship(artifact, "hasCredit", credit.getUuid());
}
}