/** * If not already created, a new <code>constraint-definition</code> element will be created and returned. * Otherwise, the first existing <code>constraint-definition</code> element will be returned. * @return the instance defined for the element <code>constraint-definition</code> */ public ConstraintDefinitionType<ValidationMappingDescriptor> getOrCreateConstraintDefinition() { List<Node> nodeList = model.get("constraint-definition"); if (nodeList != null && nodeList.size() > 0) { return new ConstraintDefinitionTypeImpl<ValidationMappingDescriptor>(this, "constraint-definition", model, nodeList.get(0)); } return createConstraintDefinition(); }
/** * If not already created, a new <code>constraint-definition</code> element will be created and returned. * Otherwise, the first existing <code>constraint-definition</code> element will be returned. * @return the instance defined for the element <code>constraint-definition</code> */ public ConstraintDefinitionType<ValidationMappingDescriptor> getOrCreateConstraintDefinition() { List<Node> nodeList = model.get("constraint-definition"); if (nodeList != null && nodeList.size() > 0) { return new ConstraintDefinitionTypeImpl<ValidationMappingDescriptor>(this, "constraint-definition", model, nodeList.get(0)); } return createConstraintDefinition(); }