ElementIterator(Element element, ElementMetadata<?, ?> metadata, Map<QName, Object> elements) { this.element = element; this.metadata = metadata; this.elements = elements; this.metadataIterator = (metadata == null) ? null : metadata.getElements().iterator(); this.elementIterator = (elements == null) ? null : elements.values().iterator(); nextElement = findNextElement(); }
ElementIterator(Element element, ElementMetadata<?, ?> metadata, Map<QName, Object> elements) { this.element = element; this.metadata = metadata; this.elements = elements; this.metadataIterator = (metadata == null) ? null : metadata.getElements().iterator(); this.elementIterator = (elements == null) ? null : elements.values().iterator(); nextElement = findNextElement(); }
ElementIterator(Element element, ElementMetadata<?, ?> metadata, Map<QName, Object> elements) { this.element = element; this.metadata = metadata; this.elements = elements; this.metadataIterator = (metadata == null) ? null : metadata.getElements().iterator(); this.elementIterator = (elements == null) ? null : elements.values().iterator(); nextElement = findNextElement(); }
public Collection<ElementKey<?, ?>> getElements() { return delegate().getElements(); }
public Collection<ElementKey<?, ?>> getElements() { return delegate().getElements(); }
public Collection<ElementKey<?, ?>> getElements() { return delegate().getElements(); }
private static void addReferencedNamespaces(ElementMetadata<?, ?> metadata, ImmutableSet.Builder<XmlNamespace> builder, Set<ElementKey<?, ?>> added) { // Avoid recursive looping if (added.contains(metadata.getKey())) { return; } added.add(metadata.getKey()); // Add namespace for this element (if any) XmlNamespace elemNs = metadata.getName().getNs(); if (elemNs != null) { builder.add(elemNs); } // Add namespace for all attributes (if any) for (AttributeKey<?> attrKey : metadata.getAttributes()) { AttributeMetadata<?> attrMetadata = metadata.bindAttribute(attrKey); XmlNamespace attrNs = attrMetadata.getName().getNs(); if (attrNs != null) { builder.add(attrNs); } } // Add namespace for all child elements (recursively) for (ElementKey<?, ?> elemKey : metadata.getElements()) { ElementMetadata<?, ?> childMetadata = metadata.bindElement(elemKey); addReferencedNamespaces(childMetadata, builder, added); } }
private static void addReferencedNamespaces(ElementMetadata<?, ?> metadata, ImmutableSet.Builder<XmlNamespace> builder, Set<ElementKey<?, ?>> added) { // Avoid recursive looping if (added.contains(metadata.getKey())) { return; } added.add(metadata.getKey()); // Add namespace for this element (if any) XmlNamespace elemNs = metadata.getName().getNs(); if (elemNs != null) { builder.add(elemNs); } // Add namespace for all attributes (if any) for (AttributeKey<?> attrKey : metadata.getAttributes()) { AttributeMetadata<?> attrMetadata = metadata.bindAttribute(attrKey); XmlNamespace attrNs = attrMetadata.getName().getNs(); if (attrNs != null) { builder.add(attrNs); } } // Add namespace for all child elements (recursively) for (ElementKey<?, ?> elemKey : metadata.getElements()) { ElementMetadata<?, ?> childMetadata = metadata.bindElement(elemKey); addReferencedNamespaces(childMetadata, builder, added); } }
private static void addReferencedNamespaces(ElementMetadata<?, ?> metadata, ImmutableSet.Builder<XmlNamespace> builder, Set<ElementKey<?, ?>> added) { // Avoid recursive looping if (added.contains(metadata.getKey())) { return; } added.add(metadata.getKey()); // Add namespace for this element (if any) XmlNamespace elemNs = metadata.getName().getNs(); if (elemNs != null) { builder.add(elemNs); } // Add namespace for all attributes (if any) for (AttributeKey<?> attrKey : metadata.getAttributes()) { AttributeMetadata<?> attrMetadata = metadata.bindAttribute(attrKey); XmlNamespace attrNs = attrMetadata.getName().getNs(); if (attrNs != null) { builder.add(attrNs); } } // Add namespace for all child elements (recursively) for (ElementKey<?, ?> elemKey : metadata.getElements()) { ElementMetadata<?, ?> childMetadata = metadata.bindElement(elemKey); addReferencedNamespaces(childMetadata, builder, added); } }
for (ElementKey<?, ?> childKey : metadata.getElements()) { ElementMetadata<?, ?> childMeta = metadata.bindElement(childKey); if (childMeta.isRequired() && !e.hasElement(childKey)) {
for (ElementKey<?, ?> childKey : metadata.getElements()) { ElementMetadata<?, ?> childMeta = metadata.bindElement(childKey); if (childMeta.isRequired() && !e.hasElement(childKey)) {
for (ElementKey<?, ?> childKey : metadata.getElements()) { ElementMetadata<?, ?> childMeta = metadata.bindElement(childKey); if (childMeta.isRequired() && !e.hasElement(childKey)) {