package xal.smf.impl;

import xal.smf.*;
import xal.smf.attr.*;
import xal.smf.impl.qualify.*;
import xal.ca.*;


/** 
 * The implementation of the Dipole element. This class contains
 * the basic members and methods of main dipoles. Note that
 * there are other classes (e.g. dipoleCorr) that extend this class.
 * 
 * @author  J. Galambos (jdg@ornl.gov)
 */

abstract public class Dipole extends Electromagnet {
	// static initializer
    static {
        registerType();
    }

    
    /** Register type for qualification */
    private static void registerType() {
        ElementTypeManager typeManager = ElementTypeManager.defaultManager();
        typeManager.registerType(Dipole.class, "dipole");
        typeManager.registerType(Dipole.class, MagnetType.DIPOLE);
    }
  
    
    /**
     * Constructor
	 * @param strID the dipole's unique ID
     */    
    public Dipole( final String strID )     { 
        super( strID );
        
    }
    

    /**
	 * Determine if this magnet has the specified pole
	 * @param pole the pole against which to compare this magnet's pole
	 */
    public boolean isPole( final String pole ) {
        return pole.equals( MagnetType.DIPOLE );
    }
    
    
    /** returns design bend angle of the dipole (deg) */
    public double getBendAngle() {
        return m_bucMagnet.getBendAngle();  // 
    }
}

@@ -407,16 +407,109 @@
 agnet %7B%0A
+%09/** type for this device */%0A    public static final String s_strType = MagnetType.DIPOLE;%0A%0A%0A
 %09// stat
@@ -523,16 +523,16 @@
 ializer%0A
-
     stat
@@ -664,16 +664,22 @@
         
+final 
 ElementT
@@ -765,32 +765,33 @@
 er.registerType(
+ 
 Dipole.class, %22d
@@ -792,16 +792,25 @@
 ss, 
-%22d
+D
 ipole
-%22
+.s_strType 
 );%0A 
@@ -841,16 +841,17 @@
 terType(
+ 
 Dipole.c
@@ -856,33 +856,25 @@
 .class, 
-MagnetType.DIPOLE
+%22dipole%22 
 );%0A    %7D
@@ -1041,22 +1041,95 @@
        %0A
-
     %7D%0A
+%0A%0A%09/** get the type */%0A%09public String getType() %7B%0A%09%09return s_strType;%0A%09%7D%0A
     %0A%0A  

Fix bug in which the s_strType was not specified for the Dipole class resulting in all electromagnets being fetched when using sequence.getNodesOfType( Dipole.s_strType ). Now this call will only return devices which are subclassed from Dipole.