public ValidationConfigurationDescriptorImpl(String descriptorName, Node node) { super(descriptorName); this.model = node; addDefaultNamespaces(); }
/** * Adds the default namespaces as defined in the specification * @return the current instance of <code>ValidationConfigurationDescriptor</code> */ public ValidationConfigurationDescriptor addDefaultNamespaces() { addNamespace("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); addNamespace("xsi:schemaLocation", "http://jboss.org/xml/ns/javax/validation/configuration validation-configuration-1.1.xsd"); addNamespace("xmlns", "http://jboss.org/xml/ns/javax/validation/configuration"); return this; }
/** * If not already created, a new <code>property</code> element will be created and returned. * Otherwise, the first existing <code>property</code> element will be returned. * @return the instance defined for the element <code>property</code> */ public PropertyType<ValidationConfigurationDescriptor> getOrCreateProperty() { List<Node> nodeList = model.get("property"); if (nodeList != null && nodeList.size() > 0) { return new PropertyTypeImpl<ValidationConfigurationDescriptor>(this, "property", model, nodeList.get(0)); } return createProperty(); }
/** * If not already created, a new <code>property</code> element will be created and returned. * Otherwise, the first existing <code>property</code> element will be returned. * @return the instance defined for the element <code>property</code> */ public PropertyType<ValidationConfigurationDescriptor> getOrCreateProperty() { List<Node> nodeList = model.get("property"); if (nodeList != null && nodeList.size() > 0) { return new PropertyTypeImpl<ValidationConfigurationDescriptor>(this, "property", model, nodeList.get(0)); } return createProperty(); }
/** * Adds the default namespaces as defined in the specification * @return the current instance of <code>ValidationConfigurationDescriptor</code> */ public ValidationConfigurationDescriptor addDefaultNamespaces() { addNamespace("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); addNamespace("xsi:schemaLocation", "http://jboss.org/xml/ns/javax/validation/configuration validation-configuration-1.1.xsd"); addNamespace("xmlns", "http://jboss.org/xml/ns/javax/validation/configuration"); return this; }
public ValidationConfigurationDescriptorImpl(String descriptorName, Node node) { super(descriptorName); this.model = node; addDefaultNamespaces(); }