/** * Set the identifier for the entity. * * @param id the identifier, must not be <code>null</code> * @throws IllegalArgumentException if <code>id</code> is <code>null</code> */ public void setId(String id) { Assertion.notEmptyOrNull(id); this.id = id; }
/** * Convenience constructor, constructing a reference to <code>ref</code> * * @param ref the reference */ public DcsEntityReference(String ref) { Assertion.notEmptyOrNull(ref); this.ref = ref; }
/** * Set the entity reference * * @param ref the entity reference, must not be empty or <code>null</code> * @throws IllegalArgumentException if <code>ref</code> is empty or <code>null</code> */ public void setRef(String ref) { Assertion.notEmptyOrNull(ref); this.ref = ref; }
/** * Set the path for the manifestation file * * @param path the path, must not be empty or null * @throws IllegalArgumentException if <code>path</code> is the empty string or <code>null</code>. */ public void setPath(String path) { Assertion.notEmptyOrNull(path); this.path = path; }
/** * The URI representing the relationship type. * * @param relUri the URI in string form */ public void setRelUri(String relUri) { Assertion.notEmptyOrNull(relUri); this.relUri = relUri; }
public void setDeliverableUnit(String deliverableUnit) { Assertion.notEmptyOrNull(deliverableUnit); this.deliverableUnit = deliverableUnit; }
public void setDateCreated(String dateCreated) { Assertion.notEmptyOrNull(dateCreated); this.dateCreated = dateCreated; }
public void setType(String type) { Assertion.notEmptyOrNull(type); this.type = type; }
/** * Set the title of the entity. * * @param title the title, must not be an empty string or <code>null</code> * @throws IllegalArgumentException if <code>title</code> is empty or <code>null</code> */ public void setTitle(String title) { Assertion.notEmptyOrNull(title); this.title = title; }
/** * Set the type of the entity * @param type the type */ public void setType(String type) { Assertion.notEmptyOrNull(type); this.type = type; }
/** * Creates a DcsRelationship with a relationship type of <code>relUri</code> with <code>target</code>. See * {@link DcsRelationship} for supported relationship types. * * @param relUri the relationship type, must not be empty or <code>null</code> * @param target the target entity, must not be empty or <code>null</code> */ public DcsRelation(String relUri, String target) { Assertion.notEmptyOrNull(relUri); Assertion.notEmptyOrNull(target); this.relUri = relUri; this.ref = new DcsEntityReference(target); }
public void addTechnicalEnvironment(String... technicalEnvironment) { Assertion.notNull(technicalEnvironment); for (String s : technicalEnvironment) { Assertion.notEmptyOrNull(s); this.technicalEnvironment.add(s); } }
/** * Add a creator to the entity. * * @param creator the creators, must not be <code>null</code> * @throws IllegalArgumentException if <code>creator<code> is <code>null</code> or the empty string */ public void addCreator(String... creator) { Assertion.notNull(creator); for (String c : creator) { Assertion.notEmptyOrNull(c); creators.add(c); } }
/** * Add former external references * * @param formerExternalRef references, must not be <code>null</code> * @throws IllegalArgumentException if <code>formerExternalRef</code> is <code>null</code> */ public void addFormerExternalRef(String... formerExternalRef) { Assertion.notNull(formerExternalRef); for (String r : formerExternalRef) { Assertion.notEmptyOrNull(r); formerExternalRefs.add(r); } }
public void setTechnicalEnvironment(Set<String> technicalEnvironment) { Assertion.notNull(technicalEnvironment); this.technicalEnvironment = new HashSet<String>(technicalEnvironment.size()); for (String s: technicalEnvironment) { Assertion.notEmptyOrNull(s); this.technicalEnvironment.add(s); } }
/** * Set former external references * * @param formerExternalRefs references, must not be <code>null</code> * @throws IllegalArgumentException if <code>formerExternalRefs</code> are <code>null</code> */ public void setFormerExternalRefs(Set<String> formerExternalRefs) { Assertion.notNull(formerExternalRefs); this.formerExternalRefs = new HashSet<String>(formerExternalRefs.size()); for (String r : formerExternalRefs) { Assertion.notEmptyOrNull(r); this.formerExternalRefs.add(r); } }
/** * Set the subject(s) of the entity. * * @param subjects the subjects, must not be <code>null</code> * @throws IllegalArgumentException if <code>subjects</code> is <code>null</code> or the empty string */ public void setSubjects(Set<String> subjects) { Assertion.notNull(subjects); this.subjects = new HashSet<String>(subjects.size()); for (String s : subjects) { Assertion.notEmptyOrNull(s); this.subjects.add(s); } }
/** * Add a subject * * @param subject the subject, must not be <code>null</code> * @throws IllegalArgumentException if <code>subject</code> is <code>null</code> or the empty string */ public void addSubject(String... subject) { Assertion.notNull(subject); for (String s : subject) { Assertion.notEmptyOrNull(s); subjects.add(s); } }
/** * Creates a DcsRelationship with a relationship type of <code>relUri</code> with <code>target</code>. See * {@link DcsRelationship} for supported relationship types. * * @param relUri the relationship type, must not be empty or <code>null</code> * @param target the target entity, must not be <code>null</code> */ public DcsRelation(String relUri, DcsEntityReference target) { Assertion.notEmptyOrNull(relUri); Assertion.notNull(target); this.relUri = relUri; this.ref = new DcsEntityReference(target); }
/** * Creates a DcsRelationship with a relationship type of <code>rel</code> with <code>target</code>. See * {@link DcsRelationship} for supported relationship types. * * @param rel the relationship type, must not be <code>null</code> * @param target the target entity, must not be empty or <code>null</code> */ public DcsRelation(DcsRelationship rel, String target) { Assertion.notNull(rel); Assertion.notEmptyOrNull(target); this.relUri = rel.asString(); this.ref = new DcsEntityReference(target); }