private static SolrInputDocument toSolr(DcsCollection col, ArchiveStore store) throws IOException { SolrInputDocument doc = new SolrInputDocument(); add(doc, EntityField.ID, col.getId()); add(doc, EntityField.TYPE, EntityTypeValue.COLLECTION.solrValue()); if (col.getParent() != null) { add(doc, CollectionField.PARENT, col.getParent().getRef()); } add(doc, CoreMetadataField.TITLE, col.getTitle()); addMetadataSet(doc, col.getMetadata()); addMetadataRefSet(doc, col.getMetadataRef(), EntityField.METADATA_REF, store); addResourceIdentifierSet(doc, col.getAlternateIds()); add(doc, CoreMetadataField.TYPE, col.getType()); addStrings(doc, col.getSubjects(), CoreMetadataField.SUBJECT); addStrings(doc, col.getCreators(), CoreMetadataField.CREATOR); return doc; }
final String id = c.getId(); final DcsCollectionRef parentRef = c.getParent(); final String title = c.getTitle(); final String type = c.getType(); final Set<String> subjects = c.getSubjects();
final Collection<DcsResourceIdentifier> altIds = c.getAlternateIds(); final DcsCollectionRef parentRef = c.getParent(); final String title = c.getTitle(); final String type = c.getType(); final Collection<String> subjects = c.getSubjects();