congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
XmlNamespaces.getPrefix
Code IndexAdd Tabnine to your IDE (free)

How to use
getPrefix
method
in
com.effektif.workflow.api.bpmn.XmlNamespaces

Best Java code snippets using com.effektif.workflow.api.bpmn.XmlNamespaces.getPrefix (Showing top 9 results out of 315)

origin: com.effektif/effektif-workflow-api

/**
 * Returns true if there is a namespace declared with the given name, which must be a well-formed URI.
 */
public boolean hasNamespace(String name) {
 if (name == null) {
  return false;
 }
 return getPrefix(name) != null;
}
origin: effektif/effektif

/**
 * Returns true if there is a namespace declared with the given name, which must be a well-formed URI.
 */
public boolean hasNamespace(String name) {
 if (name == null) {
  return false;
 }
 return getPrefix(name) != null;
}
origin: effektif/effektif

/**
 * Returns the namespace prefix for the given namespace name, which must be a well-formed URI.
 */
public String getPrefix(String name) {
 try {
  return getPrefix(new URI(name));
 } catch (URISyntaxException e) {
  return null;
 }
}
origin: com.effektif/effektif-workflow-api

/**
 * Returns the namespace prefix for the given namespace name, which must be a well-formed URI.
 */
public String getPrefix(String name) {
 try {
  return getPrefix(new URI(name));
 } catch (URISyntaxException e) {
  return null;
 }
}
origin: com.effektif/effektif-workflow-api

protected String getNamespacePrefix(String namespaceUri) {
 if (this.namespaces != null && this.namespaces.hasNamespace(namespaceUri)) {
  String prefix = this.namespaces.getPrefix(namespaceUri);
  return prefix == null || prefix.isEmpty() ? "" : prefix + ":";
 }
 if (parent!=null) {
  return parent.getNamespacePrefix(namespaceUri);
 }
 return "";
}
origin: effektif/effektif

protected String getNamespacePrefix(String namespaceUri) {
 if (this.namespaces != null && this.namespaces.hasNamespace(namespaceUri)) {
  String prefix = this.namespaces.getPrefix(namespaceUri);
  return prefix == null || prefix.isEmpty() ? "" : prefix + ":";
 }
 if (parent!=null) {
  return parent.getNamespacePrefix(namespaceUri);
 }
 return "";
}
origin: effektif/effektif

} else {
 writer.write("xmlns:");
 String prefix = xmlElement.namespaces.getPrefix(uri);
 writer.write(prefix);
origin: effektif/effektif

protected void initializeNamespacePrefixes() {
 if (xml.namespaces != null) {
  bpmnPrefix = xml.namespaces.getPrefix(BPMN_URI);
  effektifPrefix = xml.namespaces.getPrefix(EFFEKTIF_URI);
 }
 // Add any missing namespaces with their default prefixes.
 if (bpmnPrefix == null) {
  bpmnPrefix = "";
  xml.addNamespace(BPMN_URI, bpmnPrefix);
 }
 if (bpmnDiagramPrefix == null) {
  bpmnDiagramPrefix = "bpmndi";
  xml.addNamespace(BPMN_DI_URI, bpmnDiagramPrefix);
  xml.addNamespace(OMG_DC_URI, "omgdc");
  xml.addNamespace(OMG_DI_URI, "omgdi");
 }
 if (effektifPrefix == null) {
  effektifPrefix = "e";
  xml.addNamespace(EFFEKTIF_URI, effektifPrefix);
 }
}

origin: effektif/effektif

 @Test
 public void testPrefixLookup() throws URISyntaxException {
  namespaces.add(null, BPMN_URI);
  namespaces.add("e", EFFEKTIF_URI);
  assertEquals("", namespaces.getPrefix(BPMN_URI));
  assertEquals("e", namespaces.getPrefix(EFFEKTIF_URI));
 }
}
com.effektif.workflow.api.bpmnXmlNamespacesgetPrefix

Javadoc

Returns the namespace prefix for the given namespace name, which must be a well-formed URI.

Popular methods of XmlNamespaces

  • <init>
  • add
    Declares the given namespace, whose name must be a valid URI, and whose prefix may only be empty if
  • getNames
    Returns the names of all declared namespaces, including the default namespace.
  • hasNamespace
    Returns true if there is a namespace declared with the given name, which must be a well-formed URI.
  • isDefault
    Returns true if the given namespace is the default namespace, which does not have a prefix.

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ImageIO (javax.imageio)
  • 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