static Map extractElementModel(SchemaType sType) { Map elementModel = new HashMap(); if (sType != null) { SchemaProperty[] sProps = sType.getProperties(); for (int i = 0; i < sProps.length; i++) { if (sProps[i].isAttribute()) continue; elementModel.put(sProps[i].getName(), sProps[i].getType()); } } return elementModel; }
QName name = t.getProperties()[0].getName(); _documentTypes.put(name, t); if (t.getFullJavaName() != null) QName name = t.getProperties()[0].getName(); _attributeTypes.put(name, t); if (t.getFullJavaName() != null)
private boolean validate_immutable(XmlOptions options) { Collection errorListener = options == null ? null : (Collection)options.get(XmlOptions.ERROR_LISTENER); XmlErrorWatcher watcher = new XmlErrorWatcher(errorListener); if (!(schemaType().isSimpleType() || options != null && options.hasOption(XmlOptions.VALIDATE_TEXT_ONLY))) { // cannot have any required attributes or elements SchemaProperty[] properties = schemaType().getProperties(); for (int i = 0; i < properties.length; i++) { if (properties[i].getMinOccurs().signum() > 0) { // KHK: error code? if (properties[i].isAttribute()) watcher.add(XmlError.forObject(XmlErrorCodes.ELEM_COMPLEX_TYPE_LOCALLY_VALID$MISSING_REQUIRED_ATTRIBUTE, new Object[]{QNameHelper.pretty(properties[i].getName()), }, this)); else watcher.add(XmlError.forObject(XmlErrorCodes.ELEM_COMPLEX_TYPE_LOCALLY_VALID$MISSING_ELEMENT, new Object[]{properties[i].getMinOccurs(), QNameHelper.pretty(properties[i].getName()), }, this)); } } if (schemaType().getContentType() != SchemaType.SIMPLE_CONTENT) return !watcher.hasError(); // don't validate non-simple-content } String text = (String)_textsource; if (text == null) text = ""; validate_simpleval(text, new ImmutableValueValidationContext(watcher, this)); return !watcher.hasError(); }
properties = sType.getProperties(); if (extraProperties != null)
static Map extractElementModel(SchemaType sType) { Map elementModel = new HashMap(); if (sType != null) { SchemaProperty[] sProps = sType.getProperties(); for (int i = 0; i < sProps.length; i++) { if (sProps[i].isAttribute()) continue; elementModel.put(sProps[i].getName(), sProps[i].getType()); } } return elementModel; }
static Map extractElementModel(SchemaType sType) { Map elementModel = new HashMap(); if (sType != null) { SchemaProperty[] sProps = sType.getProperties(); for (int i = 0; i < sProps.length; i++) { if (sProps[i].isAttribute()) continue; elementModel.put(sProps[i].getName(), sProps[i].getType()); } } return elementModel; }
SchemaProperty[] properties = sType.getProperties(); for (int j = 0; j < properties.length; j++) { if (org.apache.axis2.namespace.Constants.XMIME_CONTENT_TYPE_QNAME
SchemaProperty[] properties = sType.getProperties(); for (int j = 0; j < properties.length; j++) { if (org.apache.axis2.namespace.Constants.XMIME_CONTENT_TYPE_QNAME
QName name = t.getProperties()[0].getName(); _documentTypes.put(name, t); if (t.getFullJavaName() != null) QName name = t.getProperties()[0].getName(); _attributeTypes.put(name, t); if (t.getFullJavaName() != null)
QName name = t.getProperties()[0].getName(); _documentTypes.put(name, t); if (t.getFullJavaName() != null) QName name = t.getProperties()[0].getName(); _attributeTypes.put(name, t); if (t.getFullJavaName() != null)
public Set getDependencies() { SchemaProperty[] properties = schemaType.getProperties(); HashSet deps = new HashSet(); for (int i = 0; i < properties.length; i++) { SchemaType etype = properties[i].getType(); SchemaProperty[] iprops = etype.getElementProperties(); for (int j = 0; j < iprops.length; j++) { SchemaType itype = iprops[j].getType(); testAndAddType(deps, itype); } testAndAddType(deps, etype.getBaseType()); testAndAddType(deps, etype.getBaseEnumType()); } return deps; }
properties = sType.getProperties(); if (extraProperties != null)
private void loadFields(SchemaType type, List<MetaDataField> metaDataFields, Map<SchemaType, XmlMetaDataModel> visitedTypes) SchemaProperty[] properties = type.getProperties(); for (SchemaProperty property : properties)
private boolean validate_immutable(XmlOptions options) { Collection errorListener = options == null ? null : (Collection)options.get(XmlOptions.ERROR_LISTENER); XmlErrorWatcher watcher = new XmlErrorWatcher(errorListener); if (!(schemaType().isSimpleType() || options != null && options.hasOption(XmlOptions.VALIDATE_TEXT_ONLY))) { // cannot have any required attributes or elements SchemaProperty[] properties = schemaType().getProperties(); for (int i = 0; i < properties.length; i++) { if (properties[i].getMinOccurs().signum() > 0) { // KHK: error code? if (properties[i].isAttribute()) watcher.add(XmlError.forObject(XmlErrorCodes.ELEM_COMPLEX_TYPE_LOCALLY_VALID$MISSING_REQUIRED_ATTRIBUTE, new Object[]{QNameHelper.pretty(properties[i].getName()), }, this)); else watcher.add(XmlError.forObject(XmlErrorCodes.ELEM_COMPLEX_TYPE_LOCALLY_VALID$MISSING_ELEMENT, new Object[]{properties[i].getMinOccurs(), QNameHelper.pretty(properties[i].getName()), }, this)); } } if (schemaType().getContentType() != SchemaType.SIMPLE_CONTENT) return !watcher.hasError(); // don't validate non-simple-content } String text = (String)_textsource; if (text == null) text = ""; validate_simpleval(text, new ImmutableValueValidationContext(watcher, this)); return !watcher.hasError(); }
private boolean validate_immutable(XmlOptions options) { Collection errorListener = options == null ? null : (Collection)options.get(XmlOptions.ERROR_LISTENER); XmlErrorWatcher watcher = new XmlErrorWatcher(errorListener); if (!(schemaType().isSimpleType() || options != null && options.hasOption(XmlOptions.VALIDATE_TEXT_ONLY))) { // cannot have any required attributes or elements SchemaProperty[] properties = schemaType().getProperties(); for (int i = 0; i < properties.length; i++) { if (properties[i].getMinOccurs().signum() > 0) { // KHK: error code? if (properties[i].isAttribute()) watcher.add(XmlError.forObject(XmlErrorCodes.ELEM_COMPLEX_TYPE_LOCALLY_VALID$MISSING_REQUIRED_ATTRIBUTE, new Object[]{QNameHelper.pretty(properties[i].getName()), }, this)); else watcher.add(XmlError.forObject(XmlErrorCodes.ELEM_COMPLEX_TYPE_LOCALLY_VALID$MISSING_ELEMENT, new Object[]{properties[i].getMinOccurs(), QNameHelper.pretty(properties[i].getName()), }, this)); } } if (schemaType().getContentType() != SchemaType.SIMPLE_CONTENT) return !watcher.hasError(); // don't validate non-simple-content } String text = (String)_textsource; if (text == null) text = ""; validate_simpleval(text, new ImmutableValueValidationContext(watcher, this)); return !watcher.hasError(); }
properties = sType.getProperties(); if (extraProperties != null)