/** * Creates a <code>Converter</code> that can convert an attribute * to a primitive object. This requires the context object used * for the current instance of XML serialization being performed. * * @param context this is context object used for serialization */ public Converter getConverter(Context context) throws Exception { String ignore = getEmpty(context); Type type = getContact(); return new Primitive(context, type, ignore); }
/** * This is used to acquire the path of the element or attribute * that is used by the class schema. The path is determined by * acquiring the XPath expression and appending the name of the * label to form a fully qualified path. * * @return returns the path that is used for the XML property */ public String getPath() throws Exception { Expression path = getExpression(); String name = getName(); return path.getAttribute(name); }
/** * Constructor for the <code>AttributeParameter</code> object. * This is used to create a parameter that can be used to * determine a consistent name using the provided XML annotation. * * @param factory this is the constructor the parameter is in * @param value this is the annotation used for the parameter * @param index this is the index the parameter appears at * @param format this is the format used to style the paths */ public AttributeParameter(Constructor factory, Attribute value, Format format, int index) throws Exception { this.contact = new Contact(value, factory, index); this.label = new AttributeLabel(contact, value, format); this.expression = label.getExpression(); this.path = label.getPath(); this.type = label.getType(); this.name = label.getName(); this.key = label.getKey(); this.index = index; }
/** * Constructor for the <code>AttributeParameter</code> object. * This is used to create a parameter that can be used to * determine a consistent name using the provided XML annotation. * * @param factory this is the constructor the parameter is in * @param value this is the annotation used for the parameter * @param index this is the index the parameter appears at * @param format this is the format used to style the paths */ public AttributeParameter(Constructor factory, Attribute value, Format format, int index) throws Exception { this.contact = new Contact(value, factory, index); this.label = new AttributeLabel(contact, value, format); this.expression = label.getExpression(); this.path = label.getPath(); this.type = label.getType(); this.name = label.getName(); this.key = label.getKey(); this.index = index; }
/** * Creates a <code>Converter</code> that can convert an attribute * to a primitive object. This requires the context object used * for the current instance of XML serialization being performed. * * @param context this is context object used for serialization */ public Converter getConverter(Context context) throws Exception { String ignore = getEmpty(context); Type type = getContact(); return new Primitive(context, type, ignore); }
/** * This is used to acquire the path of the element or attribute * that is used by the class schema. The path is determined by * acquiring the XPath expression and appending the name of the * label to form a fully qualified path. * * @return returns the path that is used for the XML property */ public String getPath() throws Exception { Expression path = getExpression(); String name = getName(); return path.getAttribute(name); }
/** * Constructor for the <code>AttributeParameter</code> object. * This is used to create a parameter that can be used to * determine a consistent name using the provided XML annotation. * * @param factory this is the constructor the parameter is in * @param value this is the annotation used for the parameter * @param index this is the index the parameter appears at * @param format this is the format used to style the paths */ public AttributeParameter(Constructor factory, Attribute value, Format format, int index) throws Exception { this.contact = new Contact(value, factory, index); this.label = new AttributeLabel(contact, value, format); this.expression = label.getExpression(); this.path = label.getPath(); this.type = label.getType(); this.name = label.getName(); this.key = label.getKey(); this.index = index; }
/** * Creates a <code>Converter</code> that can convert an attribute * to a primitive object. This requires the context object used * for the current instance of XML serialization being performed. * * @param context this is context object used for serialization */ public Converter getConverter(Context context) throws Exception { String ignore = getEmpty(context); Type type = getContact(); return new Primitive(context, type, ignore); }
/** * This is used to acquire the path of the element or attribute * that is used by the class schema. The path is determined by * acquiring the XPath expression and appending the name of the * label to form a fully qualified path. * * @return returns the path that is used for the XML property */ public String getPath() throws Exception { Expression path = getExpression(); String name = getName(); return path.getAttribute(name); }