/** * Registers the global ID attributes specified in the configuration file. * * @param idAttributesElement the IDAttributes element from the configuration file * * @throws XMLConfigurationException thrown if there is a problem with a parsing or registering the ID attribute */ protected void initializeIDAttributes(Element idAttributesElement) throws XMLConfigurationException { Element idAttributeElement; QName attributeQName; final NodeList idAttributeList = idAttributesElement.getElementsByTagNameNS(XMLTOOLING_CONFIG_NS, "IDAttribute"); for (int i = 0; i < idAttributeList.getLength(); i++) { idAttributeElement = (Element) idAttributeList.item(i); attributeQName = ElementSupport.getElementContentAsQName(idAttributeElement); if (attributeQName == null) { log.debug("IDAttribute element was empty, no registration performed"); } else { getRegistry().registerIDAttribute(attributeQName); log.debug("IDAttribute {} has been registered", attributeQName); } } }
/** * Registers the global ID attributes specified in the configuration file. * * @param idAttributesElement the IDAttributes element from the configuration file * * @throws XMLConfigurationException thrown if there is a problem with a parsing or registering the ID attribute */ protected void initializeIDAttributes(Element idAttributesElement) throws XMLConfigurationException { Element idAttributeElement; QName attributeQName; final NodeList idAttributeList = idAttributesElement.getElementsByTagNameNS(XMLTOOLING_CONFIG_NS, "IDAttribute"); for (int i = 0; i < idAttributeList.getLength(); i++) { idAttributeElement = (Element) idAttributeList.item(i); attributeQName = ElementSupport.getElementContentAsQName(idAttributeElement); if (attributeQName == null) { log.debug("IDAttribute element was empty, no registration performed"); } else { getRegistry().registerIDAttribute(attributeQName); log.debug("IDAttribute {} has been registered", attributeQName); } } }
/** {@inheritDoc} */ @Override protected void doParse(final Element element, final ParserContext parserContext, final BeanDefinitionBuilder builder) { final List<QName> retainedRoles = new ArrayList<>(); final List<Element> retainedRoleElems = ElementSupport.getChildElementsByTagNameNS(element, AbstractMetadataProviderParser.METADATA_NAMESPACE, "RetainedRole"); if (retainedRoleElems != null) { for (final Element retainedRoleElem : retainedRoleElems) { retainedRoles.add(ElementSupport.getElementContentAsQName(retainedRoleElem)); } } builder.addConstructorArgValue(retainedRoles); if (element.hasAttributeNS(null, "removeRolelessEntityDescriptors")) { builder.addPropertyValue("removeRolelessEntityDescriptors", StringSupport.trimOrNull(element.getAttributeNS(null, "removeRolelessEntityDescriptors"))); } if (element.hasAttributeNS(null, "removeEmptyEntitiesDescriptors")) { builder.addPropertyValue("removeEmptyEntitiesDescriptors", StringSupport.trimOrNull(element.getAttributeNS(null, "removeEmptyEntitiesDescriptors"))); } }