/** * Another variation of the put method to convert boolean values into * strings. The values "yes" or "no" will be used in replacement of the * boolean value. * * @param key * @param value * @return */ public String put(String key, boolean value) { return this.put(key, (value ? "yes" : "no")); } }
/** * Another variation of the put method to convert integer values into * strings. * * @param key * The attribute's name. * @param value * The value of the attribute. * @return */ public String put(String key, int value) { return this.put(key, String.valueOf(value)); }
/** * Translate this element and all contained elements into SAX events. The * events should be routed to the contentHandler found in the WingContext. * * @param contentHandler * (Required) The registered contentHandler where SAX events * should be routed too. * @param lexicalHandler * (Required) The registered lexicalHandler where lexical * events (such as CDATA, DTD, etc) should be routed too. * @param namespaces * (Required) SAX Helper class to keep track of namespaces able * to determine the correct prefix for a given namespace URI. */ public void toSAX(ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces) throws SAXException { AttributeMap attributes = new AttributeMap(); if (this.name != null) { attributes.put(A_NAME, name); attributes.put(A_ID, context.generateID(E_HEAD, name)); } startElement(contentHandler, namespaces, E_HEAD, attributes); super.toSAX(contentHandler, lexicalHandler, namespaces); endElement(contentHandler, namespaces, E_HEAD); } }
/** * Translate this element and all contained elements into SAX events. The * events should be routed to the contentHandler found in the WingContext. * * @param contentHandler * (Required) The registered contentHandler where SAX events * should be routed too. * @param lexicalHandler * (Required) The registered lexicalHandler where lexical events * (such as CDATA, DTD, etc) should be routed too. * @param namespaces * (Required) SAX Helper class to keep track of namespaces able * to determine the correct prefix for a given namespace URI. */ public void toSAX(ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces) throws SAXException { AttributeMap attributes = new AttributeMap(); attributes.put(A_RETURN_VALUE, this.returnValue); startElement(contentHandler, namespaces, E_OPTION, attributes); super.toSAX(contentHandler, lexicalHandler, namespaces); endElement(contentHandler, namespaces, E_OPTION); } }
/** * Translate this element and all contained elements into SAX events. The * events should be routed to the contentHandler found in the WingContext. * * @param contentHandler * (Required) The registered contentHandler where SAX events * should be routed too. * @param lexicalHandler * (Required) The registered lexicalHandler where lexical * events (such as CDATA, DTD, etc) should be routed too. * @param namespaces * (Required) SAX Helper class to keep track of namespaces able * to determine the correct prefix for a given namespace URI. */ public void toSAX(ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces) throws SAXException { AttributeMap attributes = new AttributeMap(); if (this.rend != null) { attributes.put(A_RENDER, this.rend); } startElement(contentHandler, namespaces, E_HIGHLIGHT, attributes); super.toSAX(contentHandler, lexicalHandler, namespaces); endElement(contentHandler, namespaces, E_HIGHLIGHT); } }