作者:Steven | 来源:互联网 | 2023-07-26 13:32
本文整理了Java中org.dataconservancy.model.dcs.DcsCollection.()
方法的一些代码示例,展示了DcsCollection.()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DcsCollection.()
方法的具体详情如下:
包路径:org.dataconservancy.model.dcs.DcsCollection
类名称:DcsCollection
方法名:
DcsCollection.介绍
[英]Constructs a new DcsCollection with no state.
[中]构造没有状态的新DcsCollection。
代码示例
代码示例来源:origin: org.dataconservancy.model/dcs-model
public Set getCollections() {
final Set collectiOns= new HashSet(this.collections.size());
for (DcsCollection c : this.collections) {
collections.add(new DcsCollection(c));
}
return collections;
}
代码示例来源:origin: org.dataconservancy.model/dcs-model
public void addCollection(DcsCollection... collection) {
Assertion.notNull(collection);
for (DcsCollection c : collection) {
Assertion.notNull(c);
this.collections.add(new DcsCollection(c));
}
}
代码示例来源:origin: org.dataconservancy.dcs/dcs-index-dcp-solr
public DcsCollection createCollection(String parent) {
DcsCollection col = new DcsCollection();
col.setId(nextid());
col.setTitle(randomText(rand.nextInt(10) + 1));
if (parent != null) {
col.setParent(createCollectionRef(parent));
}
col.setMetadata(createMetadataSet(rand.nextInt(2)));
col.setSubjects(randomStringSet(4, 4));
col.setType(randomString(4, false));
col.setCreators(randomStringSet(4, 4));
return col;
}
}
代码示例来源:origin: org.dataconservancy.dcs/dcs-ingest-test
/** 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);
}
代码示例来源:origin: org.dataconservancy.model/dcs-model-builder-xstream
final DcsCollection collection = new DcsCollection();
if (!isEmptyOrNull(id)) {
collection.setId(id);
代码示例来源:origin: org.dataconservancy.dcs/dcs-model-builder-xstream
final DcsCollection collection = new DcsCollection();
if (!isEmptyOrNull(id)) {
collection.setId(id);
代码示例来源:origin: org.dataconservancy.dcs/dcs-index-dcp-solr
private static DcsCollection getCollection(SolrDocument doc) {
DcsCollection col = new DcsCollection();
col.setId(getFirst(doc, EntityField.ID));
if (has(doc, CollectionField.PARENT)) {
col.setParent(getCollectionRef(doc, CollectionField.PARENT));
}
if (has(doc, CoreMetadataField.TYPE)) {
col.setType(getFirst(doc, CoreMetadataField.TYPE));
}
if (has(doc, CoreMetadataField.TITLE)) {
col.setTitle(getFirst(doc, CoreMetadataField.TITLE));
}
col.setMetadata(getMetadataSet(doc));
col.setMetadataRef(col.getMetadataRef());
col.setSubjects(getStringSet(doc, CoreMetadataField.SUBJECT));
col.setCreators(getStringSet(doc, CoreMetadataField.CREATOR));
col.setAlternateIds(getResourceIdentifierSet(doc));
return col;
}