if (attribute.getExistence().equals( CAttribute.Existence.NOT_ALLOWED)) { continue;
if (attribute.getExistence().equals( CAttribute.Existence.NOT_ALLOWED)) { continue;
indent(indent, out); out.write(cattribute.getRmAttributeName()); if (!CAttribute.Existence.REQUIRED.equals(cattribute.getExistence())) { out.write(" ");
indent(indent, out); out.write(cattribute.getRmAttributeName()); if (!CAttribute.Existence.REQUIRED.equals(cattribute.getExistence())) { out.write(" ");
if (attribute.getExistence().equals( CAttribute.Existence.NOT_ALLOWED)) { continue;
if (attribute.getExistence().equals( CAttribute.Existence.NOT_ALLOWED)) { continue;
/** Checks that the existence of the parent archetype's corresponding attribute is conformant * with the child archetype's attribute in the sense of VSANCE error validation * * @param cattr * @param attrInParentArchetype * @param errors */ private void checkSpecialisedAttributeNodeExistenceConformance( CAttribute cattr, CAttribute attrInParentArchetype, List<ValidationError> errors) { if ((cattr.getExistence() == Existence.OPTIONAL && (attrInParentArchetype.getExistence() == Existence.REQUIRED || attrInParentArchetype.getExistence() == Existence.NOT_ALLOWED)) || (cattr.getExistence() == Existence.REQUIRED && attrInParentArchetype.getExistence() == Existence.NOT_ALLOWED) || (cattr.getExistence() == Existence.NOT_ALLOWED && attrInParentArchetype.getExistence() != Existence.NOT_ALLOWED) ) { errors.add(new ValidationError(ErrorType.VSANCE, null, cattr.getExistence().toString(), cattr.path(), attrInParentArchetype.getExistence(), attrInParentArchetype.path())); } }
/** * Returns true if this attribute is required * * @return true if required */ public boolean isRequired() { return Existence.REQUIRED.equals(existence); }
/** * Returns true if this attribute should be allowed * * @return */ public boolean isAllowed() { return ! Existence.NOT_ALLOWED.equals(existence); }
/** * Returns true if this attribute should be allowed * * @return */ public boolean isAllowed() { return ! Existence.NOT_ALLOWED.equals(existence); }
/** * Returns true if this attribute is required * * @return true if required */ public boolean isRequired() { return Existence.REQUIRED.equals(existence); }