/** * Copy constructor for a DcsManifestationFile. The state of <code>toCopy</code> is copied * to this. * * @param toCopy the dcs manifestation file to copy */ public DcsManifestationFile(DcsManifestationFile toCopy) { this.path = toCopy.getPath(); this.ref = toCopy.getRef(); this.relSet = toCopy.getRelSet(); }
@Override public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { super.marshal(source, writer, context); final DcsManifestationFile mf = (DcsManifestationFile) source; if (mf.getRef() != null) { writer.addAttribute(A_REF, mf.getRef().getRef()); } if (!isEmptyOrNull(mf.getPath())) { writer.startNode(E_PATH); writer.setValue(mf.getPath()); writer.endNode(); } if (!isNull(mf.getRelSet()) && !mf.getRelSet().isEmpty()) { for (DcsRelation rel : mf.getRelSet()) { writer.startNode(E_REL); context.convertAnother(rel); writer.endNode(); } } }
@Override public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { super.marshal(source, writer, context); final DcsManifestationFile mf = (DcsManifestationFile) source; if (mf.getRef() != null) { writer.addAttribute(A_REF, mf.getRef().getRef()); } if (!isEmptyOrNull(mf.getPath())) { writer.startNode(E_PATH); writer.setValue(mf.getPath()); writer.endNode(); } if (!isNull(mf.getRelSet()) && !mf.getRelSet().isEmpty()) { for (DcsRelation rel : mf.getRelSet()) { writer.startNode(E_REL); context.convertAnother(rel); writer.endNode(); } } }
metadataFile.setPath(dcs_mf.getPath());
.getRef(); setadd(doc, ManifestationFileField.FILE_REF, fileRef); setadd(doc, ManifestationFileField.PATH, mf.getPath());