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

How to use
getAttributeName
method
in
org.jibx.extras.IdDefRefMapperBase

Best Java code snippets using org.jibx.extras.IdDefRefMapperBase.getAttributeName (Showing top 2 results out of 315)

origin: org.jibx/jibx-extras

ctx.attribute(0, getAttributeName(), id);
ctx.closeStartEmpty();
origin: org.jibx/jibx-extras

  public Object unmarshal(Object obj, IUnmarshallingContext ictx)
    throws JiBXException {
    
    // make sure we're at the appropriate start tag
    UnmarshallingContext ctx = (UnmarshallingContext)ictx;
    if (!ctx.isAt(m_uri, m_name)) {
      return null;
    } else {
      
      // check for reference to existing ID
      String id = ctx.attributeText(null, getAttributeName(), null);
      if (id == null) {
        
        // no ID value supplied, unmarshal full definition
        obj = ctx.unmarshalElement();
        
      } else {
        
        // find object based on ID
        obj = ctx.findID(id, 0);
        ctx.parsePastEndTag(m_uri, m_name);
        if (obj == null) {
          ctx.throwStartTagException("Reference to undefined ID " +
            id);
        }
      }
    }
    return obj;
  }
}
org.jibx.extrasIdDefRefMapperBasegetAttributeName

Javadoc

Method which can be overridden to supply a different name for the ID reference attribute. The attribute name used by default is just "ref".

Popular methods of IdDefRefMapperBase

  • getIdValue
    Get the ID value from object being marshalled.

Popular in Java

  • Finding current android device location
  • compareTo (BigDecimal)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top Vim 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