private ILocalCollectionTarget GetLocalTarget()
        {
            IPivotCollectionTarget deepestTarget = this.Target;

            while (deepestTarget is PivotCollectionTargetFilter)
            {
                deepestTarget = ((PivotCollectionTargetFilter)deepestTarget).Target;
            }
            if ((deepestTarget is ILocalCollectionTarget) == false)
            {
                throw new ArgumentException("Target chain must end with a ILocalCollectionTarget");
            }

            return((ILocalCollectionTarget)deepestTarget);
        }
 /// <summary>
 /// Creates a source image copy target filter with a given delegate collection target.
 /// </summary>
 /// <param name="target">the collection target to which the collection should be written after the source images
 /// have been copied</param>
 public SourceImageCopyTargetFilter(IPivotCollectionTarget target)
     : base(target)
 {
     // Do nothing.
 }
Beispiel #3
0
 /// <summary>
 /// Creates a new collection target filter with a given delegate collection target.
 /// </summary>
 /// <param name="target">the collection target to which the transformed source collection should be
 /// written</param>
 public PivotCollectionTargetFilter(IPivotCollectionTarget target)
 {
     this.Target = target;
 }
Beispiel #4
0
        public void ParseArgs(List<List<String>> args)
        {
            foreach (List<String> argGroup in args)
            {
                String argName = argGroup[0];

                if ((argName == "help") || (argName == "?"))
                {
                    this.PrintHelp();
                }
                else if (argName == "debug")
                {
                    if (Debugger.IsAttached == false) Debugger.Launch();
                }
                else if (argName == "source")
                {
                    if (argGroup.Count != 3) this.Fail("Expected 2 arguments for /source");

                    String name = argGroup[1] + "-source";
                    if (this.AniseEngine.ContainsObject(name) == false) this.Fail("Unknown source type: " + argGroup[1]);

                    m_currentSource = this.AniseEngine.GetObject<IPivotCollectionSource>(name);
                }
                else if (argName == "target")
                {
                    if (argGroup.Count != 3) this.Fail("Expected 2 arguments for /target");

                    String name = argGroup[1] + "-target";
                    if (this.AniseEngine.ContainsObject(name) == false) this.Fail("Unknown target type: " + argGroup[1]);

                    m_currentTarget = this.AniseEngine.GetObject<IPivotCollectionTarget>(name);
                }
                else
                {
                    String objectName = argName + "-filter";
                    if (this.AniseEngine.ContainsObject(objectName) == false)
                    {
                        Log.Error("Unsupported argument: " + argName);
                        this.Exit(false);
                    }

                    PivotCollectionSourceFilter filter =
                        this.AniseEngine.GetObject<PivotCollectionSourceFilter>(objectName);
                    filter.Source = m_currentSource;
                    m_currentSource = filter;
                }
            }
        }
Beispiel #5
0
 /// <summary>
 /// Creates a new source-to-target filter adapter using a given source filter, and a given delegate collection
 /// target.
 /// </summary>
 /// <param name="target">the collection target to which a collection stream is written after the source filter
 /// has been applied</param>
 /// <param name="sourceFilter">the source filter to be applied to a given collection stream</param>
 /// <exception cref="ArgumentNullException">if given a null value</exception>
 public SourceToTargetFilterAdapter(IPivotCollectionTarget target, PivotCollectionSourceFilter sourceFilter)
     : base(target)
 {
     this.SourceFilter = sourceFilter;
 }
 /// <summary>
 /// Creates a new DeepZoom target filter using the given delegate collection target.
 /// </summary>
 /// <param name="target">the delegate target to which a collection source will be written after it has been
 /// transformed to using DeepZoom artifacts for images</param>
 /// <exception cref="ArgumentNullException">if given a null value</exception>
 public DeepZoomTargetFilter(IPivotCollectionTarget target)
     : base(target)
 {
     m_sourceFilter = new DeepZoomSourceFilter(NullCollectionSource.Instance, this.BasePath);
 }
 /// <summary>
 /// Creates a source image copy target filter with a given delegate collection target.
 /// </summary>
 /// <param name="target">the collection target to which the collection should be written after the source images
 /// have been copied</param>
 public SourceImageCopyTargetFilter(IPivotCollectionTarget target)
     : base(target)
 {
     // Do nothing.
 }
 /// <summary>
 /// Creates a new collection target filter with a given delegate collection target.
 /// </summary>
 /// <param name="target">the collection target to which the transformed source collection should be
 /// written</param>
 public PivotCollectionTargetFilter(IPivotCollectionTarget target)
 {
     this.Target = target;
 }
 /// <summary>
 /// Creates a new source-to-target filter adapter using a given source filter, and a given delegate collection
 /// target.
 /// </summary>
 /// <param name="target">the collection target to which a collection stream is written after the source filter
 /// has been applied</param>
 /// <param name="sourceFilter">the source filter to be applied to a given collection stream</param>
 /// <exception cref="ArgumentNullException">if given a null value</exception>
 public SourceToTargetFilterAdapter(IPivotCollectionTarget target, PivotCollectionSourceFilter sourceFilter)
     : base(target)
 {
     this.SourceFilter = sourceFilter;
 }