com.linkedin.restli.common.LinkArray Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of restli-common Show documentation
Show all versions of restli-common Show documentation
Pegasus is a framework for building robust, scalable service architectures using dynamic discovery and simple asychronous type-checked REST + JSON APIs.
package com.linkedin.restli.common;
import java.util.Collection;
import java.util.List;
import javax.annotation.Generated;
import com.linkedin.data.DataList;
import com.linkedin.data.schema.ArrayDataSchema;
import com.linkedin.data.schema.PathSpec;
import com.linkedin.data.template.DataTemplateUtil;
import com.linkedin.data.template.WrappingArrayTemplate;
@Generated(value = "com.linkedin.pegasus.generator.JavaCodeUtil", comments = "Rest.li Data Template. Generated from /Users/mnchen/dev/pegasus_trunk/pegasus/restli-common/src/main/pegasus/com/linkedin/restli/common/CollectionMetadata.pdsc.", date = "Tue Oct 03 15:15:24 PDT 2017")
public class LinkArray
extends WrappingArrayTemplate
{
private final static ArrayDataSchema SCHEMA = ((ArrayDataSchema) DataTemplateUtil.parseSchema("{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"Link\",\"namespace\":\"com.linkedin.restli.common\",\"doc\":\"A atom:link-inspired link\",\"fields\":[{\"name\":\"rel\",\"type\":\"string\",\"doc\":\"The link relation e.g. 'self' or 'next'\"},{\"name\":\"href\",\"type\":\"string\",\"doc\":\"The link URI\"},{\"name\":\"type\",\"type\":\"string\",\"doc\":\"The type (media type) of the resource\"}]}}"));
public LinkArray() {
this(new DataList());
}
public LinkArray(int initialCapacity) {
this(new DataList(initialCapacity));
}
public LinkArray(Collection c) {
this(new DataList(c.size()));
addAll(c);
}
public LinkArray(DataList data) {
super(data, SCHEMA, Link.class);
}
@Override
public LinkArray clone()
throws CloneNotSupportedException
{
return ((LinkArray) super.clone());
}
@Override
public LinkArray copy()
throws CloneNotSupportedException
{
return ((LinkArray) super.copy());
}
public static class Fields
extends PathSpec
{
public Fields(List path, String name) {
super(path, name);
}
public Fields() {
super();
}
public com.linkedin.restli.common.Link.Fields items() {
return new com.linkedin.restli.common.Link.Fields(getPathComponents(), PathSpec.WILDCARD);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy