Tabnine Logo
Namespace.getURI
Code IndexAdd Tabnine to your IDE (free)

How to use
getURI
method
in
de.pdark.decentxml.Namespace

Best Java code snippets using de.pdark.decentxml.Namespace.getURI (Showing top 7 results out of 315)

origin: de.pdark/decentxml

@Override
public boolean equals (Object obj)
{
  if (obj == null)
    return false;
  
  if (!(obj instanceof Namespace) )
    return false;
  
  Namespace ns = (Namespace)obj;
  return prefix.equals (ns.getPrefix ())
    && uri.equals (ns.getURI ())
  ;
}

origin: io.fabric8.forge/camel-tooling-util

List<Node> sessions = nodesByNamespace(doc, droolsNamespace.getURI(), "ksession");
if (sessions != null) {
  for (Node session : sessions) {
origin: jboss-fuse/fabric8

List<Node> sessions = nodesByNamespace(doc, droolsNamespace.getURI(), "ksession");
if (sessions != null) {
  for (Node session: sessions) {
origin: io.fabric8.forge/camel-tooling-util

public static String getNamespaceURI(Node node) {
  if (node instanceof Element) {
    Namespace ns = ((Element) node).getNamespace();
    if (ns != null) {
      String uri = ns.getURI();
      if (uri == null || uri.length() == 0) {
        String uriAttr = ns.getPrefix().equals("") ? ((Element) node).getAttributeValue("xmlns") : null;
        if (uriAttr != null) {
          return uriAttr;
        } else {
          return getNamespaceURI(((Element) node).getParent());
        }
      } else {
        return uri;
      }
    }
  }
  return null;
}
origin: jboss-fuse/fabric8

public static String getNamespaceURI(Node node) {
  if (node instanceof Element) {
    Namespace ns = ((Element) node).getNamespace();
    if (ns != null) {
      String uri = ns.getURI();
      if (uri == null || uri.length() == 0) {
        String uriAttr = ns.getPrefix().equals("") ? ((Element) node).getAttributeValue("xmlns") : null;
        if (uriAttr != null) {
          return uriAttr;
        } else {
          return getNamespaceURI(((Element) node).getParent());
        }
      } else {
        return uri;
      }
    }
  }
  return null;
}
origin: io.fabric8.forge/camel-tooling-util

protected Node replaceNamespace(Node node, String oldNS, String newNS) {
  if (node instanceof Element) {
    String ns = getNamespaceURI(node);
    if (ns != null && ns.equals(oldNS)) {
      Namespace namespace = ((Element) node).getNamespace();
      if (namespace != null) {
        if (namespace.getURI() != null && namespace.getURI().equals(oldNS)) {
          ((Element) node).setNamespace(new Namespace(namespace.getPrefix(), newNS));
        }
      }
      for (Attribute attr : ((Element) node).getAttributes()) {
        if (attr.getName().startsWith("xmlns")) {
          String value = attr.getValue();
          if (value != null && value.equals(oldNS)) {
            attr.setValue(newNS);
          }
        }
      }
    }
  }
  if (node instanceof NodeWithChildren) {
    for (Node n : ((NodeWithChildren) node).getNodes()) {
      replaceNamespace(n, oldNS, newNS);
    }
  }
  return node;
}
origin: jboss-fuse/fabric8

protected Node replaceNamespace(Node node, String oldNS, String newNS) {
  if (node instanceof Element) {
    String ns = getNamespaceURI(node);
    if (ns != null && ns.equals(oldNS)) {
      Namespace namespace = ((Element) node).getNamespace();
      if (namespace != null) {
        if (namespace.getURI() != null && namespace.getURI().equals(oldNS)) {
          ((Element) node).setNamespace(new Namespace(namespace.getPrefix(), newNS));
        }
      }
      for (Attribute attr : ((Element) node).getAttributes()) {
        if (attr.getName().startsWith("xmlns")) {
          String value = attr.getValue();
          if (value != null && value.equals(oldNS)) {
            attr.setValue(newNS);
          }
        }
      }
    }
  }
  if (node instanceof NodeWithChildren) {
    for (Node n : ((NodeWithChildren) node).getNodes()) {
      replaceNamespace(n, oldNS, newNS);
    }
  }
  return node;
}
de.pdark.decentxmlNamespacegetURI

Popular methods of Namespace

  • <init>
  • getPrefix
  • equals

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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