/** * Relationships that this manifestation file asserts. This overwrites any existing relationships. * * @param relSet a set of DcsRelations, must not be <code>null</code> */ public void setRelSet(Set<DcsRelation> relSet) { Assertion.notNull(relSet); this.relSet = new HashSet<DcsRelation>(); for (DcsRelation rel : relSet) { addRel(rel); } }
if (relations[j] != null && targets[j] != null) { DcsRelation rel = new DcsRelation(relations[j], targets[j]); mf.addRel(rel);
@Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { final DcsManifestationFile mf = new DcsManifestationFile(); // in <manifestationFile> if (!isEmptyOrNull(reader.getAttribute(A_REF))) { mf.setRef(new DcsFileRef(reader.getAttribute(A_REF))); } while (reader.hasMoreChildren()) { reader.moveDown(); final String name = getElementName(reader); //reader.getNodeName(); if (name.equals(E_PATH)) { final String value = reader.getValue(); if (!isEmptyOrNull(value)) { mf.setPath(value); } } if (name.equals(E_REL)) { final DcsRelation rel = (DcsRelation)context.convertAnother(mf, DcsRelation.class); if (rel != null) { mf.addRel(rel); } } reader.moveUp(); } return mf; }
@Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { final DcsManifestationFile mf = new DcsManifestationFile(); // in <manifestationFile> if (!isEmptyOrNull(reader.getAttribute(A_REF))) { mf.setRef(new DcsFileRef(reader.getAttribute(A_REF))); } while (reader.hasMoreChildren()) { reader.moveDown(); final String name = getElementName(reader); //reader.getNodeName(); if (name.equals(E_PATH)) { final String value = reader.getValue(); if (!isEmptyOrNull(value)) { mf.setPath(value); } } if (name.equals(E_REL)) { final DcsRelation rel = (DcsRelation)context.convertAnother(mf, DcsRelation.class); if (rel != null) { mf.addRel(rel); } } reader.moveUp(); } return mf; }