/** * The collections for the deliverable unit * * @return a defensive copy of the collections */ public Set<DcsCollectionRef> getCollections() { final Set<DcsCollectionRef> collections = new HashSet<DcsCollectionRef>(this.collections.size()); for (DcsCollectionRef r : this.collections) { collections.add(new DcsCollectionRef(r)); } return collections; }
private Set<DcsCollectionRef> createCollectionRefSet(String string) { Set<DcsCollectionRef> result = new HashSet<DcsCollectionRef>(); DcsCollectionRef ref = new DcsCollectionRef(); ref.setRef(string); result.add(ref); return result; }
private DcsCollectionRef createCollectionRef(String string) { DcsCollectionRef ref = new DcsCollectionRef(); ref.setRef(string); return ref; }
private static Set<DcsCollectionRef> getCollectionRefSet(SolrDocument doc, SolrName field) { Set<DcsCollectionRef> set = new HashSet<DcsCollectionRef>(); for (String s : setgetAll(doc, field)) { DcsCollectionRef ref = new DcsCollectionRef(); if (s != null) { ref.setRef(s); } set.add(ref); } return set; }
/** * Set the collections for the deliverable unit * * @param collections the collections, must not be <code>null</code> * @throws IllegalArgumentException if <code>collections</code> is <code>null</code> */ public void setCollections(Set<DcsCollectionRef> collections) { Assertion.notNull(collections); this.collections = new HashSet<DcsCollectionRef>(collections.size()); for (DcsCollectionRef r : collections) { Assertion.notNull(r); this.collections.add(new DcsCollectionRef(r)); } }
/** * Add a collection to the deliverable unit * * @param collection the collections, must not be <code>null</code> * @throws IllegalArgumentException if <code>collections</code> is <code>null</code> */ public void addCollection(DcsCollectionRef... collection) { Assertion.notNull(collection); for (DcsCollectionRef r : collection) { Assertion.notNull(r); this.collections.add(new DcsCollectionRef(r)); } }
private static DcsCollectionRef getCollectionRef(SolrDocument doc, SolrName field) { DcsCollectionRef ref = new DcsCollectionRef(); String s = getFirst(doc, field); if (s != null) { ref.setRef(s); } return ref; }
private void add_descendants(DcsEntity parent, java.util.Collection<DcsEntity> entities, Set<DcsEntity> result) { if (parent instanceof DcsCollection) { DcsCollectionRef parent_col_ref = new DcsCollectionRef(parent.getId());
private void add_descendants(DcsEntity parent, java.util.Collection<DcsEntity> entities, Set<DcsEntity> result) { if (parent instanceof DcsCollection) { DcsCollectionRef parent_col_ref = new DcsCollectionRef(parent.getId());
/** Populates an example sip */ @BeforeClass public static void initExampleSips() { DcsCollection coll = new DcsCollection(); coll.setId("example:/collection"); DcsDeliverableUnit du = new DcsDeliverableUnit(); du.addCollection(new DcsCollectionRef(coll.getId())); du.setId("example:/deleverableUnit"); exampleDcp = new Dcp(); exampleDcp.addCollection(coll); exampleDcp.addDeliverableUnit(du); }
for (DcsCollection parent : dcp.getCollections()) { if (rand.nextBoolean()) { col.setParent(new DcsCollectionRef(parent.getId())); break;
final String id = reader.getAttribute(CollectionConverter.A_ID); if (!isEmptyOrNull(ref)) { final DcsCollectionRef collectionReference = new DcsCollectionRef(); collectionReference.setRef(ref); return collectionReference; final String parentRef = reader.getAttribute(A_REF); if (!isEmptyOrNull(parentRef)) { final DcsCollectionRef parent = new DcsCollectionRef(); parent.setRef(parentRef); collection.setParent(parent);
final DcsCollectionRef collectionReference = new DcsCollectionRef(); collectionReference.setRef(ref); return collectionReference; final String parentRef = reader.getAttribute(A_REF); if (!isEmptyOrNull(parentRef)) { final DcsCollectionRef parent = new DcsCollectionRef(); parent.setRef(parentRef); collection.setParent(parent);