<commit_before>/*****************************************************************************
 *  Limpet - the Lightweight InforMation ProcEssing Toolkit
 *  http://limpet.info
 *
 *  (C) 2015-2016, Deep Blue C Technologies Ltd
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the Eclipse Public License v1.0
 *  (http://www.eclipse.org/legal/epl-v10.html)
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *****************************************************************************/
package info.limpet.operations.spatial.msa;

import info.limpet.ICommand;
import info.limpet.IContext;
import info.limpet.IDocument;
import info.limpet.IOperation;
import info.limpet.IStoreGroup;
import info.limpet.IStoreItem;
import info.limpet.impl.Document;
import info.limpet.impl.LocationDocument;
import info.limpet.impl.NumberDocument;
import info.limpet.impl.NumberDocumentBuilder;
import info.limpet.impl.SampleData;
import info.limpet.impl.StoreGroup;
import info.limpet.operations.AbstractCommand;
import info.limpet.operations.CollectionComplianceTests;
import info.limpet.operations.CollectionComplianceTests.TimePeriod;
import info.limpet.operations.spatial.IGeoCalculator;

import java.awt.geom.Point2D;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;

import javax.measure.unit.SI;
import javax.measure.unit.Unit;

public class BistaticAngleOperation implements IOperation
{

  private final CollectionComplianceTests aTests =
      new CollectionComplianceTests();

  public abstract class BistaticAngleCommand extends AbstractCommand
  {
    private final IDocument<?> _timeProvider;
    final private NumberDocumentBuilder _azimuthBuilder;
    final protected NumberDocumentBuilder _bistaticBuilder;
    final protected NumberDocumentBuilder _bistaticAspectBuilder;
    final private Unit<?> _outputUnits;
    final private LocationDocument _transmitter;
    final private LocationDocument _receiver;
    final private IStoreGroup _target;

    public BistaticAngleCommand(final List<IStoreItem> selection,
        final IStoreGroup target, final LocationDocument tx,
        final LocationDocument rx, final IStoreGroup store,
        final IDocument<?> timeProvider, final IContext context)
    {
      super("Bistatic angle at:" + target.getName() + " from "
          + tx.getName() + " to:" + rx.getName(),
          "Calculate bistatic angle at:" + target.getName() + " from "
              + tx.getName() + " to:" + rx.getName(), store, false, false,
          selection, context);

      // special processing.
      // we generate our own list of inputs, so clear the existing list
      getInputs().clear();

      _timeProvider = timeProvider;
      _transmitter = tx;
      _receiver = rx;
      _target = target;
      _outputUnits = SampleData.DEGREE_ANGLE;
      final Unit<?> indexUnits =
          _timeProvider == null ? null : SampleData.MILLIS;
      _azimuthBuilder =
          new NumberDocumentBuilder("Aximuth Angle at:" + target.getName(),
              _outputUnits, null, indexUnits);
      _bistaticBuilder =
          new NumberDocumentBuilder("Bistatic Angle at:" + target.getName(),
              _outputUnits, null, indexUnits);
      _bistaticAspectBuilder =
          new NumberDocumentBuilder("Bistatic Aspect Angle at:"
              + target.getName(), _outputUnits, null, indexUnits);
    }
<commit_msg>Improve the name (so it works properly in drop-down), declare ourselves as predecessor<commit_after>/*****************************************************************************
 *  Limpet - the Lightweight InforMation ProcEssing Toolkit
 *  http://limpet.info
 *
 *  (C) 2015-2016, Deep Blue C Technologies Ltd
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the Eclipse Public License v1.0
 *  (http://www.eclipse.org/legal/epl-v10.html)
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *****************************************************************************/
package info.limpet.operations.spatial.msa;

import info.limpet.ICommand;
import info.limpet.IContext;
import info.limpet.IDocument;
import info.limpet.IOperation;
import info.limpet.IStoreGroup;
import info.limpet.IStoreItem;
import info.limpet.impl.Document;
import info.limpet.impl.LocationDocument;
import info.limpet.impl.NumberDocument;
import info.limpet.impl.NumberDocumentBuilder;
import info.limpet.impl.SampleData;
import info.limpet.impl.StoreGroup;
import info.limpet.operations.AbstractCommand;
import info.limpet.operations.CollectionComplianceTests;
import info.limpet.operations.CollectionComplianceTests.TimePeriod;
import info.limpet.operations.spatial.IGeoCalculator;

import java.awt.geom.Point2D;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;

import javax.measure.unit.SI;
import javax.measure.unit.Unit;

public class BistaticAngleOperation implements IOperation
{

  private final CollectionComplianceTests aTests =
      new CollectionComplianceTests();

  public abstract class BistaticAngleCommand extends AbstractCommand
  {
    private final IDocument<?> _timeProvider;
    final private NumberDocumentBuilder _azimuthBuilder;
    final protected NumberDocumentBuilder _bistaticBuilder;
    final protected NumberDocumentBuilder _bistaticAspectBuilder;
    final private Unit<?> _outputUnits;
    final private LocationDocument _transmitter;
    final private LocationDocument _receiver;
    final private IStoreGroup _target;

    public BistaticAngleCommand(final List<IStoreItem> selection,
        final IStoreGroup target, final LocationDocument tx,
        final LocationDocument rx, final IStoreGroup store,
        final IDocument<?> timeProvider, final IContext context)
    {
      super("Bistatic angle at:" + target.getName() + " from "
          + tx.getName() + " to:" + rx.getName(),
          "Calculate bistatic angles", store, false, false,
          selection, context);

      // special processing.
      // we generate our own list of inputs, so clear the existing list
      getInputs().clear();

      _timeProvider = timeProvider;
      _transmitter = tx;
      _receiver = rx;
      _target = target;
      _outputUnits = SampleData.DEGREE_ANGLE;
      final Unit<?> indexUnits =
          _timeProvider == null ? null : SampleData.MILLIS;
      _azimuthBuilder =
          new NumberDocumentBuilder("Aximuth Angle at:" + target.getName(),
              _outputUnits, this, indexUnits);
      _bistaticBuilder =
          new NumberDocumentBuilder("Bistatic Angle at:" + target.getName(),
              _outputUnits, this, indexUnits);
      _bistaticAspectBuilder =
          new NumberDocumentBuilder("Bistatic Aspect Angle at:"
              + target.getName(), _outputUnits, this, indexUnits);
    }

{'fraction_non_alphanumeric': 0.12258512856150104, 'fraction_numerical': 0.003613620569840167, 'mean_word_length': 3.9593383873190904, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '682234', 'n_tokens_mistral': 1952, 'n_tokens_neox': 1911, 'n_words': 540}