public ComplicatedExample( @Path("x:path[1]") @ElementMap(name="a") Map<Key, Entry> map, @Path("x:path[2]") @ElementList(name="a") List<Entry> list, @Element(name="elementOne") String elementOne, @Element(name="elementTwo") String elementTwo, @Element(name="elementThree") String elementThree, @Text String text, @Path("x:path[2]/x:someOtherPath") @Attribute(name="attribute_one") String attribute_one, @Path("x:path[2]/x:someOtherPath") @Attribute(name="attribute_two") String attribute_two) { this.map = map; this.list = list; this.elementOne = elementOne; this.elementTwo = elementTwo; this.elementThree = elementThree; this.text = text; this.attribute_one = attribute_one; this.attribute_two = attribute_two; }
public Channel(@Element(name = "title")String title, @Path("link") @Text(required=false)String link, @Element(name = "description")String description, @Element(name = "copyright")String copyright, @ElementList(name = "episode", inline = true)List<Episode> episode) { this.title = title; this.link = link; this.description = description; this.copyright = copyright; this.episode = episode; }
/** * 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 { Path path = contact.getAnnotation(Path.class); if(path == null) { return null; } return path.value(); }
public Test1( @Attribute(name="iri") final String identifier, @Path(value="resource")@Attribute(name="iri") final String identifier1) { super(); this.identifier = identifier; this.identifier1 = identifier1; }
public InlineListUnion( @Path("x:path[1]") @ElementList(name="a") List<Entry> one, @Path("y:path[2]") @ElementList(name="a") List<Entry> two) { this.one = one; this.two = two; }
public Test3( @Path(value="elements") @ElementListUnion({ @ElementList(entry="element-a", type=MyElementA.class, inline=true), @ElementList(entry="element-b", type=MyElementB.class, inline=true) }) final java.util.ArrayList<MyElement> elements ) { super(); this.elements = elements; }
@Path(value="elements") @ElementListUnion({ @ElementList(entry="elementA", type=MyElementA.class, inline=true), @ElementList(entry="elementB", type=MyElementB.class, inline=true), @ElementList(entry="element", type=MyElement.class, inline=true) }) java.util.ArrayList<MyElement> getElements(){ return this.elements; }
@Path(value="elements") @ElementListUnion({ @ElementList(entry="elementA", type=MyElementA.class, inline=true), @ElementList(entry="elementB", type=MyElementB.class, inline=true), @ElementList(entry="element", type=MyElement.class, inline=true) }) void setElements(final java.util.ArrayList<MyElement> elements){ this.elements = elements; }
private PathWithTextAndElementExample( @Text String text, @Path("some/path") @Attribute(name="name") String value, @Path("some") @Element(name="name") String item) { this.item = item; this.value = value; this.text = text; }
private OtherPathWithTextAndElementExample( @Path("valuePath/path") @Attribute(name="name") String a, @Path("someOtherPath/path") @Element(name="name") String b, @Text String c) { this.a = a; this.b = b; this.c = c; }
private PathWithMultipleTextExample( @Attribute(name="a") String a, @Path("valuePath[1]") @Text String b, @Attribute(name="c") String c, @Path("valuePath[2]") @Text String d) { this.a = a; this.b = b; this.c = c; this.d = d; }
public Example( @Path("path[1]") @Element(name="b") String x, @Path("path[2]") @Element(name="b") String y) { this.y = y; this.x = x; }
public AmbiguousConstructorParameterExample( @Element(name="b") String ambiguous, @Path("path[2]") @Element(name="b") String y) { this.y = y; this.x = ambiguous; }
private static Group getGroup() throws Exception { Field field = CompositeListUnionTest.class.getDeclaredField("EXAMPLE"); Annotation annotation = field.getAnnotation(ElementListUnion.class); Annotation path = field.getAnnotation(Path.class); return new GroupExtractor( new FieldContact(field, annotation, new Annotation[]{annotation, path}), annotation, new Format()); }
public Test1( @Attribute(name="iri") String identifier, @Path(value="resource") @Attribute(name="iri") String identifier1) { this.identifier = identifier; this.identifier1 = identifier1; }
@Path(value="elements") @ElementListUnion({ @ElementList(entry="element-a", type=MyElementA.class, inline=true), @ElementList(entry="element-b", type=MyElementB.class, inline=true) }) public java.util.ArrayList<MyElement> getElements(){ return new java.util.ArrayList<MyElement>(this.elements); }
public Test3_2( @Path(value="elements") @ElementListUnion({ @ElementList(entry="element-a", type=MyElementA.class, inline=true), @ElementList(entry="element-b", type=MyElementB.class, inline=true) }) final java.util.ArrayList<MyElement> elements ) { super(); this.elements = elements; }
public Test3_3( @Path(value="elements") @ElementListUnion({ @ElementList(entry="element-a", type=MyElementA.class, inline=true), @ElementList(entry="element-b", type=MyElementB.class, inline=true) }) final java.util.Collection<MyElement> elements ) { super(); this.elements = elements; }
@Path("channel/item") public String getNewssource() { return newssource; }