Write an {@code <EnumType>} element for the given {@code EnumType}.

@param type The given complex type. It can not be {@code null}.
@throws javax.xml.stream.XMLStreamException If unable to write to strem
348477
public void write(EnumType type) throws XMLStreamException {

        LOG.debug("Writing type {} of type {}", type.getName(), type.getMetaType());

        xmlWriter.writeStartElement(ENUM_TYPE);
        xmlWriter.writeAttribute(NAME, type.getName());
        for (EnumMember member : type.getMembers()) {
            xmlWriter.writeStartElement(ENUM_MEMBER);
            xmlWriter.writeAttribute(NAME, member.getName());
            xmlWriter.writeEndElement();
        }
        xmlWriter.writeEndElement();
    }
1260587
protected void writeNull(Type type) {

        if (logMode == MODE_DELETE) {
            write(BYTES_IS);
        } else if (isWritten) {
            write(',');
        }

        isWritten = true;

        write(BYTES_NULL);
    }
983888
public void setType(String type) throws PageException {
	if (type == null) return;
	try {
	    this.type = toType(type);
	}
	catch (SearchException e) {
	    throw Caster.toPageException(e);
	}
    }
1194811
public void setType(String type) {
        if (type == null) {
            _properties.remove(AMQP_PROP_TYPE);
            return;
        }
        
        _properties.put(AMQP_PROP_TYPE, type);
    }
989286
private void writeODataType(StructuredType structuredType) throws IOException {
        if (entitySet != null) {
            String typeName = entitySet.getTypeName();
            String type = typeName.substring(typeName.lastIndexOf(".") + 1, typeName.length());

            if (!type.equals(structuredType.getName())) {
                jsonGenerator.writeStringField(TYPE, String.format("#%s.%s",
                        structuredType.getNamespace(), structuredType.getName()));
            } else {
                LOG.trace("{} has root level. {} won't be written here", entitySet.getName(), TYPE);
            }
        }
    }
272744
public void writeData(Object entity, EntityType entityType) throws XMLStreamException, ODataRenderException {

        xmlWriter.writeStartElement(ODATA_CONTENT);
        xmlWriter.writeAttribute(TYPE, XML.toString());
        xmlWriter.writeStartElement(METADATA, ODATA_PROPERTIES, "");

        marshall(entity, entityType);

        xmlWriter.writeEndElement();
        xmlWriter.writeEndElement();
    }
386647
private void writeColumn(String columnName, Object value) throws XMLStreamException {
        xmlStreamWriter.writeStartElement("column");
        xmlStreamWriter.writeAttribute("name", columnName);
        String stringValue = null;
        if (value instanceof CompositeObject) {
            CompositeObject descriptor = (CompositeObject) value;
            LanguageElement elementValue = LanguageHelper.getLanguageElement(descriptor);
            if (elementValue != null) {
                xmlStreamWriter.writeStartElement("element");
                xmlStreamWriter.writeAttribute("language", elementValue.getLanguage());
                xmlStreamWriter.writeCharacters(elementValue.name());
                xmlStreamWriter.writeEndElement(); // element
                SourceProvider sourceProvider = elementValue.getSourceProvider();
                stringValue = sourceProvider.getName(descriptor);
                String sourceFile = sourceProvider.getSourceFile(descriptor);
                Integer lineNumber = sourceProvider.getLineNumber(descriptor);
                if (sourceFile != null) {
                    xmlStreamWriter.writeStartElement("source");
                    xmlStreamWriter.writeAttribute("name", sourceFile);
                    if (lineNumber != null) {
                        xmlStreamWriter.writeAttribute("line", lineNumber.toString());
                    }
                    xmlStreamWriter.writeEndElement(); // sourceFile
                }
            }
        } else if (value != null) {
            stringValue = ReportHelper.getLabel(value);
        }
        xmlStreamWriter.writeStartElement("value");
        xmlStreamWriter.writeCharacters(stringValue);
        xmlStreamWriter.writeEndElement(); // value
        xmlStreamWriter.writeEndElement(); // column
    }
425198
public static void writeEnum(DataOutput out, Enum<?> enumVal) throws IOException {
        Text.writeString(out, enumVal.name());
    }
846715
@Api
	public void setMapType(MapType type) {
		this.type = type;
		if (googleMap != null) {
			setMapType(googleMap, type.toString());
		}
	}
926149
private void marshallEnum(Object value, EnumType enumType) throws XMLStreamException {
        LOG.trace("Enum value: {} of type: {}", value, enumType);
        xmlWriter.writeCharacters(value.toString());
    }
783757
public void writeXml(OutputStream out) throws IOException {
        Properties properties = getProps();
        try {
            Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
            Element conf = doc.createElement("configuration");
            doc.appendChild(conf);
            conf.appendChild(doc.createTextNode("\n"));
            for (Enumeration e = properties.keys(); e.hasMoreElements();) {
                String name = (String) e.nextElement();
                Object object = properties.get(name);
                String value;
                if (object instanceof String) {
                    value = (String) object;
                } else {
                    continue;
                }
                Element propNode = doc.createElement("property");
                conf.appendChild(propNode);

                Element nameNode = doc.createElement("name");
                nameNode.appendChild(doc.createTextNode(name));
                propNode.appendChild(nameNode);

                Element valueNode = doc.createElement("value");
                valueNode.appendChild(doc.createTextNode(value));
                propNode.appendChild(valueNode);

                conf.appendChild(doc.createTextNode("\n"));
            }

            DOMSource source = new DOMSource(doc);
            StreamResult result = new StreamResult(out);
            TransformerFactory transFactory = TransformerFactory.newInstance();
            Transformer transformer = transFactory.newTransformer();
            transformer.transform(source, result);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
1180360
private void setTypeString(final String type) {
        if (type == null) {
            this.type = null;
        } else if (type.equalsIgnoreCase("WARN")) {
            this.type = Type.WARN;
        } else if (type.equalsIgnoreCase("ERROR")) {
            this.type = Type.ERROR;
        } else if (type.equalsIgnoreCase("DEBUG")) {
            this.type = Type.DEBUG;
        } else if (type.equalsIgnoreCase("INFO")) {
            this.type = Type.INFO;
        }
    }
264344
public void setType(DBFDataType type) {
		if (!type.isWriteSupported()) {
			throw new IllegalArgumentException("No support for writting " + type);
		}
		this.type = type;
		if (type.getDefaultSize() > 0) {
			this.length = type.getDefaultSize();
		}

	}
763244
public void setType(final Type type) {
		getOrCreateComponentModel().type = type == null ? Type.TABLE : type;
	}
1209829
public void write(XMLStreamWriter writer, String xmlElementName) throws XMLStreamException {
      if (isModified()) {
         writer.writeStartElement(xmlElementName);
         write(writer);
         writer.writeEndElement();
      }
   }
332803
private void writeTypedUInt(final int type, final long value)
    {
        if (value <= 0xFFL)
        {
            updateLength(2);
            buffer.writeUInt8(type | 0x01);
            buffer.writeUInt8(value);
        }
        else if (value <= 0xFFFFL)
        {
            updateLength(3);
            buffer.writeUInt8(type | 0x02);
            buffer.writeUInt16(value);
        }
        else if (value <= 0xFFFFFFL)
        {
            updateLength(4);
            buffer.writeUInt8(type | 0x03);
            buffer.writeUInt24(value);
        }
        else if (value <= 0xFFFFFFFFL)
        {
            updateLength(5);
            buffer.writeUInt8(type | 0x04);
            buffer.writeUInt32(value);
        }
        else if (value <= 0xFFFFFFFFFFL)
        {
            updateLength(6);
            buffer.writeUInt8(type | 0x05);
            buffer.writeUInt40(value);
        }
        else if (value <= 0xFFFFFFFFFFFFL)
        {
            updateLength(7);
            buffer.writeUInt8(type | 0x06);
            buffer.writeUInt48(value);
        }
        else if (value <= 0xFFFFFFFFFFFFFFL)
        {
            updateLength(8);
            buffer.writeUInt8(type | 0x07);
            buffer.writeUInt56(value);
        }
        else
        {
            updateLength(9);
            buffer.writeUInt8(type | 0x08);
            buffer.writeUInt64(value);
        }
    }
1048238
public void writeNull(IonType type)
        throws IOException
    {
        IonValue v = _factory.newNull(type);
        append(v);
    }