C# Class SimpleFramework.Xml.Core.Entry

显示文件 Open project: ngallagher/simplexml Class Usage Examples

Public Methods

Method Description
Entry ( ) : SimpleFramework.Xml.Core
Entry ( String id, String text ) : SimpleFramework.Xml.Core
Entry ( Contact contact, ElementMap label ) : SimpleFramework.Xml.Strategy

Constructor for the Entry object. This takes the element map annotation that provides configuration as to how the map is serialized and deserialized from the XML document. The entry object provides a convenient means to access the XML schema configuration using defaults where necessary.

GetKey ( Context context ) : Converter

This is used to get the key converter for the entry. This knows whether the key type is a primitive or composite object and will provide the appropriate converter implementation. This allows the root composite map converter to concern itself with only the details of the surrounding entry object.

GetValue ( Context context ) : Converter

This is used to get the value converter for the entry. This knows whether the value type is a primitive or composite object and will provide the appropriate converter implementation. This allows the root composite map converter to concern itself with only the details of the surrounding entry object.

IsAttribute ( ) : bool

Represents whether the key value is to be an attribute or an element. This allows the key to be embedded within the entry XML element allowing for a more compact representation. Only primitive key objects can be represented as an attribute. For example a java.util.Date or a string could be represented as an attribute key for the generated XML.

IsInline ( ) : bool

Represents whether the value is to be written as an inline text value within the element. This is only possible if the key has been specified as an attribute. Also, the value can only be inline if there is no wrapping value XML element specified.

Method Details

Entry() public method

public Entry ( ) : SimpleFramework.Xml.Core
return SimpleFramework.Xml.Core

Entry() public method

public Entry ( String id, String text ) : SimpleFramework.Xml.Core
id String
text String
return SimpleFramework.Xml.Core

Entry() public method

Constructor for the Entry object. This takes the element map annotation that provides configuration as to how the map is serialized and deserialized from the XML document. The entry object provides a convenient means to access the XML schema configuration using defaults where necessary.
public Entry ( Contact contact, ElementMap label ) : SimpleFramework.Xml.Strategy
contact Contact /// this is the point of contact to the map object ///
label SimpleFramework.Xml.ElementMap /// the annotation the map method or field uses ///
return SimpleFramework.Xml.Strategy

GetKey() public method

This is used to get the key converter for the entry. This knows whether the key type is a primitive or composite object and will provide the appropriate converter implementation. This allows the root composite map converter to concern itself with only the details of the surrounding entry object.
public GetKey ( Context context ) : Converter
context Context /// this is the root context for the serialization ///
return Converter

GetValue() public method

This is used to get the value converter for the entry. This knows whether the value type is a primitive or composite object and will provide the appropriate converter implementation. This allows the root composite map converter to concern itself with only the details of the surrounding entry object.
public GetValue ( Context context ) : Converter
context Context /// this is the root context for the serialization ///
return Converter

IsAttribute() public method

Represents whether the key value is to be an attribute or an element. This allows the key to be embedded within the entry XML element allowing for a more compact representation. Only primitive key objects can be represented as an attribute. For example a java.util.Date or a string could be represented as an attribute key for the generated XML.
public IsAttribute ( ) : bool
return bool

IsInline() public method

Represents whether the value is to be written as an inline text value within the element. This is only possible if the key has been specified as an attribute. Also, the value can only be inline if there is no wrapping value XML element specified.
public IsInline ( ) : bool
return bool