Exemple #1
0
 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);
 }
Exemple #2
0
 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);
   }
 }
Exemple #3
0
 @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);
 }