congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Parent.getParent
Code IndexAdd Tabnine to your IDE (free)

How to use
getParent
method
in
org.jdom2.Parent

Best Java code snippets using org.jdom2.Parent.getParent (Showing top 12 results out of 315)

origin: org.jdom/jdom

/**
 * Determines if this element is the ancestor of another element.
 *
 * @param element <code>Element</code> to check against
 * @return <code>true</code> if this element is the ancestor of the
 *         supplied element
 */
public boolean isAncestor(final Element element) {
  Parent p = element.getParent();
  while (p instanceof Element) {
    if (p == this) {
      return true;
    }
    p = p.getParent();
  }
  return false;
}

origin: org.jdom/jdom

  return ret;
p = p.getParent();
origin: net.sf.cuf/cuf-swing

while ((current= current.getParent()) instanceof Element);
origin: rometools/rome

/**
 * Use xml:base attributes at feed and entry level to resolve relative links
 */
private static String resolveURI(final URL baseURI, final Parent parent, String url) {
  url = url.equals(".") || url.equals("./") ? "" : url;
  if (isRelativeURI(url) && parent != null && parent instanceof Element) {
    final Attribute baseAtt = ((Element) parent).getAttribute("base", Namespace.XML_NAMESPACE);
    String xmlBase = baseAtt == null ? "" : baseAtt.getValue();
    if (!isRelativeURI(xmlBase) && !xmlBase.endsWith("/")) {
      xmlBase = xmlBase.substring(0, xmlBase.lastIndexOf("/") + 1);
    }
    return resolveURI(baseURI, parent.getParent(), xmlBase + url);
  } else if (isRelativeURI(url) && parent == null) {
    return baseURI + url;
  } else if (baseURI != null && url.startsWith("/")) {
    String hostURI = baseURI.getProtocol() + "://" + baseURI.getHost();
    if (baseURI.getPort() != baseURI.getDefaultPort()) {
      hostURI = hostURI + ":" + baseURI.getPort();
    }
    return hostURI + url;
  }
  return url;
}
origin: org.apache.marmotta/sesame-tools-rio-rss

/** Use xml:base attributes at feed and entry level to resolve relative links */
private static String resolveURI(URL baseURI, Parent parent, String url) {
  url = (url.equals(".") || url.equals("./")) ? "" : url;
  if (isRelativeURI(url) && parent != null && parent instanceof Element) {
    Attribute baseAtt = ((Element)parent).getAttribute("base", Namespace.XML_NAMESPACE);
    String xmlBase = (baseAtt == null) ? "" : baseAtt.getValue();
    if (!isRelativeURI(xmlBase) && !xmlBase.endsWith("/")) {
      xmlBase = xmlBase.substring(0, xmlBase.lastIndexOf("/")+1);
    }
    return resolveURI(baseURI, parent.getParent(), xmlBase + url);
  } else if (isRelativeURI(url) && parent == null) {
    return baseURI + url;
  } else if (baseURI != null && url.startsWith("/")) {
    String hostURI = baseURI.getProtocol() + "://" + baseURI.getHost();
    if (baseURI.getPort() != baseURI.getDefaultPort()) {
      hostURI = hostURI + ":" + baseURI.getPort();
    }
    return hostURI + url;
  }
  return url;
}

origin: apache/marmotta

/** Use xml:base attributes at feed and entry level to resolve relative links */
private static String resolveURI(URL baseURI, Parent parent, String url) {
  url = (url.equals(".") || url.equals("./")) ? "" : url;
  if (isRelativeURI(url) && parent != null && parent instanceof Element) {
    Attribute baseAtt = ((Element)parent).getAttribute("base", Namespace.XML_NAMESPACE);
    String xmlBase = (baseAtt == null) ? "" : baseAtt.getValue();
    if (!isRelativeURI(xmlBase) && !xmlBase.endsWith("/")) {
      xmlBase = xmlBase.substring(0, xmlBase.lastIndexOf("/")+1);
    }
    return resolveURI(baseURI, parent.getParent(), xmlBase + url);
  } else if (isRelativeURI(url) && parent == null) {
    return baseURI + url;
  } else if (baseURI != null && url.startsWith("/")) {
    String hostURI = baseURI.getProtocol() + "://" + baseURI.getHost();
    if (baseURI.getPort() != baseURI.getDefaultPort()) {
      hostURI = hostURI + ":" + baseURI.getPort();
    }
    return hostURI + url;
  }
  return url;
}

origin: com.rometools/rome-modules

/**
 * Use xml:base attributes at feed and entry level to resolve relative links
 */
private static String resolveURI(final URL baseURI, final Parent parent, String url) {
  url = url.equals(".") || url.equals("./") ? "" : url;
  if (isRelativeURI(url) && parent != null && parent instanceof Element) {
    final Attribute baseAtt = ((Element) parent).getAttribute("base", Namespace.XML_NAMESPACE);
    String xmlBase = baseAtt == null ? "" : baseAtt.getValue();
    if (!isRelativeURI(xmlBase) && !xmlBase.endsWith("/")) {
      xmlBase = xmlBase.substring(0, xmlBase.lastIndexOf("/") + 1);
    }
    return resolveURI(baseURI, parent.getParent(), xmlBase + url);
  } else if (isRelativeURI(url) && parent == null) {
    return baseURI + url;
  } else if (baseURI != null && url.startsWith("/")) {
    String hostURI = baseURI.getProtocol() + "://" + baseURI.getHost();
    if (baseURI.getPort() != baseURI.getDefaultPort()) {
      hostURI = hostURI + ":" + baseURI.getPort();
    }
    return hostURI + url;
  }
  return url;
}
origin: org.apache.marmotta/sesame-tools-rio-rss

  } else {
    return resolveURI(baseURI, parent.getParent(), 
      stripTrailingSlash(xmlbase) + "/"+ stripStartingSlash(url));
return resolveURI(baseURI, parent.getParent(), url);
origin: rometools/rome

  } else {
    return resolveURI(baseURI, parent.getParent(), stripTrailingSlash(xmlbase) + "/" + stripStartingSlash(url));
return resolveURI(baseURI, parent.getParent(), url);
origin: apache/marmotta

  } else {
    return resolveURI(baseURI, parent.getParent(), 
      stripTrailingSlash(xmlbase) + "/"+ stripStartingSlash(url));
return resolveURI(baseURI, parent.getParent(), url);
origin: com.rometools/rome

  } else {
    return resolveURI(baseURI, parent.getParent(), stripTrailingSlash(xmlbase) + "/" + stripStartingSlash(url));
return resolveURI(baseURI, parent.getParent(), url);
origin: Vhati/Slipstream-Mod-Manager

parentNode = parentNode.getParent();
org.jdom2ParentgetParent

Javadoc

Return this parent's parent, or null if this parent is currently not attached to another parent. This is the same method as in Content but also added to Parent to allow more easy up-the-tree walking.

Popular methods of Parent

  • removeContent
    Removes from this parent all child content matching the given filter and returns a list of the detac
  • canContainContent
    Test whether this Parent instance can contain the specified content at the specified position.
  • getContent
    Returns as a java.util.List the content of this parent that matches the supplied filter. The returne
  • getDocument
    Return this parent's owning document or null if the branch containing this parent is currently not a
  • indexOf
    Returns the index of the supplied child in the content list, or -1 if not a child of this parent.

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now