All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.katharsis.request.path.ResourcePath Maven / Gradle / Ivy

There is a newer version: 2.6.3
Show newest version
package io.katharsis.request.path;

/**
 * Represents a part of a path which relate a field of a resource e.g. for /resource/1 will be represented as
 * an object of ResourcePath type.
 */
public class ResourcePath extends JsonPath {

    public ResourcePath(String elementName) {
        super(elementName);
    }

    public ResourcePath(String elementName, PathIds pathIds) {
        super(elementName, pathIds);
    }

    @Override
    public boolean isCollection() {
        return ids == null || ids.getIds().size() > 1;
    }

    @Override
    public String getResourceName() {
        return elementName;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy