public void setChild(Child child) { Assert.notNull(child, "child"); Assert.isInstance(child, "child", InternalFileImpl.class, ExternalFileImpl.class); assertNotAttached(child); detach(this.child); this.child = child; attach(this.child); }
public void setNonXliffAttributes(Collection<NonXliffAttribute> nonXliffAttributes) { Assert.notNull(nonXliffAttributes, "nonXliffAttributes"); Collection<NonXliffAttribute> toDelete = getNonXliffAttributes(); for (NonXliffAttribute attr : toDelete) { clearAttribute(attr.getNamespaceUri(), attr.getName()); } for (NonXliffAttribute attr : nonXliffAttributes) { setAttribute(attr); } }
@Override protected void assertAttributesValid(Element element) throws ConstraintViolationException { Assert.xliffAttrRestricted( element, true, false, false, MimeType.NAME, Ts.NAME, State.NAME, PhaseName.NAME, ResType.NAME, ResName.NAME, StateQualifier.NAME); }