@SuppressWarnings("unchecked") public Iterator<OMElement> getChildren(OMElement el) { return el.getChildElements(); } }
private static int countChildren(OMElement element) { int count = 0; for (Iterator<?> it = element.getChildElements(); it.hasNext(); count++) { it.next(); } return count; } }
private int getColumnsCount() { Iterator iterator = tableReportElement.getChildElements(); int count = 0; while (iterator.hasNext()) { count++; iterator.next(); } return count; }
public void removeContents() { //We will get all the children and iteratively call the detach() on all of 'em. Iterator childIter = omTarget.getChildElements(); while (childIter.hasNext()) { childIter.next(); childIter.remove(); } }
public void setSmartLifecycleLinks(OMElement locationConfiguration) throws RegistryException { Iterator confElements = locationConfiguration.getChildElements(); while (confElements.hasNext()) { OMElement confElement = (OMElement)confElements.next(); if (confElement.getQName().equals(new QName("key"))) { smartLifecycleLinks.add(confElement.getText()); } } }
public void setSmartLifecycleLinks(OMElement locationConfiguration) throws RegistryException { Iterator confElements = locationConfiguration.getChildElements(); while (confElements.hasNext()) { OMElement confElement = (OMElement)confElements.next(); if (confElement.getQName().equals(new QName("key"))) { smartLifecycleLinks.add(confElement.getText()); } } }
public static Iterator<OMElement> getPolicyRefChildren(OMElement parent) { List<OMElement> policyRefs = new ArrayList<OMElement>(); Iterator children = parent.getChildElements(); while (children.hasNext()) { OMElement child = (OMElement)children.next(); if (Constants.isPolicyRef(child.getQName())) { policyRefs.add(child); } } return policyRefs.iterator(); } }
public static Iterator<OMElement> getPolicyChildren(OMElement parent) { List<OMElement> policies = new ArrayList<OMElement>(); Iterator children = parent.getChildElements(); while (children.hasNext()) { OMElement child = (OMElement)children.next(); if (Constants.isPolicyElement(child.getQName())) { policies.add(child); } } return policies.iterator(); }
private void populate(OMElement configRoot) { Iterator<OMElement> rootLevelChildren = configRoot.getChildElements(); while(rootLevelChildren.hasNext()){ addProperties(rootLevelChildren.next(), null); } }
/** * Construct from owning elements with local name filter. * * @param ele * the owning element * @param filter * the local name filter */ public Elements(final OMElement ele, final String filter) { super(filter == null ? ele.getChildElements() : ele.getChildrenWithLocalName(filter)); }
public void setStates(OMElement locationConfiguration) throws RegistryException { Iterator confElements = locationConfiguration.getChildElements(); while (confElements.hasNext()) { OMElement confElement = (OMElement)confElements.next(); if (confElement.getQName().equals(new QName("state"))) { states.put(confElement.getAttributeValue(new QName("key")), confElement.getText()); } } }
private void readallChildElements() { Iterator childs = parent.getChildElements(); while (childs.hasNext()) { OMElement omElement = (OMElement)childs.next(); OMAttribute id = omElement.getAttribute(new QName("id")); if (id != null) { childs.remove(); elementMap.put(id.getAttributeValue(), omElement); } } filledTable = true; }
private static void findPrefixNamespaces(OMElement e, Set<OMNamespace> results) { Iterator iterator = e.getAllDeclaredNamespaces(); if (iterator != null) { while (iterator.hasNext()) results.add((OMNamespace)iterator.next()); } Iterator children = e.getChildElements(); while (children.hasNext()) { findPrefixNamespaces((OMElement) children.next(), results); } }
public static ApplicationPermission build(OMElement applicationPermissionOM) { ApplicationPermission applicationPermission = new ApplicationPermission(); Iterator<?> iter = applicationPermissionOM.getChildElements(); while (iter.hasNext()) { OMElement element = (OMElement) (iter.next()); String elementName = element.getLocalName(); if ("value".equals(elementName)) { applicationPermission.setValue(element.getText()); } } return applicationPermission; }
public RESTMessage decode(ContentType contentType, AxisMessage message) throws Exception { List<Parameter> parameters = new LinkedList<Parameter>(); OMElement content = message.getEnvelope().getBody().getFirstElement(); for (Iterator<?> it = content.getChildElements(); it.hasNext(); ) { OMElement child = (OMElement)it.next(); parameters.add(new Parameter(child.getLocalName(), child.getText())); } return new RESTMessage(parameters.toArray(new Parameter[parameters.size()])); } };
private void readExtensionPoints(OMElement documentElement) { OMElement extensionsElem = documentElement.getFirstChildWithName(IdentityApplicationManagementUtil. getQNameWithIdentityApplicationNS(FrameworkConstants.Config.QNAME_EXTENSIONS)); if (extensionsElem != null) { for (Iterator extChildElems = extensionsElem.getChildElements(); extChildElems.hasNext(); ) { OMElement extensionElem = (OMElement) extChildElems.next(); instantiateClass(extensionElem); } } }
public Phase makePhase(OMElement phaseElement) throws PhaseException { String phaseName = phaseElement.getAttributeValue(new QName("name")); Phase phase = new Phase(phaseName); Iterator children = phaseElement.getChildElements(); while (children.hasNext()) { OMElement handlerElement = (OMElement) children.next(); HandlerDescription handlerDesc = makeHandler(handlerElement); phase.addHandler(handlerDesc); } return phase; }
@SuppressWarnings("unchecked") private void secureVaultResolve(OMElement dbsElement) { String secretAliasAttr = dbsElement.getAttributeValue( new QName(DataSourceConstants.SECURE_VAULT_NS, DataSourceConstants.SECRET_ALIAS_ATTR_NAME)); if (secretAliasAttr != null) { dbsElement.setText(DBUtils.loadFromSecureVault(secretAliasAttr)); } Iterator<OMElement> childEls = (Iterator<OMElement>) dbsElement.getChildElements(); while (childEls.hasNext()) { this.secureVaultResolve(childEls.next()); } }
private void readExtensionPoints(OMElement documentElement) { OMElement extensionsElem = documentElement.getFirstChildWithName(IdentityApplicationManagementUtil. getQNameWithIdentityApplicationNS(FrameworkConstants.Config.QNAME_EXTENSIONS)); if (extensionsElem != null) { for (Iterator extChildElems = extensionsElem.getChildElements(); extChildElems.hasNext(); ) { OMElement extensionElem = (OMElement) extChildElems.next(); if (isValidExtension(extensionElem)) { instantiateClass(extensionElem); } } } }
public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException { RequiredElements requiredElements = new RequiredElements(SPConstants.SP_V11); OMAttribute attrXPathVersion = element.getAttribute(SP11Constants.ATTR_XPATH_VERSION); if (attrXPathVersion != null) { requiredElements.setXPathVersion(attrXPathVersion.getAttributeValue()); } for (Iterator iterator = element.getChildElements(); iterator.hasNext();) { processElement((OMElement) iterator.next(),requiredElements); } return requiredElements; }