/** * Return parent {@link Resource resources} of {@link Resource resources} from this runtime resource. The returned list * is ordered so that the position of the parent resource in the returned list is the same as position of its child resource * in list returned by {@link #getResources()}. Simply said the order of lists returned * from {@code getParentResources()} and {@link #getResources()} from parent-child point of view is the same. If the resource * has no parent then the element {@code null} is in the list. * * @return Parent resource list with resources if this runtime resource is child resource or {@code null} elements if * this runtime resource is the parent resource. */ public List<Resource> getParentResources() { return resources.stream().map(child -> (child == null) ? null : child.getParent()).collect(Collectors.toList()); }
/** * Return parent {@link Resource resources} of {@link Resource resources} from this runtime resource. The returned list * is ordered so that the position of the parent resource in the returned list is the same as position of its child resource * in list returned by {@link #getResources()}. Simply said the order of lists returned * from {@code getParentResources()} and {@link #getResources()} from parent-child point of view is the same. If the resource * has no parent then the element {@code null} is in the list. * * @return Parent resource list with resources if this runtime resource is child resource or {@code null} elements if * this runtime resource is the parent resource. */ public List<Resource> getParentResources() { return resources.stream().map(child -> (child == null) ? null : child.getParent()).collect(Collectors.toList()); }
@Override public void accept(ResourceModelVisitor visitor) { if (getParent() == null) { visitor.visitResource(this); } else { visitor.visitChildResource(this); } }
@Override public void accept(ResourceModelVisitor visitor) { if (getParent() == null) { visitor.visitResource(this); } else { visitor.visitChildResource(this); } }
path = "N/A"; } else { path = resourceMethod.getParent().getParent() == null ? "" : resourceMethod.getParent().getPath();
path = "N/A"; } else { path = resourceMethod.getParent().getParent() == null ? "" : resourceMethod.getParent().getPath();
/** * Return parent {@link Resource resources} of {@link Resource resources} from this runtime resource. The returned list * is ordered so that the position of the parent resource in the returned list is the same as position of its child resource * in list returned by {@link #getResources()}. Simply said the order of lists returned * from {@code getParentResources()} and {@link #getResources()} from parent-child point of view is the same. If the resource * has no parent then the element {@code null} is in the list. * * @return Parent resource list with resources if this runtime resource is child resource or {@code null} elements if * this runtime resource is the parent resource. */ public List<Resource> getParentResources() { return resources.stream().map(child -> (child == null) ? null : child.getParent()).collect(Collectors.toList()); }
@Override public void accept(ResourceModelVisitor visitor) { if (getParent() == null) { visitor.visitResource(this); } else { visitor.visitChildResource(this); } }
path = "N/A"; } else { path = resourceMethod.getParent().getParent() == null ? "" : resourceMethod.getParent().getPath();
@Override public Resource apply(Resource child) { return (child == null) ? null : child.getParent(); } });
@Override public Resource apply(Resource child) { return (child == null) ? null : child.getParent(); } });
@Override public Resource apply(Resource child) { return (child == null) ? null : child.getParent(); } });
@Override public void accept(ResourceModelVisitor visitor) { if (getParent() == null) { visitor.visitResource(this); } else { visitor.visitChildResource(this); } }
@Override public void accept(ResourceModelVisitor visitor) { if (getParent() == null) { visitor.visitResource(this); } else { visitor.visitChildResource(this); } }
@Override public void accept(ResourceModelVisitor visitor) { if (getParent() == null) { visitor.visitResource(this); } else { visitor.visitChildResource(this); } }