io.katharsis.request.path.ResourcePath Maven / Gradle / Ivy
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