Available online 8 June 2011.
Sensitive magnetometry has been established as a powerful technique for the characterization and testing of materials, with the most demanding applications relying on SQUID magnetometers operating at cryogenic temperatures. The recent development of compact, non-cryogenic atomic magnetometers with sub-femtotesla sensitivity and easy sample access has opened up a number of new possibilities. We give examples of sample thermal demagnetization measurements with sensitivity better than 10−9 emu/Hz½ up to 420 °C and of magnetic detection of water droplets on an aluminum surface. Recent research on magnetometry with laser-cooled atoms and color centers in diamond promises to extend the reach of atomic magnetic sensors to the micro- and nanoscale.
Measurement of the magnetic field is one of the most basic material characterization techniques, informing on both fundamental magnetic properties of the material and the nature of any defects or inclusions. A large number of methods are commonly used for magnetic material characterization. For example, Superconducting Quantum Interference Device (SQUID) based Magnetic Property Measurement Systems are fairly standard equipment in many laboratories. More specialized instruments include scanning SQUID1 and Hall probe2 microscopes. Here we review another magnetometry technique that is based on the spin precession of atoms. Recent progress in this field makes atomic magnetometry more suitable than SQUIDs for material characterization under some conditions. We give an example of a practical measurement system and briefly summarize new techniques that may result in even greater capabilities in the near future.
SQUID magnetometers have been recognized as the most advanced tool for magnetic characterization due to their high sensitivity and ability to operate in a large magnetic field. SQUID magnetometers with centimeter-sized pick-up coils can reach a sensitivity down to 1 fT/Hz½3. The pick-up coil can be easily arranged in a gradiometer configuration to reduce sensitivity to ambient field fluctuations. Furthermore, SQUIDs are differential sensors, so they naturally measure a change of the magnetic field when a sample is introduced into the system, even in the presence of a large constant magnetic field. These advantages of SQUIDs are balanced by some limitations. They require cryogenic cooling since the basic operating principles rely on the superconductivity of both the Josephson junctions in the SQUID and the pick-up coil flux transformer. High-Tc SQUIDs cooled with liquid nitrogen have become fairly common, but still suffer from one to two orders of magnitude loss in sensitivity compared with low-Tc SQUIDs, particularly at low frequencies4. The cryogenic requirements limit the temperature range of samples that can be studied with SQUIDs. Radiation shields are usually used to separate the sample from the sensor, but they introduce additional magnetic field noise due to Johnson currents5. The high sensitivity of SQUIDs to RF interference requires extensive shielding and presents challenges for their use outside of the laboratory.
Atomic magnetometers were initially introduced for monitoring the Earth's field6 and have become quite common for measurements of magnetic fields outside of the lab. They rely on accurate measurement of the Larmor spin precession frequency of electrons in a magnetic field.
Alkali-metal atoms (K, Rb, and Cs) with an unpaired valence electron are commonly used because of their high vapor pressure and convenient optical transitions, which can easily be accessed with diode lasers. The gyromagnetic ratio γ in alkali-metal atoms is modified from that of a free electron due to the hyperfine interaction with the nuclear spin and is generally on the order of 2π × 5 kHz/μT. Atomic magnetometers are sensitive to the total value of the magnetic field, unlike SQUIDs which measure a change in the magnetic field. Therefore it is easiest to operate an atomic magnetometer in a low field, typically below 1 mT, although it should be possible to push their operating range to the Tesla regime with microwave and high-bandwidth optical techniques.
(2) where N is the number of atoms, T2 is their spin-coherence time related to the magnetic resonance linewidth by 1/T2 = Δω, and t is the measurement time. Not surprisingly, a narrower magnetic resonance and larger number of atoms leads to a small uncertainty in the frequency of spin precession and more accurate measurements of the magnetic field.
(3) where v 500 m/sec is the thermal velocity of atoms, n is their density, and σ is the spin-relaxation cross-section. The dominant spin relaxation mechanism for alkali-metal atoms is spin-exchange collisions8, which have a relatively large cross-section of σ = 2 × 10−18 m2. Combining (1), (2) and (3), one can see that the best sensitivity that can be obtained in the presence of spin-exchange relaxation is about 1 fT/Hz½ for a 1 cm3 sensor independent of atomic density9. This level of sensitivity is not much better than has already been realized with SQUIDs.
To circumvent this limitation we use the fact that spin relaxation due to spin-exchange collisions in alkali-metal atoms can be eliminated by operating in a very low magnetic field, which was first demonstrated in the 1970s10. The key requirement is that the Larmor frequency is much smaller than the rate of spin-exchange collisions, which is satisfied for fields on the order of 1 nT or less for typical alkali-metal density. In the absence of relaxation due to spin-exchange, the cross-section for spin relaxation that goes into eq. 3 can be as low as σ = 10−22 m2 for K atoms11. This results in fundamental sensitivity limit of less than 0.01 fT/Hz½ for a 1 cm3 sensor.
The large improvement in sensitivity comes at the expense of the requirement that the sensor operates near absolute zero of the magnetic field in all directions. In practice, it is not hard to realize a magnetic field of less than 1 nT using multi-layer magnetic shields and coils inside the shields to zero out residual fields using the magnetometer itself as a 3-axis sensor12. Atomic magnetometers are particularly well suited for measurements of remanent ferromagnetism and other magnetic phenomena that do not require a bias field. Besides higher magnetic sensitivity, they can measure samples over a wide range of temperatures. Since the cell containing alkali metal is typically heated to 150 – 200 °C to achieve sufficient vapor density, it is particularly easy to make measurements with the sample at elevated temperatures. Room temperature measurements can also be easily performed with a minimum amount of thermal insulation.
An example of a high sensitivity atomic magnetometer for materials characterization recently built in our laboratory is shown in Fig. 1. Potassium atoms are contained in a 1 inch spherical glass cell at the center of the apparatus. The cell also contains several atmospheres of helium gas to slow the diffusion of atoms to the walls and 50 torr of N2 to radiationlessly quench the excited state of K atoms, preventing radiation trapping of optical pumping radiation. The cell is surrounded by a boron nitride oven, which is heated to about 200 °C by flowing AC currents at 20 kHz in a tightly twisted pair of high resistivity wires. The inner layer of the magnetic shield is made from a low-loss electrically insulating ferrite material to minimize the magnetic noise from thermal electrical currents13. A set of coils inside the shield allows control of all components of the magnetic field and first order gradients in order to cancel residual magnetic fields at the magnetometer or introduce a known bias field. The K atoms are optically pumped into a spin-polarized state by illumination with several milliwatts of circularly polarized laser light tuned to the D1 optical resonance (4S½→4P½). Changes in the polarization of the atoms due to the magnetic field are probed with a linearly polarized laser perpendicular to the pump. The probe laser beam is detuned from resonance so it is largely transmitted through the cell. The plane of the probe light polarization is rotated by the atoms due to the paramagnetic Faraday effect. For small magnetic fields, the polarization rotation angle is proportional to the magnetic field component perpendicular to both the pump and the probe lasers. The polarization of the transmitted probe light is monitored with a sensitive polarimeter and gives a continuous measurement of the magnetic field with a bandwidth given by the atomic spin-relaxation rate, typically in the range of 5 to 100 Hz. Because of slow diffusion of K atoms, different parts of the cell can be used as independent magnetometers. This allows additional cancellation of the magnetic noise generated by the shields14. In this apparatus the best magnetic field sensitivity of 0.16 fT/Hz½ has been obtained for magnetic field signals near 40 Hz15.
Schematic of an atomic magnetometer with sample access. The cell (a) containing K atoms and buffer gas is located at the center of the ferrite magnetic shield (g). It is heated in a boron-nitride oven (b) to 200 °C with access holes (d) for pump and probe lasers. The sample is introduced through a quartz tube that goes through the shield. The sample can be heated using an electrical oven (f) with diamond heat spreader bars. The sample is shielded from thermal radiation with a patterned gold coating (c). Magnetic coils and water cooling lines are held by G10 form (e). The distance between the centers of the sensor cell and the sample tube is 1 inch.
Reprinted with permission from15 ©American Institute of Physics.
The sample is introduced close to the sensor through a 12 mm ID quartz tube that goes through the length of the apparatus. The distance from the center of the sample tube to the center of the sensor cell is about 1 inch. The sample can be heated by electric heaters mounted on the tube or maintained near room temperature by a gentle flow of air through the tube. We use a single layer of radiation shielding, consisting of a gold coating patterned into 0.3 × 0.3 mm2 electrically isolated squares to reduce magnetic noise from Johnson currents16. The radiation transfer power can be much larger in our system than in a typical cryogenic environment, so we use a single-layer radiation shield instead of multi-layer cryogenic insulation. The sample is typically attached to a long rod and rotated at 5 – 10 Hz, thereby introducing a clear modulation of the signal at a frequency above 1/f noise and allowing simultaneous measurements of the two transverse components of the magnetization. Great care must be taken to minimize magnetic contamination of the sample holder. The best results are obtained using a quartz tube etched in acid with the sample held by suction using a vacuum pump attached to the other end of the tube with a rotary connection. We could not find a glue or cement that can hold the sample without introducing some magnetic contamination.
Two examples of sample measurements are shown in [Fig. 2] and [Fig. 3]. Fig. 2 shows measurements of the remanent magnetization of an ancient dolomite rock as a function of temperature. Such thermal demagnetization measurements are very common in paleomagnetic studies17, but in the past could only be performed with a high sensitivity by repeatedly transferring the sample between a SQUID magnetometer and a magnetically-shielded furnace. The ability to simultaneously heat the sample to as high as 500 °C and measure its magnetization with a sensitivity below 10−9 emu/Hz½ is unique to atomic magnetometers. Atomic magnetometers for the measurement of remanent magnetization in paleomagnetic applications are starting to be commercially developed18.
Measurements of the remanent magnetization of a weakly magnetized dolomite sample as a function of temperature. The sample is continuously rotated while the temperature is slowly increased. The inset shows the spectrum of the magnetometer signal at the highest temperature. The peak at 8 Hz and its harmonics are due to the magnetic field from the sample. Analysis of the signal phase allows independent measurements of the two magnetization components that are orthogonal to the rotation axis. The magnetic moment sensitivity of the magnetometer is below 10−9 emu even at the highest sample temperature.
Reprinted with permission from15. ©American Institute of Physics.
Measurement of magnetic signals from the aluminum surface interaction with water. A small water droplet is placed on an aluminum sample which is then continuously rotated at 7 Hz. The inset shows the relative placement of the sample and alkali-metal cell. The plot shows the magnitude of the magnetic signal at the rotation frequency. At 60 seconds the water droplet evaporates, with the signal dropping to a small residual value due to magnetic contamination of the sample.
Fig. 3 shows the magnetic signals that are generated by surface interactions between aluminum and water. Magnetic signatures of corrosion have previously been studied using SQUID magnetometers19. We have made a few preliminary measurements of this effect using the atomic magnetometer. For this application the sample was held near room temperature by gently blowing air through the access tube. In addition to magnetic signals from corrosive chemicals, such as HCl and NaOH, we have also observed electrochemical magnetic signals using deionized water that are an order of magnitude smaller. We observe a magnetic field that quickly disappears as the water droplet evaporates. The field can be caused by ionic currents due to chemical reaction or possibly due to thermal currents generated by a temperature difference between the evaporating water and aluminum20. No signal is observed if the aluminum surface is coated with a thin polymer coating before the application of the water droplets. The ability to detect weak magnetic signals from the interaction between water and aluminum would be interesting for many non-destructive testing applications, such as the detection of hidden corrosion21.
So far we have focused on atomic magnetic field detectors on the centimeter scale, which is a convenient size for measurements on bulk samples. However, in many materials applications one desires to perform magnetic field scans on a much smaller scale. New atomic magnetometers are currently being developed from the millimeter to nanometer scales and may soon become available for materials characterization applications.
The scaling of hot-vapor alkali-metal magnetometers to smaller dimensions is not particularly favorable. To limit the spin relaxation of atoms on cell walls one has to increase the pressure of the buffer gas to slow down the diffusion of atoms. More frequent collisions of alkali-metal atoms with the buffer gas then result in an additional spin relaxation that broadens the magnetic resonance. One can partly compensate for this loss in sensitivity by increasing the density of the alkali-metal atoms in the cell. However, the spin-relaxation cross-sections quickly increase with temperature22 so the higher temperatures required also lead to increased resonance broadening. Currently the most sensitive millimeter sized sensors are being developed at NIST23 and a sensitivity of 5 fT/Hz½ has been achieved. Such sensors have been used, for example, for magnetorelaxometry measurements of magnetic nanoparticles24. Another approach that may be promising is the use of anti-relaxation coatings, typically made from long hydrocarbon chains, which largely prevent relaxation of alkali-metal atoms on cell walls. Recent studies of alkene coatings show that they allow up to 106 collisions of Rb atoms with cell walls before spin relaxation25. Such coatings may help to scale down the dimensions of the sensor, although so far they have been shown to operate only at relatively low temperatures.
To improve atomic magnetometer spatial resolution to the sub-millimeter size likely requires a different approach. Measurement with laser-cooled and trapped atoms is a natural technique for this length scale, since cold atomic clouds trapped at a focus of a laser beam or held in a microchip magnetic trap typically have dimensions of 10 – 100 μm. Long spin coherence times have been achieved in optical26 and magnetic traps27, but the number of trapped atoms is typically much smaller than used in vapor cells. The overall sensitivity of cold atom sensors is already quite competitive with SQUID magnetic microscopes. Two different approaches are currently being explored in this active area of research. In one approach the frequency of Larmor spin precession of atoms is measured with a probe laser28, just as in hot atom magnetometers. In another approach, one simply measures the density of the atomic cloud in a shallow trap. The extra energy from interaction of the atomic magnetic moment with the magnetic field ΔE = −μ · B leads to a perturbation of the atomic density that can be directly imaged with a laser29. Atoms with a large magnetic moment, such as Dy, have a larger magnetic interaction energy than alkali-metal atoms and may further increase the sensitivity of such sensors30. One of the challenges of using cold trapped atoms for sample studies is the requirement that they operate in ultra-high-vacuum (UHV); typically 10−10 – 10−11 Torr, since any collision with background gas will eject the atoms from the trap. Therefore all samples would have to be introduced through a load-lock system compatible with a UHV environment or placed behind a very thin vacuum window.
Another technique currently being explored for sensitive magnetometry uses nitrogen-vacancy (NV) color centers in diamond31. This crystal defect, consisting of a nitrogen substitution next to a carbon vacancy with overall negative charge, is paramagnetic and has very favorable optical and coherence properties. The level diagram of the color center is shown in Fig. 4. The ground state has electron spin S = 1 with a splitting between mS = 0 and mS = ±1 states of 2.8 GHz due to magnetic spin-spin interactions with the applied field. In the presence of a magnetic field the mS = ±1 states are further split by the electron magnetic moment interaction. The color center can be optically excited using a laser at a convenient green wavelength, such as 532 nm, and decays back by emitting florescence at 637 nm. However, the fluorescence properties of mS = 0 and mS = ±1 states are different. Whereas color centers excited from the mS = 0 state are quickly cycled back to the mS = 0 state, those excited from the mS = ±1 states have a significant probability of decaying to a metastable singlet state, where they remain for 200 – 500 ns32 before decaying back to the mS = 0 state. Thus, the initial rate of 637 nm fluorescence depends on the spin state of the color center, whereas after a sufficiently long time all color centers are optically pumped into the mS = 0. The spin coherence of the ground state is also surprisingly long for a solid state system, reaching T2 = 2 ms for specially prepared diamond samples depleted in 13C isotope33. Microwaves are used to measure the frequency of the magnetic field-dependent ΔmS = ±1 transitions to determine the magnetic field. A bias field of several mT is applied parallel to the crystal axis of the NV center to split the ΔmS = ±1 transitions, so that they can be resolved individually with microwave spectroscopy. Furthermore, because of local magnetic field fluctuations usually caused by the natural abundance of 13C nuclear spins, the highest sensitivity is realized for AC magnetic fields at a frequency of 1 to 100 kHz which are applied synchronously with a microwave spin-echo sequence34. Since the signal is measured by simply detecting the intensity of the fluorescence, a CCD camera can be used to directly image the distribution of the magnetic fields35. So far single NV color centers have reached magnetic field sensitivity of 4 nT/Hz33 whereas continuous magnetic field mapping can be realized with 20 nT/Hz½ sensitivity and 250 nm resolution36, close to the sensitivity of LHe-cooled SQUIDs on this length scale. The main advantage of diamond color centers is their ability to operate under ambient conditions and over a wide range of temperatures, without the need for UHV. One of the first examples of such measurements is the detection of the Meissner effect in a high-Tc superconductor with a diamond magnetometer37.
Energy levels of NV− color centers in diamond. The ground state of the color center has electron spin S = 1. Optical excitation of the m = 0 state at 532 nm brings the color center back to the m = 0 state by emission of a 637 nm photon. Following optical excitation of the m = ± 1 states the color center has a 30 % probability of decaying into a metastable singlet state, resulting in a reduction of the fluorescence signal. This spin-dependent difference of the optical scattering properties allows simple optical preparation and detection of the electron spin. Microwave transitions between m = 0 and m = ± 1 states are used to measure the magnetic field energy shift, μB.
In conclusion, atomic magnetometers have been undergoing rapid development over the last few years. Some of the first atomic sensors suitable for material characterization will soon start to enter the commercial market. They can achieve higher magnetic field sensitivities than SQUID magnetometers and can easily make measurements on samples heated well above room temperature. However, unlike SQUIDs, atomic magnetometers are absolute field sensors and do not easily allow application of large bias fields, in fact, they achieve the highest sensitivity at zero magnetic field. Presently the most sensitive atomic sensors operate on a centimeter length scale. However, active research is ongoing in laser-cooled atom magnetometers and color centers in diamond that should be able to achieve impressive sensitivities on the micron and nanometer scale. Such magnetometers may eventually replace SQUID, Hall, and magnetic force resonance microscopy (MFRM) probes in a variety of magnetic microscopy applications. At the same time, absence of cryogenics should allow atomic magnetic sensors to gain wider acceptance in industrial and geophysical applications.
7 D. Budker and M. Romalis, Nature Phys 3 (2007), p. 227.


Maria Raquel is a Colombian singer with a unique and powerful voice that combines Latin American rhythms including salsa, son Cubano, cumbias, and boleros. A performance not to be missed!!
Maria Raquel Band at Terraza 7 on Friday July 13th, 2018 at 10:00 pm.


text:
package org.apache.oodt.cas.workflow.repository;

import org.apache.oodt.cas.workflow.examples.NoOpTask;
import org.apache.oodt.cas.workflow.structs.*;
import org.apache.oodt.cas.workflow.structs.exceptions.RepositoryException;
import org.apache.oodt.cas.workflow.util.DbStructFactory;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.sql.DataSource;

/**
 *
 * A {@link DataSource}-based implementation of a workflow repository.
 *
 * @author mattmann
 * @version $Revision$
 */
public class DataSourceWorkflowRepository implements WorkflowRepository {

  /* our data source */
  private DataSource dataSource = null;

  /* our log stream */
  private Logger LOG = Logger.getLogger(DataSourceWorkflowRepository.class
      .getName());

  /**
   * <p>
   * Default Constructor
   * </p>
   * .
   */
  public DataSourceWorkflowRepository(DataSource ds) {
    dataSource = ds;
  }

  /*
   * (non-Javadoc)
   *
   * @see
   * org.apache.oodt.cas.workflow.repository.WorkflowRepository#getWorkflowByName
   * (java.lang.String)
   */
  public Workflow getWorkflowByName(String workflowName)
      throws RepositoryException {
    return getWorkflowByName(workflowName, true, true);
  }

  public Workflow getWorkflowByName(String workflowName, boolean getTasks,
      boolean getConditions) throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    Workflow workflow = null;

    try {
      if(dataSource!=null) {
        conn = dataSource.getConnection();
      }
      else{
        throw new RepositoryException("Null datasource");
      }
      statement = conn.createStatement();

      String getWorkflowSql = "SELECT * from workflows WHERE workflow_name = '"
          + workflowName + "'";

      LOG.log(Level.FINE, "getWorkflowByName: Executing: " + getWorkflowSql);
      rs = statement.executeQuery(getWorkflowSql);

      while (rs.next()) {
        workflow = DbStructFactory.getWorkflow(rs);

        if (getTasks) {
          workflow.setTasks(getTasksByWorkflowId(workflow.getId()));
        }

        if (getConditions) {
          workflow.setConditions(getConditionsByWorkflowId(workflow.getId()));
          handleGlobalWorkflowConditions(workflow);
        }
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING,
          "Exception getting workflow. Message: " + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(
            Level.SEVERE,
            "Unable to rollback getWorkflowByName transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return workflow;
  }

  /*
   * (non-Javadoc)
   *
   * @see
   * org.apache.oodt.cas.workflow.repository.WorkflowRepository#getWorkflowById
   * (java.lang.String)
   */
  public Workflow getWorkflowById(String workflowId) throws RepositoryException {
    return getWorkflowById(workflowId, true, true);
  }

  public Workflow getWorkflowById(String workflowId, boolean getTasks,
      boolean getConditions) throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    Workflow workflow = null;

    try {

      if(dataSource!=null) {
        conn = dataSource.getConnection();
      }
      else{
        throw new RepositoryException("Null datasource");
      }      statement = conn.createStatement();

      String getWorkflowSql = "SELECT * from workflows WHERE workflow_id = '"
          + workflowId + "'";

      LOG.log(Level.FINE, "getWorkflowById: Executing: " + getWorkflowSql);
      rs = statement.executeQuery(getWorkflowSql);

      while (rs.next()) {
        workflow = DbStructFactory.getWorkflow(rs);

        if (getTasks) {
          workflow.setTasks(getTasksByWorkflowId(workflow.getId()));
        }

        if (getConditions) {
          workflow.setConditions(getConditionsByWorkflowId(workflow.getId()));
          handleGlobalWorkflowConditions(workflow);
        }
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING,
          "Exception getting workflow. Message: " + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(
            Level.SEVERE,
            "Unable to rollback getWorkflowById transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return workflow;
  }

  /*
   * (non-Javadoc)
   *
   * @see
   * org.apache.oodt.cas.workflow.repository.WorkflowRepository#getWorkflows()
   */
  public List getWorkflows() throws RepositoryException {
    return getWorkflows(true, true);
  }

  public List getWorkflows(boolean getTasks, boolean getConditions)
      throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    List workflows = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getWorkflowSql = "SELECT * from workflows";

      LOG.log(Level.FINE, "getWorkflows: Executing: " + getWorkflowSql);
      rs = statement.executeQuery(getWorkflowSql);
      workflows = new Vector();

      while (rs.next()) {
        Workflow workflow = DbStructFactory.getWorkflow(rs);

        if (getTasks) {
          workflow.setTasks(getTasksByWorkflowId(workflow.getId()));
        }

        if (getConditions) {
          workflow.setConditions(getConditionsByWorkflowId(workflow.getId()));
          handleGlobalWorkflowConditions(workflow);
        }

        workflows.add(workflow);
      }

      if (workflows.size() == 0) {
        workflows = null;
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING,
          "Exception getting workflows. Message: " + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(
            Level.SEVERE,
            "Unable to rollback getWorkflows transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return workflows;
  }

  public List getTasksByWorkflowId(String workflowId)
      throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    List tasks = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getTasksSql = "SELECT workflow_tasks.*, workflow_task_map.task_order "
          + "FROM workflow_tasks, workflow_task_map "
          + "WHERE workflow_task_map.workflow_task_id = workflow_tasks.workflow_task_id "
          + "AND workflow_task_map.workflow_id = "
          + workflowId
          + " "
          + "ORDER BY workflow_task_map.task_order";

      LOG.log(Level.FINE, "getTasksByWorkflowId: Executing: " + getTasksSql);
      rs = statement.executeQuery(getTasksSql);
      tasks = new Vector();

      while (rs.next()) {
        // get an instance of the class name

        WorkflowTask task = DbStructFactory.getWorkflowTask(rs, true);

        if (task != null) {
          task.setConditions(getConditionsByTaskId(task.getTaskId()));
          task.setTaskConfig(getConfigurationByTaskId(task.getTaskId()));
          tasks.add(task);
        }
      }

      if (tasks.size() == 0) {
        tasks = null;
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING, "Exception getting tasks for workflow. Message: "
          + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getTasksByWorkflowId transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return tasks;
  }

  public List<WorkflowTask> getTasksByWorkflowName(String workflowName)
      throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    List<WorkflowTask> tasks = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getTasksSql = "SELECT workflow_tasks.*, workflow_task_map.task_order "
          + "FROM workflow_tasks, workflow_task_map, workflows "
          + "WHERE workflow_task_map.workflow_task_id = workflow_tasks.workflow_task_id "
          + "AND workflow_task_map.workflow_id = workflows.workflow_id "
          + "AND workflows.workflow_name = '"
          + workflowName
          + "' "
          + "ORDER BY workflow_task_map.task_order";

      LOG.log(Level.FINE, "getTasksByWorkflowName: Executing: " + getTasksSql);
      rs = statement.executeQuery(getTasksSql);
      tasks = new Vector();

      while (rs.next()) {
        // get an instance of the class name
        WorkflowTask task = DbStructFactory.getWorkflowTask(rs, true);

        if (task != null) {
          task.setConditions(getConditionsByTaskId(task.getTaskId()));
          task.setTaskConfig(getConfigurationByTaskId(task.getTaskId()));
          tasks.add(task);
        }
      }

      if (tasks.size() == 0) {
        tasks = null;
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING, "Exception getting tasks for workflow. Message: "
          + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getTasksByWorkflowName transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return tasks;
  }

  public List<Workflow> getWorkflowsForEvent(String eventName) throws RepositoryException {
    return getWorkflowsForEvent(eventName, true, true);
  }

  public List<Workflow> getWorkflowsForEvent(String eventName, boolean getTasks,
      boolean getConditions) throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    List<Workflow> workflows = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getWorkflowSql = "SELECT * from workflows, event_workflow_map WHERE event_workflow_map.workflow_id = workflows.workflow_id  "
          + "AND event_workflow_map.event_name = '" + eventName + "'";

      LOG.log(Level.FINE, "getWorkflowsForEvent: Executing: " + getWorkflowSql);
      rs = statement.executeQuery(getWorkflowSql);
      workflows = new Vector();

      while (rs.next()) {
        Workflow workflow = DbStructFactory.getWorkflow(rs);

        if (getTasks) {
          workflow.setTasks(getTasksByWorkflowId(workflow.getId()));
        }

        if (getConditions) {
          workflow.setConditions(getConditionsByWorkflowId(workflow.getId()));
          handleGlobalWorkflowConditions(workflow);
        }

        workflows.add(workflow);
      }

      if (workflows.size() == 0) {
        workflows = null;
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING, "Exception getting workflows for event. Message: "
          + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getWorkflowsForEvent transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return workflows;
  }

  /*
   * (non-Javadoc)
   *
   * @see org.apache.oodt.cas.workflow.repository.WorkflowRepository#
   * getConditionsByTaskName(java.lang.String)
   */
  public List<WorkflowCondition> getConditionsByTaskName(String taskName)
      throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    List conditions = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getConditionsSql = "SELECT workflow_conditions.*, task_condition_map.condition_order "
          + "FROM workflow_conditions, task_condition_map, workflow_tasks "
          + "WHERE task_condition_map.workflow_condition_id = workflow_conditions.workflow_condition_id "
          + "AND task_condition_map.workflow_task_id = workflow_tasks.workflow_task_id "
          + "AND workflow_tasks.workflow_task_name = '"
          + taskName
          + "' "
          + "ORDER BY task_condition_map.condition_order";

      LOG.log(Level.FINE, "getConditionsByTaskName: Executing: "
          + getConditionsSql);
      rs = statement.executeQuery(getConditionsSql);
      conditions = new Vector();

      while (rs.next()) {
        // get an instance of the class name
        WorkflowCondition condition = DbStructFactory.getWorkflowCondition(rs,
            true);
        conditions.add(condition);
      }

      if (conditions.size() == 0) {
        conditions = null;
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING, "Exception getting conditions for task. Message: "
          + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getConditionsByTaskName transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return conditions;
  }

  /*
   * (non-Javadoc)
   *
   * @see org.apache.oodt.cas.workflow.repository.WorkflowRepository#
   * getConditionsByTaskId(java.lang.String)
   */
  public List getConditionsByTaskId(String taskId) throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    List conditions = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getConditionsSql = "SELECT workflow_conditions.*, task_condition_map.condition_order "
          + "FROM workflow_conditions, task_condition_map "
          + "WHERE task_condition_map.workflow_condition_id = workflow_conditions.workflow_condition_id "
          + "AND task_condition_map.workflow_task_id = "
          + taskId
          + " "
          + "ORDER BY task_condition_map.condition_order";

      LOG.log(Level.FINE, "getConditionsByTaskId: Executing: "
          + getConditionsSql);
      rs = statement.executeQuery(getConditionsSql);
      conditions = new Vector();

      while (rs.next()) {
        // get an instance of the class name
        WorkflowCondition condition = DbStructFactory.getWorkflowCondition(rs,
            true);
        conditions.add(condition);
      }

      if (conditions.size() == 0) {
        conditions = null;
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING, "Exception getting conditions for task. Message: "
          + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getConditionsByTaskId transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return conditions;
  }

  public WorkflowTaskConfiguration getConfigurationByTaskId(String taskId)
      throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    WorkflowTaskConfiguration config = null;

    try {
      if(dataSource!=null) {
        conn = dataSource.getConnection();
      }
      else{
        throw new RepositoryException("Null data source");
      }
      statement = conn.createStatement();

      String getConfigurationSql = "SELECT * from workflow_task_configuration WHERE workflow_task_id = "
          + taskId;

      LOG.log(Level.FINE, "getConfigurationByTaskId: Executing: "
          + getConfigurationSql);
      rs = statement.executeQuery(getConfigurationSql);

      config = new WorkflowTaskConfiguration();
      while (rs.next()) {
        config.getProperties().put(rs.getString("property_name"),
            rs.getString("property_value"));
      }

      if (config.getProperties().keySet().size() == 0) {
        config = null;
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING,
          "Exception getting task configuration for taskId: " + taskId
              + " Message: " + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getConfigurationBytaskId transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return config;
  }

  public WorkflowConditionConfiguration getConfigurationByConditionId(
      String condId) throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    WorkflowConditionConfiguration config = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getConfigurationSql = "SELECT * from workflow_condition_configuration WHERE workflow_condition_id = "
          + condId;

      LOG.log(Level.FINE, "getConfigurationByConfigurationId: Executing: "
          + getConfigurationSql);
      rs = statement.executeQuery(getConfigurationSql);

      config = new WorkflowConditionConfiguration();
      while (rs.next()) {
        config.getProperties().put(rs.getString("property_name"),
            rs.getString("property_value"));
      }

      if (config.getProperties().keySet().size() == 0) {
        config = null;
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING,
          "Exception getting task configuration for condId: " + condId
              + " Message: " + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getConfigurationByConfigurationId transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return config;
  }

  /*
   * (non-Javadoc)
   *
   * @see
   * org.apache.oodt.cas.workflow.repository.WorkflowRepository#getWorkflowTaskById
   * (java.lang.String)
   */
  public WorkflowTask getWorkflowTaskById(String taskId)
      throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    WorkflowTask task = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getTaskSql = "SELECT * FROM workflow_tasks WHERE workflow_task_id = "
          + taskId;

      LOG.log(Level.FINE, "getWorkflowTaskById: Executing: " + getTaskSql);
      rs = statement.executeQuery(getTaskSql);

      while (rs.next()) {
        // get an instance of the class name
        task = DbStructFactory.getWorkflowTask(rs, false);
        task.setConditions(getConditionsByTaskId(task.getTaskId()));
        task.setTaskConfig(getConfigurationByTaskId(task.getTaskId()));
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING,
          "Exception getting task by id. Message: " + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getWorkflowTaskById transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return task;
  }

  /*
   * (non-Javadoc)
   *
   * @see org.apache.oodt.cas.workflow.repository.WorkflowRepository#
   * getWorkflowConditionById(java.lang.String)
   */
  public WorkflowCondition getWorkflowConditionById(String conditionId)
      throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    WorkflowCondition condition = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getConditionsSql = "SELECT * FROM workflow_conditions WHERE workflow_condition_id = "
          + conditionId;

      LOG.log(Level.FINE, "getWorkflowConditionById: Executing: "
          + getConditionsSql);
      rs = statement.executeQuery(getConditionsSql);

      while (rs.next()) {
        // get an instance of the class name
        condition = DbStructFactory.getWorkflowCondition(rs, false);
        if (condition != null) {
          condition.setCondConfig(getConfigurationByConditionId(conditionId));
        }
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING,
          "Exception getting condition by id. Message: " + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getWorkflowConditionById transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return condition;
  }

  /*
   * (non-Javadoc)
   *
   * @see
   * org.apache.oodt.cas.workflow.repository.WorkflowRepository#getRegisteredEvents
   * ()
   */
  public List<String> getRegisteredEvents() throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    List events = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getEventSql = "SELECT DISTINCT event_name FROM event_workflow_map ORDER BY event_name ASC";

      LOG.log(Level.FINE, "getRegisteredEvents: Executing: " + getEventSql);
      rs = statement.executeQuery(getEventSql);
      events = new Vector();

      while (rs.next()) {
        // get an instance of the class name
        String event = DbStructFactory.getEvent(rs);
        events.add(event);
      }

      if (events.size() == 0) {
        events = null;
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING, "Exception getting registered events. Message: "
          + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getRegisteredEvents transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return events;
  }

  /* (non-Javadoc)
   * @see org.apache.oodt.cas.workflow.repository.WorkflowRepository#addTask(org.apache.oodt.cas.workflow.structs.WorkflowTask)
   */
  @Override
  public String addTask(WorkflowTask task) throws RepositoryException {
    List<WorkflowCondition> allConditions = getConditions();
    // check its conditions
    if(task.getPreConditions() != null && task.getPreConditions().size() > 0){
      for(WorkflowCondition cond: task.getPreConditions()){
        if(!this.hasConditionId(allConditions, cond.getConditionId())){
          throw new RepositoryException("Reference in new task: ["+task.getTaskName()+"] to undefined pre condition ith id: ["+cond.getConditionId()+"]");
        }
      }

      for(WorkflowCondition cond: task.getPostConditions()){
        if(!this.hasConditionId(allConditions, cond.getConditionId())){
          throw new RepositoryException("Reference in new task: ["+task.getTaskName()+"] to undefined post condition ith id: ["+cond.getConditionId()+"]");
        }
      }
    }

    return this.commitTask(null, task);
  }

  /*
   * (non-Javadoc)
   *
   * @see
   * org.apache.oodt.cas.workflow.repository.WorkflowRepository#addWorkflow(
   * org.apache.oodt.cas.workflow.structs.Workflow)
   */
  @Override
  public String addWorkflow(Workflow workflow) throws RepositoryException {
    // first check to see that its tasks are all present
    if (workflow.getTasks() == null || (workflow.getTasks().size() == 0)) {
      throw new RepositoryException("Attempt to define a new worklfow: ["
          + workflow.getName() + "] with no tasks.");
    }

    List<WorkflowTask> allTasks = this.getTasks();

    for (WorkflowTask task : workflow.getTasks()) {
      if (!this.hasTaskId(allTasks, task.getTaskId())) {
        throw new RepositoryException("Reference in new workflow: ["
            + workflow.getName() + "] to undefined task with id: ["
            + task.getTaskId() + "]");
      }

      // check its conditions
      if (task.getConditions() != null && task.getConditions().size() > 0) {
        List<WorkflowCondition> conditions = this.getConditionsByTaskId(task
            .getTaskId());
        for (WorkflowCondition cond : (List<WorkflowCondition>) task
            .getConditions()) {
          if (!this.hasConditionId(conditions, cond.getConditionId())) {
            throw new RepositoryException("Reference in new workflow: ["
                + workflow.getName() + "] to undefined condition ith id: ["
                + cond.getConditionId() + "]");
          }
        }
      }
    }

    return this.commitWorkflow(workflow);
  }

  /*
   * (non-Javadoc)
   *
   * @see org.apache.oodt.cas.workflow.repository.WorkflowRepository#
   * getConditionsByWorkflowId(java.lang.String)
   */
  @Override
  public List<WorkflowCondition> getConditionsByWorkflowId(String workflowId)
      throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    List<WorkflowCondition> conditions = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getConditionsSql = "SELECT workflow_conditions.*, workflow_condition_map.condition_order "
          + "FROM workflow_conditions, workflow_condition_map "
          + "WHERE workflow_condition_map.workflow_condition_id = workflow_conditions.workflow_condition_id "
          + "AND workflow_condition_map.workflow_id = "
          + workflowId
          + " "
          + "ORDER BY workflow_condition_map.condition_order";

      LOG.log(Level.FINE, "getConditionsByWorkflowId: Executing: "
          + getConditionsSql);
      rs = statement.executeQuery(getConditionsSql);
      conditions = new Vector<WorkflowCondition>();

      while (rs.next()) {
        // get an instance of the class name
        WorkflowCondition condition = DbStructFactory.getWorkflowCondition(rs,
            true);
        conditions.add(condition);
      }

      if (conditions.size() == 0) {
        conditions = null;
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(
          Level.WARNING,
          "Exception getting conditions for workflow. Message: "
              + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getConditionsByWorkflowId transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return conditions;
  }

  /* (non-Javadoc)
   * @see org.apache.oodt.cas.workflow.repository.WorkflowRepository#getTaskById(java.lang.String)
   */
  @Override
  public WorkflowTask getTaskById(String taskId) throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    WorkflowTask task = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getTasksSql = "SELECT * "
          + "FROM workflow_tasks "
          + "WHERE workflow_task_id = " + taskId;

      LOG.log(Level.FINE, "getTaskById: Executing: " + getTasksSql);
      rs = statement.executeQuery(getTasksSql);

      while (rs.next()) {
        // get an instance of the class name

        task = DbStructFactory.getWorkflowTask(rs, true);

        if (task != null) {
          task.setConditions(getConditionsByTaskId(task.getTaskId()));
          task.setTaskConfig(getConfigurationByTaskId(task.getTaskId()));
        }
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING, "Exception getting tasks for workflow. Message: "
          + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getTasksByWorkflowId transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return task;
  }

  private String commitWorkflow(Workflow workflow) throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;
    String workflowId = null;

    try {
      conn = dataSource.getConnection();
      conn.setAutoCommit(false);
      statement = conn.createStatement();

      String sql = "INSERT INTO workflows (workflow_id, workflow_name) VALUES ('"+workflow.getId()+"','"
          + workflow.getName() + "')";

      LOG.log(Level.FINE, "commitWorkflowToDB: Executing: " + sql);
      statement.execute(sql);

      sql = "SELECT MAX(workflow_id) AS max_id FROM workflows";
      rs = statement.executeQuery(sql);

      while (rs.next()) {
        workflowId = String.valueOf(rs.getInt("max_id"));
      }

      workflow.setId(workflowId);

      // event to workflow map
      sql = "INSERT INTO event_workflow_map (workflow_id, event_name) VALUES ("
          + workflowId + ",'workflow-" + workflowId + "')";
      LOG.log(Level.FINE, "commitWorkflowToDB: Executing: " + sql);
      statement.execute(sql);
      conn.commit();

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING,
          "Exception adding workflow. Message: " + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(
            Level.SEVERE,
            "Unable to rollback workflow transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return workflowId;
  }

  private String commitTask(Workflow workflow, WorkflowTask task)
      throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;
    String taskId = null;

    try {
      conn = dataSource.getConnection();
      conn.setAutoCommit(false);
      statement = conn.createStatement();

      String sql = "SELECT MAX(workflow_task_id) AS max_id FROM workflow_tasks";
      LOG.log(Level.FINE, "commitTaskToDB: Executing: " + sql);
      rs = statement.executeQuery(sql);

      while (rs.next()) {
        taskId = String.valueOf(rs.getInt("max_id"));
      }

      synchronized (taskId) {
        taskId = String.valueOf(Integer.valueOf(taskId) + 1);
      }

      task.setTaskId(taskId);
      sql = "INSERT INTO workflow_tasks (workflow_task_id, workflow_task_name, workflow_task_class) VALUES ("
          + taskId
          + ", '"
          + task.getTaskName()
          + "', '"
          + task.getTaskInstanceClassName() + "')";

      LOG.log(Level.FINE, "commitTaskToDB: Executing: " + sql);
      statement.execute(sql);

      if (workflow != null) {
        // task to workflow map
        sql = "INSERT INTO workflow_task_map (workflow_id, workflow_task_id, task_order) VALUES ("
            + workflow.getId() + "," + taskId + ",1)";
        LOG.log(Level.FINE, "commitTaskToDB: Executing: " + sql);
        statement.execute(sql);
      }

      conn.commit();

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING,
          "Exception adding task. Message: " + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(Level.SEVERE, "Unable to rollback task transaction. Message: "
            + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return taskId;
  }

  public List<WorkflowCondition> getConditions() throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    List<WorkflowCondition> conditions = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getConditionsSql = "SELECT workflow_conditions.* "
          + "FROM workflow_conditions "
          + "ORDER BY workflow_condition_id";

      LOG.log(Level.FINE, "getConditions: Executing: "
          + getConditionsSql);
      rs = statement.executeQuery(getConditionsSql);
      conditions = new Vector<WorkflowCondition>();

      while (rs.next()) {
        // get an instance of the class name
        WorkflowCondition condition = DbStructFactory.getWorkflowCondition(rs,
            true);
        conditions.add(condition);
      }

      if (conditions.size() == 0) {
        conditions = null;
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING, "Exception getting conditions. Message: "
          + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getConditions transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return conditions;
  }

  private List<WorkflowTask> getTasks() throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    List<WorkflowTask> tasks = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getTasksSql = "SELECT workflow_tasks.*, workflow_task_map.task_order "
          + "FROM workflow_tasks, workflow_task_map WHERE workflow_tasks.workflow_task_id = workflow_task_map.workflow_task_id "
                           + "ORDER BY workflow_task_map.task_order";

      LOG.log(Level.FINE, "getTasks: Executing: " + getTasksSql);
      rs = statement.executeQuery(getTasksSql);
      tasks = new Vector<WorkflowTask>();

      while (rs.next()) {
        // get an instance of the class name

        WorkflowTask task = DbStructFactory.getWorkflowTask(rs, true);

        if (task != null) {
          task.setConditions(getConditionsByTaskId(task.getTaskId()));
          task.setTaskConfig(getConfigurationByTaskId(task.getTaskId()));
          tasks.add(task);
        }
      }

      if (tasks.size() == 0) {
        tasks = null;
      }

    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage());
      LOG.log(Level.WARNING,
          "Exception getting tasks. Message: " + e.getMessage());
      try {
        if (conn != null) {
          conn.rollback();
        }
      } catch (SQLException e2) {
        LOG.log(
            Level.SEVERE,
            "Unable to rollback getTasks transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException ignore) {
        }

      }

      if (statement != null) {
        try {
          statement.close();
        } catch (SQLException ignore) {
        }

      }

      if (conn != null) {
        try {
          conn.close();

        } catch (SQLException ignore) {
        }

      }
    }

    return tasks;
  }

  private boolean hasTaskId(List<WorkflowTask> tasks, String id) {
    if (tasks == null || (tasks.size() == 0)) {
      return false;
    }

    for (WorkflowTask task : tasks) {
      if (task.getTaskId().equals(id)) {
        return true;
      }
    }

    return false;
  }

  private boolean hasConditionId(List<WorkflowCondition> conds, String id) {
    if (conds == null || (conds.size() == 0)) {
      return false;
    }

    for (WorkflowCondition cond : conds) {
      if (cond.getConditionId().equals(id)) {
        return true;
      }
    }

    return false;
  }

  private void handleGlobalWorkflowConditions(Workflow workflow) throws RepositoryException {
    if (workflow.getConditions() != null && workflow.getConditions().size() > 0) {
      if (workflow.getTasks() == null || (workflow.getTasks().size() == 0)) {
        workflow.setTasks(new Vector<WorkflowTask>());
      }

      workflow.getTasks().add(
          0,
          getGlobalWorkflowConditionsTask(workflow,
              workflow.getConditions()));
    }
  }

  private WorkflowTask getGlobalWorkflowConditionsTask(Workflow workflow,
      List<WorkflowCondition> conditions) throws RepositoryException {
    WorkflowTask task = new WorkflowTask();
    task.setConditions(conditions);
    task.setTaskConfig(new WorkflowTaskConfiguration());
    task.setTaskId(workflow.getId() + "-global-conditions-eval");
    task.setTaskName(workflow.getName() + "-global-conditions-eval");
    task.setTaskInstanceClassName(NoOpTask.class.getName());
    task.setTaskId(this.commitTask(workflow, task));
    return task;
  }

}

redpajama_set_name: RedPajamaGithub


text:
Denial-of-service attack takes down JP Morgan Chase sites
Representative confirms to CNET that the attack is occurring, but can't say how long the site has been down.
Steven Musil
March 12, 2013 3:29 PM PDT
Chase.com during Tuesday's distributed-denial-of-service attack. Screenshot by Steven Musil/CNET
The Web sites for banking giant JP Morgan Chase are offline this afternoon as the result of a distributed-denial-of-service attack, a representative told CNET.
The site's usual banking tools and content were replaced this afternoon with a message that said:
Our website is temporarily down, but our branches and Mobile Apps are available. Please try again later.
The representative couldn't say how long the site had been down or how long it would be until service was resumed.
Hackers have ratcheted up their assaults on financial institutions in recent months, using DDoS attacks to take down Wells Fargo, Bank of America, Chase, Citigroup, HSBC, and others. Though initially it was unclear who was behind the attacks, government officials and security researchers said in January that Iran was responsible for these cyberattacks.
Even the U.S. Federal Reserve was not immune to hackers, suffering a security breach last month of one of its internal Web sites. That attack came on the heels of the hacking group Anonymous claiming to have published log-in and private information from more than 4,000 U.S. bank executive accounts, though it was unclear if the two events were connected.
In its December report, security company McAfee said that attacks on U.S. financial institutions are only going to increase in 2013. The firm said that this isn't just a possibility; it's a "credible threat." Anonymous has also promised to increase its activity in 2013. In a statement issued at the beginning of the year, the group said that it has no plans to fade away in the year to come.
Discuss: Denial-of-service attack takes down JP Morgan Chase sites

redpajama_set_name: RedPajamaCommonCrawl


There are a few things I do just for the heck of it.
I am a Freeman in the Information Technologists' Company.
I am a marketing advisor to the Courtauld Institute of Art.
I serve a mentor to the School of Communication Arts.


This post explores a meditation for a calm heart. When you only have a few minutes to spare, but are wanting to sneak in some instant calm, try this quick guided meditation. By spending a few minutes each day practicing consciously bringing more joy into your heart space, you will gradually shift your biochemistry into a more favourable state.
Feel free to comment below if you got benefit out of this meditation.
Liz is a yoga teacher and bioenergetic practitioner.
COMBINING ANCIENT KNOWLEDGE WITH MODERN SCIENCE.


text:
Shaky Knees wraps up with psychedelic performances from Tame Impala, Spiritualized
The final day of Shaky Knees Music Festival in Atlanta was a departure from the punk and angst of the previous two days. The music seemed to fit the mood of people winding down their weekend, mellowing out in the shade of the many trees that occupied the park.
Most of the angst of the day came in the form of SoCal band The Mowgli's in the Buford Highway tent. They're a bit GROUPLOVE meets Dashboard Confessional — and they knew how to get the crowd into their show. Singer Colin Dieden found himself in the crowd for the set-closing "San Francisco," and though the sound was rough at times (as it was all weekend in the tent), they overcame it with unbridled charisma.
Aimee Mann and Ted Leo, aka The Both, delivered a fun set on the main stage. Mann made a couple mistakes and had to restart a few songs, and Leo's keyboards showed a warning that it was getting too hot, prompting Mann to crack some jokes.
SoCal's finest indie-surf-pop band, Best Coast played a number of tracks from their recently-released album Calilfornia Nights, the first album with a full band arrangement. They've grown quite nicely since their days of writing mostly two-minute songs. The new tracks had a full sound that stretched to the back of the field at the Piedmont Stage. The crowd wished Bobb a happy birthday and Bethany looked like Wonder Woman in her outfit — with matching confidence to boot.
Dr. Dog was another perfect fit for the mellowed Sunday vibes of Shaky Knees on the main stage. I destroyed two pulled pork sandwiches while sitting far back but really enjoyed "That Old Black Hole" and "Be the Void" while waiting to head over to Spiritualized.
I'd been a big fan of Spiritualized since hearing "Ladies and Gentlemen We're Floating in Space" in Cameron Crowe's Vanilla Sky. I had caught them the night before at Terminal West, and though they didn't play that track during either performance, they were both the kind of sets that makes you feel like you're not in your own body. Lead man Jason Pierce may not have looked out at the crowd even one time, always looking straight ahead as he faced side-stage. The bass line in "Lord Let It Rain On Me" was bone-chilling. "Shine a Light" and "Come Together" were two highlights of the entire festival — plus when a streaker was unceremoniously tackled by security.
If any one artist fit Shaky Knees the best, it was Ryan Adams. You could tell he really loved the setup and felt at home and appreciated the support. He may have turned in the weirdest Mother's Day tribute of all-time with a cover of Danzig's "Mother," and the transition to "Oh My Sweet Carolina" was interesting, but it worked nonetheless. There were enough rocking jams to balance out the songs that felt right for those couples that were there. At times during his guitar solos, Adams sounded like a psych-rock John Frusciante. The harmonica work on "Come Pick Me Up" was the right way to end the set and carry into the final stretch of the weekend.
I never expected shoegaze giants Ride to sound as hard as they did, but damn if they didn't deliver a rocking performance. "Vapour Trail" was the hit everyone knew, but the rest of their set was well received. Other than The Pixies, they were the best legacy act booked by Shaky Knees in my opinion.
Anyone who waited until Sunday to take their psychedelics were rewarded by a mesmerizing set from Australia's Tame Impala. Their sound is suitable to have been put together in the '70s, and the older crowd who were here for acts like Ryan Adams, Spiritualized, and Ride were pleasantly surprised by the chops of these guys. "We love this, there's a lot of landscape," lead man Kevin Parker said near the end of the set, also mentioning it was their first time playing Atlanta (which is incorrect, but hey, memory can be hazy). This group was on the second line for Coachella, and while they're not quite headliner material for the biggest music festivals in the States, their Shaky Knees performance solidified the idea they can carry mid-level festivals on their backs.
Shaky Knees Festival Wrap-up:
Overall, Shaky Knees Fest was more than I could have hoped for. There were occasional lulls in the lineup where nothing jumped at me as must-see, but I got to check out a bunch of stuff I wasn't too familiar with and more often than not I was a fan. The setup of the park was easy to navigate, though I'd complain the food situation around dinner time was difficult and that they weren't selling water in enough places.
The vibe of the festival was so laid-back that it took me by surprise. I'm so used to festivals being all "go, go, go" where people's manners are left at home. Not the case in Atlanta as everyone was really nice and engaging, nobody was pushing you or being rude. There were people throwing frisbees and lying in hammocks, something I'd never expect to see at a festival.
My hope is that Shaky Knees stays more or less what it is and doesn't try and get much larger than that. The capacity was perfect, it was easy to get close to the front of almost any set, and the level of bookings was enough to make it worth traveling across the States for, for me. A lot of people came from nearby states and there were quite a number of people who went on their own, which is something you don't see much at festivals. I'd like to see how things progress in the coming years.
Best sets of the weekend
1. Noel Gallagher's High Flying Birds – Noel was at the top of his game, mixing in Oasis classics like "Champagne Supernova" and "Don't Look Back in Anger" with killer tracks from his two solo endeavors.
Noel Gallagher and Avett Brothers shine at day two of Shaky Knees Festival
2. The Strokes – Julian Casablancas and his band played for the first time since July's FYF Fest and they made it special, dusting off songs like "Vision of Division" and "You Talk Way Too Much" for the first time in years. There was no rust in their performance.
Day one of Shaky Knees Fest rattles with The Strokes, Mastodon, Kaiser Chiefs and more
3. Ryan Adams – The laid-back rock vibe of Shaky Knees was perfectly suited for Adams' Don Henley-like jams. He fit better here than at Coachella and you could tell he appreciated the setup.
4. Tame Impala – These Aussies paired their psychedelic rock and visuals quite nicely with the surrounding trees. There were a lot of people tripping specifically for this set and I'm sure it paid off nicely for them.
5. Pixies – It was a tough conflict with them going against Brand New and James Blake, but there was no questioning my choice as they tore through a marathon set.
The early bird gets the worm
There was a lot of good quality stuff early in the afternoon on all three days of Shaky Knees. If you got through the gates early on Friday and caught HAERTS' emotional synthpop, you caught one of the best sets of the whole weekend. Palma Violets, Kevin Devine and the Goddamn Band, and The Mowgli's were some of the other early afternoon standouts.
Words: Mark E. Ortega
Photography: Tom Dellinger
Aimee Mann of The Both
Want more photos from Shaky Knees Fest? Check out the photo gallery below!
[View with PicLens]
Shaky Knees festival out to prove rock 'n' roll isn't dead
Day Two Austin Psych Fest / Levitation 2015 mesmerizes with Jesus & Mary Chain, Primal Scream and more
Austin Psych Fest / Levitation 2015 kicks off rainy day with Tame Impala, Spiritualized, METZ and more
Watch Grimy TV's mini festival documentary from Burgerama 2015
Desert Daze brings back the spirit of what "music festivals" once were
This entry was posted in Live Concerts, Music Festivals and tagged aimee mann, dr. dog, ryan adams, shaky knees fest, spiritualized, Tame Impala, the both on May 11, 2015 by Sandra Burciaga Olinger.


Image Title: Outdoor Side Tables S O B L E K I Regarding Remodel 11. Post Title: Outdoor Side Tables. Filename: outdoor-side-tables-s-o-b-l-e-k-i-regarding-remodel-11.jpg. Image Dimension: 600 x 600 pixels. Images Format: jpg/jpeg. Publisher/Author: Hassan Keeling. Uploaded Date: Saturday - September 29th. 2018 02:40:22 AM. Category: Architecture. Image Source: hgtv.com. Helms Indoor Outdoor Side Table Heather Ashton Design For Tables Remodel 15. Hampton Bay Oak Cliff Metal Outdoor Side Table 176 411 20ET The Pertaining To Tables Plan 8. On The Move Outdoor Side Table Moss Furniture Pertaining To Tables Prepare 4. Lucca Concrete Outdoor Side Table Williams Sonoma Intended For Tables Designs 10. Portside Outdoor C Shaped Side Table Weathered Gray West Elm Inside Tables Remodel 14. Amazon Com Tuscany 3 Piece Wicker Nesting Outdoor Side Table Set Intended For Tables Ideas 17. POSTURE SIDE TABLE TEAK OUTDOOR With Outdoor Side Tables Prepare 18. Outdoor Side Tables You Ll Love Wayfair Regarding Decor 2. Hampton Bay Belcourt Metal Square Outdoor Side Table D11334 TS The Regarding Tables Prepare 6. Outdoor Side Tables Patio The Home Depot Within Designs 5.


text:
<?php
// +-----------------------------------------------------------------------+
// | This file is part of Piwigo.                                          |
// |                                                                       |
// | For copyright and license information, please view the COPYING.txt    |
// | file that was distributed with this source code.                      |
// +-----------------------------------------------------------------------+
$lang['Span the full viewport height'] = 'Spanna alla hæð útsýnisgáttarinnar';
$lang['Tabs below the image'] = 'Flipar fyrir neðan myndina';
$lang['The path to the image, relative to your Piwigo installation folder'] = 'Slóðin að myndinni, miðað við þína Piwigo uppsetningarmöppu';
$lang['This will display categories as media wells with squared thumbnails, similar to the smartpocket mobile theme.'] = 'Þetta mun birta flokka sem gagnabrunn með ferningasmámyndum, svipað og smartpocket farsímaþemað.';
$lang['Thumbnail Link Target'] = 'Tengill fyrir smámyndir';
$lang['Thumbnail page display'] = 'Birting smámyndasíðu';
$lang['URL or releative path to the image'] = 'Vefslóð eða tilvísunarslóð að myndinni';
$lang['Use 6 colums for viewports >= 1680px'] = 'Notaðu 6 dálka fyrir útsýnisgáttir >= 1680px';
$lang['Use colored share buttons instead of icons'] = 'Notaðu litaða deilingarhnappa í stað tákna';
$lang['Use description rather than title for images'] = 'Notaðu lýsingu frekar en titil fyrir myndir';
$lang['Use full width containers that span the entire width of the viewport'] = 'Notaðu ílát í fullri breidd sem spanna alla breidd útsýnisgáttarinnar';
$lang['center-aligned h5 heading'] = 'miðstillt h5 fyrirsögn';
$lang['directly in the navigation bar'] = 'beint á leiðsögustikunni';
$lang['from'] = 'frá';
$lang['lazyLoad method'] = 'lazyLoad aðferð';
$lang['left-aligned free text for advanced descriptions'] = 'vinstrijafnaður frjáls texti fyrir ítarlegar lýsingar';
$lang['loads all images one after another when the page loads (use carefully!)'] = 'hleður öllum myndum hverri á eftir annarri þegar síðan hleðst (notið varlega!)';
$lang['milliseconds'] = 'millisekúndur';
$lang['will load the image as soon as you slide to it'] = 'mun hlaða myndinni um leið og þú rennir að henni';
$lang['Issue tracker'] = 'Vandamálarakning';
$lang['Link thumbnail to'] = 'Tengdu smámynd við';
$lang['List view'] = 'Listasýn';
$lang['Never'] = 'Aldrei';
$lang['On mobile devices only'] = 'Aðeins í farsímum';
$lang['Page header'] = 'Síðuhaus';
$lang['PhotoSwipe Slideshow'] = 'PhotoSwipe Skyggnusýning';
$lang['Photoswipe Slideshow (Mobile devices only)'] = 'Photoswipe Skyggnusýning (aðeins fyrir farsíma)';
$lang['Picture details page'] = 'Myndaupplýsingasíða';
$lang['Picture info display position'] = 'Birtingarstaða myndupplýsinga';
$lang['Picture page display'] = 'Birting myndasíðu';
$lang['Show a jumbotron banner on the categroy pages.'] = 'Sýndu jumbotron borða á flokkasíðunum.';
$lang['Show basic EXIF metadata'] = 'Sýndu grunn EXIF lýsigögn';
$lang['Show image caption'] = 'Sýndu myndatexta';
$lang['Sidebar (like Boostrap Default)'] = 'Hliðarstika (eins og Bootstrap Sjálfgefið)';
$lang['Simple'] = 'Einfalt';
$lang['Site logo'] = 'Vefsíðulógó';
$lang['Social Media Integration'] = 'Samfélags Samþætting';
$lang['Social integration'] = 'Samfélags samþætting';
$lang['Disabled'] = 'Afvirkjað';
$lang['Discover'] = 'Skoða';
$lang['Display a site logo image instead of plain text'] = 'Birtu lógómynd vefsíðunnar í stað venjulegs texta';
$lang['Display categories as Bootstrap media wells'] = 'Birta flokka sem Bootstrap gagnabrunna';
$lang['Display category description in grid view'] = 'Birta flokkalýsingu í töfluyfirliti';
$lang['Display number of images in album and subalbums'] = 'Birta fjölda mynda í albúmi og undiralbúmum';
$lang['Display the currently selected image in the middle. Works best with infinite looping enabled.'] = 'Sýndu myndina sem er valin í miðjunni. Virkar best með óendanlega lykkju virka.';
$lang['Enable PhotoSwipe fullscreen slideshow. Disable if you prefer to use Plugins like Fotorama or Piwigo\'s default slideshow.'] = 'Virkjaðu PhotoSwipe skyggnusýningu á öllum skjánum. Slökktu ef þú vilt frekar nota viðbætur eins og Fotorama eða sjálfgefna myndasýningu Piwigo.';
$lang['Enable the slick carousel below the main image on the picture page'] = 'Virkjaðu klóku hringekjuna fyrir neðan aðalmyndina á myndasíðunni';
$lang['Enabled'] = 'Virkjað';
$lang['Endlessly scroll through album images'] = 'Skrunaðu endalaust í gegnum albúmmyndir';
$lang['For more information on metadata visit'] = 'Fyrir frekari upplýsingar um lýsigögn heimsóttu';
$lang['Full width layout'] = 'Skipulag í fullri breidd';
$lang['Fullscreen'] = 'Fullskjár';
$lang['Grid view'] = 'Töflusýn';
$lang['HTML 5 canvas'] = 'HTML 5 strigi';
$lang['Hero image'] = 'Auðkennismynd';
$lang['If you find any issues, please report them to the'] = 'Ef þú finnur einhver vandamál, vinsamlegast tilkynntu þau til';
$lang['Infinite looping'] = 'Óendanleg lykkja';
$lang['Integrate lower navbar'] = 'Samþættu neðri leiðsögustiku';
$lang['A color theme from'] = 'Litaþema frá';
$lang['A mobile-ready theme based on Bootstrap 4'] = 'Farsímatilbúið þema byggt á Bootstrap 4';
$lang['Advanced'] = 'Ítarlegri';
$lang['Always'] = 'Alltaf';
$lang['Appearance'] = 'Útlit';
$lang['Autoplay interval'] = 'Sjálfspilunarbil';
$lang['Banner style'] = 'Borðastíll';
$lang['Basic'] = 'Grunnþema';
$lang['Bootstrap Darkroom\'s custom dark color theme'] = 'Sérsniðið dökkt litaþema Bootstrap Darkroom';
$lang['Bootstrap theme'] = 'Bootstrap þema';
$lang['Bootstrap\'s default theme'] = 'Bootstrap sjálfgefið þema';
$lang['Bootswatch theme'] = 'Bootwatch þema';
$lang['Bug reports and feature requests'] = 'Villuskýrslur og eiginleikabeiðnir';
$lang['By'] = 'Eftir';
$lang['Card grid below the image'] = 'Kortatöflu fyrir neðan myndina';
$lang['Category page display'] = 'Birting flokkasíðu';
$lang['Center mode'] = 'Miðjuhamur';
$lang['Color theme'] = 'Litaþema';
$lang['Components'] = 'Einingar';
$lang['Description display style'] = 'Birtingarstíll lýsingar';


text:
Review of Forensic Medicine and Toxicology (Including Clinical & Pathological Aspects) 4th Edition 2019 By Gautam Biswas
Review of Forensic Medicine and Toxicology (Including Clinical & Pathological Aspects) 4th Editi..
The Essentials of Forensic Medicine and Toxicology 34th Edition 2017 By KS Narayan Reddy
The Essentials of Forensic Medicine and Toxicology 34th Edition 2017 By KS Narayan Reddy..
Essentials of Forensic Medicine & Toxicology,1st Edition 2019 By Suresh Chand
Essentials of Forensic Medicine and Toxicology, 1st Edition..
Exam Preparatory Manual For Undergraduates Forensic Medicine & Toxicology 2nd Edition 2018 By Dekal V
Exam Preparatory Manual For Undergraduates Forensic Medicine & Toxicology 2nd Edition 2018 By De..
Parikhs Textbook Of Medical Jurisprudence, Forensic Medicine And Toxicology 7th Edition 2017 By Parikh BV Subrahmanyam
Parikhs Textbook Of Medical Jurisprudence, Forensic Medicine And Toxicology 7th Edition 2017 By Pari..
Review of Forensic Medicine 7th edition 2018 by Sumit Seth
Review of Forensic Medicine 7th edition 2018 by Sumit Seth..
REVIEW OF FORENSIC MEDICINE by Akhilesh Raj Jhamad & Rajanikanta Swain
REVIEW OF FORENSIC MEDICINE by Akhilesh Raj Jhamad & Rajanikanta Swain..
Self Assessment & Review Of Basic Subjects Anatomy & Forensic Medicine Vol 2, 2019 By Arvind Arora
Basic subjects Anatomy and Forensic Medicine (Volume 2) Arvind Arora..
Textbook Of Forensic Medicine & Toxicology 4th Edition 2019 By Ignatius P. C
Textbook Of Forensic Medicine & Toxicology 4th Edition 2019 By Ignatius P. C..
Textbook of Forensic Medicine And Toxicology 19th Edition 2019 by V V Pillay
Textbook of Forensic Medicine And Toxicology 19th Edition 2019 by V V Pillay..


BC's lethal exploitation of wolves is not based on science.
As British Columbia's Ministry of Forests, Lands, Natural Resource Operations and Rural Development is proposing to extend wolf-killing season on Vancouver Island to 10 months from the current eight months, wolves on the Island could endure an additional two months each year of needless suffering.
Anecdotes and guesswork, however, are not scientific data, and when substituted for sound science, they contribute to poor reasoning and stunningly bad decisions.
The ministry goes on to state: "There have been decreased trends in deer population index in northern management units since the increased wolf sightings/sign have been observed," implying a causal fallacy that wolf predation is the ultimate cause of deer decline on Vancouver Island. In addition to blatantly violating the elementary statistical principle of "correlation does not imply causation," the ministry's reckless conjecture is contradicted by an abundance of scientific literature.
The actions of humans coupled with a suite of natural forces affect deer abundance. Predators are only one factor in this dynamic. In fact, predator-prey interactions are influenced overwhelmingly by the altered landscape we have created through decades of widespread clearcut logging and industrial forestry.
Although forage in early cutover areas might be temporarily abundant, typically it is of lesser nutritional value. In a few short years, when the second-growth plantation-forest canopy closes, there is next to no forage.
Some understory plant species never reappear in areas subjected to the kind of short-rotation and even-age management that is dominant on Vancouver Island.
What little forage persists is not available to deer during periods of deep snow because deer can neither travel efficiently nor access forage in snow that accumulates in clearcuts. Token "deer winter ranges" set amidst a sea of clearcuts provide a futile panacea.
This, too, describes Vancouver Island, where most of the Island's old-growth forests have been transformed by clearcut logging and converted into biologically simplified tree plantations that are logged on short rotations, doing little to provide productive habitat for wildlife.
Predation by wolves affects deer populations, just as all predators affect prey populations. If left alone, predation is nearly always self-regulating; native (i.e., not introduced) predators rarely over-exploit their prey. But once again, wolves are being unethically scapegoated and consequently persecuted for the damage done to deer habitat, and the capacity of that habitat to support deer, by decades of regressive forestry practices on Vancouver Island.
Conservation of wolves and other demanding carnivore species will always be inconvenient and forcefully opposed by some groups and organizations seeking to influence government policy, and therefore politically volatile. Traditionally, the province has been aligned philosophically with "special interest hunting" as a management tool, and has been too absorbed with assuaging these special interests to dependably assess the situation on Vancouver Island.
Moreover, decision-makers have consistently forgotten that professional standards of managing wildlife include ethics. Even the best scientific management of wildlife populations doesn't give us permission to kill wolves gratuitously or do as we please.
Adherence to ethical standards is even more important when science is ignored and haphazard stories and groundless suppositions are the primary reasoning used to make decisions.
Chris Genovali is executive director of Raincoast Conservation Foundation. Paul C. Paquet, PhD, is Raincoast's senior scientist and a large-carnivore expert.
This article first appeared in the Times Colonist, 2018 01 19 .