// Path: src/main/java/org/netmelody/cieye/core/domain/LandscapeObservation.java
// public final class LandscapeObservation {
// 
//     private final List<TargetDetail> targets = new ArrayList<TargetDetail>();
//     private final Set<Sponsor> dohGroup;
//     
//     public LandscapeObservation() {
//         this(new TargetDetailGroup());
//     }
//     
//     public LandscapeObservation(TargetDetailGroup targets) {
//         this(newArrayList(targets.targets()), null);
//     }
//     
//     private LandscapeObservation(Collection<TargetDetail> targets, Set<Sponsor> dohGroup) {
//         this.targets.addAll(targets);
//         this.dohGroup = (null == dohGroup) ? null : new HashSet<Sponsor>(dohGroup);
//     }
// 
//     public LandscapeObservation add(TargetDetailGroup group) {
//         if (null == group) {
//             return this;
//         }
//         final LandscapeObservation result = new LandscapeObservation(targets, dohGroup);
//         result.targets.addAll(newArrayList(group.targets()));
//         return result;
//     }
// 
//     public List<TargetDetail> targets() {
//         return new ArrayList<TargetDetail>(targets);
//     }
//     
//     public Set<Sponsor> dohGroup() {
//         return (null == dohGroup) ? new HashSet<Sponsor>() : new HashSet<Sponsor>(dohGroup);
//     }
// 
//     public LandscapeObservation withDoh(Set<Sponsor> dohGroup) {
//         return new LandscapeObservation(this.targets, dohGroup);
//     }
// 
//     public LandscapeObservation forSponsor(final Sponsor sponsor) {
//         return new LandscapeObservation(filter(targets, onSponsor(sponsor)), dohGroup);
//     }
// 
//     private Predicate<TargetDetail> onSponsor(final Sponsor sponsor) {
//         return new Predicate<TargetDetail>() {
//             @Override
//             public boolean apply(TargetDetail input) {
//                 return input.sponsors().contains(sponsor);
//             }
//         };
//     }
// 
// }


import static java.lang.Math.min;
import java.io.IOException;
import com.google.common.base.Function;
import com.google.common.base.Functions;
import org.netmelody.cieye.core.domain.Feature;
import org.netmelody.cieye.core.domain.Landscape;
import org.netmelody.cieye.core.domain.LandscapeObservation;
import org.netmelody.cieye.server.CiSpyIntermediary;
import org.netmelody.cieye.server.TargetGroupBriefing;
import org.netmelody.cieye.server.response.CiEyeResponder;
import org.netmelody.cieye.server.response.CiEyeResponse;
import org.netmelody.cieye.server.response.JsonTranslator;
import org.netmelody.cieye.server.response.Prison;
import org.simpleframework.http.Request;

package org.netmelody.cieye.server.response.responder;




public final class LandscapeObservationResponder implements CiEyeResponder {

    private final CiSpyIntermediary spyIntermediary;
    private final Landscape landscape;
    private final Prison prison;

// Path: src/main/java/org/netmelody/cieye/core/domain/LandscapeObservation.java
// public final class LandscapeObservation {
// 
//     private final List<TargetDetail> targets = new ArrayList<TargetDetail>();
//     private final Set<Sponsor> dohGroup;
//     
//     public LandscapeObservation() {
//         this(new TargetDetailGroup());
//     }
//     
//     public LandscapeObservation(TargetDetailGroup targets) {
//         this(newArrayList(targets.targets()), null);
//     }
//     
//     private LandscapeObservation(Collection<TargetDetail> targets, Set<Sponsor> dohGroup) {
//         this.targets.addAll(targets);
//         this.dohGroup = (null == dohGroup) ? null : new HashSet<Sponsor>(dohGroup);
//     }
// 
//     public LandscapeObservation add(TargetDetailGroup group) {
//         if (null == group) {
//             return this;
//         }
//         final LandscapeObservation result = new LandscapeObservation(targets, dohGroup);
//         result.targets.addAll(newArrayList(group.targets()));
//         return result;
//     }
// 
//     public List<TargetDetail> targets() {
//         return new ArrayList<TargetDetail>(targets);
//     }
//     
//     public Set<Sponsor> dohGroup() {
//         return (null == dohGroup) ? new HashSet<Sponsor>() : new HashSet<Sponsor>(dohGroup);
//     }
// 
//     public LandscapeObservation withDoh(Set<Sponsor> dohGroup) {
//         return new LandscapeObservation(this.targets, dohGroup);
//     }
// 
//     public LandscapeObservation forSponsor(final Sponsor sponsor) {
//         return new LandscapeObservation(filter(targets, onSponsor(sponsor)), dohGroup);
//     }
// 
//     private Predicate<TargetDetail> onSponsor(final Sponsor sponsor) {
//         return new Predicate<TargetDetail>() {
//             @Override
//             public boolean apply(TargetDetail input) {
//                 return input.sponsors().contains(sponsor);
//             }
//         };
//     }
// 
// }


// Path: src/main/java/org/netmelody/cieye/server/response/responder/LandscapeObservationResponder.java
import static java.lang.Math.min;
import java.io.IOException;
import com.google.common.base.Function;
import com.google.common.base.Functions;
import org.netmelody.cieye.core.domain.Feature;
import org.netmelody.cieye.core.domain.Landscape;
import org.netmelody.cieye.core.domain.LandscapeObservation;
import org.netmelody.cieye.server.CiSpyIntermediary;
import org.netmelody.cieye.server.TargetGroupBriefing;
import org.netmelody.cieye.server.response.CiEyeResponder;
import org.netmelody.cieye.server.response.CiEyeResponse;
import org.netmelody.cieye.server.response.JsonTranslator;
import org.netmelody.cieye.server.response.Prison;
import org.simpleframework.http.Request;

package org.netmelody.cieye.server.response.responder;




public final class LandscapeObservationResponder implements CiEyeResponder {

    private final CiSpyIntermediary spyIntermediary;
    private final Landscape landscape;
    private final Prison prison;

    private final Function<LandscapeObservation, LandscapeObservation> converter;
