Write out a fully formed, correct entity definition (assuming the Entity
 object itself is valid.)

 out::
   An object implementing <TT>&lt;&lt;<TT> to which the entity will be
   output
 indent::
   *DEPRECATED* and ignored
356572
def write out, indent=-1
      out << '<!ENTITY '
      out << '% ' if @reference
      out << @name
      out << ' '
      if @external
        out << @external << ' '
        if @pubid
          q = @pubid.include?('"')?"'":'"'
          out << q << @pubid << q << ' '
        end
        q = @ref.include?('"')?"'":'"'
        out << q << @ref << q
        out << ' NDATA ' << @ndata if @ndata
      else
        q = @value.include?('"')?"'":'"'
        out << q << @value << q
      end
      out << '>'
    end
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();
    }
990588
public <T> void write(final OutputStream stream, final T object,
			final DataTypeDescriptor<T> descriptor, final boolean indent) {
		try {
			jsonFormat.write(stream, object, descriptor, indent);
		} catch (Exception e) {
			throw propagate(e);
		}
	}
120723
@Override
  public void write(TextWriterStream out, String label, TextWriteable obj) {
    obj.writeToText(out, label);
  }
129224
public void write(EntityType type) throws ODataRenderException {

        LOG.debug("Writing type {} of type {}", type.getName(), type.getMetaType());
        try {
            xmlWriter.writeStartElement(ENTITY_TYPE);
            if (!isNullOrEmpty(type.getBaseTypeName())) {
                xmlWriter.writeAttribute(BASE_TYPE, type.getBaseTypeName());
            }
            if (type.isOpen()) {
                xmlWriter.writeAttribute(OPEN_TYPE, Boolean.toString(type.isOpen()));
            }
            if (type.hasStream()) {
                xmlWriter.writeAttribute(HAS_STREAM, Boolean.toString(type.hasStream()));
            }
            xmlWriter.writeAttribute(NAME, type.getName());
            if (type.isAbstract()) {
                xmlWriter.writeAttribute(ABSTRACT, "true");
            }
            xmlWriter.writeStartElement(ENTITY_TYPE_KEY);
            for (PropertyRef propertyRef : type.getKey().getPropertyRefs()) {
                xmlWriter.writeStartElement(PROPERTY_REF);
                xmlWriter.writeAttribute(NAME, propertyRef.getPath());
                xmlWriter.writeEndElement();
            }
            xmlWriter.writeEndElement();

            visitProperties(entityDataModel, type, property -> {
                try {
                    propertyWriter.write(property);
                } catch (XMLStreamException e) {
                    throw new ODataRenderException("Error while writing property: " + property.getName(), e);
                }
            });
            xmlWriter.writeEndElement();
        } catch (XMLStreamException e) {
            throw new ODataRenderException("Error while writing entity type: " + type.getName(), e);
        }

    }
1336173
void writeClassComment(Definition def, Writer out) throws IOException
   {
      out.write("/**\n");
      out.write(" * " + getClassName(def));
      writeEol(out);
      out.write(" *\n");
      out.write(" * @version $Revision: $\n");
      out.write(" */\n");
   }
1041182
private void writeConnection(Definition def, Writer out, int indent) throws IOException
   {
      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Gets a connection to an EIS instance. \n");
      writeWithIndent(out, indent, " *\n");
      writeWithIndent(out, indent, " * @return Connection instance the EIS instance.\n");
      writeWithIndent(out, indent, " * @throws ResourceException Failed to get a connection to\n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "@Override\n");
      writeWithIndent(out, indent, "public Connection getConnection() throws ResourceException");
      writeLeftCurlyBracket(out, indent);

      writeWithIndent(out, indent + 1,
            "return new " + def.getMcfDefs().get(getNumOfMcf()).getCciConnClass() + "(new " + def.getMcfDefs()
                  .get(getNumOfMcf()).getConnSpecClass() + "());");
      writeRightCurlyBracket(out, indent);
      writeEol(out);

      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Gets a connection to an EIS instance. \n");
      writeWithIndent(out, indent, " *\n");
      writeWithIndent(out, indent, " * @param connSpec Connection parameters and security information specified as "
            + "ConnectionSpec instance\n");
      writeWithIndent(out, indent, " * @return Connection instance the EIS instance.\n");
      writeWithIndent(out, indent, " * @throws ResourceException Failed to get a connection to\n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "@Override\n");
      writeWithIndent(out, indent, "public Connection getConnection(ConnectionSpec connSpec) throws ResourceException");
      writeLeftCurlyBracket(out, indent);

      writeWithIndent(out, indent + 1,
            "return new " + def.getMcfDefs().get(getNumOfMcf()).getCciConnClass() + "(connSpec);");
      writeRightCurlyBracket(out, indent);
      writeEol(out);
   }
1127940
def t_INDENTIFIER(t):
    '
    if t.value in reserved:
        t.type = t.value.upper()
        if t.value in reservedMap:
            t.value = reservedMap[t.value]
    elif t.value in strStatment:
        t.type = 'STATEMENT'
    return t
1104711
@Override
    public void write(DataOutput out) throws IOException
    {
        addSignatureIfNeed();
        out.writeInt(magic);
        out.writeShort(minor_version);
        out.writeShort(major_version);
        out.writeShort(constant_pool.size()+1);
        for (ConstantInfo ci : constant_pool)
        {
            ci.write(out);
        }
        int modifier = ClassFlags.getModifier(getModifiers());
        modifier |= ClassFlags.ACC_SYNTHETIC | ClassFlags.ACC_PUBLIC | ClassFlags.ACC_SUPER;
        out.writeShort(modifier);
        out.writeShort(this_class);
        out.writeShort(super_class);
        out.writeShort(interfaces.size());
        for (int ii : interfaces)
        {
            out.writeShort(ii);
        }
        out.writeShort(fields.size());
        for (FieldInfo fi : fields)
        {
            fi.write(out);
        }
        out.writeShort(methods.size());
        for (MethodInfo mi : methods)
        {
            mi.write(out);
        }
        out.writeShort(attributes.size());
        for (AttributeInfo ai : attributes)
        {
            ai.write(out);
        }

    }
848108
def long_out io , level
      indent = " " * level
      @children.each_with_index do |child , i|
        key , val = child
        io.write "\n#{indent}" unless i == 0
        io.write "- "
        key.out(io , level + 1)
        io.write " => "
        val.out(io , level + 1)
      end
    end
1043799
protected void writeMethodSignature(Writer out, int indent, MethodForConnection method) throws IOException
   {
      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * " + method.getMethodName());
      writeEol(out);
      for (MethodParam param : method.getParams())
      {
         writeIndent(out, indent);
         out.write(" * @param " + param.getName() + " " + param.getName());
         writeEol(out);
      }
      if (!method.getReturnType().equals("void"))
      {
         writeIndent(out, indent);
         out.write(" * @return " + method.getReturnType());
         writeEol(out);
      }
      for (String ex : method.getExceptionType())
      {
         writeIndent(out, indent);
         out.write(" * @throws " + ex + " " + ex);
         writeEol(out);
      }

      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "public " + method.getReturnType() + " " +
            method.getMethodName() + "(");
      int paramSize = method.getParams().size();
      for (int i = 0; i < paramSize; i++)
      {
         MethodParam param = method.getParams().get(i);
         out.write(param.getType());
         out.write(" ");
         out.write(param.getName());
         if (i + 1 < paramSize)
            out.write(", ");
      }
      out.write(")");
      int exceptionSize = method.getExceptionType().size();
      for (int i = 0; i < exceptionSize; i++)
      {
         if (i == 0)
            out.write(" throws ");
         String ex = method.getExceptionType().get(i);
         out.write(ex);
         if (i + 1 < exceptionSize)
            out.write(", ");
      }
   }
1014077
private void writeGetConnection(Definition def, Writer out, int indent) throws IOException
   {
      String connInterface = def.getMcfDefs().get(0).getConnInterfaceClass();
      String cfInterface = def.getMcfDefs().get(0).getCfInterfaceClass();

      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * GetConnection\n");
      writeWithIndent(out, indent, " * @return " + connInterface);
      writeEol(out);
      writeWithIndent(out, indent, " */\n");
      writeWithIndent(out, indent, "private " + connInterface + " getConnection() throws Exception");
      writeLeftCurlyBracket(out, indent);
      writeWithIndent(out, indent + 1, "InitialContext context = new InitialContext();\n");
      writeIndent(out, indent + 1);
      out.write(cfInterface + " factory = (" + cfInterface +
            ")context.lookup(JNDI_NAME);\n");
      writeIndent(out, indent + 1);
      out.write(connInterface + " conn = factory.getConnection();\n");
      writeWithIndent(out, indent + 1, "if (conn == null)");
      writeLeftCurlyBracket(out, indent + 1);
      writeIndent(out, indent + 2);
      out.write("throw new RuntimeException(\"No connection\");");
      writeRightCurlyBracket(out, indent + 1);

      writeWithIndent(out, indent + 1, "return conn;");

      writeRightCurlyBracket(out, indent);
   }
724790
def handleEntity(self, entity):
        
        if entity is None: entity__o = None
        else: entity__o = entity._o
        libxml2mod.xmlHandleEntity(self._o, entity__o)
387315
def mark_clean(self, entity):
        
        state = EntityState.get_state(entity)
        state.status = ENTITY_STATUS.CLEAN
        state.is_persisted = True
1013190
def output(data, **kwargs):  # pylint: disable=unused-argument
    '''
    
    '''

    params = {}
    if 'output_indent' not in __opts__:
        # default indentation
        params.update(default_flow_style=False)
    elif __opts__['output_indent'] >= 0:
        # custom indent
        params.update(default_flow_style=False,
                      indent=__opts__['output_indent'])
    else:  # no indentation
        params.update(default_flow_style=True,
                      indent=0)
    try:
        return salt.utils.yaml.safe_dump(data, **params)
    except Exception as exc:
        import pprint
        log.exception(
            'Exception %s encountered when trying to serialize %s',
            exc, pprint.pformat(data)
        )
436518
public <T> void write(final PrintWriter writer, final T object,
			final DataTypeDescriptor<T> descriptor, final boolean indent) {
		try {
			jsonFormat.write(writer, object, descriptor, indent);
		} catch (Exception e) {
			throw propagate(e);
		}
	}
81304
private void writeEIS(Definition def, Writer out, int indent) throws IOException
   {
      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Returns product name of the underlying EIS instance connected\n");
      writeWithIndent(out, indent, " *\n");
      writeWithIndent(out, indent, " * @return Product name of the EIS instance\n");
      writeWithIndent(out, indent, " * @throws ResourceException  Failed to get the information\n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "@Override\n");
      writeWithIndent(out, indent, "public String getEISProductName() throws ResourceException");
      writeLeftCurlyBracket(out, indent);
      writeWithIndent(out, indent + 1, "return null; //TODO");
      writeRightCurlyBracket(out, indent);
      writeEol(out);

      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Returns product version of the underlying EIS instance.\n");
      writeWithIndent(out, indent, " *\n");
      writeWithIndent(out, indent, " * @return Product version of the EIS instance\n");
      writeWithIndent(out, indent, " * @throws ResourceException  Failed to get the information\n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "@Override\n");
      writeWithIndent(out, indent, "public String getEISProductVersion() throws ResourceException");
      writeLeftCurlyBracket(out, indent);
      writeWithIndent(out, indent + 1, "return null; //TODO");
      writeRightCurlyBracket(out, indent);
      writeEol(out);
   }