net.sf.jsefa.xml.annotation
Annotation Type XmlTextContent


@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface XmlTextContent

An annotation stating that the annotated java field should be mapped to the content of the xml node with the data type described by the class the annotated field is part of.

Author:
Norman Lahme-Huetig, Matthias Derer

Optional Element Summary
 String[] constraints
          The constraints to validate.
 Class<? extends SimpleTypeConverter> converterType
          Specifies the converter type to be used for the xml attribute.
 String[] format
          The format to be used to construct a SimpleTypeConverter for the content.
 SimpleListItem listItem
          In case of a simple type list this annotation parameter provides details about the list items.
 boolean required
          True, if a value is required; false otherwise.
 TextMode textMode
          The text mode.
 Class<? extends Validator> validatorType
          Specifies the validator type to be used.
 

format

public abstract String[] format
The format to be used to construct a SimpleTypeConverter for the content. The SimpleTypeConverter class will be determined using the type of the java field with this annotation.

Default:
{}

textMode

public abstract TextMode textMode
The text mode. Used to define the method for serializing the text content.

Default:
net.sf.jsefa.xml.lowlevel.TextMode.IMPLICIT

converterType

public abstract Class<? extends SimpleTypeConverter> converterType
Specifies the converter type to be used for the xml attribute. In the default case the converter type is determined using the type of the java field with this annotation.

Default:
net.sf.jsefa.common.annotation.NoConverterType.class

listItem

public abstract SimpleListItem listItem
In case of a simple type list this annotation parameter provides details about the list items.

Default:
@net.sf.jsefa.common.annotation.SimpleListItem

required

public abstract boolean required
True, if a value is required; false otherwise.

Default:
false

validatorType

public abstract Class<? extends Validator> validatorType
Specifies the validator type to be used. In the default case the validator type is determined using the type of the java field with this annotation.

Default:
net.sf.jsefa.common.annotation.NoValidatorType.class

constraints

public abstract String[] constraints
The constraints to validate. Each constraint is a String of the form 'name=value' where name is the name of the constraint and value is its value. The allowed set of constraints depend on the validator type.

Default:
{}


Copyright © 2014. All rights reserved.