Obtains hierarchy interface information from the received {@link XsdElement}.
@param element The received {@link XsdElement} object.
@param apiName The name of the generated fluent interface.
@return The names of the hierarchy interfaces.
167132
private String[] getHierarchyInterfaces(XsdElement element, String apiName) {
        List<String> interfaceNames = new ArrayList<>();
        XsdElement base = getBaseFromElement(element);
        List<XsdAttribute> elementAttributes = getOwnAttributes(element).collect(Collectors.toList());
        List<ElementHierarchyItem> hierarchyInterfacesList = new ArrayList<>();

        while (base != null) {
            List<String> attributeNames = elementAttributes.stream().map(XsdAttribute::getName).collect(Collectors.toList());
            List<XsdAttribute> moreAttributes = getOwnAttributes(base).filter(attribute -> !attributeNames.contains(attribute.getName())).collect(Collectors.toList());
            elementAttributes.addAll(moreAttributes);

            hierarchyInterfacesList.add(new ElementHierarchyItem(base.getName() + HIERARCHY_INTERFACES_SUFFIX, moreAttributes, getInterfaces(base, apiName)));

            base = getBaseFromElement(base);
        }

        if (!hierarchyInterfacesList.isEmpty()){
            interfaceNames.add(hierarchyInterfacesList.get(0).getInterfaceName());

            hierarchyInterfacesList.forEach(item -> this.hierarchyInterfaces.put(item.getInterfaceName(), item));
        }

        return listToArray(interfaceNames);
    }
494729
public SOAPElement getElement(SOAPElement element, String strElementName)
    {
        Iterator<?> iterator = element.getChildElements();
        while (iterator.hasNext())
        {
            javax.xml.soap.Node elMessageType = (javax.xml.soap.Node)iterator.next();
            if (elMessageType instanceof SOAPElement)
            {
                if (strElementName == null)
                    return (SOAPElement)elMessageType;    // The message type
                if (strElementName.equalsIgnoreCase(((SOAPElement)elMessageType).getElementName().getLocalName()))
                    return (SOAPElement)elMessageType;    // The message type
            }
        }
        return null;    // not found
    }
566938
function(element) {
        // Top level elements are body and ones with an id
        if (element === document.documentElement) {
            return ':root';
        } else if (element.tagName && element.tagName.toUpperCase() === 'BODY') {
            return 'body';
        } else if (element.id) {
            return '#' + element.id;
        }

        var parent = element.parentNode;
        var parentLoc = this.getSelectorFromElement(parent);

        // See which index we are in parent. Array#indexOf could also be used here
        var children = parent.childNodes;
        var index = 0;
        for (var i = 0; i < children.length; i++) {
            // nodeType is 1 if ELEMENT_NODE
            if (children[i].nodeType === 1) {
                if (children[i] === element) {
                    break;
                }

                index++;
            }
        }

        return parentLoc + ' *:nth-child(' + (index + 1) + ')';
    }
156443
private String findQualifierName(VariableElement element) {
    String name = null;
    if (element.getAnnotationMirrors().isEmpty()) {
      return name;
    }

    for (AnnotationMirror annotationMirror : element.getAnnotationMirrors()) {
      TypeElement annotationTypeElement = (TypeElement) annotationMirror.getAnnotationType().asElement();
      if (isSameType(annotationTypeElement, "javax.inject.Named")) {
        checkIfAlreadyHasName(element, name);
        name = getValueOfAnnotation(annotationMirror);
      } else if (annotationTypeElement.getAnnotation(javax.inject.Qualifier.class) != null) {
        checkIfAlreadyHasName(element, name);
        name = annotationTypeElement.getQualifiedName().toString();
      }
    }
    return name;
  }
695103
private static void getNamespaceBindings(Element element, Map<String, String> namespaceMap) {
    if (element == null) {
      return;
    }
    NamedNodeMap attrs = element.getAttributes();
    for (int i = 0; i < attrs.getLength(); i++) {
      Node node = attrs.item(i);
      String name = node.getNodeName();
      if ((name != null && (XMLConstants.XMLNS_ATTRIBUTE.equals(name) || name.startsWith(XMLConstants.XMLNS_ATTRIBUTE + ":")))) {
        namespaceMap.put(name, node.getNodeValue());
      }
    }
    Node parent = element.getParentNode();
    if (parent instanceof Element) {
      getNamespaceBindings((Element) parent, namespaceMap);
    }
  }
432412
public static Element getElementNode(final Element element, final DitaClass classValue) {
        final NodeList list = element.getChildNodes();
        for (int i = 0; i < list.getLength(); i++) {
            final Node node = list.item(i);
            if (node.getNodeType() == Node.ELEMENT_NODE) {
                final Element child = (Element) node;
                if (classValue.matches(child)) {
                    return child;
                }
            }
        }
        return null;
    }
352240
protected Element findTag(String tagName, Element element) {
        Node result = element.getFirstChild();
        
        while (result != null) {
            if (result instanceof Element
                    && (tagName.equals(((Element) result).getNodeName()) || tagName
                            .equals(((Element) result).getLocalName()))) {
                break;
            }
            result = result.getNextSibling();
        }
        
        return (Element) result;
    }
1203464
private static Map<String, String> getNamespaceBindings(Element element) {
    Map<String, String> namespaceMap = new HashMap<String, String>();
    getNamespaceBindings(element, namespaceMap);
    return namespaceMap;
  }
1222892
static final String xpath(Element element) {
        StringBuilder sb = new StringBuilder();

        Node iterator = element;
        while (iterator.getNodeType() == Node.ELEMENT_NODE) {
            sb.insert(0, "]");
            sb.insert(0, siblingIndex((Element) iterator) + 1);
            sb.insert(0, "[");
            sb.insert(0, ((Element) iterator).getTagName());
            sb.insert(0, "/");

            iterator = iterator.getParentNode();
        }

        return sb.toString();
    }
1188201
function (element) {
		if (element) {
			if (element.metaClassName() === 'org.kevoree.ComponentInstance') {
				// if parent is this node platform: it's ok
				return (element.eContainer().name === this.node.getName());

			} else if (element.metaClassName() === 'org.kevoree.Channel') {
				// if this channel has bindings with components hosted in this node platform: it's ok
				var bindings = element.bindings.iterator();
				while (bindings.hasNext()) {
					var binding = bindings.next();
					if (binding.port && binding.port.eContainer()) {
						if (this.isRelatedToPlatform(binding.port.eContainer())) {
							return true;
						}
					}
				}

			} else if (element.metaClassName() === 'org.kevoree.Group') {
				return element.subNodes.array.some(function (node) {
					return this.isRelatedToPlatform(node);
				}.bind(this));

			} else if (element.metaClassName() === 'org.kevoree.ContainerNode') {
				return ((element.name === this.node.getName()) || (element.host && element.host.name === this.node.getName()));

			} else if (element.metaClassName() === 'org.kevoree.MBinding') {
				if (element.port && element.port.eContainer()) {
					if (this.isRelatedToPlatform(element.port.eContainer())) {
						return true;
					}
				}
				if (element.hub) {
					return this.isRelatedToPlatform(element.hub);
				}

			} else if (element.metaClassName() === 'org.kevoree.Value') {
				if (element.eContainer().metaClassName() === 'org.kevoree.FragmentDictionary') {
					return (element.eContainer().name === this.node.getName());
				} else {
					return this.isRelatedToPlatform(element.eContainer().eContainer());
				}

			} else if (element.metaClassName() === 'org.kevoree.Port') {
				return this.isRelatedToPlatform(element.eContainer());
			}
		}
		return false;
	}
789949
public static List<TypeName> getTypeArguments(TypeElement element) {
		final List<TypeName> result = new ArrayList<>();

		if (element.getKind() == ElementKind.CLASS) {
			if (element.getSuperclass() instanceof DeclaredType) {
				result.addAll(convert(((DeclaredType) element.getSuperclass()).getTypeArguments()));
			}
		} else if (element.getKind() == ElementKind.INTERFACE) {

			List<? extends TypeMirror> interfaces = element.getInterfaces();

			for (TypeMirror item : interfaces) {
				item.accept(new SimpleTypeVisitor7<Void, Void>() {

					@Override
					public Void visitDeclared(DeclaredType t, Void p) {
						result.addAll(convert(t.getTypeArguments()));
						return null;
					}

				}, null);

			}
		}

		return result;
	}
1100072
public static List<Element> getElements(Element element, String tagName) {
		final NodeList nodeList = StrUtil.isBlank(tagName) ? element.getChildNodes() : element.getElementsByTagName(tagName);
		return transElements(element, nodeList);
	}
1299014
public static HTMLElement element(com.google.gwt.dom.client.Element element) {
        return Js.cast(element);
    }
644315
@XmlElementWrapper(name = "entries")
    @XmlElement(name = "entry", nillable = true, type = Object.class)
    @JsonProperty(value = "entries")
    @ApiModelProperty(value = "The elements of the page.")
    @Override
    public List<Object> getEntries() {
        return entries;
    }
624105
public static String getPackageName(Elements elementUtils, Element element) {
		return elementUtils.getPackageOf(element).getQualifiedName().toString();
	}
1176868
function getQualifiedElementName(elementName) {
	    var qualifiedName;
	    switch (elementName.type) {
	        case jsx_syntax_1.JSXSyntax.JSXIdentifier:
	            var id = elementName;
	            qualifiedName = id.name;
	            break;
	        case jsx_syntax_1.JSXSyntax.JSXNamespacedName:
	            var ns = elementName;
	            qualifiedName = getQualifiedElementName(ns.namespace) + ':' +
	                getQualifiedElementName(ns.name);
	            break;
	        case jsx_syntax_1.JSXSyntax.JSXMemberExpression:
	            var expr = elementName;
	            qualifiedName = getQualifiedElementName(expr.object) + '.' +
	                getQualifiedElementName(expr.property);
	            break;
	        /* istanbul ignore next */
	        default:
	            break;
	    }
	    return qualifiedName;
	}
77809
@Requires("element != null")
  @Ensures("result != null")
  @SuppressWarnings("unchecked")
  protected Set<String> getImportNames(Element element) {
    if (JavaUtils.classExists("com.sun.source.util.Trees")) {
      try {
        return (Set<String>) Class
            .forName("com.google.java.contract.core.apt.JavacUtils")
            .getMethod("getImportNames", ProcessingEnvironment.class,
                       Element.class)
            .invoke(null, utils.processingEnv, element);
      } catch (Exception e) {
        return Collections.emptySet();
      }
    } else {
      return Collections.emptySet();
    }
  }