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

How to use
AttributesImplSerializer
in
org.apache.xml.serializer

Best Java code snippets using org.apache.xml.serializer.AttributesImplSerializer (Showing top 20 results out of 315)

origin: robovm/robovm

protected AttributesImplSerializer m_attributes = new AttributesImplSerializer();
origin: robovm/robovm

int index;
if (uri == null || localName == null || uri.length() == 0)
  index = m_attributes.getIndex(rawName);
else {
  index = m_attributes.getIndex(uri, localName);
  if (m_tracer != null)
    old_value = m_attributes.getValue(index);
    if (value.equals(old_value))
      old_value = null;
  m_attributes.setValue(index, value);
  was_added = false;
  if (old_value != null)
  m_attributes.addAttribute(uri, localName, rawName, type, value);
  was_added = true;
  if (m_tracer != null)
origin: robovm/robovm

  super.fireStartElem(m_elemContext.m_elementName);  
int nAttrs = m_attributes.getLength();   
if (nAttrs>0)
  m_attributes.clear();
origin: robovm/robovm

  index = m_attributes.getIndex(rawName);
else {
  index = m_attributes.getIndex(uri,localName);
  m_attributes.setValue(index,value);
  was_added = false;
  m_attributes.addAttribute(uri, localName, rawName, type, value);
  was_added = true;
origin: robovm/robovm

/**
 * Process the attributes, which means to write out the currently
 * collected attributes to the writer. The attributes are not
 * cleared by this method
 * 
 * @param writer the writer to write processed attributes to.
 * @param nAttrs the number of attributes in m_attributes 
 * to be processed
 *
 * @throws org.xml.sax.SAXException
 */
public void processAttributes(java.io.Writer writer, int nAttrs)
  throws IOException,SAXException
{
    /* 
     * process the collected attributes
     */
    for (int i = 0; i < nAttrs; i++)
    {
      processAttribute(
        writer,
        m_attributes.getQName(i),
        m_attributes.getValue(i),
        m_elemContext.m_elementDesc);
    }
}
origin: robovm/robovm

/**
 * This method sets the attributes, previous attributes are cleared,
 * it also keeps the hashtable up to date for quick lookup via
 * getIndex(qName).
 * @param atts the attributes to copy into these attributes.
 * @see org.xml.sax.helpers.AttributesImpl#setAttributes(Attributes)
 * @see #getIndex(String)
 */
public final void setAttributes(Attributes atts)
{
  super.setAttributes(atts);
  // we've let the super class add the attributes, but
  // we need to keep the hash table up to date ourselves for the
  // potentially new qName/index pairs for quick lookup. 
  int numAtts = atts.getLength();
  if (MAX <= numAtts)
    switchOverToHash(numAtts);
}

origin: robovm/robovm

this.m_attributes.clear();
this.m_CdataElems = null;
this.m_cdataTagOpen = false;
origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

  index = m_attributes.getIndex(rawName);
else {
  index = m_attributes.getIndex(uri,localName);
  m_attributes.addAttribute(uri, localName, rawName, type, value);
  was_added = true;
origin: robovm/robovm

int nAttrs = m_attributes.getLength();
if (nAttrs > 0)
origin: MobiVM/robovm

  index = m_attributes.getIndex(rawName);
else {
  index = m_attributes.getIndex(uri,localName);
  m_attributes.setValue(index,value);
  was_added = false;
  m_attributes.addAttribute(uri, localName, rawName, type, value);
  was_added = true;
origin: robovm/robovm

final String name = m_attributes.getQName(i);
final String value = m_attributes.getValue(i);
writer.write(' ');
writer.write(name);
origin: robovm/robovm

switchOverToHash(MAX);
origin: robovm/robovm

/**
 * This method is called when all the data needed for a call to the
 * SAX handler's startElement() method has been gathered.
 */
protected void closeStartTag() throws SAXException
{
  m_elemContext.m_startTagOpen = false;
  final String localName = getLocalName(m_elemContext.m_elementName);
  final String uri = getNamespaceURI(m_elemContext.m_elementName, true);
  // Now is time to send the startElement event
  if (m_needToCallStartDocument)
  {
    startDocumentInternal();
  }
  m_saxHandler.startElement(uri, localName, m_elemContext.m_elementName, m_attributes);
  // we've sent the official SAX attributes on their way,
  // now we don't need them anymore.
  m_attributes.clear();
  if(m_state != null)
   m_state.setCurrentNode(null);
}
origin: org.apache.xalan/com.springsource.org.apache.xml.serializer

  index = m_attributes.getIndex(rawName);
else {
  index = m_attributes.getIndex(uri,localName);
  m_attributes.addAttribute(uri, localName, rawName, type, value);
  was_added = true;
origin: ibinti/bugvm

int index;
if (uri == null || localName == null || uri.length() == 0)
  index = m_attributes.getIndex(rawName);
else {
  index = m_attributes.getIndex(uri, localName);
  if (m_tracer != null)
    old_value = m_attributes.getValue(index);
    if (value.equals(old_value))
      old_value = null;
  m_attributes.setValue(index, value);
  was_added = false;
  if (old_value != null)
  m_attributes.addAttribute(uri, localName, rawName, type, value);
  was_added = true;
  if (m_tracer != null)
origin: ibinti/bugvm

  index = m_attributes.getIndex(rawName);
else {
  index = m_attributes.getIndex(uri,localName);
  m_attributes.setValue(index,value);
  was_added = false;
  m_attributes.addAttribute(uri, localName, rawName, type, value);
  was_added = true;
origin: robovm/robovm

int nAttrs = m_attributes.getLength();
if (nAttrs > 0)
  m_attributes.clear();
origin: MobiVM/robovm

/**
 * Process the attributes, which means to write out the currently
 * collected attributes to the writer. The attributes are not
 * cleared by this method
 * 
 * @param writer the writer to write processed attributes to.
 * @param nAttrs the number of attributes in m_attributes 
 * to be processed
 *
 * @throws org.xml.sax.SAXException
 */
public void processAttributes(java.io.Writer writer, int nAttrs)
  throws IOException,SAXException
{
    /* 
     * process the collected attributes
     */
    for (int i = 0; i < nAttrs; i++)
    {
      processAttribute(
        writer,
        m_attributes.getQName(i),
        m_attributes.getValue(i),
        m_elemContext.m_elementDesc);
    }
}
origin: MobiVM/robovm

/**
 * This method sets the attributes, previous attributes are cleared,
 * it also keeps the hashtable up to date for quick lookup via
 * getIndex(qName).
 * @param atts the attributes to copy into these attributes.
 * @see org.xml.sax.helpers.AttributesImpl#setAttributes(Attributes)
 * @see #getIndex(String)
 */
public final void setAttributes(Attributes atts)
{
  super.setAttributes(atts);
  // we've let the super class add the attributes, but
  // we need to keep the hash table up to date ourselves for the
  // potentially new qName/index pairs for quick lookup. 
  int numAtts = atts.getLength();
  if (MAX <= numAtts)
    switchOverToHash(numAtts);
}

origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

/**
 * This method is called when all the data needed for a call to the
 * SAX handler's startElement() method has been gathered.
 */
protected void closeStartTag() throws SAXException
{
  m_elemContext.m_startTagOpen = false;
  // Now is time to send the startElement event
  m_saxHandler.startElement(
    EMPTYSTRING,
    m_elemContext.m_elementName,
    m_elemContext.m_elementName,
    m_attributes);
  m_attributes.clear();       
}
org.apache.xml.serializerAttributesImplSerializer

Javadoc

This class extends org.xml.sax.helpers.AttributesImpl which implements org. xml.sax.Attributes. But for optimization this class adds a Hashtable for faster lookup of an index by qName, which is commonly done in the stream serializer.

Most used methods

  • <init>
  • addAttribute
    This method adds the attribute, but also records its qName/index pair in the hashtable for fast look
  • clear
    This method clears the accumulated attributes.
  • getIndex
    This method gets the index of an attribute given its uri and locanName.
  • switchOverToHash
    We are switching over to having a hash table for quick look up of attributes, but up until now we ha
  • getLength
  • getQName
  • getValue
  • setValue

Popular in Java

  • Parsing JSON documents to java classes using gson
  • requestLocationUpdates (LocationManager)
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top plugins for WebStorm
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