src/main/java/com/mxgraph/io/mxObjectCodec.java
protected void encodeValue(mxCodec enc, Object obj, String fieldname,
			Object value, Node node)
	{
		if (value != null && !isExcluded(obj, fieldname, value, true))
		{
			if (isReference(obj, fieldname, value, true))
			{
				Object tmp = enc.getId(value);

				if (tmp == null)
				{
					log.log(Level.FINEST, "mxObjectCodec.encode: No ID for "
							+ getName() + "." + fieldname + "=" + value);
					return; // exit
				}

				value = tmp;
			}

			Object defaultValue = getFieldValue(template, fieldname);

			if (fieldname == null || enc.isEncodeDefaults()
					|| defaultValue == null || !defaultValue.equals(value))
			{
				writeAttribute(enc, obj, getAttributeName(fieldname), value,
						node);
			}
		}
	}
/**
	 * Converts the given value according to the mappings
	 * and id-refs in this codec and uses
	 * {@link #writeAttribute(mxCodec, Object, String, Object, Node)}
	 * to write the attribute into the given node.
	 * 
	 * @param enc Codec that controls the encoding process.
	 * @param obj Object whose field is going to be encoded.
	 * @param fieldname Name if the field to be encoded.
	 * @param value Value of the property to be encoded.
	 * @param node XML node that contains the encoded object.
	 */
Converts the given value according to the mappings
and id-refs in this codec and uses
#writeAttribute(mxCodec, Object, String, Object, Node)
to write the attribute into the given node.

@param enc Codec that controls the encoding process.
@param obj Object whose field is going to be encoded.
@param fieldname Name if the field to be encoded.
@param value Value of the property to be encoded.
@param node XML node that contains the encoded object.
Converts the given value according to the mappings and id - refs in this codec and uses #writeAttribute ( mxCodec Object String Object Node ) to write the attribute into the given node . @param enc Codec that controls the encoding process . @param obj Object whose field is going to be encoded . @param fieldname Name if the field to be encoded . @param value Value of the property to be encoded . @param node XML node that contains the encoded object .
protected void encodeValue(mxCodec enc, Object obj, String fieldname,
			Object value, Node node)
	{
		if (value != null && !isExcluded(obj, fieldname, value, true))
		{
			if (isReference(obj, fieldname, value, true))
			{
				Object tmp = enc.getId(value);
				if (tmp == null)
				{
					log.log(Level.FINEST, "mxObjectCodec.encode: No ID for "
							+ getName() + "." + fieldname + "=" + value);
					return; 
				}
				value = tmp;
			}
			Object defaultValue = getFieldValue(template, fieldname);
			if (fieldname == null || enc.isEncodeDefaults()
					|| defaultValue == null || !defaultValue.equals(value))
			{
				writeAttribute(enc, obj, getAttributeName(fieldname), value,
						node);
			}
		}
	}
protected void encodeValue ( mxCodec enc , Object obj , String fieldname , Object value , Node node ) { if ( value != null && ! isExcluded ( obj , fieldname , value , true ) ) { if ( isReference ( obj , fieldname , value , true ) ) { Object tmp = enc . getId ( value ) ; if ( tmp == null ) { log . log ( Level . FINEST , "mxObjectCodec.encode: No ID for " + getName ( ) + "." + fieldname + "=" + value ) ; return ; } value = tmp ; } Object defaultValue = getFieldValue ( template , fieldname ) ; if ( fieldname == null || enc . isEncodeDefaults ( ) || defaultValue == null || ! defaultValue . equals ( value ) ) { writeAttribute ( enc , obj , getAttributeName ( fieldname ) , value , node ) ; } } }
Converts the given value according to the mappings
 and id-refs in this codec and uses
 {@link #writeAttribute(mxCodec, Object, String, Object, Node)}
 to write the attribute into the given node.
Converts the given value according to the mappings and id - refs in this codec and uses { @link #writeAttribute ( mxCodec Object String Object Node ) } to write the attribute into the given node .
// exit