本文整理汇总了Java中org.simpleframework.xml.Path类的典型用法代码示例。如果您正苦于以下问题:Java Path类的具体用法?Java Path怎么用?Java Path使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Path类属于org.simpleframework.xml包,在下文中一共展示了Path类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ComplicatedExample
import org.simpleframework.xml.Path; //导入依赖的package包/类
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;
}
示例2: Channel
import org.simpleframework.xml.Path; //导入依赖的package包/类
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;
}
示例3: getPath
import org.simpleframework.xml.Path; //导入依赖的package包/类
/**
* 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();
}
示例4: Test1
import org.simpleframework.xml.Path; //导入依赖的package包/类
public Test1(
@Attribute(name="iri") final String identifier,
@Path(value="resource")@Attribute(name="iri") final String identifier1)
{
super();
this.identifier = identifier;
this.identifier1 = identifier1;
}
示例5: InlineListUnion
import org.simpleframework.xml.Path; //导入依赖的package包/类
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;
}
示例6: Test3
import org.simpleframework.xml.Path; //导入依赖的package包/类
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;
}
示例7: getElements
import org.simpleframework.xml.Path; //导入依赖的package包/类
@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;
}
示例8: setElements
import org.simpleframework.xml.Path; //导入依赖的package包/类
@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;
}
示例9: PathWithTextAndElementExample
import org.simpleframework.xml.Path; //导入依赖的package包/类
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;
}
示例10: OtherPathWithTextAndElementExample
import org.simpleframework.xml.Path; //导入依赖的package包/类
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;
}
示例11: PathWithMultipleTextExample
import org.simpleframework.xml.Path; //导入依赖的package包/类
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;
}
示例12: Example
import org.simpleframework.xml.Path; //导入依赖的package包/类
public Example(
@Path("path[1]") @Element(name="b") String x,
@Path("path[2]") @Element(name="b") String y)
{
this.y = y;
this.x = x;
}
示例13: AmbiguousConstructorParameterExample
import org.simpleframework.xml.Path; //导入依赖的package包/类
public AmbiguousConstructorParameterExample(
@Element(name="b") String ambiguous,
@Path("path[2]") @Element(name="b") String y)
{
this.y = y;
this.x = ambiguous;
}
示例14: getGroup
import org.simpleframework.xml.Path; //导入依赖的package包/类
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());
}
示例15: Test1
import org.simpleframework.xml.Path; //导入依赖的package包/类
public Test1(
@Attribute(name="iri") String identifier,
@Path(value="resource") @Attribute(name="iri") String identifier1)
{
this.identifier = identifier;
this.identifier1 = identifier1;
}