/** {@inheritDoc} */ public Set<Namespace> getNamespaces() { return new LazySet<>(); }
/** * Get the set of non-visibly used namespaces used on the owning XMLObject (only the owner, * not the owner's children). * * <p> * Namespaces returned in the set are copied from the ones held in the manager. The * <code>alwaysDeclare</code> property is not preserved. * </p> * * @return the set of non-visibly-used namespaces */ private Set<Namespace> getNonVisibleNamespaceCandidates() { LazySet<Namespace> namespaces = new LazySet<Namespace>(); // Add xsi:type value's prefix, if element carries an xsi:type if (getElementTypeNamespace() != null) { namespaces.add(copyNamespace(getElementTypeNamespace())); } // Add prefixes from attribute and content values for (Namespace attribValue : attrValues.values()) { if (attribValue != null) { namespaces.add(copyNamespace(attribValue)); } } if (contentValue != null) { namespaces.add(copyNamespace(contentValue)); } return namespaces; }
LazySet<Namespace> nonVisibleCandidates = new LazySet<Namespace>(); Set<Namespace> childNonVisibleNamespaces = child.getNamespaceManager().getNonVisibleNamespaces(); if (childNonVisibleNamespaces != null && ! childNonVisibleNamespaces.isEmpty()) { nonVisibleCandidates.addAll(childNonVisibleNamespaces); nonVisibleCandidates.addAll(getNonVisibleNamespaceCandidates()); nonVisibleCandidates.removeAll(getVisibleNamespaces()); nonVisibleCandidates.remove(XML_NAMESPACE);
log.debug("Attribute Definition {}: mapping depdenency attribute value {}", getId(), value); LazySet<String> mappedValues = new LazySet<String>(); mappedValues.addAll(valueMap.evaluate(value)); if (!mappedValues.isEmpty()) { valueMapMatch = true; mappedValues.add(value); } else if (getDefaultValue() != null) { mappedValues.add(getDefaultValue());
/** * Populate the inclusive namspace prefixes on the specified Apache (exclusive) transform object. * * @param signature the Apache XMLSignature object * @param transform the Apache Transform object representing an exclusive transform */ private void processExclusiveTransform(XMLSignature signature, Transform transform) { // Namespaces that aren't visibly used, such as those used in QName attribute values, would // be stripped out by exclusive canonicalization. Need to make sure they aren't by explicitly // telling the transformer about them. log.debug("Adding list of inclusive namespaces for signature exclusive canonicalization transform"); LazySet<String> inclusiveNamespacePrefixes = new LazySet<String>(); populateNamespacePrefixes(inclusiveNamespacePrefixes, signableObject); if (inclusiveNamespacePrefixes != null && inclusiveNamespacePrefixes.size() > 0) { InclusiveNamespaces inclusiveNamespaces = new InclusiveNamespaces(signature.getDocument(), inclusiveNamespacePrefixes); transform.getElement().appendChild(inclusiveNamespaces.getElement()); } }
/** {@inheritDoc} */ public Iterator<ElementType> iterator() { delegate = createImplementation(); return delegate.iterator(); }
/** * Get the set of non-visibly used namespaces used on the owning XMLObject (only the owner, * not the owner's children). * * <p> * Namespaces returned in the set are copied from the ones held in the manager. The * <code>alwaysDeclare</code> property is not preserved. * </p> * * @return the set of non-visibly-used namespaces */ private Set<Namespace> getNonVisibleNamespaceCandidates() { LazySet<Namespace> namespaces = new LazySet<Namespace>(); // Add xsi:type value's prefix, if element carries an xsi:type if (getElementTypeNamespace() != null) { namespaces.add(copyNamespace(getElementTypeNamespace())); } // Add prefixes from attribute and content values for (Namespace attribValue : attrValues.values()) { if (attribValue != null) { namespaces.add(copyNamespace(attribValue)); } } if (contentValue != null) { namespaces.add(copyNamespace(contentValue)); } return namespaces; }
LazySet<Namespace> nonVisibleCandidates = new LazySet<Namespace>(); Set<Namespace> childNonVisibleNamespaces = child.getNamespaceManager().getNonVisibleNamespaces(); if (childNonVisibleNamespaces != null && ! childNonVisibleNamespaces.isEmpty()) { nonVisibleCandidates.addAll(childNonVisibleNamespaces); nonVisibleCandidates.addAll(getNonVisibleNamespaceCandidates()); nonVisibleCandidates.removeAll(getVisibleNamespaces()); nonVisibleCandidates.remove(XML_NAMESPACE);
/** {@inheritDoc} */ public boolean retainAll(Collection<?> collection) { delegate = createImplementation(); return delegate.retainAll(collection); }
/** * Get the set of namespaces which are currently visibly-used on the owning XMLObject (only the owner, * not its children). * * <p> * Namespaces returned in the set are copied from the ones held in the manager. The * <code>alwaysDeclare</code> property is not preserved. * </p> * * @return the set of visibly-used namespaces */ private Set<Namespace> getVisibleNamespaces() { LazySet<Namespace> namespaces = new LazySet<Namespace>(); // Add namespace from element name. if (getElementNameNamespace() != null) { namespaces.add(copyNamespace(getElementNameNamespace())); } // Add xsi attribute prefix, if element carries an xsi:type. if (getElementTypeNamespace() != null) { namespaces.add(copyNamespace(XSI_NAMESPACE)); } // Add namespaces from attribute names for (Namespace attribName : attrNames) { if (attribName != null) { namespaces.add(copyNamespace(attribName)); } } return namespaces; }
/** {@inheritDoc} */ public Set<Namespace> getNamespaces() { return new LazySet<Namespace>(); }
/** {@inheritDoc} */ public boolean remove(Object element) { delegate = createImplementation(); return delegate.remove(element); }
/** * Get the set of namespaces which are currently visibly-used on the owning XMLObject (only the owner, * not its children). * * <p> * Namespaces returned in the set are copied from the ones held in the manager. The * <code>alwaysDeclare</code> property is not preserved. * </p> * * @return the set of visibly-used namespaces */ private Set<Namespace> getVisibleNamespaces() { LazySet<Namespace> namespaces = new LazySet<Namespace>(); // Add namespace from element name. if (getElementNameNamespace() != null) { namespaces.add(copyNamespace(getElementNameNamespace())); } // Add xsi attribute prefix, if element carries an xsi:type. if (getElementTypeNamespace() != null) { namespaces.add(copyNamespace(XSI_NAMESPACE)); } // Add namespaces from attribute names for (Namespace attribName : attrNames) { if (attribName != null) { namespaces.add(copyNamespace(attribName)); } } return namespaces; }
/** Constructor. */ protected AbstractSAMLProfileConfiguration() { assertionAudiences = new LazySet<String>(); }
/** {@inheritDoc} */ public boolean addAll(Collection<? extends ElementType> collection) { delegate = createImplementation(); return delegate.addAll(collection); }