/** * This method returns a <code>Converter</code> which can be used to * convert an XML node into an object value and vice versa. The * converter requires only the context object in order to perform * serialization or deserialization of the provided XML node. * * @param context this is the context object for the serialization * * @return this returns an object that is used for conversion */ public Converter getConverter(Context context) throws Exception { Type type = getMap(); if(!label.inline()) { return new CompositeMap(context, entry, type); } return new CompositeInlineMap(context, entry, type); }
/** * This method returns a <code>Converter</code> which can be used to * convert an XML node into an object value and vice versa. The * converter requires only the context object in order to perform * serialization or deserialization of the provided XML node. * * @param context this is the context object for the serialization * * @return this returns an object that is used for conversion */ public Converter getConverter(Context context) throws Exception { Type type = getMap(); if(!label.inline()) { return new CompositeMap(context, entry, type); } return new CompositeInlineMap(context, entry, type); }
/** * This method returns a <code>Converter</code> which can be used to * convert an XML node into an object value and vice versa. The * converter requires only the context object in order to perform * serialization or deserialization of the provided XML node. * * @param context this is the context object for the serialization * * @return this returns an object that is used for conversion */ public Converter getConverter(Context context) throws Exception { Type type = getMap(); if(!label.inline()) { return new CompositeMap(context, entry, type); } return new CompositeInlineMap(context, entry, type); }
/** * This is used to acquire the name of the element or attribute * that is used by the class schema. The name is determined by * checking for an override within the annotation. If it contains * a name then that is used, if however the annotation does not * specify a name the the field or method name is used instead. * * @return returns the name that is used for the XML property */ public String getName() throws Exception{ if(name == null) { Style style = format.getStyle(); String value = entry.getEntry(); if(!label.inline()) { value = detail.getName(); } name = style.getElement(value); } return name; }
/** * This is used to acquire the name of the element or attribute * that is used by the class schema. The name is determined by * checking for an override within the annotation. If it contains * a name then that is used, if however the annotation does not * specify a name the the field or method name is used instead. * * @return returns the name that is used for the XML property */ public String getName() throws Exception{ if(name == null) { Style style = format.getStyle(); String value = entry.getEntry(); if(!label.inline()) { value = detail.getName(); } name = style.getElement(value); } return name; }
/** * This is used to acquire the name of the element or attribute * that is used by the class schema. The name is determined by * checking for an override within the annotation. If it contains * a name then that is used, if however the annotation does not * specify a name the the field or method name is used instead. * * @return returns the name that is used for the XML property */ public String getName() throws Exception{ if(name == null) { Style style = format.getStyle(); String value = entry.getEntry(); if(!label.inline()) { value = detail.getName(); } name = style.getElement(value); } return name; }
/** * Constructor for the <code>ElementMapLabel</code> object. This * creates a label object, which can be used to convert an XML * node to a <code>Map</code> of XML serializable objects. * * @param contact this is the contact that this label represents * @param label the annotation that contains the schema details * @param format this is the format used to style this label */ public ElementMapLabel(Contact contact, ElementMap label, Format format) { this.detail = new Introspector(contact, this, format); this.decorator = new Qualifier(contact); this.entry = new Entry(contact, label); this.required = label.required(); this.type = contact.getType(); this.inline = label.inline(); this.override = label.name(); this.data = label.data(); this.format = format; this.label = label; }
/** * Constructor for the <code>ElementMapLabel</code> object. This * creates a label object, which can be used to convert an XML * node to a <code>Map</code> of XML serializable objects. * * @param contact this is the contact that this label represents * @param label the annotation that contains the schema details * @param format this is the format used to style this label */ public ElementMapLabel(Contact contact, ElementMap label, Format format) { this.detail = new Introspector(contact, this, format); this.decorator = new Qualifier(contact); this.entry = new Entry(contact, label); this.required = label.required(); this.type = contact.getType(); this.inline = label.inline(); this.override = label.name(); this.data = label.data(); this.format = format; this.label = label; }
/** * Constructor for the <code>ElementMapLabel</code> object. This * creates a label object, which can be used to convert an XML * node to a <code>Map</code> of XML serializable objects. * * @param contact this is the contact that this label represents * @param label the annotation that contains the schema details * @param format this is the format used to style this label */ public ElementMapLabel(Contact contact, ElementMap label, Format format) { this.detail = new Introspector(contact, this, format); this.decorator = new Qualifier(contact); this.entry = new Entry(contact, label); this.required = label.required(); this.type = contact.getType(); this.inline = label.inline(); this.override = label.name(); this.data = label.data(); this.format = format; this.label = label; }