/** * Adds new attribute to the entity. If attribute has no name, IllegalArgumentException is thrown. * * <p>Also sets <code>attr</code>'s entity to be this entity. */ public void addAttribute(Attribute attr) { if (attr.getName() == null) { throw new IllegalArgumentException("Attempt to insert unnamed attribute."); } attributes.put(attr.getName(), attr); }
/** Adds new relationship to the entity. */ public void addRelationship(Relationship rel) { relationships.put(rel.getName(), rel); }