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

How to use
LDAPXMLHandler
in
com.novell.ldap.util

Best Java code snippets using com.novell.ldap.util.LDAPXMLHandler (Showing top 7 results out of 315)

origin: com.novell.ldap/jldap

 /**
  * This method is used to set the Deserialized Object and it also calls
  * the parent LDAPXMLHandler (if not null), returning the value using 
  * addValue() 
  * @param data Object data.
  * @see #addValue(String, Object)
  */
 protected final void setObject(Object data) {

  if ((state != START) && (state != CHILDELEMENT))
   throw new IllegalStateException("setObject");
  resultantObject = data;
  if (getParent() != null) {
   getParent().addValue(getName(), data);
  }
 }
}
origin: com.novell.ldap/jldap

/** Default Constructor with element name for this Handler and parent
 * LDAPXMLHandler to be processed. 
 * @param ElementName String name of the XML element to process.
 * @param parent LDAPXMLHandler , which is the parent of this Element.
 */
public LDAPXMLHandler(String ElementName, LDAPXMLHandler parent) {
 elementName = ElementName;
 parenthandler = parent;
 state = INIT;
 initHandler();
}
/**
origin: com.novell.ldap/jldap

/**
 * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
 */
public void startElement(
 String uri,
 String localName,
 String qName,
 Attributes attributes)
 throws SAXException {
 super.startElement(uri, localName, qName, attributes);
 Handlerstack.push(currenthandler);
 if (currenthandler == null) {
  currenthandler = defaulthandler;
 } else {
  currenthandler = currenthandler.nextHandler(localName);
 }
 //process Elements.
 if (!localName.equals(currenthandler.getName())) {
  throw new SAXException("Unknown tag:" + localName);
 }
 currenthandler.startElement();
 currenthandler.handleAttributes(attributes);
}
origin: com.novell.ldap/jldap

/**
 * @see org.xml.sax.ContentHandler#endElement(java.lang.String, java.lang.String, java.lang.String)
 */
public void endElement(String uri, String localName, String qName)
 throws SAXException {
 //		Kind of assertion
 if (!localName.equals(currenthandler.getName())) {
  throw new SAXException("Invalid System State");
 }
 currenthandler.value(buffer);
 //	Reset StringBuffer.
 buffer.delete(0, buffer.length());
 currenthandler.endElement();
 //Pop the element.
 currenthandler = (LDAPXMLHandler) Handlerstack.pop();
 super.endElement(uri, localName, qName);
}
origin: com.novell.ldap/jldap

/**
 * Sets the Handler for the Child LDAPXMLHandler, it expects only
 * one handler for each code base.
 * @param handler This handler for specific child element. 
 */
protected final void setchildelement(LDAPXMLHandler handler) {
 if (state != INIT)
  throw new IllegalStateException("setchildelement");
 m_handler_map.put(handler.getName(), handler);
}
/**
origin: com.novell.ldap/jldap

  "The XML cannot be parsed is configured incorrectly:" + e);
return defaulthandler.getObject();
origin: com.novell.ldap/jldap

protected void endElement() {
 try {
  byte[] temp;
  String name = getName();
  String value = getValue();
  if (this.isBase64) {
   temp = Base64.decode(value);
  } else {
   temp = value.getBytes("UTF-8");
  }
  //getParent().addValue("value", temp);
  getParent().addValue(name, temp);
 } catch (UnsupportedEncodingException e) {
 }
}
protected void handleAttributes(Attributes attributes) throws SAXException {
com.novell.ldap.utilLDAPXMLHandler

Javadoc

This class is used to handle the deserialization events emitted by SAXEventMultiplexer. It is a variation of SAXEvents Handler, simplied for accessing specific required events only.

Most used methods

  • addValue
    This method defines the generic adapter to be used by child elements to return the values of the pro
  • endElement
    This method is used to signal the end of Element. It is expected that most of the implementation of
  • getName
    This method returns the Name of the Element to be handled by this LDAPXMLHandler.
  • getObject
    This method returns the deserialize Object generated by this class.
  • getParent
    Returns the Parent LDAPXMLHandler.
  • handleAttributes
    This method is used to handle the Attributes associated with this Element. It is expected that most
  • initHandler
    This method is used to initialize the Handler. It is expected that most of the implementation of thi
  • nextHandler
    This method is used to access the child element's LDAPXMLHandler. The events for the child elements
  • startElement
    This method is called when a new element controlled by this handler is found.
  • value
    This is used to handle the processing of the characters for the specific xml tags.

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • 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