Tabnine Logo
BindingHolder.addNamespaceUsage
Code IndexAdd Tabnine to your IDE (free)

How to use
addNamespaceUsage
method
in
org.jibx.binding.model.BindingHolder

Best Java code snippets using org.jibx.binding.model.BindingHolder.addNamespaceUsage (Showing top 6 results out of 315)

origin: org.jibx/jibx-tools

/**
 * Set the name and namespace URI for a <structure> or <collection> binding component.
 *
 * @param qname qualified name to be set (<code>null</code> if none)
 * @param holder binding containing the structure or collection definition
 * @param struct binding component
 */
private static void setName(QName qname, BindingHolder holder, StructureElementBase struct) {
  if (qname != null) {
    if (struct.getName() != null) {
      throw new IllegalStateException("Internal error - trying to overwrite name '" + struct.getName() + "' with '" + qname.getName() + '\'');
    }
    String name = qname.getName();
    String uri = qname.getUri();
    if (name.charAt(0) == '{') {
      int split = name.indexOf('}');
      uri = name.substring(1, split);
      name = name.substring(split+1);
    }
    struct.setName(name);
    holder.addNamespaceUsage(uri);
    if (!Utility.safeEquals(uri, holder.getElementDefaultNamespace())) {
      struct.setUri(uri);
    }
  }
}

origin: org.jibx/jibx-tools

/**
 * Set the name and namespace URI for a &lt;value> binding component. The value style must be set before making this
 * call, since element and attribute elements are handled differently.
 *
 * @param qname qualified name to be set (<code>null</code> if none)
 * @param holder binding containing the value definition
 * @param value binding component
 */
private static void setName(QName qname, BindingHolder holder, ValueElement value) {
  if (qname != null) {
    if (value.getName() != null) {
      throw new IllegalStateException("Internal error - trying to overwrite name '" + value.getName() + "' with '" + qname.getName() + '\'');
    }
    value.setName(qname.getName());
    String uri = qname.getUri();
    int style = value.getStyle();
    if (style == NestingAttributes.ATTRIBUTE_STYLE) {
      if (uri != null) {
        holder.addNamespaceUsage(uri);
      }
      value.setUri(uri);
    } else if (style == NestingAttributes.ELEMENT_STYLE) {
      holder.addNamespaceUsage(uri);
      if (!Utility.safeEquals(uri, holder.getElementDefaultNamespace())) {
        value.setUri(uri);
      }
    }
  }
}

origin: org.jibx/jibx-tools

/**
 * Set the name and namespace URI for a concrete &lt;mapping> binding component. This is the same logic as used in
 * the {@link StructureClassHolder} equivalent.
 *
 * @param qname qualified name to be set (<code>null</code> if none)
 * @param mapping concrete mapping definition
 * @param holder binding containing the mapping
 */
private void setName(QName qname, MappingElementBase mapping, BindingHolder holder) {
  if (qname != null) {
    String name = qname.getName();
    mapping.setName(name);
    String uri = qname.getUri();
    holder.addNamespaceUsage(uri);
    if (!Utility.safeEquals(uri, holder.getElementDefaultNamespace())) {
      mapping.setUri(uri);
    }
  }
}

origin: org.jibx/jibx-tools

if (memb != null) {
  struct.setName(memb.getXmlName());
  hold.addNamespaceUsage(hold.getNamespace());
  hold.addNamespaceUsage(hold.getNamespace());
origin: org.jibx/jibx-tools

if ((cust.isWrapCollections() || memb.isElementForced()) && name != null) {
  coll.setName(name);
  hold.addNamespaceUsage(hold.getNamespace());
  hold.addNamespaceUsage(hold.getNamespace());
origin: org.jibx/jibx-tools

  hold.addNamespaceUsage(hold.getNamespace());
  struct.setCreateType(custom.getCreateType());
  struct.setFactoryName(custom.getFactoryMethod());
hold.addNamespaceUsage(hold.getNamespace());
fillStructure(custom, null, null, struct, hold);
coll.addChild(struct);
org.jibx.binding.modelBindingHolderaddNamespaceUsage

Popular methods of BindingHolder

  • getBinding
  • getElementDefaultNamespace
  • addFormat
  • addMapping
  • addTypeNameReference
  • getFileName
  • getMappingCount
  • getNamespace
  • setFileName

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setContentView (Activity)
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (Timer)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JTable (javax.swing)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top 12 Jupyter Notebook extensions
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