001/*
002 * JScience - Java(TM) Tools and Libraries for the Advancement of Sciences.
003 * Copyright (C) 2006 - JScience (http://jscience.org/)
004 * All rights reserved.
005 * 
006 * Permission to use, copy, modify, and distribute this software is
007 * freely granted, provided that this notice is preserved.
008 */
009package org.jscience.physics.model;
010
011import javax.measure.converter.RationalConverter;
012import javax.measure.converter.UnitConverter;
013import javax.measure.unit.BaseUnit;
014import javax.measure.unit.Dimension;
015import javax.measure.unit.SI;
016
017/**
018 * This class represents the quantum model.
019 *
020 * @author  <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
021 * @version 3.0, February 13, 2006
022 */
023public final class QuantumModel extends PhysicalModel {
024
025    /**
026     * Holds the single instance of this class.
027     */
028    final static QuantumModel INSTANCE = new QuantumModel();
029    /**
030     * Holds the meter to time transform.
031     */
032    private static RationalConverter METRE_TO_TIME 
033        = new RationalConverter(1, 299792458);
034    
035    /**
036     * Selects the relativistic model as the current model.
037     */
038    public static void select() {
039        throw new UnsupportedOperationException("Not implemented");
040    }
041
042    // Implements Dimension.Model
043    public Dimension getDimension(BaseUnit<?> unit) {
044        if (unit.equals(SI.METRE)) return Dimension.TIME;
045        return Dimension.Model.STANDARD.getDimension(unit);
046    }
047
048    // Implements Dimension.Model
049    public UnitConverter getTransform(BaseUnit<?> unit) {
050        if (unit.equals(SI.METRE)) return METRE_TO_TIME;
051        return Dimension.Model.STANDARD.getTransform(unit);
052    }
053    
054//        // ENERGY = m²·kg/s² = kg·c²
055//        SI.KILOGRAM.setDimension(SI.GIGA(NonSI.ELECTRON_VOLT),
056//                new MultiplyConverter(1E-9 * c * c / ePlus));
057//
058//        // H_BAR (SECOND * JOULE = SECOND * (KILOGRAM / C^2 )) = 1
059//        SI.SECOND.setDimension(Unit.ONE.divide(SI.GIGA(NonSI.ELECTRON_VOLT)),
060//                new MultiplyConverter(1E9 * ePlus / hBar));
061//
062//        // SPEED_OF_LIGHT (METRE / SECOND) = 1
063//        SI.METRE.setDimension(Unit.ONE.divide(SI.GIGA(NonSI.ELECTRON_VOLT)),
064//                new MultiplyConverter(1E9 * ePlus / (c * hBar)));
065//
066//        // BOLTZMANN (JOULE / KELVIN = (KILOGRAM / C^2 ) / KELVIN) = 1
067//        SI.KELVIN.setDimension(SI.GIGA(NonSI.ELECTRON_VOLT),
068//                new MultiplyConverter(1E-9 * k / ePlus));
069//
070//        // MAGNETIC CONSTANT (NEWTON / AMPERE^2) = 1
071//        SI.AMPERE.setDimension(SI.GIGA(NonSI.ELECTRON_VOLT),
072//                new MultiplyConverter(1E-9 * MathLib.sqrt(µ0 * c * hBar) / ePlus));
073//
074//        SI.MOLE.setDimension(SI.MOLE, Converter.IDENTITY);
075//        SI.CANDELA.setDimension(SI.CANDELA, Converter.IDENTITY);
076    
077}