diff --git a/polyglotter-common/pom.xml b/chrysalix-common/pom.xml similarity index 89% rename from polyglotter-common/pom.xml rename to chrysalix-common/pom.xml index d7e6d6c..6c8a5e3 100644 --- a/polyglotter-common/pom.xml +++ b/chrysalix-common/pom.xml @@ -6,17 +6,17 @@ - org.polyglotter - polyglotter + org.chrysalix + chrysalix 0.0.1-SNAPSHOT - polyglotter-common - Polyglotter Common - Common facilities, utilities, and classes used by other Polyglotter modules. + chrysalix-common + Chrysalix Common + Common facilities, utilities, and classes used by other Chrysalix modules. diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/BaseException.java b/chrysalix-common/src/main/java/org/chrysalix/common/BaseException.java similarity index 93% rename from polyglotter-common/src/main/java/org/polyglotter/common/BaseException.java rename to chrysalix-common/src/main/java/org/chrysalix/common/BaseException.java index 214f8e2..c7a0661 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/BaseException.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/BaseException.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -22,7 +22,7 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common; +package org.chrysalix.common; /** * diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/CheckArg.java b/chrysalix-common/src/main/java/org/chrysalix/common/CheckArg.java similarity index 99% rename from polyglotter-common/src/main/java/org/polyglotter/common/CheckArg.java rename to chrysalix-common/src/main/java/org/chrysalix/common/CheckArg.java index ac6fe62..ba0e660 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/CheckArg.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/CheckArg.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common; +package org.chrysalix.common; /** * Utility class that checks arguments to methods. This class is to be used only in API methods, where failure to supply correct diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/ClassUtil.java b/chrysalix-common/src/main/java/org/chrysalix/common/ClassUtil.java similarity index 89% rename from polyglotter-common/src/main/java/org/polyglotter/common/ClassUtil.java rename to chrysalix-common/src/main/java/org/chrysalix/common/ClassUtil.java index 423c8a8..1765735 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/ClassUtil.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/ClassUtil.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common; +package org.chrysalix.common; import java.lang.reflect.AccessibleObject; import java.security.AccessController; diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/CommonException.java b/chrysalix-common/src/main/java/org/chrysalix/common/CommonException.java similarity index 92% rename from polyglotter-common/src/main/java/org/polyglotter/common/CommonException.java rename to chrysalix-common/src/main/java/org/chrysalix/common/CommonException.java index afa539b..2845f5e 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/CommonException.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/CommonException.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common; +package org.chrysalix.common; /** * diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/CommonI18n.java b/chrysalix-common/src/main/java/org/chrysalix/common/CommonI18n.java similarity index 82% rename from polyglotter-common/src/main/java/org/polyglotter/common/CommonI18n.java rename to chrysalix-common/src/main/java/org/chrysalix/common/CommonI18n.java index 333eec5..4d4f221 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/CommonI18n.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/CommonI18n.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,12 +21,12 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common; +package org.chrysalix.common; import java.util.Locale; /** - * The internationalized string constants for the org.polyglotter.common packages. + * The internationalized string constants for the org.chrysalix.common packages. */ @SuppressWarnings( "javadoc" ) public final class CommonI18n { diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/I18n.java b/chrysalix-common/src/main/java/org/chrysalix/common/I18n.java similarity index 98% rename from polyglotter-common/src/main/java/org/polyglotter/common/I18n.java rename to chrysalix-common/src/main/java/org/chrysalix/common/I18n.java index 51aa26a..34a97b2 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/I18n.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/I18n.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common; +package org.chrysalix.common; import java.io.IOException; import java.io.InputStream; @@ -40,7 +40,7 @@ import java.util.concurrent.ConcurrentMap; import java.util.concurrent.CopyOnWriteArraySet; -import org.polyglotter.common.i18n.ClasspathLocalizationRepository; +import org.chrysalix.common.i18n.ClasspathLocalizationRepository; /** * An internalized string object, which manages the initialization of internationalization (i18n) files, substitution of values diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/LogFactory.java b/chrysalix-common/src/main/java/org/chrysalix/common/LogFactory.java similarity index 84% rename from polyglotter-common/src/main/java/org/polyglotter/common/LogFactory.java rename to chrysalix-common/src/main/java/org/chrysalix/common/LogFactory.java index edf8232..71036c5 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/LogFactory.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/LogFactory.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common; +package org.chrysalix.common; import javassist.ClassPool; import javassist.CtClass; @@ -29,38 +29,38 @@ import javassist.CtMethod; import javassist.NotFoundException; -import org.polyglotter.common.logging.JdkLoggerFactory; -import org.polyglotter.common.logging.Log4jLoggerFactory; -import org.polyglotter.common.logging.SLF4JLoggerFactory; +import org.chrysalix.common.logging.JdkLoggerFactory; +import org.chrysalix.common.logging.Log4jLoggerFactory; +import org.chrysalix.common.logging.SLF4JLoggerFactory; /** * The abstract class for the LogFactory, which is called to create a specific implementation of the {@link Logger}. *

- * Polyglotter provides out-of-the-box several LogFactory implementations that work with common log frameworks: + * Several LogFactory implementations are provided out-of-the-box that work with common log frameworks: *

    *
  1. SLF4J (which sits atop several logging frameworks)
  2. *
  3. Log4J
  4. *
  5. JDK Util Logging
  6. *
* The static initializer for this class checks the classpath for the availability of these frameworks, and as soon as one is found - * the LogFactory implementation for that framework is instantiated and used for all Polyglotter logging. + * the LogFactory implementation for that framework is instantiated and used for all logging. *

*

- * However, since Polyglotter can be embedded into any application, it is possible that applications use a logging framework other - * than those listed above. So before falling back to the JDK logging, Polyglotter looks for the - * org.polyglotter.common.logging.CustomLoggerFactory class, and if found attempts to instantiate and use it. But - * Polyglotter does not provide this class out of the box; rather an application that is embedding Polyglotter can provide its own + * However, since this facility can be embedded into any application, it is possible that applications use a logging framework other + * than those listed above. So before falling back to the JDK logging, this facility looks for the + * org.chrysalix.common.logging.CustomLoggerFactory class, and if found attempts to instantiate and use it. But this + * facility does not provide this class out of the box; rather an application that is embedding this facility can provide its own * version of that class that should extend {@link LogFactory} and create an appropriate implementation of {@link Logger} that - * forwards Polyglotter log messages to the application's logging framework. + * forwards log messages to the application's logging framework. *

*/ public abstract class LogFactory { /** * The name of the {@link LogFactory} implementation that is not provided out of the box but can be created, implemented, and - * placed on the classpath to have Polyglotter send log messages to a custom framework. + * placed on the classpath to have this facility send log messages to a custom framework. */ - public static final String CUSTOM_LOG_FACTORY_CLASSNAME = "org.polyglotter.common.logging.CustomLoggerFactory"; + public static final String CUSTOM_LOG_FACTORY_CLASSNAME = "org.chrysalix.common.logging.CustomLoggerFactory"; private static LogFactory LOGFACTORY; diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/Logger.java b/chrysalix-common/src/main/java/org/chrysalix/common/Logger.java similarity index 98% rename from polyglotter-common/src/main/java/org/polyglotter/common/Logger.java rename to chrysalix-common/src/main/java/org/chrysalix/common/Logger.java index 8498e25..7416c4b 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/Logger.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/Logger.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common; +package org.chrysalix.common; import java.util.Locale; import java.util.concurrent.atomic.AtomicReference; diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/ObjectUtil.java b/chrysalix-common/src/main/java/org/chrysalix/common/ObjectUtil.java similarity index 89% rename from polyglotter-common/src/main/java/org/polyglotter/common/ObjectUtil.java rename to chrysalix-common/src/main/java/org/chrysalix/common/ObjectUtil.java index 720bd64..58ece39 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/ObjectUtil.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/ObjectUtil.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common; +package org.chrysalix.common; /** * Utilities for any {@link Object object}. diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/TextUtil.java b/chrysalix-common/src/main/java/org/chrysalix/common/TextUtil.java similarity index 86% rename from polyglotter-common/src/main/java/org/polyglotter/common/TextUtil.java rename to chrysalix-common/src/main/java/org/chrysalix/common/TextUtil.java index 885059f..6423ecf 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/TextUtil.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/TextUtil.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common; +package org.chrysalix.common; /** * diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/i18n/ClasspathLocalizationRepository.java b/chrysalix-common/src/main/java/org/chrysalix/common/i18n/ClasspathLocalizationRepository.java similarity index 93% rename from polyglotter-common/src/main/java/org/polyglotter/common/i18n/ClasspathLocalizationRepository.java rename to chrysalix-common/src/main/java/org/chrysalix/common/i18n/ClasspathLocalizationRepository.java index e6c131e..bd563dd 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/i18n/ClasspathLocalizationRepository.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/i18n/ClasspathLocalizationRepository.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,15 +21,15 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common.i18n; +package org.chrysalix.common.i18n; import java.net.URL; import java.util.ArrayList; import java.util.List; import java.util.Locale; -import org.polyglotter.common.CheckArg; -import org.polyglotter.common.I18n; +import org.chrysalix.common.CheckArg; +import org.chrysalix.common.I18n; /** * Class that loads a properties file from the classpath of the supplied {@link ClassLoader class loader}. diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/logging/JdkLoggerFactory.java b/chrysalix-common/src/main/java/org/chrysalix/common/logging/JdkLoggerFactory.java similarity index 77% rename from polyglotter-common/src/main/java/org/polyglotter/common/logging/JdkLoggerFactory.java rename to chrysalix-common/src/main/java/org/chrysalix/common/logging/JdkLoggerFactory.java index 54942ed..53ed6f4 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/logging/JdkLoggerFactory.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/logging/JdkLoggerFactory.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,10 +21,10 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common.logging; +package org.chrysalix.common.logging; -import org.polyglotter.common.LogFactory; -import org.polyglotter.common.Logger; +import org.chrysalix.common.LogFactory; +import org.chrysalix.common.Logger; /** * Factory used to create the {@link Logger} implementation that uses the JDK logging framework. @@ -34,7 +34,7 @@ public final class JdkLoggerFactory extends LogFactory { /** * {@inheritDoc} * - * @see org.polyglotter.common.LogFactory#logger(java.lang.Class, java.lang.String) + * @see org.chrysalix.common.LogFactory#logger(java.lang.Class, java.lang.String) */ @Override protected Logger logger( final Class< ? > i18nClass, diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/logging/JdkLoggerImpl.java b/chrysalix-common/src/main/java/org/chrysalix/common/logging/JdkLoggerImpl.java similarity index 95% rename from polyglotter-common/src/main/java/org/polyglotter/common/logging/JdkLoggerImpl.java rename to chrysalix-common/src/main/java/org/chrysalix/common/logging/JdkLoggerImpl.java index 41bbb8b..ce2c386 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/logging/JdkLoggerImpl.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/logging/JdkLoggerImpl.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,10 +21,10 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common.logging; +package org.chrysalix.common.logging; -import org.polyglotter.common.I18n; -import org.polyglotter.common.Logger; +import org.chrysalix.common.I18n; +import org.chrysalix.common.Logger; /** * Logger that delivers messages to a JDK logger @@ -150,7 +150,7 @@ private void log( final java.util.logging.Level level, /** * {@inheritDoc} * - * @see org.polyglotter.common.Logger#setLevel(org.polyglotter.common.Logger.Level) + * @see org.chrysalix.common.Logger#setLevel(org.chrysalix.common.Logger.Level) */ @Override public void setLevel( final Level level ) { diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/logging/Log4jLoggerFactory.java b/chrysalix-common/src/main/java/org/chrysalix/common/logging/Log4jLoggerFactory.java similarity index 77% rename from polyglotter-common/src/main/java/org/polyglotter/common/logging/Log4jLoggerFactory.java rename to chrysalix-common/src/main/java/org/chrysalix/common/logging/Log4jLoggerFactory.java index 0ddb565..f3339eb 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/logging/Log4jLoggerFactory.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/logging/Log4jLoggerFactory.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,10 +21,10 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common.logging; +package org.chrysalix.common.logging; -import org.polyglotter.common.LogFactory; -import org.polyglotter.common.Logger; +import org.chrysalix.common.LogFactory; +import org.chrysalix.common.Logger; /** * Factory used to create the {@link Logger} implementation that uses the Log4j logging framework. @@ -34,7 +34,7 @@ public final class Log4jLoggerFactory extends LogFactory { /** * {@inheritDoc} * - * @see org.polyglotter.common.LogFactory#logger(java.lang.Class, java.lang.String) + * @see org.chrysalix.common.LogFactory#logger(java.lang.Class, java.lang.String) */ @Override protected Logger logger( final Class< ? > i18nClass, diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/logging/Log4jLoggerImpl.java b/chrysalix-common/src/main/java/org/chrysalix/common/logging/Log4jLoggerImpl.java similarity index 94% rename from polyglotter-common/src/main/java/org/polyglotter/common/logging/Log4jLoggerImpl.java rename to chrysalix-common/src/main/java/org/chrysalix/common/logging/Log4jLoggerImpl.java index 3db4a3c..323b916 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/logging/Log4jLoggerImpl.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/logging/Log4jLoggerImpl.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,10 +21,10 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common.logging; +package org.chrysalix.common.logging; -import org.polyglotter.common.I18n; -import org.polyglotter.common.Logger; +import org.chrysalix.common.I18n; +import org.chrysalix.common.Logger; final class Log4jLoggerImpl extends Logger { @@ -142,7 +142,7 @@ public boolean infoEnabled() { /** * {@inheritDoc} * - * @see org.polyglotter.common.Logger#setLevel(org.polyglotter.common.Logger.Level) + * @see org.chrysalix.common.Logger#setLevel(org.chrysalix.common.Logger.Level) */ @Override public void setLevel( final Level level ) { diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/logging/SLF4JLoggerFactory.java b/chrysalix-common/src/main/java/org/chrysalix/common/logging/SLF4JLoggerFactory.java similarity index 77% rename from polyglotter-common/src/main/java/org/polyglotter/common/logging/SLF4JLoggerFactory.java rename to chrysalix-common/src/main/java/org/chrysalix/common/logging/SLF4JLoggerFactory.java index e9d79a8..a39e6c3 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/logging/SLF4JLoggerFactory.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/logging/SLF4JLoggerFactory.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,10 +21,10 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common.logging; +package org.chrysalix.common.logging; -import org.polyglotter.common.LogFactory; -import org.polyglotter.common.Logger; +import org.chrysalix.common.LogFactory; +import org.chrysalix.common.Logger; /** * Factory used to create the {@link Logger} implementation that uses the SLF4J logging framework. @@ -34,7 +34,7 @@ public final class SLF4JLoggerFactory extends LogFactory { /** * {@inheritDoc} * - * @see org.polyglotter.common.LogFactory#logger(java.lang.Class, java.lang.String) + * @see org.chrysalix.common.LogFactory#logger(java.lang.Class, java.lang.String) */ @Override protected Logger logger( final Class< ? > i18nClass, diff --git a/polyglotter-common/src/main/java/org/polyglotter/common/logging/SLF4JLoggerImpl.java b/chrysalix-common/src/main/java/org/chrysalix/common/logging/SLF4JLoggerImpl.java similarity index 96% rename from polyglotter-common/src/main/java/org/polyglotter/common/logging/SLF4JLoggerImpl.java rename to chrysalix-common/src/main/java/org/chrysalix/common/logging/SLF4JLoggerImpl.java index 81307c6..531a838 100644 --- a/polyglotter-common/src/main/java/org/polyglotter/common/logging/SLF4JLoggerImpl.java +++ b/chrysalix-common/src/main/java/org/chrysalix/common/logging/SLF4JLoggerImpl.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,10 +21,10 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common.logging; +package org.chrysalix.common.logging; -import org.polyglotter.common.I18n; -import org.polyglotter.common.Logger; +import org.chrysalix.common.I18n; +import org.chrysalix.common.Logger; import org.slf4j.LoggerFactory; /** diff --git a/polyglotter-common/src/test/java/org/polyglotter/common/BaseI8nTest.java b/chrysalix-common/src/test/java/org/chrysalix/common/BaseI8nTest.java similarity index 88% rename from polyglotter-common/src/test/java/org/polyglotter/common/BaseI8nTest.java rename to chrysalix-common/src/test/java/org/chrysalix/common/BaseI8nTest.java index bcc823a..5e06057 100644 --- a/polyglotter-common/src/test/java/org/polyglotter/common/BaseI8nTest.java +++ b/chrysalix-common/src/test/java/org/chrysalix/common/BaseI8nTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common; +package org.chrysalix.common; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsNull.notNullValue; @@ -30,6 +30,7 @@ import java.lang.reflect.Field; import java.lang.reflect.Modifier; +import org.chrysalix.common.I18n; import org.junit.Test; @SuppressWarnings( "javadoc" ) diff --git a/polyglotter-common/src/test/java/org/polyglotter/common/CommonI18nTest.java b/chrysalix-common/src/test/java/org/chrysalix/common/CommonI18nTest.java similarity index 82% rename from polyglotter-common/src/test/java/org/polyglotter/common/CommonI18nTest.java rename to chrysalix-common/src/test/java/org/chrysalix/common/CommonI18nTest.java index 361dfc0..b0e4783 100644 --- a/polyglotter-common/src/test/java/org/polyglotter/common/CommonI18nTest.java +++ b/chrysalix-common/src/test/java/org/chrysalix/common/CommonI18nTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common; +package org.chrysalix.common; @SuppressWarnings( "javadoc" ) public class CommonI18nTest extends BaseI8nTest {} diff --git a/polyglotter-common/src/test/java/org/polyglotter/common/LoggerTest.java b/chrysalix-common/src/test/java/org/chrysalix/common/LoggerTest.java similarity index 84% rename from polyglotter-common/src/test/java/org/polyglotter/common/LoggerTest.java rename to chrysalix-common/src/test/java/org/chrysalix/common/LoggerTest.java index 5003d60..bd2dc0b 100644 --- a/polyglotter-common/src/test/java/org/polyglotter/common/LoggerTest.java +++ b/chrysalix-common/src/test/java/org/chrysalix/common/LoggerTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,11 +21,13 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common; +package org.chrysalix.common; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; +import org.chrysalix.common.CommonI18n; +import org.chrysalix.common.Logger; import org.junit.Test; @SuppressWarnings( "javadoc" ) @@ -33,8 +35,8 @@ public class LoggerTest { @Test public void shouldLogWithCallingMethodContext() { - assertThat( new SubClass().logger( 0, null ).getName(), is( "org.polyglotter.common.LoggerTest$SuperClass.logger(int,java.lang.String)" ) ); - assertThat( new SubClass().logger( 0 ).getName(), is( "org.polyglotter.common.LoggerTest$SubClass.logger(int)" ) ); + assertThat( new SubClass().logger( 0, null ).getName(), is( "org.chrysalix.common.LoggerTest$SuperClass.logger(int,java.lang.String)" ) ); + assertThat( new SubClass().logger( 0 ).getName(), is( "org.chrysalix.common.LoggerTest$SubClass.logger(int)" ) ); } class SubClass extends SuperClass { diff --git a/polyglotter-common/src/test/resources/log4j.properties b/chrysalix-common/src/test/resources/log4j.properties similarity index 91% rename from polyglotter-common/src/test/resources/log4j.properties rename to chrysalix-common/src/test/resources/log4j.properties index 22d7126..a759908 100644 --- a/polyglotter-common/src/test/resources/log4j.properties +++ b/chrysalix-common/src/test/resources/log4j.properties @@ -8,4 +8,4 @@ log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %m%n log4j.rootLogger=ERROR, stdout # Set up the default logging to be ERROR level, then override specific units -log4j.logger.org.polyglotter=ERROR +log4j.logger.org.chrysalix=ERROR diff --git a/polyglotter-common/src/test/resources/org/polyglotter/common/I18nTest$I18nInterface_en_CA.properties b/chrysalix-common/src/test/resources/org/chrysalix/common/I18nTest$I18nInterface_en_CA.properties similarity index 100% rename from polyglotter-common/src/test/resources/org/polyglotter/common/I18nTest$I18nInterface_en_CA.properties rename to chrysalix-common/src/test/resources/org/chrysalix/common/I18nTest$I18nInterface_en_CA.properties diff --git a/polyglotter-eclipse/LICENSE b/chrysalix-eclipse/LICENSE similarity index 100% rename from polyglotter-eclipse/LICENSE rename to chrysalix-eclipse/LICENSE diff --git a/polyglotter-eclipse/README.md b/chrysalix-eclipse/README.md similarity index 100% rename from polyglotter-eclipse/README.md rename to chrysalix-eclipse/README.md diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/META-INF/MANIFEST.MF b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/META-INF/MANIFEST.MF similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/META-INF/MANIFEST.MF rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/META-INF/MANIFEST.MF diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/OSGI-INF/l10n/bundle.properties b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/OSGI-INF/l10n/bundle.properties similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/OSGI-INF/l10n/bundle.properties rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/OSGI-INF/l10n/bundle.properties diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/build.properties b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/build.properties similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/build.properties rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/build.properties diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/add.gif b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/add.gif similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/add.gif rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/add.gif diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/collapseall.gif b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/collapseall.gif similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/collapseall.gif rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/collapseall.gif diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/copy.gif b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/copy.gif similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/copy.gif rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/copy.gif diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/delete.png b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/delete.png similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/delete.png rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/delete.png diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/duplicate.gif b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/duplicate.gif similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/duplicate.gif rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/duplicate.gif diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/export.gif b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/export.gif similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/export.gif rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/export.gif diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/icons.gif b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/icons.gif similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/icons.gif rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/icons.gif diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/import.gif b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/import.gif similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/import.gif rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/import.gif diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/maximize.gif b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/maximize.gif similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/maximize.gif rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/maximize.gif diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/minimize.gif b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/minimize.gif similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/minimize.gif rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/minimize.gif diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/plugin_id.gif b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/plugin_id.gif similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/plugin_id.gif rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/plugin_id.gif diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/prohibit.png b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/prohibit.png similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/prohibit.png rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/prohibit.png diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/rotate.gif b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/rotate.gif similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/rotate.gif rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/rotate.gif diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/sync.gif b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/sync.gif similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/sync.gif rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/sync.gif diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/zoom.gif b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/zoom.gif similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/icons/zoom.gif rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/icons/zoom.gif diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/plugin.xml b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/plugin.xml similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/plugin.xml rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/plugin.xml diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/pom.xml b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/pom.xml similarity index 100% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/pom.xml rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/pom.xml diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/common/logging/CustomLoggerFactory.java b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/common/logging/CustomLoggerFactory.java similarity index 82% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/common/logging/CustomLoggerFactory.java rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/common/logging/CustomLoggerFactory.java index 8948647..28dfd66 100644 --- a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/common/logging/CustomLoggerFactory.java +++ b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/common/logging/CustomLoggerFactory.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,14 +21,14 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.common.logging; +package org.chrysalix.common.logging; import java.util.HashMap; import java.util.Map; -import org.polyglotter.common.LogFactory; -import org.polyglotter.common.Logger; -import org.polyglotter.eclipse.EclipseLogger; +import org.chrysalix.common.LogFactory; +import org.chrysalix.common.Logger; +import org.chrysalix.eclipse.EclipseLogger; /** * diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/Activator.java b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/Activator.java similarity index 81% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/Activator.java rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/Activator.java index efb4140..0bf40e0 100644 --- a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/Activator.java +++ b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/Activator.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.eclipse; +package org.chrysalix.eclipse; import org.eclipse.swt.graphics.Image; import org.eclipse.ui.plugin.AbstractUIPlugin; @@ -35,7 +35,7 @@ public class Activator extends AbstractUIPlugin { /** * */ - public static String ID = "org.polyglotter.eclipse"; + public static String ID = "org.chrysalix.eclipse"; static Activator plugin; @@ -46,8 +46,6 @@ static Image image( final String path ) { return plugin.getImageRegistry().get( path ); } - // private Polyglotter polyglotter; - /** * {@inheritDoc} * @@ -57,7 +55,6 @@ static Image image( final String path ) { public void start( final BundleContext context ) throws Exception { super.start( context ); plugin = this; - // polyglotter = new Polyglotter( getStateLocation().toOSString() ); } /** @@ -67,8 +64,6 @@ public void start( final BundleContext context ) throws Exception { */ @Override public void stop( final BundleContext context ) throws Exception { - // Close Polyglotter - // if ( polyglotter != null ) polyglotter.close(); // Stop plug-in plugin = null; super.stop( context ); diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/EclipseI18n.java b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/EclipseI18n.java similarity index 96% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/EclipseI18n.java rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/EclipseI18n.java index b5e8e6b..c7d010c 100644 --- a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/EclipseI18n.java +++ b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/EclipseI18n.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,12 +21,12 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.eclipse; +package org.chrysalix.eclipse; -import org.polyglotter.common.I18n; +import org.chrysalix.common.I18n; /** - * The internationalized string constants for the org.polyglotter.eclipse packages. + * The internationalized string constants for the org.chrysalix.eclipse packages. */ @SuppressWarnings( "javadoc" ) public final class EclipseI18n { diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/EclipseLogger.java b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/EclipseLogger.java similarity index 94% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/EclipseLogger.java rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/EclipseLogger.java index 0395a9c..659d86d 100644 --- a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/EclipseLogger.java +++ b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/EclipseLogger.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,13 +21,13 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.eclipse; +package org.chrysalix.eclipse; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Status; -import org.polyglotter.common.I18n; -import org.polyglotter.common.Logger; +import org.chrysalix.common.I18n; +import org.chrysalix.common.Logger; /** * The EclipseLogger class provides an Logger implementation that uses the Eclipse logger. @@ -199,7 +199,7 @@ else if ( severity == IStatus.ERROR ) { /** * {@inheritDoc} * - * @see org.polyglotter.common.Logger#setLevel(org.polyglotter.common.Logger.Level) + * @see Logger#setLevel(Logger.Level) */ @Override public void setLevel( final Level level ) { diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/PerspectiveFactory.java b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/PerspectiveFactory.java similarity index 81% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/PerspectiveFactory.java rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/PerspectiveFactory.java index 4c15d9d..f8ba09f 100644 --- a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/PerspectiveFactory.java +++ b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/PerspectiveFactory.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,15 +21,15 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.eclipse; +package org.chrysalix.eclipse; import org.eclipse.ui.IPageLayout; import org.eclipse.ui.IPerspectiveFactory; -import org.polyglotter.eclipse.view.TransformView; -import org.polyglotter.eclipse.view.WorkspaceView; +import org.chrysalix.eclipse.view.TransformView; +import org.chrysalix.eclipse.view.WorkspaceView; /** - * The Polyglotter perspective definition. + * The Chrysalix perspective definition. */ public final class PerspectiveFactory implements IPerspectiveFactory { diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/Util.java b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/Util.java similarity index 93% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/Util.java rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/Util.java index b4ebf73..734081b 100644 --- a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/Util.java +++ b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/Util.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.eclipse; +package org.chrysalix.eclipse; import org.eclipse.core.runtime.Platform; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; -import org.polyglotter.common.I18n; -import org.polyglotter.common.Logger; -import org.polyglotter.common.Logger.Level; +import org.chrysalix.common.I18n; +import org.chrysalix.common.Logger; +import org.chrysalix.common.Logger.Level; /** - * Utilities used in the Polyglotter Eclipse project. + * Utilities */ public final class Util { diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/editor/TransformEditor.java b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/editor/TransformEditor.java similarity index 92% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/editor/TransformEditor.java rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/editor/TransformEditor.java index 096b904..96765fa 100644 --- a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/editor/TransformEditor.java +++ b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/editor/TransformEditor.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.eclipse.editor; +package org.chrysalix.eclipse.editor; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.swt.widgets.Composite; diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/focustree/FocusTree.java b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/focustree/FocusTree.java similarity index 95% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/focustree/FocusTree.java rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/focustree/FocusTree.java index ba8c533..c5dcafa 100644 --- a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/focustree/FocusTree.java +++ b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/focustree/FocusTree.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.eclipse.focustree; +package org.chrysalix.eclipse.focustree; import java.util.ArrayList; import java.util.Collection; @@ -79,13 +79,13 @@ import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.ToolBar; import org.eclipse.swt.widgets.ToolItem; -import org.polyglotter.common.CheckArg; -import org.polyglotter.common.I18n; -import org.polyglotter.common.PolyglotterException; -import org.polyglotter.eclipse.EclipseI18n; -import org.polyglotter.eclipse.Util; -import org.polyglotter.eclipse.focustree.FocusTreeCanvas.Cell; -import org.polyglotter.eclipse.focustree.FocusTreeCanvas.CellColumn; +import org.chrysalix.common.CheckArg; +import org.chrysalix.common.I18n; +import org.chrysalix.common.ChrysalixException; +import org.chrysalix.eclipse.EclipseI18n; +import org.chrysalix.eclipse.Util; +import org.chrysalix.eclipse.focustree.FocusTreeCanvas.Cell; +import org.chrysalix.eclipse.focustree.FocusTreeCanvas.CellColumn; //TODO move position of cells //TODO zoom, search @@ -111,8 +111,8 @@ public class FocusTree extends Composite { static final int HEADER_MARGIN = 2; - private static final String HIDE_BUTTON_PROPERTY = "org.polyglotter.hideButton"; - private static final String COLUMN_PROPERTY = "org.polyglotter.column"; + private static final String HIDE_BUTTON_PROPERTY = "org.chrysalix.hideButton"; + private static final String COLUMN_PROPERTY = "org.chrysalix.column"; Object root; Model model; @@ -427,7 +427,7 @@ private void createHeader( final Column column, GridDataFactory.swtDefaults().applyTo( childCount ); try { childCount.setText( String.valueOf( model.childCount( column.item ) ) ); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { childCount.setText( "?" ); } childCount.setToolTipText( EclipseI18n.focusTreeChildCountToolTip.text() ); @@ -437,14 +437,14 @@ private void createHeader( final Column column, String name; try { name = model.name( column.item ).toString(); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { Util.logError( e, EclipseI18n.focusTreeUnableToGetName, column.item ); name = EclipseI18n.focusTreeErrorText.text( e.getMessage() ); } itemName.setText( name ); try { itemName.setToolTipText( EclipseI18n.focusTreeParentNameToolTip.text( model.qualifiedName( column.item ) ) ); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { Util.logError( e, EclipseI18n.focusTreeUnableToGetQualifiedName, column.item ); itemName.setToolTipText( EclipseI18n.focusTreeErrorText.text( e.getMessage() ) ); } @@ -548,7 +548,7 @@ private void createPathBarButton( final Column column, column.pathButton.setForeground( pathButtonForegroundColor ); try { column.pathButton.setText( model.name( column.item ).toString() ); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { Util.logError( e, EclipseI18n.focusTreeUnableToGetName, column.item ); column.pathButton.setText( EclipseI18n.focusTreeErrorText.text( e.getMessage() ) ); } @@ -572,7 +572,7 @@ public void mouseUp( final MouseEvent event ) { } ); try { column.pathButton.setToolTipText( EclipseI18n.focusTreePathButtonToolTip.text( model.qualifiedName( column.item ) ) ); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { Util.logError( e, EclipseI18n.focusTreeUnableToGetName, column.item ); column.pathButton.setToolTipText( EclipseI18n.focusTreeErrorText.text( e.getMessage() ) ); } @@ -1007,11 +1007,11 @@ public static class Model { * the index within the supplied parent where a new item is to be added * @return The newly added item. Must not be null unless {@link #childrenAddable(Object) children can not be * added to the supplied parent}. Default is null - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs */ public Object add( final Object parent, - final int index ) throws PolyglotterException { + final int index ) throws ChrysalixException { return true; } @@ -1019,10 +1019,10 @@ public Object add( final Object parent, * @param item * an item in the tree * @return the number of children of the supplied item. Default is 0. - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs */ - public int childCount( final Object item ) throws PolyglotterException { + public int childCount( final Object item ) throws ChrysalixException { return 0; } @@ -1030,10 +1030,10 @@ public int childCount( final Object item ) throws PolyglotterException { * @param item * an item in the tree * @return the children of the supplied item. Must not be null. Default is an empty array. - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs */ - public Object[] children( final Object item ) throws PolyglotterException { + public Object[] children( final Object item ) throws ChrysalixException { return Util.EMPTY_ARRAY; } @@ -1068,10 +1068,10 @@ public boolean delete( final Object item ) { * @param item * an item in the tree * @return true if the supplied item has children. Default is false, - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs */ - public boolean hasChildren( final Object item ) throws PolyglotterException { + public boolean hasChildren( final Object item ) throws ChrysalixException { return false; } @@ -1079,10 +1079,10 @@ public boolean hasChildren( final Object item ) throws PolyglotterException { * @param item * an item in the tree * @return true if the supplied item has a name. Default is true - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs */ - public boolean hasName( final Object item ) throws PolyglotterException { + public boolean hasName( final Object item ) throws ChrysalixException { return true; } @@ -1099,10 +1099,10 @@ public boolean hasType( final Object item ) { * @param item * an item in the tree * @return true if the supplied item has a value. Default is false - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs */ - public boolean hasValue( final Object item ) throws PolyglotterException { + public boolean hasValue( final Object item ) throws ChrysalixException { return false; } @@ -1113,11 +1113,11 @@ public boolean hasValue( final Object item ) throws PolyglotterException { * the parent of the supplied item * @return the supplied item's index, or -1 if not found. Default is the item's index within * {@link #children(Object)}. - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs */ public int indexOf( final Object item, - final Object parent ) throws PolyglotterException { + final Object parent ) throws ChrysalixException { int ndx = 0; for ( final Object child : children( parent ) ) { if ( child.equals( item ) ) return ndx; @@ -1150,10 +1150,10 @@ public boolean movable( final Object item ) { * an item in the tree * @return the name of the supplied item's cell. Must not be null. Default is the item's * {@link Object#toString()}. - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs */ - public Object name( final Object item ) throws PolyglotterException { + public Object name( final Object item ) throws ChrysalixException { return item.toString(); } @@ -1184,10 +1184,10 @@ public String nameProblem( final Object item, * an item in the tree * @return the fully-qualified name of the supplied item's cell. Must not be null. Default is the item's * {@link #name(Object) name} - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs */ - public Object qualifiedName( final Object item ) throws PolyglotterException { + public Object qualifiedName( final Object item ) throws ChrysalixException { return name( item ); } @@ -1202,12 +1202,12 @@ public Object qualifiedName( final Object item ) throws PolyglotterException { * @param index * an index for the supplied item * @return an item with the supplied index. Default is the supplied item. - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs */ public Object setIndex( final Object item, final Object parent, - final int index ) throws PolyglotterException { + final int index ) throws ChrysalixException { return item; } @@ -1219,11 +1219,11 @@ public Object setIndex( final Object item, * @param name * a name for the supplied item * @return an item with the supplied name. Must not be null. Default is the supplied item. - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs */ public Object setName( final Object item, - final Object name ) throws PolyglotterException { + final Object name ) throws ChrysalixException { return item; } @@ -1235,11 +1235,11 @@ public Object setName( final Object item, * @param type * a type for the supplied item * @return an item with the supplied type. Must not be null. Default is the supplied item. - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs */ public Object setType( final Object item, - final Object type ) throws PolyglotterException { + final Object type ) throws ChrysalixException { return item; } @@ -1251,11 +1251,11 @@ public Object setType( final Object item, * @param value * a value for the supplied item * @return an item with the supplied value. Default is the supplied item. - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs */ public Object setValue( final Object item, - final Object value ) throws PolyglotterException { + final Object value ) throws ChrysalixException { return item; } @@ -1263,10 +1263,10 @@ public Object setValue( final Object item, * @param item * an item in the tree * @return the type of the supplied item's cell. Default is the item's simple class name. - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs */ - public Object type( final Object item ) throws PolyglotterException { + public Object type( final Object item ) throws ChrysalixException { return item.getClass().getSimpleName(); } @@ -1296,10 +1296,10 @@ public String typeProblem( final Object item, * @param item * an item in the tree * @return the value of the supplied item's cell. Default is null. - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs */ - public Object value( final Object item ) throws PolyglotterException { + public Object value( final Object item ) throws ChrysalixException { return null; } diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/focustree/FocusTreeCanvas.java b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/focustree/FocusTreeCanvas.java similarity index 95% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/focustree/FocusTreeCanvas.java rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/focustree/FocusTreeCanvas.java index d4f51ae..cd7416c 100644 --- a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/focustree/FocusTreeCanvas.java +++ b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/focustree/FocusTreeCanvas.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.eclipse.focustree; +package org.chrysalix.eclipse.focustree; import java.util.HashMap; import java.util.List; @@ -63,11 +63,11 @@ import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; -import org.polyglotter.common.PolyglotterException; -import org.polyglotter.eclipse.EclipseI18n; -import org.polyglotter.eclipse.Util; -import org.polyglotter.eclipse.focustree.FocusTree.Column; -import org.polyglotter.eclipse.focustree.FocusTree.Indicator; +import org.chrysalix.common.ChrysalixException; +import org.chrysalix.eclipse.EclipseI18n; +import org.chrysalix.eclipse.Util; +import org.chrysalix.eclipse.focustree.FocusTree.Column; +import org.chrysalix.eclipse.focustree.FocusTree.Indicator; class FocusTreeCanvas extends FigureCanvas { @@ -222,7 +222,7 @@ public void paint( final IFigure figure, } Cell addCell( final Object item, - final Column column ) throws PolyglotterException { + final Column column ) throws ChrysalixException { // Add new cell for item final Cell cell = addCell( item, column, modelIndex( item, column ) ); // Update indexes @@ -288,7 +288,7 @@ private Cell addCell( final Object item, if ( focusTree.model.hasName( item ) ) { try { cell.nameField = new NameField( focusTree.model.name( item ).toString() ); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { Util.logError( e, EclipseI18n.focusTreeUnableToGetName, item ); cell.nameField = new NameField( EclipseI18n.focusTreeErrorText.text( e.getMessage() ) ); } @@ -297,13 +297,13 @@ private Cell addCell( final Object item, cell.nameField.setForegroundColor( focusTree.viewModel.cellForegroundColor( item ) ); try { cell.nameField.setToolTip( new Label( EclipseI18n.focusTreeCellNameToolTip.text( focusTree.model.qualifiedName( item ) ) ) ); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { Util.logError( e, EclipseI18n.focusTreeUnableToGetQualifiedName, item ); cell.nameField.setToolTip( new Label( EclipseI18n.focusTreeErrorText.text( e.getMessage() ) ) ); } cell.setConstraint( cell.nameField, new GridData( SWT.FILL, SWT.DEFAULT, true, false, 3, 1 ) ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { Util.logError( e, EclipseI18n.focusTreeUnableToDetermineIfItemHasName, item ); } if ( focusTree.model.hasType( item ) ) { @@ -312,7 +312,7 @@ private Cell addCell( final Object item, try { final Object type = focusTree.model.type( item ); typeField = new TypeField( type == null ? null : type.toString() ); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { Util.logError( e, EclipseI18n.focusTreeUnableToGetType, item ); typeField = new TypeField( EclipseI18n.focusTreeErrorText.text( e.getMessage() ) ); } @@ -328,7 +328,7 @@ private Cell addCell( final Object item, try { final Object value = focusTree.model.value( item ); cell.valueField = new ValueField( value == null ? null : value.toString() ); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { Util.logError( e, EclipseI18n.focusTreeUnableToGetValue, item ); cell.valueField = new ValueField( EclipseI18n.focusTreeErrorText.text( e.getMessage() ) ); } @@ -338,7 +338,7 @@ private Cell addCell( final Object item, cell.valueField.setToolTip( new Label( EclipseI18n.focusTreeCellValueToolTip.text() ) ); cell.setConstraint( cell.valueField, new GridData( SWT.FILL, SWT.DEFAULT, true, false, 3, 1 ) ); } - } catch ( final PolyglotterException e ) {} + } catch ( final ChrysalixException e ) {} // Make index and spacer labels the same size so icon is centered final int width = Math.max( cell.indexField.getPreferredSize().width, indicators.getPreferredSize().width ); ( ( GridData ) cell.getLayoutManager().getConstraint( cell.indexField ) ).widthHint = width; @@ -362,7 +362,7 @@ void addColumn( final Column column ) { if ( column.focusCell == null && ( lastFocusItem == null || child.equals( lastFocusItem ) ) ) column.focusCell = cell; } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { Util.logAndShowError( e, EclipseI18n.focusTreeUnableToGetChildren, column.item ); } updateCellPreferredWidth( column ); @@ -403,7 +403,7 @@ void addItem() { try { final Object item = focusTree.model.add( column.item, addButton.index ); if ( item == null ) - throw new PolyglotterException( EclipseI18n.focusTreeNullReturnedFromCreate, column.item, addButton.index ); + throw new ChrysalixException( EclipseI18n.focusTreeNullReturnedFromCreate, column.item, addButton.index ); final Cell cell = addCell( item, column ); updateCellPreferredWidth( column ); if ( focusTree.model.nameEditable( cell.item ) ) { @@ -414,11 +414,11 @@ public void run() { try { if ( focusTree.model.hasName( cell.item ) ) editNameField( cell ); else editValueField( cell ); - } catch ( final PolyglotterException e ) {} + } catch ( final ChrysalixException e ) {} } } ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { Util.logAndShowError( e, EclipseI18n.focusTreeUnableToCreateItem, column.item ); } } @@ -555,10 +555,10 @@ void editNameField( final Cell cell ) { edit( cell.nameField, focusTree.viewModel.nameEditor( cell.item ), new EditorHandler() { @Override - public Object commit() throws PolyglotterException { + public Object commit() throws ChrysalixException { final Object item = focusTree.model.setName( cell.item, editor.getValue().toString() ); if ( item == null ) - throw new PolyglotterException( EclipseI18n.focusTreeNullReturnedFromSetName, cell.item ); + throw new ChrysalixException( EclipseI18n.focusTreeNullReturnedFromSetName, cell.item ); return item; } @@ -574,11 +574,11 @@ void editValueField( final Cell cell ) { edit( cell.valueField, focusTree.viewModel.valueEditor( cell.item ), new EditorHandler() { @Override - public Object commit() throws PolyglotterException { + public Object commit() throws ChrysalixException { final Object value = editor.getValue(); final Object item = focusTree.model.setValue( cell.item, value == null ? null : value.toString() ); if ( item == null ) - throw new PolyglotterException( EclipseI18n.focusTreeNullReturnedFromSetValue, cell.item ); + throw new ChrysalixException( EclipseI18n.focusTreeNullReturnedFromSetValue, cell.item ); return item; } @@ -606,7 +606,7 @@ void endEdit() { final Label toolTip = ( Label ) fieldEdited.getToolTip(); try { toolTip.setText( EclipseI18n.focusTreeCellNameToolTip.text( focusTree.model.qualifiedName( item ) ) ); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { Util.logError( e, EclipseI18n.focusTreeUnableToGetQualifiedName, item ); toolTip.setText( EclipseI18n.focusTreeErrorText.text( e.getMessage() ) ); } @@ -621,7 +621,7 @@ public void paintControl( final PaintEvent e ) { } } ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { Util.logAndShowError( e, EclipseI18n.focusTreeUnableToCommitChanges, cell( fieldEdited ).item ); } editor.deactivate(); @@ -634,7 +634,7 @@ private void expandFocusCell( final Column column ) { focusTree.addColumn( column.focusCell.item ); column.focusCellExpanded = true; } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { Util.logAndShowError( e, EclipseI18n.focusTreeUnableToDetermineIfChildrenExist, column.focusCell.item ); } } @@ -711,14 +711,14 @@ void modelChanged() { } int modelIndex( final Object item, - final Column column ) throws PolyglotterException { + final Column column ) throws ChrysalixException { // Find actual index of item in model int index = 0; for ( final Object child : focusTree.model.children( column.item ) ) { if ( child.equals( item ) ) return index; index++; } - throw new PolyglotterException( EclipseI18n.focusTreeItemNotFound, item, column.item ); + throw new ChrysalixException( EclipseI18n.focusTreeItemNotFound, item, column.item ); } void mouseClickedOverCanvas( final MouseEvent event ) { @@ -752,14 +752,14 @@ void mouseDoubleClickedOverCanvas( final MouseEvent event ) { edit( ( IndexField ) figure, focusTree.viewModel.indexEditor( cell.item ), new EditorHandler() { @Override - public Object commit() throws PolyglotterException { + public Object commit() throws ChrysalixException { final Object value = editor.getValue(); if ( value == null ) return cell.item; final int index = Integer.parseInt( value.toString() ); final Column column = column( cell ); final Object item = focusTree.model.setIndex( cell.item, column.item, index ); if ( item == null ) - throw new PolyglotterException( EclipseI18n.focusTreeNullReturnedFromSetType, cell.item ); + throw new ChrysalixException( EclipseI18n.focusTreeNullReturnedFromSetType, cell.item ); int actualIndex = focusTree.model.indexOf( item, column.item ); if ( focusTree.viewModel.initialIndexIsOne() ) actualIndex++; if ( index != actualIndex ) editor.setValue( Integer.valueOf( actualIndex ).toString() ); @@ -784,11 +784,11 @@ public String problem() { edit( ( TypeField ) figure, focusTree.viewModel.typeEditor( cell.item ), new EditorHandler() { @Override - public Object commit() throws PolyglotterException { + public Object commit() throws ChrysalixException { final Object type = editor.getValue(); final Object item = focusTree.model.setType( cell.item, type == null ? null : type.toString() ); if ( item == null ) - throw new PolyglotterException( EclipseI18n.focusTreeNullReturnedFromSetType, cell.item ); + throw new ChrysalixException( EclipseI18n.focusTreeNullReturnedFromSetType, cell.item ); return item; } @@ -809,7 +809,7 @@ public String problem() { try { if ( cell != null && ( focusTree.model.childrenAddable( cell.item ) || focusTree.model.hasChildren( cell.item ) ) ) focusTree.duplicate( cell.item ); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { Util.logAndShowError( e, EclipseI18n.focusTreeUnableToDetermineIfChildrenAddableOrExist, cell.item ); } } @@ -1199,7 +1199,7 @@ class DeleteButton extends ImageFigure { private interface EditorHandler { - Object commit() throws PolyglotterException; + Object commit() throws ChrysalixException; String problem(); } diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/ModelContentProvider.java b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/ModelContentProvider.java similarity index 84% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/ModelContentProvider.java rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/ModelContentProvider.java index 4aef4a8..d40f572 100644 --- a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/ModelContentProvider.java +++ b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/ModelContentProvider.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.eclipse.view; +package org.chrysalix.eclipse.view; import java.lang.reflect.Method; import java.util.ArrayList; @@ -32,15 +32,15 @@ import org.modeshape.modeler.Model; import org.modeshape.modeler.ModelObject; import org.modeshape.modeler.ModelerException; -import org.polyglotter.common.Logger; -import org.polyglotter.common.Logger.Level; -import org.polyglotter.common.PolyglotterException; -import org.polyglotter.eclipse.EclipseI18n; -import org.polyglotter.eclipse.Util; -import org.polyglotter.eclipse.focustree.FocusTree; +import org.chrysalix.common.Logger; +import org.chrysalix.common.Logger.Level; +import org.chrysalix.common.ChrysalixException; +import org.chrysalix.eclipse.EclipseI18n; +import org.chrysalix.eclipse.Util; +import org.chrysalix.eclipse.focustree.FocusTree; /** - * A {@link FocusTree} content provider for Polyglotter {@link Model models}. + * A {@link FocusTree} content provider for {@link Model models}. */ public final class ModelContentProvider extends FocusTree.Model { @@ -175,12 +175,12 @@ private Collection< PropertyModel > addPropertiesFromMethods( final ModelObject * @param parent * the parent of the child being requested (cannot be null) * @return the child or null if not found - * @throws PolyglotterException + * @throws ChrysalixException * if any error occurs */ public Object child( final String childName, final Object parent - ) throws PolyglotterException { + ) throws ChrysalixException { for ( final Object obj : children( parent ) ) { final Object name = name( obj ); @@ -195,25 +195,25 @@ public Object child( final String childName, /** * {@inheritDoc} * - * @see org.polyglotter.eclipse.focustree.FocusTree.Model#childCount(java.lang.Object) + * @see org.chrysalix.eclipse.focustree.FocusTree.Model#childCount(java.lang.Object) */ @Override - public int childCount( final Object item ) throws PolyglotterException { + public int childCount( final Object item ) throws ChrysalixException { return children( item ).length; } /** * {@inheritDoc} * - * @see org.polyglotter.eclipse.focustree.FocusTree.Model#children(java.lang.Object) + * @see org.chrysalix.eclipse.focustree.FocusTree.Model#children(java.lang.Object) */ @Override - public Object[] children( final Object item ) throws PolyglotterException { + public Object[] children( final Object item ) throws ChrysalixException { if ( item instanceof ModelObject ) { try { return childrenOf( ( ModelObject ) item ); } catch ( final Exception e ) { - throw new PolyglotterException( e ); + throw new ChrysalixException( e ); } } @@ -221,7 +221,7 @@ public Object[] children( final Object item ) throws PolyglotterException { try { return childrenOf( ( ModelContent ) item ); } catch ( final Exception e ) { - throw new PolyglotterException( e ); + throw new ChrysalixException( e ); } } @@ -260,16 +260,16 @@ private Object[] childrenOf( final ModelObject modelObj ) throws Exception { /** * {@inheritDoc} * - * @see org.polyglotter.eclipse.focustree.FocusTree.Model#hasChildren(java.lang.Object) + * @see org.chrysalix.eclipse.focustree.FocusTree.Model#hasChildren(java.lang.Object) */ @Override - public boolean hasChildren( final Object item ) throws PolyglotterException { + public boolean hasChildren( final Object item ) throws ChrysalixException { if ( item instanceof ModelObject ) { try { debug( "%s has children: %s", ( ( ModelObject ) item ).name(), ( ( ModelObject ) item ).hasChildren() ); return ( children( item ).length != 0 ); } catch ( final Exception e ) { - throw new PolyglotterException( e ); + throw new ChrysalixException( e ); } } @@ -280,15 +280,15 @@ public boolean hasChildren( final Object item ) throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.eclipse.focustree.FocusTree.Model#hasName(java.lang.Object) + * @see org.chrysalix.eclipse.focustree.FocusTree.Model#hasName(java.lang.Object) */ @Override - public boolean hasName( final Object item ) throws PolyglotterException { + public boolean hasName( final Object item ) throws ChrysalixException { if ( item instanceof ModelObject ) { try { return !Util.isBlank( ( ( ModelObject ) item ).name() ); } catch ( final ModelerException e ) { - throw new PolyglotterException( e ); + throw new ChrysalixException( e ); } } @@ -299,7 +299,7 @@ public boolean hasName( final Object item ) throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.eclipse.focustree.FocusTree.Model#hasType(java.lang.Object) + * @see org.chrysalix.eclipse.focustree.FocusTree.Model#hasType(java.lang.Object) */ @Override public boolean hasType( final Object item ) { @@ -311,25 +311,25 @@ public boolean hasType( final Object item ) { /** * {@inheritDoc} * - * @see org.polyglotter.eclipse.focustree.FocusTree.Model#hasValue(java.lang.Object) + * @see org.chrysalix.eclipse.focustree.FocusTree.Model#hasValue(java.lang.Object) */ @Override - public boolean hasValue( final Object item ) throws PolyglotterException { + public boolean hasValue( final Object item ) throws ChrysalixException { return ( value( item ) != null ); } /** * {@inheritDoc} * - * @see org.polyglotter.eclipse.focustree.FocusTree.Model#name(java.lang.Object) + * @see org.chrysalix.eclipse.focustree.FocusTree.Model#name(java.lang.Object) */ @Override - public Object name( final Object item ) throws PolyglotterException { + public Object name( final Object item ) throws ChrysalixException { if ( item instanceof ModelObject ) { try { return ( ( ModelObject ) item ).name(); } catch ( final Exception e ) { - throw new PolyglotterException( e ); + throw new ChrysalixException( e ); } } @@ -340,10 +340,10 @@ public Object name( final Object item ) throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.eclipse.focustree.FocusTree.Model#qualifiedName(java.lang.Object) + * @see org.chrysalix.eclipse.focustree.FocusTree.Model#qualifiedName(java.lang.Object) */ @Override - public Object qualifiedName( final Object item ) throws PolyglotterException { + public Object qualifiedName( final Object item ) throws ChrysalixException { if ( item instanceof ModelObject ) { return ( ( ModelObject ) item ).absolutePath(); } @@ -358,15 +358,15 @@ public Object qualifiedName( final Object item ) throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.eclipse.focustree.FocusTree.Model#type(java.lang.Object) + * @see org.chrysalix.eclipse.focustree.FocusTree.Model#type(java.lang.Object) */ @Override - public Object type( final Object item ) throws PolyglotterException { + public Object type( final Object item ) throws ChrysalixException { if ( item instanceof ModelObject ) { try { return formatType( ( ( ModelObject ) item ).primaryType() ); } catch ( final Exception e ) { - throw new PolyglotterException( e ); + throw new ChrysalixException( e ); } } @@ -377,10 +377,10 @@ public Object type( final Object item ) throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.eclipse.focustree.FocusTree.Model#value(java.lang.Object) + * @see org.chrysalix.eclipse.focustree.FocusTree.Model#value(java.lang.Object) */ @Override - public Object value( final Object item ) throws PolyglotterException { + public Object value( final Object item ) throws ChrysalixException { if ( item instanceof ModelObject ) return null; if ( item instanceof ModelContent ) return ( ( ModelContent ) item ).value(); return super.value( item ); @@ -494,7 +494,7 @@ public String name() { /** * {@inheritDoc} * - * @see org.polyglotter.eclipse.view.ModelContentProvider.ModelContent#qualifiedName() + * @see org.chrysalix.eclipse.view.ModelContentProvider.ModelContent#qualifiedName() */ @Override public String qualifiedName() { @@ -540,7 +540,7 @@ class ValueModel implements ModelContent { /** * {@inheritDoc} * - * @see org.polyglotter.eclipse.view.ModelContentProvider.ModelContent#children() + * @see org.chrysalix.eclipse.view.ModelContentProvider.ModelContent#children() */ @Override public Object[] children() { @@ -550,7 +550,7 @@ public Object[] children() { /** * {@inheritDoc} * - * @see org.polyglotter.eclipse.view.ModelContentProvider.ModelContent#hasChildren() + * @see org.chrysalix.eclipse.view.ModelContentProvider.ModelContent#hasChildren() */ @Override public boolean hasChildren() { @@ -569,7 +569,7 @@ PropertyModel parent() { /** * {@inheritDoc} * - * @see org.polyglotter.eclipse.view.ModelContentProvider.ModelContent#qualifiedName() + * @see org.chrysalix.eclipse.view.ModelContentProvider.ModelContent#qualifiedName() */ @Override public String qualifiedName() { diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/TransformView.java b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/TransformView.java similarity index 86% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/TransformView.java rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/TransformView.java index 58382da..2a7f8a4 100644 --- a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/TransformView.java +++ b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/TransformView.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.eclipse.view; +package org.chrysalix.eclipse.view; import java.io.File; @@ -30,12 +30,12 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.part.ViewPart; -import org.polyglotter.common.PolyglotterException; -import org.polyglotter.eclipse.EclipseI18n; -import org.polyglotter.eclipse.Util; -import org.polyglotter.eclipse.focustree.FocusTree; -import org.polyglotter.eclipse.focustree.FocusTree.Model; -import org.polyglotter.eclipse.focustree.FocusTree.ViewModel; +import org.chrysalix.common.ChrysalixException; +import org.chrysalix.eclipse.EclipseI18n; +import org.chrysalix.eclipse.Util; +import org.chrysalix.eclipse.focustree.FocusTree; +import org.chrysalix.eclipse.focustree.FocusTree.Model; +import org.chrysalix.eclipse.focustree.FocusTree.ViewModel; /** * A view whose contents are the transforms contained in the workspace. @@ -102,7 +102,7 @@ public boolean initialIndexIsOne() { } ); try { setPartName( focusTree.model().name( focusTree.root() ).toString() ); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { setPartName( EclipseI18n.focusTreeErrorText.text( e.getMessage() ) ); } setTitleImage( focusTree.viewModel().icon( focusTree.root() ) ); diff --git a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/WorkspaceView.java b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/WorkspaceView.java similarity index 96% rename from polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/WorkspaceView.java rename to chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/WorkspaceView.java index 88e76f3..4c07205 100644 --- a/polyglotter-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/WorkspaceView.java +++ b/chrysalix-eclipse/plugins/org.polyglotter.eclipse/src/org/polyglotter/eclipse/view/WorkspaceView.java @@ -1,4 +1,4 @@ -package org.polyglotter.eclipse.view; +package org.chrysalix.eclipse.view; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; diff --git a/polyglotter-eclipse/plugins/pom.xml b/chrysalix-eclipse/plugins/pom.xml similarity index 100% rename from polyglotter-eclipse/plugins/pom.xml rename to chrysalix-eclipse/plugins/pom.xml diff --git a/polyglotter-eclipse/pom.xml b/chrysalix-eclipse/pom.xml similarity index 100% rename from polyglotter-eclipse/pom.xml rename to chrysalix-eclipse/pom.xml diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/GuiTestModelContentProvider.launch b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/GuiTestModelContentProvider.launch similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/GuiTestModelContentProvider.launch rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/GuiTestModelContentProvider.launch diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/META-INF/MANIFEST.MF b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/META-INF/MANIFEST.MF similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/META-INF/MANIFEST.MF rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/META-INF/MANIFEST.MF diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/OSGI-INF/I10n/bundle.properties b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/OSGI-INF/I10n/bundle.properties similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/OSGI-INF/I10n/bundle.properties rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/OSGI-INF/I10n/bundle.properties diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/build.properties b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/build.properties similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/build.properties rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/build.properties diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/add.gif b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/add.gif similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/add.gif rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/add.gif diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/close.gif b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/close.gif similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/close.gif rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/close.gif diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/collapseall.gif b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/collapseall.gif similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/collapseall.gif rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/collapseall.gif diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/copy.gif b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/copy.gif similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/copy.gif rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/copy.gif diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/delete.png b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/delete.png similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/delete.png rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/delete.png diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/duplicate.gif b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/duplicate.gif similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/duplicate.gif rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/duplicate.gif diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/file.gif b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/file.gif similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/file.gif rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/file.gif diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/folder.gif b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/folder.gif similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/folder.gif rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/folder.gif diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/maximize.gif b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/maximize.gif similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/maximize.gif rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/maximize.gif diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/minimize.gif b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/minimize.gif similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/minimize.gif rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/minimize.gif diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/transformation.png b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/transformation.png similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/icons/transformation.png rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/icons/transformation.png diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/pom.xml b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/pom.xml similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/pom.xml rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/pom.xml diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/resources/Books.xsd b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/resources/Books.xsd similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/resources/Books.xsd rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/resources/Books.xsd diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/resources/data/types/BookDatatypes.xsd b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/resources/data/types/BookDatatypes.xsd similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/resources/data/types/BookDatatypes.xsd rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/resources/data/types/BookDatatypes.xsd diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/resources/log4j.properties b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/resources/log4j.properties similarity index 100% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/resources/log4j.properties rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/resources/log4j.properties diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/GuiTestUtil.java b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/GuiTestUtil.java similarity index 89% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/GuiTestUtil.java rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/GuiTestUtil.java index d888dae..b2b13b8 100644 --- a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/GuiTestUtil.java +++ b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/GuiTestUtil.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.eclipse; +package org.chrysalix.eclipse; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Control; diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/TestEclipseI18n.java b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/TestEclipseI18n.java similarity index 82% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/TestEclipseI18n.java rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/TestEclipseI18n.java index a54dfbc..59ab929 100644 --- a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/TestEclipseI18n.java +++ b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/TestEclipseI18n.java @@ -1,19 +1,19 @@ -package org.polyglotter.eclipse; +package org.chrysalix.eclipse; /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -24,7 +24,7 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -import org.polyglotter.common.I18n; +import org.chrysalix.common.I18n; @SuppressWarnings( "javadoc" ) public final class TestEclipseI18n { diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/focustree/GuiTestFocusTree.java b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/focustree/GuiTestFocusTree.java similarity index 85% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/focustree/GuiTestFocusTree.java rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/focustree/GuiTestFocusTree.java index 4edc095..0900908 100644 --- a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/focustree/GuiTestFocusTree.java +++ b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/focustree/GuiTestFocusTree.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.eclipse.focustree; +package org.chrysalix.eclipse.focustree; import java.io.File; import java.io.IOException; @@ -30,13 +30,13 @@ import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Display; -import org.polyglotter.common.PolyglotterException; -import org.polyglotter.eclipse.GuiTestUtil; -import org.polyglotter.eclipse.TestEclipseI18n; -import org.polyglotter.eclipse.Util; -import org.polyglotter.eclipse.focustree.FocusTree.Indicator; -import org.polyglotter.eclipse.focustree.FocusTree.Model; -import org.polyglotter.eclipse.focustree.FocusTree.ViewModel; +import org.chrysalix.common.ChrysalixException; +import org.chrysalix.eclipse.GuiTestUtil; +import org.chrysalix.eclipse.TestEclipseI18n; +import org.chrysalix.eclipse.Util; +import org.chrysalix.eclipse.focustree.FocusTree.Indicator; +import org.chrysalix.eclipse.focustree.FocusTree.Model; +import org.chrysalix.eclipse.focustree.FocusTree.ViewModel; /** * @@ -57,13 +57,13 @@ public static void main( final String[] args ) { @Override public Object add( final Object folder, - final int index ) throws PolyglotterException { + final int index ) throws ChrysalixException { try { final File file = new File( ( ( File ) folder ), "Unnamed" ); - if ( !file.createNewFile() ) throw new PolyglotterException( TestEclipseI18n.unableToCreateFile, folder, index ); + if ( !file.createNewFile() ) throw new ChrysalixException( TestEclipseI18n.unableToCreateFile, folder, index ); return file; } catch ( final IOException e ) { - throw new PolyglotterException( e ); + throw new ChrysalixException( e ); } } @@ -143,11 +143,11 @@ public String qualifiedName( final Object file ) { @Override public Object setName( final Object item, - final Object name ) throws PolyglotterException { + final Object name ) throws ChrysalixException { final File file = ( File ) item; final File renamedFile = new File( file.getParentFile(), name.toString() ); if ( file.renameTo( renamedFile ) ) return renamedFile; - throw new PolyglotterException( TestEclipseI18n.unableToRenameFile, file, renamedFile ); + throw new ChrysalixException( TestEclipseI18n.unableToRenameFile, file, renamedFile ); } @Override diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/view/GuiTestModelContentProvider.java b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/view/GuiTestModelContentProvider.java similarity index 91% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/view/GuiTestModelContentProvider.java rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/view/GuiTestModelContentProvider.java index 1fc7215..d236996 100644 --- a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/view/GuiTestModelContentProvider.java +++ b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/view/GuiTestModelContentProvider.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.eclipse.view; +package org.chrysalix.eclipse.view; import java.io.File; import java.io.IOException; @@ -42,10 +42,10 @@ import org.modeshape.modeler.internal.Manager; import org.modeshape.modeler.internal.MetamodelManagerImpl; import org.modeshape.modeler.internal.Task; -import org.polyglotter.eclipse.GuiTestUtil; -import org.polyglotter.eclipse.focustree.FocusTree; -import org.polyglotter.eclipse.focustree.FocusTree.ViewModel; -import org.polyglotter.eclipse.view.ModelContentProvider.PropertyModel; +import org.chrysalix.eclipse.GuiTestUtil; +import org.chrysalix.eclipse.focustree.FocusTree; +import org.chrysalix.eclipse.focustree.FocusTree.ViewModel; +import org.chrysalix.eclipse.view.ModelContentProvider.PropertyModel; @SuppressWarnings( { "javadoc" } ) public final class GuiTestModelContentProvider { diff --git a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/view/ModelContentProviderTest.java b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/view/ModelContentProviderTest.java similarity index 93% rename from polyglotter-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/view/ModelContentProviderTest.java rename to chrysalix-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/view/ModelContentProviderTest.java index 20efbc0..39f4d9b 100644 --- a/polyglotter-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/view/ModelContentProviderTest.java +++ b/chrysalix-eclipse/tests/org.polyglotter.eclipse.test/src/org/polyglotter/eclipse/view/ModelContentProviderTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.eclipse.view; +package org.chrysalix.eclipse.view; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsNull.notNullValue; @@ -39,9 +39,9 @@ import org.modeshape.modeler.MetamodelManager; import org.modeshape.modeler.Modeler; import org.modeshape.modeler.test.BaseTest; -import org.polyglotter.eclipse.view.ModelContentProvider.ModelContent; -import org.polyglotter.eclipse.view.ModelContentProvider.PropertyModel; -import org.polyglotter.eclipse.view.ModelContentProvider.ValueModel; +import org.chrysalix.eclipse.view.ModelContentProvider.ModelContent; +import org.chrysalix.eclipse.view.ModelContentProvider.PropertyModel; +import org.chrysalix.eclipse.view.ModelContentProvider.ValueModel; /** * A test class for ModelContentProvider. diff --git a/polyglotter-eclipse/tests/pom.xml b/chrysalix-eclipse/tests/pom.xml similarity index 100% rename from polyglotter-eclipse/tests/pom.xml rename to chrysalix-eclipse/tests/pom.xml diff --git a/polyglotter-engine/pom.xml b/chrysalix-engine/pom.xml similarity index 80% rename from polyglotter-engine/pom.xml rename to chrysalix-engine/pom.xml index 0af6910..0f435ff 100644 --- a/polyglotter-engine/pom.xml +++ b/chrysalix-engine/pom.xml @@ -6,17 +6,17 @@ - org.polyglotter - polyglotter + org.chrysalix + chrysalix 0.0.1-SNAPSHOT - polyglotter-engine - Polyglotter Engine - The Polyglotter data transformation engine. + chrysalix-engine + Chrysalix Engine + The Chrysalix data transformation engine. @@ -28,12 +28,12 @@ - org.polyglotter - polyglotter-common + org.chrysalix + chrysalix-common - org.polyglotter + org.chrysalix modelspace-engine @@ -61,8 +61,8 @@ - org.polyglotter - polyglotter-common + org.chrysalix + chrysalix-common test-jar diff --git a/polyglotter-engine/src/integration/java/org/polyglotter/transformation/ITJava2JavaTransformation.java b/chrysalix-engine/src/integration/java/org/polyglotter/transformation/ITJava2JavaTransformation.java similarity index 86% rename from polyglotter-engine/src/integration/java/org/polyglotter/transformation/ITJava2JavaTransformation.java rename to chrysalix-engine/src/integration/java/org/polyglotter/transformation/ITJava2JavaTransformation.java index 9c0123f..99a4818 100644 --- a/polyglotter-engine/src/integration/java/org/polyglotter/transformation/ITJava2JavaTransformation.java +++ b/chrysalix-engine/src/integration/java/org/polyglotter/transformation/ITJava2JavaTransformation.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.transformation; +package org.chrysalix.transformation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsNot.not; @@ -37,9 +37,9 @@ import org.modelspace.Metamodel; import org.modelspace.Model; import org.modelspace.ModelObject; -import org.polyglotter.operation.Map; -import org.polyglotter.operation.OperationTestConstants; -import org.polyglotter.test.BaseTest; +import org.chrysalix.operation.Map; +import org.chrysalix.operation.OperationTestConstants; +import org.chrysalix.test.BaseTest; @SuppressWarnings( { "javadoc" } ) public final class ITJava2JavaTransformation extends BaseTest { @@ -86,16 +86,16 @@ private ModelObject findModelObject( final ModelObject modelObject, @Before public void installCategory() throws Exception { - polyglotter().metamodelManager().install( CATEGORY ); + chrysalix().metamodelManager().install( CATEGORY ); } private Metamodel metamodel() throws Exception { - return polyglotter().metamodelManager().metamodel( METAMODEL_ID ); + return chrysalix().metamodelManager().metamodel( METAMODEL_ID ); } @Before public void registerTestRepository() throws Exception { - polyglotter().metamodelManager().registerMetamodelRepository( INTEGRATION_TEST_METAMODEL_REPOSITORY_URL ); + chrysalix().metamodelManager().registerMetamodelRepository( INTEGRATION_TEST_METAMODEL_REPOSITORY_URL ); } @Test @@ -110,7 +110,7 @@ public void shouldMapFieldToField() throws Exception { // setup source final File sourceFile = new File( SOURCE_MODEL_PATH ); - final Model sourceModel = polyglotter().importModel( sourceFile, "test", metamodel() ); + final Model sourceModel = chrysalix().importModel( sourceFile, "test", metamodel() ); assertThat( sourceModel, is( notNullValue() ) ); transform.add( Transformation.ModelType.SOURCE, sourceModel ); @@ -121,7 +121,7 @@ public void shouldMapFieldToField() throws Exception { // setup target final File targetFile = new File( TARGET_MODEL_PATH ); - final Model targetModel = polyglotter().importModel( targetFile, "test", metamodel() ); + final Model targetModel = chrysalix().importModel( targetFile, "test", metamodel() ); assertThat( targetModel, is( notNullValue() ) ); transform.add( Transformation.ModelType.TARGET, targetModel ); diff --git a/polyglotter-engine/src/main/java/org/polyglotter/Polyglotter.java b/chrysalix-engine/src/main/java/org/chrysalix/Chrysalix.java similarity index 91% rename from polyglotter-engine/src/main/java/org/polyglotter/Polyglotter.java rename to chrysalix-engine/src/main/java/org/chrysalix/Chrysalix.java index 25848fa..140dc8f 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/Polyglotter.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/Chrysalix.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,41 +21,41 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter; +package org.chrysalix; import java.io.File; import java.io.InputStream; import java.io.OutputStream; import java.net.URL; +import org.chrysalix.common.Logger; import org.modelspace.Metamodel; import org.modelspace.MetamodelManager; import org.modelspace.Model; import org.modelspace.Modelspace; import org.modelspace.ModelspaceException; -import org.polyglotter.common.Logger; /** * */ -public final class Polyglotter implements Modelspace { +public final class Chrysalix implements Modelspace { /** * */ - public static final Logger LOGGER = Logger.logger( PolyglotterI18n.class ); + public static final Logger LOGGER = Logger.logger( ChrysalixI18n.class ); private final Modelspace modelspace; /** - * The Polyglotter namespace. Value is {@value} . + * The Chrysalix namespace. Value is {@value} . */ - public static final String NAMESPACE_URI = "www.redhat.com/polyglotter/1.0"; + public static final String NAMESPACE_URI = "chrysalix.org/1.0"; /** - * The Polyglotter namespace prefix. Value is {@value} . + * The Chrysalix namespace prefix. Value is {@value} . */ - public static final String NAMESPACE_PREFIX = "poly"; + public static final String NAMESPACE_PREFIX = "chryx"; /** * Uses a default configuration. @@ -63,7 +63,7 @@ public final class Polyglotter implements Modelspace { * @param repositoryStoreParentPath * the file path to the folder that should contain the repository store */ - public Polyglotter( final String repositoryStoreParentPath ) { + public Chrysalix( final String repositoryStoreParentPath ) { modelspace = Modelspace.Factory.instance( repositoryStoreParentPath ); } @@ -73,8 +73,8 @@ public Polyglotter( final String repositoryStoreParentPath ) { * @param configurationPath * the file path to a configuration file */ - public Polyglotter( final String repositoryStoreParentPath, - final String configurationPath ) { + public Chrysalix( final String repositoryStoreParentPath, + final String configurationPath ) { modelspace = Modelspace.Factory.instance( repositoryStoreParentPath, configurationPath ); } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/PolyglotterException.java b/chrysalix-engine/src/main/java/org/chrysalix/ChrysalixException.java similarity index 76% rename from polyglotter-engine/src/main/java/org/polyglotter/PolyglotterException.java rename to chrysalix-engine/src/main/java/org/chrysalix/ChrysalixException.java index dde09f2..2c5ca60 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/PolyglotterException.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/ChrysalixException.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,15 +21,15 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter; +package org.chrysalix; -import org.polyglotter.common.BaseException; -import org.polyglotter.common.I18n; +import org.chrysalix.common.BaseException; +import org.chrysalix.common.I18n; /** * */ -public class PolyglotterException extends BaseException { +public class ChrysalixException extends BaseException { /** * @param message @@ -37,7 +37,7 @@ public class PolyglotterException extends BaseException { * @param arguments * optional arguments to the supplied message */ - public PolyglotterException( final I18n message, + public ChrysalixException( final I18n message, final Object... arguments ) { super( message, arguments ); } @@ -48,9 +48,9 @@ public PolyglotterException( final I18n message, * @param arguments * optional arguments to the supplied message */ - public PolyglotterException( final String message, + public ChrysalixException( final String message, final Object... arguments ) { - super( PolyglotterI18n.class, message, arguments ); + super( ChrysalixI18n.class, message, arguments ); } /** @@ -61,7 +61,7 @@ public PolyglotterException( final String message, * @param arguments * optional arguments to the supplied message */ - public PolyglotterException( final Throwable cause, + public ChrysalixException( final Throwable cause, final I18n message, final Object... arguments ) { super( cause, message, arguments ); @@ -75,9 +75,9 @@ public PolyglotterException( final Throwable cause, * @param arguments * optional arguments to the supplied message */ - public PolyglotterException( final Throwable cause, + public ChrysalixException( final Throwable cause, final String message, final Object... arguments ) { - super( PolyglotterI18n.class, cause, message, arguments ); + super( ChrysalixI18n.class, cause, message, arguments ); } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/PolyglotterI18n.java b/chrysalix-engine/src/main/java/org/chrysalix/ChrysalixI18n.java similarity index 98% rename from polyglotter-engine/src/main/java/org/polyglotter/PolyglotterI18n.java rename to chrysalix-engine/src/main/java/org/chrysalix/ChrysalixI18n.java index ea53898..d842288 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/PolyglotterI18n.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/ChrysalixI18n.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,15 +21,15 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter; +package org.chrysalix; -import org.polyglotter.common.I18n; +import org.chrysalix.common.I18n; /** - * Internationalized string constants for the Polyglotter project. + * Internationalized string constants for the Chrysalix project. */ @SuppressWarnings( "javadoc" ) -public class PolyglotterI18n { +public class ChrysalixI18n { public static I18n errorAddingBuiltInCategory = new I18n( "An error occurred adding a built-in category to operation '%s'" ); @@ -485,6 +485,6 @@ public class PolyglotterI18n { public static String localize( final String text, final Object... arguments ) { - return I18n.localize( PolyglotterI18n.class, text, arguments ); + return I18n.localize( ChrysalixI18n.class, text, arguments ); } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/AbsoluteValue.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/AbsoluteValue.java similarity index 70% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/AbsoluteValue.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/AbsoluteValue.java index 540d33a..d17dc0b 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/AbsoluteValue.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/AbsoluteValue.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,24 +21,24 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import java.math.BigDecimal; import java.math.BigInteger; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the absolute value of a number. @@ -55,8 +55,8 @@ public final class AbsoluteValue extends AbstractOperation< Number > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( AbsoluteValue.class, "input" ), - PolyglotterI18n.absoluteValueOperationInputDescription.text(), - PolyglotterI18n.absoluteValueOperationInputName.text(), + ChrysalixI18n.absoluteValueOperationInputDescription.text(), + ChrysalixI18n.absoluteValueOperationInputName.text(), Number.class ); /** @@ -69,15 +69,15 @@ public final class AbsoluteValue extends AbstractOperation< Number > { */ public static final OperationDescriptor< Number > DESCRIPTOR = new AbstractOperationDescriptor< Number >( TransformationFactory.createId( AbsoluteValue.class ), - PolyglotterI18n.absoluteValueOperationDescription.text(), - PolyglotterI18n.absoluteValueOperationName.text(), + ChrysalixI18n.absoluteValueOperationDescription.text(), + ChrysalixI18n.absoluteValueOperationName.text(), Number.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Number > newInstance( final Transformation transformation ) { @@ -97,18 +97,18 @@ public Operation< Number > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Number calculate() throws PolyglotterException { + protected Number calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -128,7 +128,7 @@ protected Number calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -136,7 +136,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.absoluteValueOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.absoluteValueOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // must be a number @@ -149,16 +149,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.absoluteValueOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.absoluteValueOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/AbstractOperation.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/AbstractOperation.java similarity index 80% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/AbstractOperation.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/AbstractOperation.java index 99eb2a6..751163c 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/AbstractOperation.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/AbstractOperation.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import java.util.ArrayList; import java.util.Collections; @@ -32,20 +32,20 @@ import java.util.Map; import java.util.Set; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.common.CheckArg; -import org.polyglotter.common.ObjectUtil; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.ValidationProblems; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.common.CheckArg; +import org.chrysalix.common.ObjectUtil; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationCategory; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.ValidationProblems; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; /** * A base class implementation for an {@link Operation operation}. @@ -82,15 +82,15 @@ protected AbstractOperation( final ValueDescriptor< T > operationDescriptor, /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Operation#addCategory(org.polyglotter.transformation.OperationCategory[]) + * @see org.chrysalix.transformation.Operation#addCategory(org.chrysalix.transformation.OperationCategory[]) */ @Override - public void addCategory( final OperationCategory... categoriesToAdd ) throws PolyglotterException { + public void addCategory( final OperationCategory... categoriesToAdd ) throws ChrysalixException { CheckArg.isNotEmpty( categoriesToAdd, "categoriesToAdd" ); for ( final OperationCategory category : categoriesToAdd ) { if ( ( category == null ) || !this.categories.add( category ) ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingOperationCategory, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingOperationCategory, name(), transformationId() ); } @@ -100,17 +100,17 @@ public void addCategory( final OperationCategory... categoriesToAdd ) throws Pol /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Operation#addInput(java.lang.String, java.lang.Object[]) + * @see org.chrysalix.transformation.Operation#addInput(java.lang.String, java.lang.Object[]) */ @SuppressWarnings( "unchecked" ) @Override public void addInput( final String descriptorId, - final Object... valuesBeingAdded ) throws PolyglotterException { + final Object... valuesBeingAdded ) throws ChrysalixException { CheckArg.notEmpty( descriptorId, "descriptorId" ); CheckArg.isNotEmpty( valuesBeingAdded, "valuesBeingAdded" ); if ( !isValidInputDescriptorId( descriptorId ) ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingOperationInput, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingOperationInput, name(), transformationId(), descriptorId ); @@ -126,7 +126,7 @@ public void addInput( final String descriptorId, for ( final Object value : valuesBeingAdded ) { if ( value == null ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingOperationInput, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingOperationInput, name(), transformationId(), descriptorId ); @@ -141,7 +141,7 @@ public void addInput( final String descriptorId, } if ( !added ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingOperationInput, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingOperationInput, name(), transformationId(), descriptorId ); @@ -159,11 +159,11 @@ public void addInput( final String descriptorId, * Calculates the result. Calculation should only be done when there are no {@link ValidationProblem validation problems}. * * @return the result (can be null) - * @throws PolyglotterException + * @throws ChrysalixException * if there are validation problems * @see #problems() */ - protected abstract T calculate() throws PolyglotterException; + protected abstract T calculate() throws ChrysalixException; /** * @param categoryBeingChecked @@ -179,7 +179,7 @@ public boolean canRemoveCategory( final OperationCategory categoryBeingChecked ) /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Operation#categories() + * @see org.chrysalix.transformation.Operation#categories() */ @Override public Set< OperationCategory > categories() { @@ -196,7 +196,7 @@ protected String description() { /** * {@inheritDoc} * - * @see org.polyglotter.operation.ValueImpl#descriptor() + * @see org.chrysalix.operation.ValueImpl#descriptor() */ @Override public final OperationDescriptor< T > descriptor() { @@ -218,21 +218,21 @@ public final OperationDescriptor< T > descriptor() { *

* Do not call if there are validation errors as this will throw an exception. * - * @see org.polyglotter.operation.ValueImpl#get() + * @see org.chrysalix.operation.ValueImpl#get() */ @Override - public T get() throws PolyglotterException { + public T get() throws ChrysalixException { if ( !this.problems.isError() ) { return super.get(); } - throw new PolyglotterException( PolyglotterI18n.operationHasErrors, name(), transformationId() ); + throw new ChrysalixException( ChrysalixI18n.operationHasErrors, name(), transformationId() ); } /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Operation#inputs() + * @see org.chrysalix.transformation.Operation#inputs() */ @Override public List< Value< ? >> inputs() { @@ -293,7 +293,7 @@ protected String name() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Operation#problems() + * @see org.chrysalix.transformation.Operation#problems() */ @Override public ValidationProblems problems() { @@ -303,17 +303,17 @@ public ValidationProblems problems() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Operation#removeCategory(org.polyglotter.transformation.OperationCategory[]) + * @see org.chrysalix.transformation.Operation#removeCategory(org.chrysalix.transformation.OperationCategory[]) */ @Override - public void removeCategory( final OperationCategory... categoriesToRemove ) throws PolyglotterException { + public void removeCategory( final OperationCategory... categoriesToRemove ) throws ChrysalixException { CheckArg.isNotEmpty( categoriesToRemove, "categoriesToRemove" ); for ( final OperationCategory category : categoriesToRemove ) { if ( ( category == null ) || ( category instanceof OperationCategory.BuiltInCategory ) || !this.categories.remove( category ) ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingOperationCategory, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingOperationCategory, name(), transformationId() ); } @@ -323,16 +323,16 @@ public void removeCategory( final OperationCategory... categoriesToRemove ) thro /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Operation#removeInput(java.lang.String, java.lang.Object[]) + * @see org.chrysalix.transformation.Operation#removeInput(java.lang.String, java.lang.Object[]) */ @Override public void removeInput( final String descriptorId, - final Object... valuesBeingRemoved ) throws PolyglotterException { + final Object... valuesBeingRemoved ) throws ChrysalixException { CheckArg.notEmpty( descriptorId, "descriptorId" ); CheckArg.isNotEmpty( valuesBeingRemoved, "valuesBeingRemoved" ); if ( !isValidInputDescriptorId( descriptorId ) ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingOperationInput, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingOperationInput, name(), transformationId(), descriptorId ); @@ -342,7 +342,7 @@ public void removeInput( final String descriptorId, // error if there are no values to delete if ( values.isEmpty() ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingOperationInput, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingOperationInput, name(), transformationId(), descriptorId ); @@ -350,7 +350,7 @@ public void removeInput( final String descriptorId, for ( final Object valueToDelete : valuesBeingRemoved ) { if ( valueToDelete == null ) { - throw new PolyglotterException( PolyglotterI18n.errorRemovingOperationInput, + throw new ChrysalixException( ChrysalixI18n.errorRemovingOperationInput, name(), transformationId() ); } @@ -370,7 +370,7 @@ public void removeInput( final String descriptorId, } if ( !removed ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingOperationInput, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingOperationInput, name(), transformationId(), descriptorId ); @@ -387,25 +387,25 @@ public void removeInput( final String descriptorId, /** * {@inheritDoc} * - * @see org.polyglotter.operation.ValueImpl#set(java.lang.Object) + * @see org.chrysalix.operation.ValueImpl#set(java.lang.Object) */ @Override public void set( final T newValue ) throws UnsupportedOperationException { - throw new UnsupportedOperationException( PolyglotterI18n.operationResultNotModifiable.text( name(), + throw new UnsupportedOperationException( ChrysalixI18n.operationResultNotModifiable.text( name(), transformation().id() ) ); } /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Operation#setInput(java.lang.String, java.lang.Object[]) + * @see org.chrysalix.transformation.Operation#setInput(java.lang.String, java.lang.Object[]) */ @SuppressWarnings( "unchecked" ) @Override public void setInput( final String descriptorId, - final Object... valuesBeingSet ) throws PolyglotterException { + final Object... valuesBeingSet ) throws ChrysalixException { if ( !isValidInputDescriptorId( descriptorId ) ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingOperationInput, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingOperationInput, name(), transformationId(), descriptorId ); @@ -415,7 +415,7 @@ public void setInput( final String descriptorId, this.inputs.remove( descriptorId ); if ( ( valuesBeingSet == null ) || ( valuesBeingSet.length == 0 ) ) { - Polyglotter.LOGGER.debug( "Input values for descriptor '%s' were removed", descriptorId ); + Chrysalix.LOGGER.debug( "Input values for descriptor '%s' were removed", descriptorId ); return; } @@ -424,7 +424,7 @@ public void setInput( final String descriptorId, for ( final Object value : valuesBeingSet ) { if ( value == null ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingOperationInput, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingOperationInput, name(), transformationId(), descriptorId ); @@ -471,7 +471,7 @@ public String toString() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Operation#transformation() + * @see org.chrysalix.transformation.Operation#transformation() */ @Override public Transformation transformation() { @@ -508,10 +508,10 @@ protected void valueChanged() { if ( !ObjectUtil.equals( oldValue, newValue ) ) { this.value = newValue; // do not call set method as it throws exception } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( descriptor().id(), - PolyglotterI18n.errorOnTermChanged.text( descriptor().id(), + ChrysalixI18n.errorOnTermChanged.text( descriptor().id(), transformationId() ) ); problems().add( problem ); } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/AbstractOperationDescriptor.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/AbstractOperationDescriptor.java similarity index 86% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/AbstractOperationDescriptor.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/AbstractOperationDescriptor.java index 9a6c07e..343818f 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/AbstractOperationDescriptor.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/AbstractOperationDescriptor.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,10 +21,10 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.ValueDescriptor; /** * A base class implementation for an {@link OperationDescriptor operation descriptor}. @@ -61,7 +61,7 @@ protected AbstractOperationDescriptor( final String outputDescriptorId, /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#inputDescriptors() + * @see org.chrysalix.transformation.OperationDescriptor#inputDescriptors() */ @Override public ValueDescriptor< ? >[] inputDescriptors() { diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Add.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Add.java similarity index 68% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Add.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Add.java index 57150d9..e466a2b 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Add.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Add.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,21 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import java.util.List; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Adds a collection of terms. @@ -47,8 +47,8 @@ public final class Add extends AbstractOperation< Number > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Add.class, "input" ), - PolyglotterI18n.addOperationInputDescription.text(), - PolyglotterI18n.addOperationInputName.text(), + ChrysalixI18n.addOperationInputDescription.text(), + ChrysalixI18n.addOperationInputName.text(), Number.class, true, 2, @@ -63,15 +63,15 @@ public final class Add extends AbstractOperation< Number > { */ public static final OperationDescriptor< Number > DESCRIPTOR = new AbstractOperationDescriptor< Number >( TransformationFactory.createId( Add.class ), - PolyglotterI18n.addOperationDescription.text(), - PolyglotterI18n.addOperationName.text(), + ChrysalixI18n.addOperationDescription.text(), + ChrysalixI18n.addOperationName.text(), Number.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Number > newInstance( final Transformation transformation ) { @@ -91,18 +91,18 @@ public Operation< Number > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Number calculate() throws PolyglotterException { + protected Number calculate() throws ChrysalixException { assert !problems().isError(); Number result = new Long( 0 ); @@ -129,7 +129,7 @@ protected Number calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -139,13 +139,13 @@ protected void validate() { if ( inputs.isEmpty() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.addOperationHasNoTerms.text( transformationId() ) ); + ChrysalixI18n.addOperationHasNoTerms.text( transformationId() ) ); problems().add( problem ); } else { if ( inputs.size() < INPUT_DESCRIPTORS[ 0 ].requiredValueCount() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermCount.text( name(), transformationId(), inputs().size() ) ); + ChrysalixI18n.invalidTermCount.text( name(), transformationId(), inputs().size() ) ); problems().add( problem ); } @@ -159,17 +159,17 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermType.text( transformationId(), + ChrysalixI18n.invalidTermType.text( transformationId(), transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/ArcCosine.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/ArcCosine.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/ArcCosine.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/ArcCosine.java index c1aa2a2..b9dcb94 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/ArcCosine.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/ArcCosine.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the arc cosine of a number. @@ -47,8 +47,8 @@ public final class ArcCosine extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( ArcCosine.class, "input" ), - PolyglotterI18n.arcCosineOperationInputDescription.text(), - PolyglotterI18n.arcCosineOperationInputName.text(), + ChrysalixI18n.arcCosineOperationInputDescription.text(), + ChrysalixI18n.arcCosineOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class ArcCosine extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( ArcCosine.class ), - PolyglotterI18n.arcCosineOperationDescription.text(), - PolyglotterI18n.arcCosineOperationName.text(), + ChrysalixI18n.arcCosineOperationDescription.text(), + ChrysalixI18n.arcCosineOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.arcCosineOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.arcCosineOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.arcCosineOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.arcCosineOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/ArcSine.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/ArcSine.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/ArcSine.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/ArcSine.java index e27a5c5..8cd8de2 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/ArcSine.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/ArcSine.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the arc sine of a number. @@ -47,8 +47,8 @@ public final class ArcSine extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( ArcSine.class, "input" ), - PolyglotterI18n.arcSineOperationInputDescription.text(), - PolyglotterI18n.arcSineOperationInputName.text(), + ChrysalixI18n.arcSineOperationInputDescription.text(), + ChrysalixI18n.arcSineOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class ArcSine extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( ArcSine.class ), - PolyglotterI18n.arcSineOperationDescription.text(), - PolyglotterI18n.arcSineOperationName.text(), + ChrysalixI18n.arcSineOperationDescription.text(), + ChrysalixI18n.arcSineOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.arcSineOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.arcSineOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.arcSineOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.arcSineOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/ArcTangent.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/ArcTangent.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/ArcTangent.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/ArcTangent.java index d6d5879..7e58fcf 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/ArcTangent.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/ArcTangent.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the arc tangent of a number. @@ -47,8 +47,8 @@ public final class ArcTangent extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( ArcTangent.class, "input" ), - PolyglotterI18n.arcTangentOperationInputDescription.text(), - PolyglotterI18n.arcTangentOperationInputName.text(), + ChrysalixI18n.arcTangentOperationInputDescription.text(), + ChrysalixI18n.arcTangentOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class ArcTangent extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( ArcTangent.class ), - PolyglotterI18n.arcTangentOperationDescription.text(), - PolyglotterI18n.arcTangentOperationName.text(), + ChrysalixI18n.arcTangentOperationDescription.text(), + ChrysalixI18n.arcTangentOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.arcTangentOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.arcTangentOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.arcTangentOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.arcTangentOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Average.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Average.java similarity index 67% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Average.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Average.java index cc6c9e4..1e1168d 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Average.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Average.java @@ -1,17 +1,17 @@ /* -AbstractOperation * Polyglotter (http://polyglotter.org) +AbstractOperation * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,21 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import java.util.List; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Computes the average value of a collection of number terms. @@ -47,8 +47,8 @@ public final class Average extends AbstractOperation< Number > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Average.class, "input" ), - PolyglotterI18n.averageOperationInputDescription.text(), - PolyglotterI18n.averageOperationInputName.text(), + ChrysalixI18n.averageOperationInputDescription.text(), + ChrysalixI18n.averageOperationInputName.text(), Number.class, true, 1, @@ -64,15 +64,15 @@ public final class Average extends AbstractOperation< Number > { */ public static final OperationDescriptor< Number > DESCRIPTOR = new AbstractOperationDescriptor< Number >( TransformationFactory.createId( Average.class ), - PolyglotterI18n.averageOperationDescription.text(), - PolyglotterI18n.averageOperationName.text(), + ChrysalixI18n.averageOperationDescription.text(), + ChrysalixI18n.averageOperationName.text(), Number.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Number > newInstance( final Transformation transformation ) { @@ -92,18 +92,18 @@ public Operation< Number > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Number calculate() throws PolyglotterException { + protected Number calculate() throws ChrysalixException { assert !problems().isError(); final List< Value< ? >> terms = inputs(); @@ -121,12 +121,12 @@ protected Number calculate() throws PolyglotterException { divideOp.addInput( Divide.TERM_DESCRIPTOR.id(), total, terms.size() ); return divideOp.get(); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.averageOperationError.text( transformationId() ) ); + ChrysalixI18n.averageOperationError.text( transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.averageOperationError, transformationId() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.averageOperationError, transformationId() ); return null; } @@ -135,7 +135,7 @@ protected Number calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -143,13 +143,13 @@ protected void validate() { if ( inputs().isEmpty() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.averageOperationHasNoTerms.text( transformationId() ) ); + ChrysalixI18n.averageOperationHasNoTerms.text( transformationId() ) ); problems().add( problem ); } else { if ( inputs().size() < INPUT_DESCRIPTORS[ 0 ].requiredValueCount() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermCount.text( name(), + ChrysalixI18n.invalidTermCount.text( name(), transformationId(), inputs().size() ) ); problems().add( problem ); @@ -165,17 +165,17 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermType.text( name(), + ChrysalixI18n.invalidTermType.text( name(), transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/BuiltInOperationDescriptorProvider.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/BuiltInOperationDescriptorProvider.java similarity index 87% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/BuiltInOperationDescriptorProvider.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/BuiltInOperationDescriptorProvider.java index c7ce86b..66a0dfe 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/BuiltInOperationDescriptorProvider.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/BuiltInOperationDescriptorProvider.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import java.io.File; import java.lang.reflect.Field; @@ -31,9 +31,9 @@ import java.util.Enumeration; import java.util.List; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.OperationDescriptorProvider; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.OperationDescriptorProvider; /** * A provider for the built-in {@link Operation operation} descriptors. @@ -57,7 +57,7 @@ private String className( final File file ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptorProvider#descriptors() + * @see org.chrysalix.transformation.OperationDescriptorProvider#descriptors() */ @Override public List< OperationDescriptor< ? >> descriptors() { diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Ceiling.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Ceiling.java similarity index 66% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Ceiling.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Ceiling.java index 05578d5..9441f80 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Ceiling.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Ceiling.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the ceiling of a number. @@ -47,8 +47,8 @@ public final class Ceiling extends AbstractOperation< Integer > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( Ceiling.class, "input" ), - PolyglotterI18n.ceilingOperationInputDescription.text(), - PolyglotterI18n.ceilingOperationInputName.text(), + ChrysalixI18n.ceilingOperationInputDescription.text(), + ChrysalixI18n.ceilingOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class Ceiling extends AbstractOperation< Integer > { */ public static final OperationDescriptor< Integer > DESCRIPTOR = new AbstractOperationDescriptor< Integer >( TransformationFactory.createId( Ceiling.class ), - PolyglotterI18n.ceilingOperationDescription.text(), - PolyglotterI18n.ceilingOperationName.text(), + ChrysalixI18n.ceilingOperationDescription.text(), + ChrysalixI18n.ceilingOperationName.text(), Integer.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Integer > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Integer > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Integer calculate() throws PolyglotterException { + protected Integer calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -111,7 +111,7 @@ protected Integer calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -119,7 +119,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.ceilingOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.ceilingOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -132,16 +132,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.ceilingOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.ceilingOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Concat.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Concat.java similarity index 67% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Concat.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Concat.java index 56aea40..64676dd 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Concat.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Concat.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * A string concatenation operation. @@ -45,8 +45,8 @@ public final class Concat extends AbstractOperation< String > { */ public static final ValueDescriptor< Object > TERM_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Concat.class, "input" ), - PolyglotterI18n.concatOperationInputDescription.text(), - PolyglotterI18n.concatOperationInputName.text(), + ChrysalixI18n.concatOperationInputDescription.text(), + ChrysalixI18n.concatOperationInputName.text(), Object.class, true, 2, @@ -61,15 +61,15 @@ public final class Concat extends AbstractOperation< String > { */ public static final OperationDescriptor< String > DESCRIPTOR = new AbstractOperationDescriptor< String >( TransformationFactory.createId( Concat.class ), - PolyglotterI18n.concatOperationDescription.text(), - PolyglotterI18n.concatOperationName.text(), + ChrysalixI18n.concatOperationDescription.text(), + ChrysalixI18n.concatOperationName.text(), String.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< String > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< String > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.STRING ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected String calculate() throws PolyglotterException { + protected String calculate() throws ChrysalixException { assert !problems().isError(); final StringBuilder result = new StringBuilder(); @@ -116,7 +116,7 @@ protected String calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -124,7 +124,7 @@ protected void validate() { if ( inputs().size() < TERM_DESCRIPTOR.requiredValueCount() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermCount.text( name(), + ChrysalixI18n.invalidTermCount.text( name(), transformationId(), inputs().size() ) ); problems().add( problem ); diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Cosine.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Cosine.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Cosine.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Cosine.java index 3e13e5a..2c061ff 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Cosine.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Cosine.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the cosine of a number. @@ -47,8 +47,8 @@ public final class Cosine extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( Cosine.class, "input" ), - PolyglotterI18n.cosineOperationInputDescription.text(), - PolyglotterI18n.cosineOperationInputName.text(), + ChrysalixI18n.cosineOperationInputDescription.text(), + ChrysalixI18n.cosineOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class Cosine extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( Cosine.class ), - PolyglotterI18n.cosineOperationDescription.text(), - PolyglotterI18n.cosineOperationName.text(), + ChrysalixI18n.cosineOperationDescription.text(), + ChrysalixI18n.cosineOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.cosineOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.cosineOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.cosineOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.cosineOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Count.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Count.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Count.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Count.java index 740e8e6..64c9bd4 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Count.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Count.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,17 +21,17 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Counts the number of terms. @@ -43,8 +43,8 @@ public final class Count extends AbstractOperation< Integer > { */ public static final ValueDescriptor< Object > TERM_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Count.class, "input" ), - PolyglotterI18n.countOperationInputDescription.text(), - PolyglotterI18n.countOperationInputName.text(), + ChrysalixI18n.countOperationInputDescription.text(), + ChrysalixI18n.countOperationInputName.text(), Object.class, true, 0, @@ -60,15 +60,15 @@ public final class Count extends AbstractOperation< Integer > { */ public static final OperationDescriptor< Integer > DESCRIPTOR = new AbstractOperationDescriptor< Integer >( TransformationFactory.createId( Count.class ), - PolyglotterI18n.countOperationDescription.text(), - PolyglotterI18n.countOperationName.text(), + ChrysalixI18n.countOperationDescription.text(), + ChrysalixI18n.countOperationName.text(), Integer.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Integer > newInstance( final Transformation transformation ) { @@ -88,15 +88,15 @@ public Operation< Integer > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override protected Integer calculate() { @@ -107,10 +107,10 @@ protected Integer calculate() { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#get() + * @see org.chrysalix.operation.AbstractOperation#get() */ @Override - public Integer get() throws PolyglotterException { + public Integer get() throws ChrysalixException { final Integer result = super.get(); return ( ( result == null ) ? 0 : result ); } @@ -118,7 +118,7 @@ public Integer get() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/CubeRoot.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/CubeRoot.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/CubeRoot.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/CubeRoot.java index a80aa0b..86f97d7 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/CubeRoot.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/CubeRoot.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the cube root of a number. @@ -47,8 +47,8 @@ public final class CubeRoot extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( CubeRoot.class, "input" ), - PolyglotterI18n.cubeRootOperationInputDescription.text(), - PolyglotterI18n.cubeRootOperationInputName.text(), + ChrysalixI18n.cubeRootOperationInputDescription.text(), + ChrysalixI18n.cubeRootOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class CubeRoot extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( CubeRoot.class ), - PolyglotterI18n.cubeRootOperationDescription.text(), - PolyglotterI18n.cubeRootOperationName.text(), + ChrysalixI18n.cubeRootOperationDescription.text(), + ChrysalixI18n.cubeRootOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.cubeRootOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.cubeRootOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.cubeRootOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.cubeRootOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Decrement.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Decrement.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Decrement.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Decrement.java index 8198cb7..3838708 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Decrement.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Decrement.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Decrements the term. @@ -45,8 +45,8 @@ public final class Decrement extends AbstractOperation< Integer > { */ public static final ValueDescriptor< Integer > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( Decrement.class, "input" ), - PolyglotterI18n.decrementOperationInputDescription.text(), - PolyglotterI18n.decrementOperationInputName.text(), + ChrysalixI18n.decrementOperationInputDescription.text(), + ChrysalixI18n.decrementOperationInputName.text(), Integer.class ); /** @@ -59,15 +59,15 @@ public final class Decrement extends AbstractOperation< Integer > { */ public static final OperationDescriptor< Integer > DESCRIPTOR = new AbstractOperationDescriptor< Integer >( TransformationFactory.createId( Decrement.class ), - PolyglotterI18n.decrementOperationDescription.text(), - PolyglotterI18n.decrementOperationName.text(), + ChrysalixI18n.decrementOperationDescription.text(), + ChrysalixI18n.decrementOperationName.text(), Integer.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Integer > newInstance( final Transformation transformation ) { @@ -87,18 +87,18 @@ public Operation< Integer > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Integer calculate() throws PolyglotterException { + protected Integer calculate() throws ChrysalixException { assert !problems().isError(); int value = ( Integer ) inputs().get( 0 ).get(); return --value; @@ -107,7 +107,7 @@ protected Integer calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -115,7 +115,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.decrementOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.decrementOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is an int @@ -128,16 +128,16 @@ protected void validate() { if ( !( value instanceof Integer ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.decrementOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.decrementOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Divide.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Divide.java similarity index 71% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Divide.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Divide.java index f3ca67b..7d42b0e 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Divide.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Divide.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; - -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +package org.chrysalix.operation; + +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Divides a collection of terms. @@ -45,8 +45,8 @@ public final class Divide extends AbstractOperation< Number > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Divide.class, "input" ), - PolyglotterI18n.divideOperationInputDescription.text(), - PolyglotterI18n.divideOperationInputName.text(), + ChrysalixI18n.divideOperationInputDescription.text(), + ChrysalixI18n.divideOperationInputName.text(), Number.class, true, 2, @@ -62,15 +62,15 @@ public final class Divide extends AbstractOperation< Number > { */ public static final OperationDescriptor< Number > DESCRIPTOR = new AbstractOperationDescriptor< Number >( TransformationFactory.createId( Divide.class ), - PolyglotterI18n.divideOperationDescription.text(), - PolyglotterI18n.divideOperationName.text(), + ChrysalixI18n.divideOperationDescription.text(), + ChrysalixI18n.divideOperationName.text(), Number.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Number > newInstance( final Transformation transformation ) { @@ -90,18 +90,18 @@ public Operation< Number > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Number calculate() throws PolyglotterException { + protected Number calculate() throws ChrysalixException { assert !problems().isError(); Number result = null; @@ -140,7 +140,7 @@ protected Number calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -148,13 +148,13 @@ protected void validate() { if ( inputs().isEmpty() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.divideOperationHasNoTerms.text( transformationId() ) ); + ChrysalixI18n.divideOperationHasNoTerms.text( transformationId() ) ); problems().add( problem ); } else { if ( inputs().size() < INPUT_DESCRIPTORS[ 0 ].requiredValueCount() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermCount.text( name(), + ChrysalixI18n.invalidTermCount.text( name(), transformationId(), inputs().size() ) ); problems().add( problem ); @@ -170,17 +170,17 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermType.text( name(), + ChrysalixI18n.invalidTermType.text( name(), transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Floor.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Floor.java similarity index 66% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Floor.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Floor.java index ba1b3bd..8417f0f 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Floor.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Floor.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the floor of a number. The floor is the largest integer value less than or equal to the term. @@ -47,8 +47,8 @@ public final class Floor extends AbstractOperation< Integer > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( Floor.class, "input" ), - PolyglotterI18n.floorOperationInputDescription.text(), - PolyglotterI18n.floorOperationInputName.text(), + ChrysalixI18n.floorOperationInputDescription.text(), + ChrysalixI18n.floorOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class Floor extends AbstractOperation< Integer > { */ public static final OperationDescriptor< Integer > DESCRIPTOR = new AbstractOperationDescriptor< Integer >( TransformationFactory.createId( Floor.class ), - PolyglotterI18n.floorOperationDescription.text(), - PolyglotterI18n.floorOperationName.text(), + ChrysalixI18n.floorOperationDescription.text(), + ChrysalixI18n.floorOperationName.text(), Integer.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Integer > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Integer > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Integer calculate() throws PolyglotterException { + protected Integer calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -111,7 +111,7 @@ protected Integer calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -119,7 +119,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.floorOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.floorOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -132,16 +132,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.floorOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.floorOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/HyperbolicCosine.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/HyperbolicCosine.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/HyperbolicCosine.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/HyperbolicCosine.java index 4908e3d..a4c71f0 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/HyperbolicCosine.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/HyperbolicCosine.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the hyperbolic cosine of a number. @@ -47,8 +47,8 @@ public final class HyperbolicCosine extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( HyperbolicCosine.class, "input" ), - PolyglotterI18n.hyperbolicCosineOperationInputDescription.text(), - PolyglotterI18n.hyperbolicCosineOperationInputName.text(), + ChrysalixI18n.hyperbolicCosineOperationInputDescription.text(), + ChrysalixI18n.hyperbolicCosineOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class HyperbolicCosine extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( HyperbolicCosine.class ), - PolyglotterI18n.hyperbolicCosineOperationDescription.text(), - PolyglotterI18n.hyperbolicCosineOperationName.text(), + ChrysalixI18n.hyperbolicCosineOperationDescription.text(), + ChrysalixI18n.hyperbolicCosineOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.hyperbolicCosineOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.hyperbolicCosineOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.hyperbolicCosineOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.hyperbolicCosineOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/HyperbolicSine.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/HyperbolicSine.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/HyperbolicSine.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/HyperbolicSine.java index 34df7f1..69092ce 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/HyperbolicSine.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/HyperbolicSine.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the hyperbolic sine of a number. @@ -47,8 +47,8 @@ public final class HyperbolicSine extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( HyperbolicSine.class, "input" ), - PolyglotterI18n.hyperbolicSineOperationInputDescription.text(), - PolyglotterI18n.hyperbolicSineOperationInputName.text(), + ChrysalixI18n.hyperbolicSineOperationInputDescription.text(), + ChrysalixI18n.hyperbolicSineOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class HyperbolicSine extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( HyperbolicSine.class ), - PolyglotterI18n.hyperbolicSineOperationDescription.text(), - PolyglotterI18n.hyperbolicSineOperationName.text(), + ChrysalixI18n.hyperbolicSineOperationDescription.text(), + ChrysalixI18n.hyperbolicSineOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.hyperbolicSineOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.hyperbolicSineOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.hyperbolicSineOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.hyperbolicSineOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/HyperbolicTangent.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/HyperbolicTangent.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/HyperbolicTangent.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/HyperbolicTangent.java index 421bfb2..12aa654 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/HyperbolicTangent.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/HyperbolicTangent.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the hyperbolic tangent of a number. @@ -47,8 +47,8 @@ public final class HyperbolicTangent extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( HyperbolicTangent.class, "input" ), - PolyglotterI18n.hyperbolicTangentOperationInputDescription.text(), - PolyglotterI18n.hyperbolicTangentOperationInputName.text(), + ChrysalixI18n.hyperbolicTangentOperationInputDescription.text(), + ChrysalixI18n.hyperbolicTangentOperationInputName.text(), Number.class ); /** @@ -60,15 +60,15 @@ public final class HyperbolicTangent extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( HyperbolicTangent.class ), - PolyglotterI18n.hyperbolicTangentOperationDescription.text(), - PolyglotterI18n.hyperbolicTangentOperationName.text(), + ChrysalixI18n.hyperbolicTangentOperationDescription.text(), + ChrysalixI18n.hyperbolicTangentOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -88,18 +88,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -109,7 +109,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -117,7 +117,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.hyperbolicTangentOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.hyperbolicTangentOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -130,16 +130,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.hyperbolicTangentOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.hyperbolicTangentOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Increment.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Increment.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Increment.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Increment.java index 3eb4b6b..a3dc095 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Increment.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Increment.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Increments the term. @@ -45,8 +45,8 @@ public final class Increment extends AbstractOperation< Integer > { */ public static final ValueDescriptor< Integer > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( Increment.class, "input" ), - PolyglotterI18n.incrementOperationInputDescription.text(), - PolyglotterI18n.incrementOperationInputName.text(), + ChrysalixI18n.incrementOperationInputDescription.text(), + ChrysalixI18n.incrementOperationInputName.text(), Integer.class ); /** @@ -59,15 +59,15 @@ public final class Increment extends AbstractOperation< Integer > { */ public static final OperationDescriptor< Integer > DESCRIPTOR = new AbstractOperationDescriptor< Integer >( TransformationFactory.createId( Increment.class ), - PolyglotterI18n.incrementOperationDescription.text(), - PolyglotterI18n.incrementOperationName.text(), + ChrysalixI18n.incrementOperationDescription.text(), + ChrysalixI18n.incrementOperationName.text(), Integer.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Integer > newInstance( final Transformation transformation ) { @@ -87,18 +87,18 @@ public Operation< Integer > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Integer calculate() throws PolyglotterException { + protected Integer calculate() throws ChrysalixException { assert !problems().isError(); int value = ( Integer ) inputs().get( 0 ).get(); return ++value; @@ -107,7 +107,7 @@ protected Integer calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -115,7 +115,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.incrementOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.incrementOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is an int @@ -128,16 +128,16 @@ protected void validate() { if ( !( value instanceof Integer ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.incrementOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.incrementOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Log.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Log.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Log.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Log.java index 07c1454..5d05262 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Log.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Log.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the natural logarithm (base e). @@ -47,8 +47,8 @@ public final class Log extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( Log.class, "input" ), - PolyglotterI18n.logOperationInputDescription.text(), - PolyglotterI18n.logOperationInputName.text(), + ChrysalixI18n.logOperationInputDescription.text(), + ChrysalixI18n.logOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class Log extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( Log.class ), - PolyglotterI18n.logOperationDescription.text(), - PolyglotterI18n.logOperationName.text(), + ChrysalixI18n.logOperationDescription.text(), + ChrysalixI18n.logOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.logOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.logOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.logOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.logOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Log10.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Log10.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Log10.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Log10.java index 37c3b75..fe6b45b 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Log10.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Log10.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the base 10 logarithm of a term. @@ -47,8 +47,8 @@ public final class Log10 extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( Log10.class, "input" ), - PolyglotterI18n.log10OperationInputDescription.text(), - PolyglotterI18n.log10OperationInputName.text(), + ChrysalixI18n.log10OperationInputDescription.text(), + ChrysalixI18n.log10OperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class Log10 extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( Log10.class ), - PolyglotterI18n.log10OperationDescription.text(), - PolyglotterI18n.log10OperationName.text(), + ChrysalixI18n.log10OperationDescription.text(), + ChrysalixI18n.log10OperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.log10OperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.log10OperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.log10OperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.log10OperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Map.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Map.java similarity index 71% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Map.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Map.java index b86d376..d7d07e0 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Map.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Map.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,23 +21,23 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import java.util.List; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.modelspace.Model; import org.modelspace.ModelObject; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; /** * Maps one {@link ModelObject model object's} property to another model object's property. @@ -49,8 +49,8 @@ public final class Map extends AbstractOperation< Void > { */ public static final ValueDescriptor< ModelObject > SOURCE_MODEL_OBJECT_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Map.class, "source" ), - PolyglotterI18n.mapOperationSourceDescription.text(), - PolyglotterI18n.mapOperationSourceName.text(), + ChrysalixI18n.mapOperationSourceDescription.text(), + ChrysalixI18n.mapOperationSourceName.text(), ModelObject.class, true, 1, @@ -61,8 +61,8 @@ public final class Map extends AbstractOperation< Void > { */ public static final ValueDescriptor< String > SOURCE_PROP_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Map.class, "sourceProperty" ), - PolyglotterI18n.mapOperationSourcePropDescription.text(), - PolyglotterI18n.mapOperationSourcePropName.text(), + ChrysalixI18n.mapOperationSourcePropDescription.text(), + ChrysalixI18n.mapOperationSourcePropName.text(), String.class, true, 1, @@ -73,8 +73,8 @@ public final class Map extends AbstractOperation< Void > { */ public static final ValueDescriptor< ModelObject > TARGET_MODEL_OBJECT_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Map.class, "target" ), - PolyglotterI18n.mapOperationTargetDescription.text(), - PolyglotterI18n.mapOperationTargetName.text(), + ChrysalixI18n.mapOperationTargetDescription.text(), + ChrysalixI18n.mapOperationTargetName.text(), ModelObject.class, true, 1, @@ -85,8 +85,8 @@ public final class Map extends AbstractOperation< Void > { */ public static final ValueDescriptor< String > TARGET_PROP_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Map.class, "targetProperty" ), - PolyglotterI18n.mapOperationTargetPropDescription.text(), - PolyglotterI18n.mapOperationTargetPropName.text(), + ChrysalixI18n.mapOperationTargetPropDescription.text(), + ChrysalixI18n.mapOperationTargetPropName.text(), String.class, true, 1, @@ -106,15 +106,15 @@ public final class Map extends AbstractOperation< Void > { */ public static final OperationDescriptor< Void > DESCRIPTOR = new AbstractOperationDescriptor< Void >( TransformationFactory.createId( Map.class ), - PolyglotterI18n.mapOperationDescription.text(), - PolyglotterI18n.mapOperationName.text(), + ChrysalixI18n.mapOperationDescription.text(), + ChrysalixI18n.mapOperationName.text(), Void.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Void > newInstance( final Transformation transformation ) { @@ -134,18 +134,18 @@ public Operation< Void > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ASSIGNMENT ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Void calculate() throws PolyglotterException { + protected Void calculate() throws ChrysalixException { assert !problems().isError(); /* final ModelObject sourceModel = ( ModelObject ) inputs( SOURCE_MODEL_OBJECT_DESCRIPTOR.id() ).get( 0 ).get(); @@ -158,7 +158,7 @@ protected Void calculate() throws PolyglotterException { final Object value = sourceModel.value( sourceProp ); targetModel.setProperty( targetProp, value ); } catch ( final ModelspaceException e ) { - throw new PolyglotterException( e, "Unable to calculate operation result" ); + throw new ChrysalixException( e, "Unable to calculate operation result" ); } */ return null; @@ -167,7 +167,7 @@ protected Void calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -175,7 +175,7 @@ protected void validate() { if ( inputs().size() != 4 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.mapOperationInvalidTermCount.text( transformationId() ) ); + ChrysalixI18n.mapOperationInvalidTermCount.text( transformationId() ) ); problems().add( problem ); } else { { // source model @@ -184,7 +184,7 @@ protected void validate() { if ( sourceModels.size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.mapOperationInvalidSourceModelCount.text( transformationId() ) ); + ChrysalixI18n.mapOperationInvalidSourceModelCount.text( transformationId() ) ); problems().add( problem ); } else { final Value< ? > term = sourceModels.get( 0 ); @@ -196,16 +196,16 @@ protected void validate() { if ( !( model instanceof ModelObject ) && !( model instanceof Model ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.mapOperationInvalidSourceModelObjectType.text( transformationId() ) ); + ChrysalixI18n.mapOperationInvalidSourceModelObjectType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } @@ -216,7 +216,7 @@ protected void validate() { if ( propNames.size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.mapOperationInvalidSourcePropCount.text( transformationId() ) ); + ChrysalixI18n.mapOperationInvalidSourcePropCount.text( transformationId() ) ); problems().add( problem ); } else { final Value< ? > term = propNames.get( 0 ); @@ -228,16 +228,16 @@ protected void validate() { if ( !( name instanceof String ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.mapOperationInvalidSourcePropType.text( transformationId() ) ); + ChrysalixI18n.mapOperationInvalidSourcePropType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } @@ -248,7 +248,7 @@ protected void validate() { if ( targetModels.size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.mapOperationInvalidTargetModelCount.text( transformationId() ) ); + ChrysalixI18n.mapOperationInvalidTargetModelCount.text( transformationId() ) ); problems().add( problem ); } else { final Value< ? > term = targetModels.get( 0 ); @@ -260,16 +260,16 @@ protected void validate() { if ( !( model instanceof ModelObject ) && !( model instanceof Model ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.mapOperationInvalidTargetModelObjectType.text( transformationId() ) ); + ChrysalixI18n.mapOperationInvalidTargetModelObjectType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } @@ -280,7 +280,7 @@ protected void validate() { if ( propNames.size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.mapOperationInvalidTargetPropCount.text( transformationId() ) ); + ChrysalixI18n.mapOperationInvalidTargetPropCount.text( transformationId() ) ); problems().add( problem ); } else { final Value< ? > term = propNames.get( 0 ); @@ -292,16 +292,16 @@ protected void validate() { if ( !( name instanceof String ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.mapOperationInvalidTargetPropType.text( transformationId() ) ); + ChrysalixI18n.mapOperationInvalidTargetPropType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Max.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Max.java similarity index 71% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Max.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Max.java index c6b2627..59154dc 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Max.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Max.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; - -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +package org.chrysalix.operation; + +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Determines the maximum value of a collection of terms. @@ -45,8 +45,8 @@ public final class Max extends AbstractOperation< Number > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Max.class, "input" ), - PolyglotterI18n.maxOperationInputDescription.text(), - PolyglotterI18n.maxOperationInputName.text(), + ChrysalixI18n.maxOperationInputDescription.text(), + ChrysalixI18n.maxOperationInputName.text(), Number.class, true, 1, @@ -62,15 +62,15 @@ public final class Max extends AbstractOperation< Number > { */ public static final OperationDescriptor< Number > DESCRIPTOR = new AbstractOperationDescriptor< Number >( TransformationFactory.createId( Max.class ), - PolyglotterI18n.maxOperationDescription.text(), - PolyglotterI18n.maxOperationName.text(), + ChrysalixI18n.maxOperationDescription.text(), + ChrysalixI18n.maxOperationName.text(), Number.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Number > newInstance( final Transformation transformation ) { @@ -90,18 +90,18 @@ public Operation< Number > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Number calculate() throws PolyglotterException { + protected Number calculate() throws ChrysalixException { assert !problems().isError(); Number result = null; @@ -140,7 +140,7 @@ protected Number calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -148,13 +148,13 @@ protected void validate() { if ( inputs().isEmpty() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.maxOperationHasNoTerms.text( transformationId() ) ); + ChrysalixI18n.maxOperationHasNoTerms.text( transformationId() ) ); problems().add( problem ); } else { if ( inputs().size() < INPUT_DESCRIPTORS[ 0 ].requiredValueCount() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermCount.text( name(), + ChrysalixI18n.invalidTermCount.text( name(), transformationId(), inputs().size() ) ); problems().add( problem ); @@ -170,17 +170,17 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermType.text( name(), + ChrysalixI18n.invalidTermType.text( name(), transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Median.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Median.java similarity index 70% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Median.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Median.java index 773a57b..8751236 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Median.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Median.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,23 +21,23 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Computes the median value of a collection of number terms. @@ -49,8 +49,8 @@ public final class Median extends AbstractOperation< Number > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Median.class, "input" ), - PolyglotterI18n.medianOperationInputDescription.text(), - PolyglotterI18n.medianOperationInputName.text(), + ChrysalixI18n.medianOperationInputDescription.text(), + ChrysalixI18n.medianOperationInputName.text(), Number.class, true, 1, @@ -66,15 +66,15 @@ public final class Median extends AbstractOperation< Number > { */ public static final OperationDescriptor< Number > DESCRIPTOR = new AbstractOperationDescriptor< Number >( TransformationFactory.createId( Median.class ), - PolyglotterI18n.medianOperationDescription.text(), - PolyglotterI18n.medianOperationName.text(), + ChrysalixI18n.medianOperationDescription.text(), + ChrysalixI18n.medianOperationName.text(), Number.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Number > newInstance( final Transformation transformation ) { @@ -94,19 +94,19 @@ public Operation< Number > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @SuppressWarnings( "unchecked" ) @Override - protected Number calculate() throws PolyglotterException { + protected Number calculate() throws ChrysalixException { assert !problems().isError(); int size = 0; @@ -142,12 +142,12 @@ protected Number calculate() throws PolyglotterException { divideOp.addInput( Divide.TERM_DESCRIPTOR.id(), sum, 2 ); return divideOp.get(); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.medianOperationError.text( transformationId() ) ); + ChrysalixI18n.medianOperationError.text( transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.medianOperationError, transformationId() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.medianOperationError, transformationId() ); } } @@ -157,7 +157,7 @@ protected Number calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -165,13 +165,13 @@ protected void validate() { if ( inputs().isEmpty() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.medianOperationHasNoTerms.text( transformationId() ) ); + ChrysalixI18n.medianOperationHasNoTerms.text( transformationId() ) ); problems().add( problem ); } else { if ( inputs().size() < INPUT_DESCRIPTORS[ 0 ].requiredValueCount() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermCount.text( name(), + ChrysalixI18n.invalidTermCount.text( name(), transformationId(), inputs().size() ) ); problems().add( problem ); @@ -187,17 +187,17 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermType.text( name(), + ChrysalixI18n.invalidTermType.text( name(), transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Min.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Min.java similarity index 71% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Min.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Min.java index 9448f34..dc57b9f 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Min.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Min.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; - -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +package org.chrysalix.operation; + +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Determines the minimum value of a collection of terms. @@ -45,8 +45,8 @@ public final class Min extends AbstractOperation< Number > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Min.class, "input" ), - PolyglotterI18n.minOperationInputDescription.text(), - PolyglotterI18n.minOperationInputName.text(), + ChrysalixI18n.minOperationInputDescription.text(), + ChrysalixI18n.minOperationInputName.text(), Number.class, true, 1, @@ -62,15 +62,15 @@ public final class Min extends AbstractOperation< Number > { */ public static final OperationDescriptor< Number > DESCRIPTOR = new AbstractOperationDescriptor< Number >( TransformationFactory.createId( Min.class ), - PolyglotterI18n.minOperationDescription.text(), - PolyglotterI18n.minOperationName.text(), + ChrysalixI18n.minOperationDescription.text(), + ChrysalixI18n.minOperationName.text(), Number.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Number > newInstance( final Transformation transformation ) { @@ -90,18 +90,18 @@ public Operation< Number > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Number calculate() throws PolyglotterException { + protected Number calculate() throws ChrysalixException { assert !problems().isError(); Number result = null; @@ -140,7 +140,7 @@ protected Number calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -148,13 +148,13 @@ protected void validate() { if ( inputs().isEmpty() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.minOperationHasNoTerms.text( transformationId() ) ); + ChrysalixI18n.minOperationHasNoTerms.text( transformationId() ) ); problems().add( problem ); } else { if ( inputs().size() < INPUT_DESCRIPTORS[ 0 ].requiredValueCount() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermCount.text( name(), + ChrysalixI18n.invalidTermCount.text( name(), transformationId(), inputs().size() ) ); problems().add( problem ); @@ -170,17 +170,17 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermType.text( name(), + ChrysalixI18n.invalidTermType.text( name(), transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Mode.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Mode.java similarity index 71% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Mode.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Mode.java index f4830fe..f1c8b4d 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Mode.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Mode.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,24 +21,24 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the mode, or most common term, of a collection of terms. @@ -50,8 +50,8 @@ public final class Mode extends AbstractOperation< Number[] > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Mode.class, "input" ), - PolyglotterI18n.modeOperationInputDescription.text(), - PolyglotterI18n.modeOperationInputName.text(), + ChrysalixI18n.modeOperationInputDescription.text(), + ChrysalixI18n.modeOperationInputName.text(), Number.class, true, 1, @@ -67,15 +67,15 @@ public final class Mode extends AbstractOperation< Number[] > { */ public static final OperationDescriptor< Number[] > DESCRIPTOR = new AbstractOperationDescriptor< Number[] >( TransformationFactory.createId( Mode.class ), - PolyglotterI18n.modeOperationDescription.text(), - PolyglotterI18n.modeOperationName.text(), + ChrysalixI18n.modeOperationDescription.text(), + ChrysalixI18n.modeOperationName.text(), Number[].class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Number[] > newInstance( final Transformation transformation ) { @@ -95,8 +95,8 @@ public Operation< Number[] > newInstance( final Transformation transformation ) try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } @@ -105,10 +105,10 @@ public Operation< Number[] > newInstance( final Transformation transformation ) *

* When there is no mode an empty array will be returned. * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Number[] calculate() throws PolyglotterException { + protected Number[] calculate() throws ChrysalixException { assert !problems().isError(); final Map< Number, Integer > result = new HashMap<>(); @@ -140,7 +140,7 @@ protected Number[] calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -148,13 +148,13 @@ protected void validate() { if ( inputs().isEmpty() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.modeOperationHasNoTerms.text( transformationId() ) ); + ChrysalixI18n.modeOperationHasNoTerms.text( transformationId() ) ); problems().add( problem ); } else { if ( inputs().size() < INPUT_DESCRIPTORS[ 0 ].requiredValueCount() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermCount.text( name(), + ChrysalixI18n.invalidTermCount.text( name(), transformationId(), inputs().size() ) ); problems().add( problem ); @@ -170,17 +170,17 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermType.text( name(), + ChrysalixI18n.invalidTermType.text( name(), transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Modulus.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Modulus.java similarity index 68% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Modulus.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Modulus.java index 6f0c8e5..ff2fb6c 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Modulus.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Modulus.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,21 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import java.util.List; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the modulus (remainder) of the first term divided by the second term. @@ -47,8 +47,8 @@ public final class Modulus extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > DIVIDEND_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Modulus.class, "dividend" ), - PolyglotterI18n.modulusOperationDividendDescription.text(), - PolyglotterI18n.modulusOperationDividendName.text(), + ChrysalixI18n.modulusOperationDividendDescription.text(), + ChrysalixI18n.modulusOperationDividendName.text(), Number.class, true, 1, @@ -59,8 +59,8 @@ public final class Modulus extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > DIVISOR_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Modulus.class, "divisor" ), - PolyglotterI18n.modulusOperationDivisorDescription.text(), - PolyglotterI18n.modulusOperationDivisorName.text(), + ChrysalixI18n.modulusOperationDivisorDescription.text(), + ChrysalixI18n.modulusOperationDivisorName.text(), Number.class, true, 1, @@ -76,15 +76,15 @@ public final class Modulus extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( Modulus.class ), - PolyglotterI18n.modulusOperationDescription.text(), - PolyglotterI18n.modulusOperationName.text(), + ChrysalixI18n.modulusOperationDescription.text(), + ChrysalixI18n.modulusOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -104,18 +104,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number dividend = ( Number ) inputs( DIVIDEND_DESCRIPTOR.id() ).get( 0 ).get(); @@ -127,7 +127,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -135,7 +135,7 @@ protected void validate() { if ( inputs().size() != 2 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.modulusOperationInvalidTermCount.text( transformationId() ) ); + ChrysalixI18n.modulusOperationInvalidTermCount.text( transformationId() ) ); problems().add( problem ); } else { { // dividend @@ -144,7 +144,7 @@ protected void validate() { if ( dividendValues.size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.modulusOperationInvalidDividendCount.text( transformationId() ) ); + ChrysalixI18n.modulusOperationInvalidDividendCount.text( transformationId() ) ); problems().add( problem ); } else { final Value< ? > term = dividendValues.get( 0 ); @@ -156,16 +156,16 @@ protected void validate() { if ( !( x instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.modulusOperationInvalidDividendTermType.text( transformationId() ) ); + ChrysalixI18n.modulusOperationInvalidDividendTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } @@ -176,7 +176,7 @@ protected void validate() { if ( divisorValues.size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.modulusOperationInvalidDivisorCount.text( transformationId() ) ); + ChrysalixI18n.modulusOperationInvalidDivisorCount.text( transformationId() ) ); problems().add( problem ); } else { final Value< ? > term = divisorValues.get( 0 ); @@ -188,15 +188,15 @@ protected void validate() { if ( !( y instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.modulusOperationInvalidDivisorTermType.text( transformationId() ) ); + ChrysalixI18n.modulusOperationInvalidDivisorTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = - TransformationFactory.createError( transformationId(), PolyglotterI18n.operationValidationError.text( name(), + TransformationFactory.createError( transformationId(), ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Multiply.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Multiply.java similarity index 71% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Multiply.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Multiply.java index 990d8d2..e81cdf3 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Multiply.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Multiply.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; - -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +package org.chrysalix.operation; + +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Multiplies a collection of terms. @@ -45,8 +45,8 @@ public final class Multiply extends AbstractOperation< Number > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Multiply.class, "input" ), - PolyglotterI18n.multiplyOperationInputDescription.text(), - PolyglotterI18n.multiplyOperationInputName.text(), + ChrysalixI18n.multiplyOperationInputDescription.text(), + ChrysalixI18n.multiplyOperationInputName.text(), Number.class, true, 2, @@ -62,15 +62,15 @@ public final class Multiply extends AbstractOperation< Number > { */ public static final OperationDescriptor< Number > DESCRIPTOR = new AbstractOperationDescriptor< Number >( TransformationFactory.createId( Multiply.class ), - PolyglotterI18n.multiplyOperationDescription.text(), - PolyglotterI18n.multiplyOperationName.text(), + ChrysalixI18n.multiplyOperationDescription.text(), + ChrysalixI18n.multiplyOperationName.text(), Number.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Number > newInstance( final Transformation transformation ) { @@ -90,18 +90,18 @@ public Operation< Number > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Number calculate() throws PolyglotterException { + protected Number calculate() throws ChrysalixException { assert !problems().isError(); Number result = null; @@ -140,7 +140,7 @@ protected Number calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -148,13 +148,13 @@ protected void validate() { if ( inputs().isEmpty() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.multiplyOperationHasNoTerms.text( transformationId() ) ); + ChrysalixI18n.multiplyOperationHasNoTerms.text( transformationId() ) ); problems().add( problem ); } else { if ( inputs().size() < INPUT_DESCRIPTORS[ 0 ].requiredValueCount() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermCount.text( name(), + ChrysalixI18n.invalidTermCount.text( name(), transformationId(), inputs().size() ) ); problems().add( problem ); @@ -170,17 +170,17 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermType.text( name(), + ChrysalixI18n.invalidTermType.text( name(), transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/ParseDouble.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/ParseDouble.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/ParseDouble.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/ParseDouble.java index e3e9812..0a8bb52 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/ParseDouble.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/ParseDouble.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Parses the string term into a double value. @@ -47,8 +47,8 @@ public final class ParseDouble extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( ParseDouble.class, "input" ), - PolyglotterI18n.parseDoubleOperationInputDescription.text(), - PolyglotterI18n.parseDoubleOperationInputName.text(), + ChrysalixI18n.parseDoubleOperationInputDescription.text(), + ChrysalixI18n.parseDoubleOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class ParseDouble extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( ParseDouble.class ), - PolyglotterI18n.parseDoubleOperationDescription.text(), - PolyglotterI18n.parseDoubleOperationName.text(), + ChrysalixI18n.parseDoubleOperationDescription.text(), + ChrysalixI18n.parseDoubleOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final String value = ( String ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.parseDoubleOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.parseDoubleOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.parseDoubleOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.parseDoubleOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Power.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Power.java similarity index 69% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Power.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Power.java index cd9526e..318509f 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Power.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Power.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,23 +21,23 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import java.math.BigDecimal; import java.math.BigInteger; import java.util.List; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the value of the first term raised to the power of the second term. @@ -51,8 +51,8 @@ public final class Power extends AbstractOperation< Number > { */ public static final ValueDescriptor< Number > BASE_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Power.class, "base" ), - PolyglotterI18n.powerOperationBaseDescription.text(), - PolyglotterI18n.powerOperationBaseName.text(), + ChrysalixI18n.powerOperationBaseDescription.text(), + ChrysalixI18n.powerOperationBaseName.text(), Number.class, true, 1, @@ -63,8 +63,8 @@ public final class Power extends AbstractOperation< Number > { */ public static final ValueDescriptor< Number > EXPONENT_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Power.class, "exponent" ), - PolyglotterI18n.powerOperationExponentDescription.text(), - PolyglotterI18n.powerOperationExponentName.text(), + ChrysalixI18n.powerOperationExponentDescription.text(), + ChrysalixI18n.powerOperationExponentName.text(), Number.class, true, 1, @@ -80,15 +80,15 @@ public final class Power extends AbstractOperation< Number > { */ public static final OperationDescriptor< Number > DESCRIPTOR = new AbstractOperationDescriptor< Number >( TransformationFactory.createId( Power.class ), - PolyglotterI18n.powerOperationDescription.text(), - PolyglotterI18n.powerOperationName.text(), + ChrysalixI18n.powerOperationDescription.text(), + ChrysalixI18n.powerOperationName.text(), Number.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Number > newInstance( final Transformation transformation ) { @@ -108,18 +108,18 @@ public Operation< Number > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Number calculate() throws PolyglotterException { + protected Number calculate() throws ChrysalixException { assert !problems().isError(); final Number base = ( Number ) inputs( BASE_DESCRIPTOR.id() ).get( 0 ).get(); @@ -134,14 +134,14 @@ protected Number calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { // make sure there are terms if ( inputs().size() != 2 ) { final ValidationProblem problem = - TransformationFactory.createError( transformationId(), PolyglotterI18n.powerOperationInvalidTermCount.text( transformationId() ) ); + TransformationFactory.createError( transformationId(), ChrysalixI18n.powerOperationInvalidTermCount.text( transformationId() ) ); problems().add( problem ); } else { { // base @@ -150,7 +150,7 @@ protected void validate() { if ( baseValues.size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.powerOperationInvalidBaseCount.text( transformationId() ) ); + ChrysalixI18n.powerOperationInvalidBaseCount.text( transformationId() ) ); problems().add( problem ); } else { final Value< ? > term = baseValues.get( 0 ); @@ -162,16 +162,16 @@ protected void validate() { if ( !( x instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.powerOperationInvalidBaseTermType.text( transformationId() ) ); + ChrysalixI18n.powerOperationInvalidBaseTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } @@ -182,7 +182,7 @@ protected void validate() { if ( exponentValues.size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.powerOperationInvalidExponentCount.text( transformationId() ) ); + ChrysalixI18n.powerOperationInvalidExponentCount.text( transformationId() ) ); problems().add( problem ); } else { final Value< ? > term = exponentValues.get( 0 ); @@ -194,16 +194,16 @@ protected void validate() { if ( !( y instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.powerOperationInvalidExponentTermType.text( transformationId() ) ); + ChrysalixI18n.powerOperationInvalidExponentTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/PowerOfE.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/PowerOfE.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/PowerOfE.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/PowerOfE.java index af49865..d6f7780 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/PowerOfE.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/PowerOfE.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates Euler's number raised to a power. @@ -47,8 +47,8 @@ public final class PowerOfE extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( PowerOfE.class, "input" ), - PolyglotterI18n.powerOfEOperationInputDescription.text(), - PolyglotterI18n.powerOfEOperationInputName.text(), + ChrysalixI18n.powerOfEOperationInputDescription.text(), + ChrysalixI18n.powerOfEOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class PowerOfE extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( PowerOfE.class ), - PolyglotterI18n.powerOfEOperationDescription.text(), - PolyglotterI18n.powerOfEOperationName.text(), + ChrysalixI18n.powerOfEOperationDescription.text(), + ChrysalixI18n.powerOfEOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.powerOfEOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.powerOfEOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.powerOfEOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.powerOfEOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/PowerOfEMinus1.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/PowerOfEMinus1.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/PowerOfEMinus1.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/PowerOfEMinus1.java index 1792e51..670522d 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/PowerOfEMinus1.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/PowerOfEMinus1.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates Euler's number raised to a power and minus one. @@ -47,8 +47,8 @@ public final class PowerOfEMinus1 extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( PowerOfEMinus1.class, "input" ), - PolyglotterI18n.powerOfEMinus1OperationInputDescription.text(), - PolyglotterI18n.powerOfEMinus1OperationInputName.text(), + ChrysalixI18n.powerOfEMinus1OperationInputDescription.text(), + ChrysalixI18n.powerOfEMinus1OperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class PowerOfEMinus1 extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( PowerOfEMinus1.class ), - PolyglotterI18n.powerOfEMinus1OperationDescription.text(), - PolyglotterI18n.powerOfEMinus1OperationName.text(), + ChrysalixI18n.powerOfEMinus1OperationDescription.text(), + ChrysalixI18n.powerOfEMinus1OperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.powerOfEMinus1OperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.powerOfEMinus1OperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.powerOfEMinus1OperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.powerOfEMinus1OperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Random.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Random.java similarity index 64% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Random.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Random.java index d3d834b..cdabb17 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Random.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Random.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,18 +21,18 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Provides a random number with a positive sign, greater than or equal to {@code 0.0} and less than {@code 1.0}. There is an @@ -45,15 +45,15 @@ public final class Random extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( Random.class ), - PolyglotterI18n.randomOperationDescription.text(), - PolyglotterI18n.randomOperationName.text(), + ChrysalixI18n.randomOperationDescription.text(), + ChrysalixI18n.randomOperationName.text(), Double.class, ValueDescriptor.NO_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -73,15 +73,15 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override protected Double calculate() { @@ -92,7 +92,7 @@ protected Double calculate() { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -100,7 +100,7 @@ protected void validate() { if ( !inputs().isEmpty() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.randomOperationInvalidNumberOfTerms.text( transformationId() ) ); + ChrysalixI18n.randomOperationInvalidNumberOfTerms.text( transformationId() ) ); problems().add( problem ); } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Round.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Round.java similarity index 69% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Round.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Round.java index bfbc2b4..65887fb 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Round.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Round.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import java.math.BigDecimal; import java.math.BigInteger; @@ -29,17 +29,17 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the closest long to the specified numeric term. @@ -53,8 +53,8 @@ public final class Round extends AbstractOperation< Number > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( Round.class, "input" ), - PolyglotterI18n.roundOperationInputDescription.text(), - PolyglotterI18n.roundOperationInputName.text(), + ChrysalixI18n.roundOperationInputDescription.text(), + ChrysalixI18n.roundOperationInputName.text(), Number.class ); /** @@ -67,15 +67,15 @@ public final class Round extends AbstractOperation< Number > { */ public static final OperationDescriptor< Number > DESCRIPTOR = new AbstractOperationDescriptor< Number >( TransformationFactory.createId( Round.class ), - PolyglotterI18n.roundOperationDescription.text(), - PolyglotterI18n.roundOperationName.text(), + ChrysalixI18n.roundOperationDescription.text(), + ChrysalixI18n.roundOperationName.text(), Number.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Number > newInstance( final Transformation transformation ) { @@ -95,18 +95,18 @@ public Operation< Number > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Number calculate() throws PolyglotterException { + protected Number calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -129,7 +129,7 @@ protected Number calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -137,7 +137,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.roundOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.roundOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // must be a number @@ -150,16 +150,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.roundOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.roundOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Sign.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Sign.java similarity index 68% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Sign.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Sign.java index 3d3cd2b..7a3e830 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Sign.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Sign.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,22 +21,22 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import java.math.BigDecimal; import java.math.BigInteger; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the sign (0, 1, or -1) of a number. @@ -53,8 +53,8 @@ public final class Sign extends AbstractOperation< Integer > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( Sign.class, "input" ), - PolyglotterI18n.signOperationInputDescription.text(), - PolyglotterI18n.signOperationInputName.text(), + ChrysalixI18n.signOperationInputDescription.text(), + ChrysalixI18n.signOperationInputName.text(), Number.class ); /** @@ -67,15 +67,15 @@ public final class Sign extends AbstractOperation< Integer > { */ public static final OperationDescriptor< Integer > DESCRIPTOR = new AbstractOperationDescriptor< Integer >( TransformationFactory.createId( Sign.class ), - PolyglotterI18n.signOperationDescription.text(), - PolyglotterI18n.signOperationName.text(), + ChrysalixI18n.signOperationDescription.text(), + ChrysalixI18n.signOperationName.text(), Integer.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Integer > newInstance( final Transformation transformation ) { @@ -95,18 +95,18 @@ public Operation< Integer > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Integer calculate() throws PolyglotterException { + protected Integer calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -120,7 +120,7 @@ protected Integer calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -128,7 +128,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.signOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.signOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // must be a number @@ -141,16 +141,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.signOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.signOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Sine.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Sine.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Sine.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Sine.java index 06fafea..9172850 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Sine.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Sine.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the sine of a number. @@ -47,8 +47,8 @@ public final class Sine extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( Sine.class, "input" ), - PolyglotterI18n.sineOperationInputDescription.text(), - PolyglotterI18n.sineOperationInputName.text(), + ChrysalixI18n.sineOperationInputDescription.text(), + ChrysalixI18n.sineOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class Sine extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( Sine.class ), - PolyglotterI18n.sineOperationDescription.text(), - PolyglotterI18n.sineOperationName.text(), + ChrysalixI18n.sineOperationDescription.text(), + ChrysalixI18n.sineOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.sineOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.sineOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.sineOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.sineOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/SquareRoot.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/SquareRoot.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/SquareRoot.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/SquareRoot.java index 7e3f4df..0622c4f 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/SquareRoot.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/SquareRoot.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the square root of a number. @@ -47,8 +47,8 @@ public final class SquareRoot extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( SquareRoot.class, "input" ), - PolyglotterI18n.squareRootOperationInputDescription.text(), - PolyglotterI18n.squareRootOperationInputName.text(), + ChrysalixI18n.squareRootOperationInputDescription.text(), + ChrysalixI18n.squareRootOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class SquareRoot extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( SquareRoot.class ), - PolyglotterI18n.squareRootOperationDescription.text(), - PolyglotterI18n.squareRootOperationName.text(), + ChrysalixI18n.squareRootOperationDescription.text(), + ChrysalixI18n.squareRootOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.squareRootOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.squareRootOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.squareRootOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.squareRootOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Subtract.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Subtract.java similarity index 71% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Subtract.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Subtract.java index cccd1d6..6849b49 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Subtract.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Subtract.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; - -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +package org.chrysalix.operation; + +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Subtracts a collection of terms. @@ -45,8 +45,8 @@ public final class Subtract extends AbstractOperation< Number > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createValueDescriptor( TransformationFactory.createId( Subtract.class, "input" ), - PolyglotterI18n.subtractOperationInputDescription.text(), - PolyglotterI18n.subtractOperationInputName.text(), + ChrysalixI18n.subtractOperationInputDescription.text(), + ChrysalixI18n.subtractOperationInputName.text(), Number.class, true, 2, @@ -62,15 +62,15 @@ public final class Subtract extends AbstractOperation< Number > { */ public static final OperationDescriptor< Number > DESCRIPTOR = new AbstractOperationDescriptor< Number >( TransformationFactory.createId( Subtract.class ), - PolyglotterI18n.subtractOperationDescription.text(), - PolyglotterI18n.subtractOperationName.text(), + ChrysalixI18n.subtractOperationDescription.text(), + ChrysalixI18n.subtractOperationName.text(), Number.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Number > newInstance( final Transformation transformation ) { @@ -90,18 +90,18 @@ public Operation< Number > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Number calculate() throws PolyglotterException { + protected Number calculate() throws ChrysalixException { assert !problems().isError(); Number result = null; @@ -140,7 +140,7 @@ protected Number calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -148,13 +148,13 @@ protected void validate() { if ( inputs().isEmpty() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.subtractOperationHasNoTerms.text( transformationId() ) ); + ChrysalixI18n.subtractOperationHasNoTerms.text( transformationId() ) ); problems().add( problem ); } else { if ( inputs().size() < INPUT_DESCRIPTORS[ 0 ].requiredValueCount() ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermCount.text( name(), + ChrysalixI18n.invalidTermCount.text( name(), transformationId(), inputs().size() ) ); problems().add( problem ); @@ -170,17 +170,17 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.invalidTermType.text( name(), + ChrysalixI18n.invalidTermType.text( name(), transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/Tangent.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/Tangent.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/Tangent.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/Tangent.java index 9d6dcdd..5fa821b 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/Tangent.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/Tangent.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Calculates the tangent of a number. @@ -47,8 +47,8 @@ public final class Tangent extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( Tangent.class, "input" ), - PolyglotterI18n.tangentOperationInputDescription.text(), - PolyglotterI18n.tangentOperationInputName.text(), + ChrysalixI18n.tangentOperationInputDescription.text(), + ChrysalixI18n.tangentOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class Tangent extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( Tangent.class ), - PolyglotterI18n.tangentOperationDescription.text(), - PolyglotterI18n.tangentOperationName.text(), + ChrysalixI18n.tangentOperationDescription.text(), + ChrysalixI18n.tangentOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.tangentOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.tangentOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.tangentOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.tangentOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/ToDegrees.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/ToDegrees.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/ToDegrees.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/ToDegrees.java index f793975..000ca23 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/ToDegrees.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/ToDegrees.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Converts an angle measured in radians to an approximately equivalent angle measured in degrees. @@ -47,8 +47,8 @@ public final class ToDegrees extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( ToDegrees.class, "input" ), - PolyglotterI18n.toDegreesOperationInputDescription.text(), - PolyglotterI18n.toDegreesOperationInputName.text(), + ChrysalixI18n.toDegreesOperationInputDescription.text(), + ChrysalixI18n.toDegreesOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class ToDegrees extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( ToDegrees.class ), - PolyglotterI18n.toDegreesOperationDescription.text(), - PolyglotterI18n.toDegreesOperationName.text(), + ChrysalixI18n.toDegreesOperationDescription.text(), + ChrysalixI18n.toDegreesOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.toDegreesOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.toDegreesOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.toDegreesOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.toDegreesOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/ToRadians.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/ToRadians.java similarity index 65% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/ToRadians.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/ToRadians.java index a791cdb..2667c0f 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/ToRadians.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/ToRadians.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.ValidationProblem; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; /** * Converts an angle measured in degrees to an approximately equivalent angle measured in radians. @@ -47,8 +47,8 @@ public final class ToRadians extends AbstractOperation< Double > { */ public static final ValueDescriptor< Number > TERM_DESCRIPTOR = TransformationFactory.createWritableBoundedOneValueDescriptor( TransformationFactory.createId( ToRadians.class, "input" ), - PolyglotterI18n.toRadiansOperationInputDescription.text(), - PolyglotterI18n.toRadiansOperationInputName.text(), + ChrysalixI18n.toRadiansOperationInputDescription.text(), + ChrysalixI18n.toRadiansOperationInputName.text(), Number.class ); /** @@ -61,15 +61,15 @@ public final class ToRadians extends AbstractOperation< Double > { */ public static final OperationDescriptor< Double > DESCRIPTOR = new AbstractOperationDescriptor< Double >( TransformationFactory.createId( ToRadians.class ), - PolyglotterI18n.toRadiansOperationDescription.text(), - PolyglotterI18n.toRadiansOperationName.text(), + ChrysalixI18n.toRadiansOperationDescription.text(), + ChrysalixI18n.toRadiansOperationName.text(), Double.class, INPUT_DESCRIPTORS ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationDescriptor#newInstance(org.polyglotter.transformation.Transformation) + * @see org.chrysalix.transformation.OperationDescriptor#newInstance(org.chrysalix.transformation.Transformation) */ @Override public Operation< Double > newInstance( final Transformation transformation ) { @@ -89,18 +89,18 @@ public Operation< Double > newInstance( final Transformation transformation ) { try { addCategory( BuiltInCategory.ARITHMETIC ); - } catch ( final PolyglotterException e ) { - Polyglotter.LOGGER.error( e, PolyglotterI18n.errorAddingBuiltInCategory, transformationId() ); + } catch ( final ChrysalixException e ) { + Chrysalix.LOGGER.error( e, ChrysalixI18n.errorAddingBuiltInCategory, transformationId() ); } } /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override - protected Double calculate() throws PolyglotterException { + protected Double calculate() throws ChrysalixException { assert !problems().isError(); final Number value = ( Number ) inputs().get( 0 ).get(); @@ -110,7 +110,7 @@ protected Double calculate() throws PolyglotterException { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { @@ -118,7 +118,7 @@ protected void validate() { if ( inputs().size() != 1 ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.toRadiansOperationMustHaveOneTerm.text( transformationId() ) ); + ChrysalixI18n.toRadiansOperationMustHaveOneTerm.text( transformationId() ) ); problems().add( problem ); } else { // make sure term is a number @@ -131,16 +131,16 @@ protected void validate() { if ( !( value instanceof Number ) ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.toRadiansOperationInvalidTermType.text( transformationId() ) ); + ChrysalixI18n.toRadiansOperationInvalidTermType.text( transformationId() ) ); problems().add( problem ); } - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { final ValidationProblem problem = TransformationFactory.createError( transformationId(), - PolyglotterI18n.operationValidationError.text( name(), + ChrysalixI18n.operationValidationError.text( name(), transformationId() ) ); problems().add( problem ); - Polyglotter.LOGGER.error( e, PolyglotterI18n.message, problem.message() ); + Chrysalix.LOGGER.error( e, ChrysalixI18n.message, problem.message() ); } } } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/ValueDescriptorImpl.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/ValueDescriptorImpl.java similarity index 83% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/ValueDescriptorImpl.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/ValueDescriptorImpl.java index 46737ea..bc7f011 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/ValueDescriptorImpl.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/ValueDescriptorImpl.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,10 +21,10 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; -import org.polyglotter.common.CheckArg; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.common.CheckArg; +import org.chrysalix.transformation.ValueDescriptor; /** * An implementation of a {@link ValueDescriptor value descriptor}. @@ -83,7 +83,7 @@ public ValueDescriptorImpl( final String valueId, /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValueDescriptor#description() + * @see org.chrysalix.transformation.ValueDescriptor#description() */ @Override public String description() { @@ -93,7 +93,7 @@ public String description() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValueDescriptor#id() + * @see org.chrysalix.transformation.ValueDescriptor#id() */ @Override public String id() { @@ -103,7 +103,7 @@ public String id() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValueDescriptor#modifiable() + * @see org.chrysalix.transformation.ValueDescriptor#modifiable() */ @Override public boolean modifiable() { @@ -113,7 +113,7 @@ public boolean modifiable() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValueDescriptor#name() + * @see org.chrysalix.transformation.ValueDescriptor#name() */ @Override public String name() { @@ -123,7 +123,7 @@ public String name() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValueDescriptor#requiredValueCount() + * @see org.chrysalix.transformation.ValueDescriptor#requiredValueCount() */ @Override public int requiredValueCount() { @@ -133,7 +133,7 @@ public int requiredValueCount() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValueDescriptor#type() + * @see org.chrysalix.transformation.ValueDescriptor#type() */ @Override public Class< T > type() { @@ -143,7 +143,7 @@ public Class< T > type() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValueDescriptor#unbounded() + * @see org.chrysalix.transformation.ValueDescriptor#unbounded() */ @Override public boolean unbounded() { diff --git a/polyglotter-engine/src/main/java/org/polyglotter/operation/ValueImpl.java b/chrysalix-engine/src/main/java/org/chrysalix/operation/ValueImpl.java similarity index 76% rename from polyglotter-engine/src/main/java/org/polyglotter/operation/ValueImpl.java rename to chrysalix-engine/src/main/java/org/chrysalix/operation/ValueImpl.java index a6fa0ba..af9b5f6 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/operation/ValueImpl.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/operation/ValueImpl.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,15 +21,15 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import java.lang.reflect.ParameterizedType; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.common.CheckArg; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.common.CheckArg; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; /** * The base class for {@link Value value} transformation objects. @@ -59,7 +59,7 @@ public ValueImpl( final ValueDescriptor< T > valueDescriptor ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Value#descriptor() + * @see org.chrysalix.transformation.Value#descriptor() */ @Override public ValueDescriptor< T > descriptor() { @@ -69,24 +69,24 @@ public ValueDescriptor< T > descriptor() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Value#get() + * @see org.chrysalix.transformation.Value#get() */ @SuppressWarnings( "unused" ) @Override - public T get() throws PolyglotterException { + public T get() throws ChrysalixException { return this.value; } /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Value#set(java.lang.Object) + * @see org.chrysalix.transformation.Value#set(java.lang.Object) */ @SuppressWarnings( "unused" ) @Override - public void set( final T newValue ) throws PolyglotterException { + public void set( final T newValue ) throws ChrysalixException { if ( !this.descriptor.modifiable() ) { - throw new UnsupportedOperationException( PolyglotterI18n.valueNotModifiable.text( this.descriptor.id() ) ); + throw new UnsupportedOperationException( ChrysalixI18n.valueNotModifiable.text( this.descriptor.id() ) ); } boolean changed = false; diff --git a/polyglotter-engine/src/main/java/org/polyglotter/transformation/Operation.java b/chrysalix-engine/src/main/java/org/chrysalix/transformation/Operation.java similarity index 87% rename from polyglotter-engine/src/main/java/org/polyglotter/transformation/Operation.java rename to chrysalix-engine/src/main/java/org/chrysalix/transformation/Operation.java index 01edc44..01d6f07 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/transformation/Operation.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/transformation/Operation.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,14 +21,14 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.transformation; +package org.chrysalix.transformation; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Set; -import org.polyglotter.PolyglotterException; +import org.chrysalix.ChrysalixException; /** * A class that produces a result by using zero or more {@link Value values}. @@ -66,10 +66,10 @@ public int compare( final Operation< ? > thisOp, * the categories being added (cannot be null) * @throws IllegalArgumentException * if the categories being added is null, empty, or any value in the array is null - * @throws PolyglotterException + * @throws ChrysalixException * if any of the categories cannot be added */ - void addCategory( final OperationCategory... categoriesBeingAdded ) throws PolyglotterException; + void addCategory( final OperationCategory... categoriesBeingAdded ) throws ChrysalixException; /** * @param descriptorId @@ -79,11 +79,11 @@ public int compare( final Operation< ? > thisOp, * the inputs being added (cannot be null or empty) * @throws IllegalArgumentException * if the inputs being added is null, empty, or any value in the array is null - * @throws PolyglotterException + * @throws ChrysalixException * if the descriptor ID is not valid or if there is a problem adding any of the values */ void addInput( final String descriptorId, - final Object... valuesBeingAdded ) throws PolyglotterException; + final Object... valuesBeingAdded ) throws ChrysalixException; /** * @return a collection of {@link OperationCategory categories} this operation belongs to (never null but can be @@ -106,10 +106,10 @@ void addInput( final String descriptorId, * the {@link OperationCategory categories} being removed (cannot be null or empty) * @throws IllegalArgumentException * if the categories being removed is null, empty, or any value in the array is null - * @throws PolyglotterException + * @throws ChrysalixException * if any of the categories cannot be found or cannot be removed */ - void removeCategory( final OperationCategory... categoriesBeingRemoved ) throws PolyglotterException; + void removeCategory( final OperationCategory... categoriesBeingRemoved ) throws ChrysalixException; /** * @param descriptorId @@ -120,11 +120,11 @@ void addInput( final String descriptorId, * @throws IllegalArgumentException * if the inputs being removed is null, empty, or any value in the array is null; or if the * descriptor ID is not valid - * @throws PolyglotterException + * @throws ChrysalixException * if there is a problem adding any of the values */ void removeInput( final String descriptorId, - final Object... valuesBeingRemoved ) throws PolyglotterException; + final Object... valuesBeingRemoved ) throws ChrysalixException; /** * @param descriptorId @@ -132,11 +132,11 @@ void removeInput( final String descriptorId, * or empty) * @param valuesBeingSet * the new input values (can be null or empty) - * @throws PolyglotterException + * @throws ChrysalixException * if there is a problem setting the input values */ void setInput( final String descriptorId, - final Object... valuesBeingSet ) throws PolyglotterException; + final Object... valuesBeingSet ) throws ChrysalixException; /** * @return the owning {@link Transformation transformation} (never null) diff --git a/polyglotter-engine/src/main/java/org/polyglotter/transformation/OperationCategory.java b/chrysalix-engine/src/main/java/org/chrysalix/transformation/OperationCategory.java similarity index 76% rename from polyglotter-engine/src/main/java/org/polyglotter/transformation/OperationCategory.java rename to chrysalix-engine/src/main/java/org/chrysalix/transformation/OperationCategory.java index 79b842b..7909511 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/transformation/OperationCategory.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/transformation/OperationCategory.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,14 +21,14 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.transformation; +package org.chrysalix.transformation; import java.util.Collections; import java.util.Comparator; import java.util.Set; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.common.I18n; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.common.I18n; /** * The category of an {@link Operation operation}. @@ -76,42 +76,42 @@ enum BuiltInCategory implements OperationCategory { /** * A category for operations that act on and/or have a numeric result. */ - ARITHMETIC( "arithmetic", PolyglotterI18n.opCatArithmeticLabel, PolyglotterI18n.opCatArithmeticDescription ), + ARITHMETIC( "arithmetic", ChrysalixI18n.opCatArithmeticLabel, ChrysalixI18n.opCatArithmeticDescription ), /** * A category for operations that assign a term a value. */ - ASSIGNMENT( "assignment", PolyglotterI18n.opCatAssignmentLabel, PolyglotterI18n.opCatAssignmentDescription ), + ASSIGNMENT( "assignment", ChrysalixI18n.opCatAssignmentLabel, ChrysalixI18n.opCatAssignmentDescription ), /** * A category for operations who perform on the bit level. */ - BITWISE( "bitwise", PolyglotterI18n.opCatBitwiseLabel, PolyglotterI18n.opCatBitwiseDescription ), + BITWISE( "bitwise", ChrysalixI18n.opCatBitwiseLabel, ChrysalixI18n.opCatBitwiseDescription ), /** * A category for operations that act on and/or have a date or time result. */ - DATE_TIME( "date_time", PolyglotterI18n.opCatDateTimeLabel, PolyglotterI18n.opCatDateTimeDescription ), + DATE_TIME( "date_time", ChrysalixI18n.opCatDateTimeLabel, ChrysalixI18n.opCatDateTimeDescription ), /** * A category for operations that compare two expressions. */ - LOGICAL( "logical", PolyglotterI18n.opCatLogicalLabel, PolyglotterI18n.opCatLogicalDescription ), + LOGICAL( "logical", ChrysalixI18n.opCatLogicalLabel, ChrysalixI18n.opCatLogicalDescription ), /** * A category for miscellaneous operations. */ - OTHER( "other", PolyglotterI18n.opCatOtherLabel, PolyglotterI18n.opCatOtherDescription ), + OTHER( "other", ChrysalixI18n.opCatOtherLabel, ChrysalixI18n.opCatOtherDescription ), /** * A category for operations that compare one operand to another. */ - RELATIONAL( "relational", PolyglotterI18n.opCatRelationalLabel, PolyglotterI18n.opCatRelationalDescription ), + RELATIONAL( "relational", ChrysalixI18n.opCatRelationalLabel, ChrysalixI18n.opCatRelationalDescription ), /** * A category for operations that act on and/or have a string result. */ - STRING( "string", PolyglotterI18n.opCatStringLabel, PolyglotterI18n.opCatStringDescription ); + STRING( "string", ChrysalixI18n.opCatStringLabel, ChrysalixI18n.opCatStringDescription ); private final I18n description; private final String id; @@ -135,7 +135,7 @@ public String description() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.OperationCategory#id() + * @see org.chrysalix.transformation.OperationCategory#id() */ @Override public String id() { diff --git a/polyglotter-engine/src/main/java/org/polyglotter/transformation/OperationDescriptor.java b/chrysalix-engine/src/main/java/org/chrysalix/transformation/OperationDescriptor.java similarity index 88% rename from polyglotter-engine/src/main/java/org/polyglotter/transformation/OperationDescriptor.java rename to chrysalix-engine/src/main/java/org/chrysalix/transformation/OperationDescriptor.java index 43dbffd..19ff1ff 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/transformation/OperationDescriptor.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/transformation/OperationDescriptor.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.transformation; +package org.chrysalix.transformation; /** diff --git a/polyglotter-engine/src/main/java/org/polyglotter/transformation/OperationDescriptorProvider.java b/chrysalix-engine/src/main/java/org/chrysalix/transformation/OperationDescriptorProvider.java similarity index 84% rename from polyglotter-engine/src/main/java/org/polyglotter/transformation/OperationDescriptorProvider.java rename to chrysalix-engine/src/main/java/org/chrysalix/transformation/OperationDescriptorProvider.java index 3eb9305..7ea6cdf 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/transformation/OperationDescriptorProvider.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/transformation/OperationDescriptorProvider.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.transformation; +package org.chrysalix.transformation; import java.util.List; diff --git a/polyglotter-engine/src/main/java/org/polyglotter/transformation/Transformation.java b/chrysalix-engine/src/main/java/org/chrysalix/transformation/Transformation.java similarity index 85% rename from polyglotter-engine/src/main/java/org/polyglotter/transformation/Transformation.java rename to chrysalix-engine/src/main/java/org/chrysalix/transformation/Transformation.java index 078bb8c..66e21cc 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/transformation/Transformation.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/transformation/Transformation.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,11 +21,11 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.transformation; +package org.chrysalix.transformation; +import org.chrysalix.ChrysalixException; +import org.chrysalix.common.CheckArg; import org.modelspace.Model; -import org.polyglotter.PolyglotterException; -import org.polyglotter.common.CheckArg; /** * A class representing a transformation. A transformation uses an ordered set of {@link Operation operations} to calculate a result @@ -42,23 +42,23 @@ public interface Transformation extends Iterable< Operation< ? > > { * the models being added to the transformation (cannot be null or empty) * @throws IllegalArgumentException * if the model type is null or if the models being added is null or empty - * @throws PolyglotterException + * @throws ChrysalixException * if a model is null, if a model being added has already been added and already has the specified model * type, or if a model cannot be added */ void add( final ModelType modelType, - final Model... models ) throws PolyglotterException; + final Model... models ) throws ChrysalixException; /** * @param operations * the operations being added (cannot be null or empty) * @throws IllegalArgumentException * if the operations being added are null or empty - * @throws PolyglotterException + * @throws ChrysalixException * if any of the operations have already been added, if an operation is null, or if an operation cannot be * added */ - void add( final Operation< ? >... operations ) throws PolyglotterException; + void add( final Operation< ? >... operations ) throws ChrysalixException; /** * @return a unique identifier (never null or empty) @@ -77,10 +77,10 @@ void add( final ModelType modelType, * the models being removed from the transformation (cannot be null or empty) * @throws IllegalArgumentException * if the models being removed is null or empty - * @throws PolyglotterException + * @throws ChrysalixException * if a model is null or if it cannot be removed */ - void remove( final Model... models ) throws PolyglotterException; + void remove( final Model... models ) throws ChrysalixException; /** * Removes a model type from an added model or removes the model completely if there are no more model types associcated with @@ -92,21 +92,21 @@ void add( final ModelType modelType, * the models whose model type is being removed (cannot be null or empty) * @throws IllegalArgumentException * if the model type is null or if the models being removed is null or empty - * @throws PolyglotterException + * @throws ChrysalixException * if a model is null, if a model does not have that model type, or if a model cannot be removed */ void remove( final ModelType modelType, - final Model... models ) throws PolyglotterException; + final Model... models ) throws ChrysalixException; /** * @param operations * the operations being removed (cannot be null or empty) * @throws IllegalArgumentException * if the operation being removed is null, empty, or any value in the array is null - * @throws PolyglotterException + * @throws ChrysalixException * if any of the operations cannot be found or cannot be removed */ - void remove( final Operation< ? >... operations ) throws PolyglotterException; + void remove( final Operation< ? >... operations ) throws ChrysalixException; /** * @return all source models (never null but can be empty) diff --git a/polyglotter-engine/src/main/java/org/polyglotter/transformation/TransformationFactory.java b/chrysalix-engine/src/main/java/org/chrysalix/transformation/TransformationFactory.java similarity index 85% rename from polyglotter-engine/src/main/java/org/polyglotter/transformation/TransformationFactory.java rename to chrysalix-engine/src/main/java/org/chrysalix/transformation/TransformationFactory.java index 9a6948f..1e6f024 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/transformation/TransformationFactory.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/transformation/TransformationFactory.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.transformation; +package org.chrysalix.transformation; import java.util.ArrayList; import java.util.Collection; @@ -31,16 +31,16 @@ import java.util.List; import java.util.Map; +import org.chrysalix.Chrysalix; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.common.CheckArg; +import org.chrysalix.operation.BuiltInOperationDescriptorProvider; +import org.chrysalix.operation.ValueDescriptorImpl; +import org.chrysalix.operation.ValueImpl; +import org.chrysalix.transformation.ValidationProblem.Severity; import org.modelspace.Model; import org.modelspace.ModelspaceException; -import org.polyglotter.Polyglotter; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.common.CheckArg; -import org.polyglotter.operation.BuiltInOperationDescriptorProvider; -import org.polyglotter.operation.ValueDescriptorImpl; -import org.polyglotter.operation.ValueImpl; -import org.polyglotter.transformation.ValidationProblem.Severity; /** * A factory for creating {@link Transformation transformation}-related objects. @@ -65,7 +65,7 @@ public static ValidationProblem createError( final String transformationId, } /** - * Creates an ID using the {@link Polyglotter#NAMESPACE_PREFIX} and {@link Polyglotter#NAMESPACE_URI}. + * Creates an ID using the {@link Chrysalix#NAMESPACE_PREFIX} and {@link Chrysalix#NAMESPACE_URI}. * * @param clazz * the class whose name will be used to construct the identifier (cannot be null) @@ -151,11 +151,11 @@ public static ValidationProblems createValidationProblems() { * @param initialValue * the initial value * @return the new double value (never null) - * @throws PolyglotterException + * @throws ChrysalixException * if there is a problem setting the initial value */ public static Value< Double > createValue( final ValueDescriptor< Double > descriptor, - final double initialValue ) throws PolyglotterException { + final double initialValue ) throws ChrysalixException { return new DoubleValue( descriptor, initialValue ); } @@ -165,11 +165,11 @@ public static Value< Double > createValue( final ValueDescriptor< Double > descr * @param initialValue * the initial value * @return the new double value (never null) - * @throws PolyglotterException + * @throws ChrysalixException * if there is a problem setting the initial value */ public static Value< Float > createValue( final ValueDescriptor< Float > descriptor, - final float initialValue ) throws PolyglotterException { + final float initialValue ) throws ChrysalixException { return new FloatValue( descriptor, initialValue ); } @@ -179,11 +179,11 @@ public static Value< Float > createValue( final ValueDescriptor< Float > descrip * @param initialValue * the initial value * @return the new double value (never null) - * @throws PolyglotterException + * @throws ChrysalixException * if there is a problem setting the initial value */ public static Value< Integer > createValue( final ValueDescriptor< Integer > descriptor, - final int initialValue ) throws PolyglotterException { + final int initialValue ) throws ChrysalixException { return new IntegerValue( descriptor, initialValue ); } @@ -193,11 +193,11 @@ public static Value< Integer > createValue( final ValueDescriptor< Integer > des * @param initialValue * the initial value * @return the new double value (never null) - * @throws PolyglotterException + * @throws ChrysalixException * if there is a problem setting the initial value */ public static Value< Long > createValue( final ValueDescriptor< Long > descriptor, - final long initialValue ) throws PolyglotterException { + final long initialValue ) throws ChrysalixException { return new LongValue( descriptor, initialValue ); } @@ -217,13 +217,13 @@ public static < T > Value< T > createValue( final ValueDescriptor< T > descripto * @param value * the initial value (can be null) * @return the new value (never null) - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs * @throws UnsupportedOperationException * if the descriptor is read-only */ public static < T > Value< T > createValue( final ValueDescriptor< T > descriptor, - final T value ) throws PolyglotterException { + final T value ) throws ChrysalixException { final Value< T > result = createValue( descriptor ); result.set( value ); @@ -327,11 +327,11 @@ public DoubleValue( final ValueDescriptor< Double > descriptor ) { * the value descriptor (cannot be null) * @param initialValue * the initial value (can be null) - * @throws PolyglotterException + * @throws ChrysalixException * if there is a problem setting the initial value */ public DoubleValue( final ValueDescriptor< Double > descriptor, - final double initialValue ) throws PolyglotterException { + final double initialValue ) throws ChrysalixException { this( descriptor ); set( initialValue ); } @@ -353,11 +353,11 @@ public FloatValue( final ValueDescriptor< Float > descriptor ) { * the value descriptor (cannot be null) * @param initialValue * the initial value (can be null) - * @throws PolyglotterException + * @throws ChrysalixException * if there is a problem setting the initial value */ public FloatValue( final ValueDescriptor< Float > descriptor, - final float initialValue ) throws PolyglotterException { + final float initialValue ) throws ChrysalixException { this( descriptor ); set( initialValue ); } @@ -379,11 +379,11 @@ public IntegerValue( final ValueDescriptor< Integer > descriptor ) { * the value descriptor (cannot be null) * @param initialValue * the initial value (can be null) - * @throws PolyglotterException + * @throws ChrysalixException * if there is a problem setting the initial value */ public IntegerValue( final ValueDescriptor< Integer > descriptor, - final int initialValue ) throws PolyglotterException { + final int initialValue ) throws ChrysalixException { this( descriptor ); set( initialValue ); } @@ -405,11 +405,11 @@ public LongValue( final ValueDescriptor< Long > descriptor ) { * the value descriptor (cannot be null) * @param initialValue * the initial value (can be null) - * @throws PolyglotterException + * @throws ChrysalixException * if there is a problem setting the initial value */ public LongValue( final ValueDescriptor< Long > descriptor, - final long initialValue ) throws PolyglotterException { + final long initialValue ) throws ChrysalixException { this( descriptor ); set( initialValue ); } @@ -433,7 +433,7 @@ private static final class Problem implements ValidationProblem { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValidationProblem#isError() + * @see org.chrysalix.transformation.ValidationProblem#isError() */ @Override public boolean isError() { @@ -443,7 +443,7 @@ public boolean isError() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValidationProblem#isInfo() + * @see org.chrysalix.transformation.ValidationProblem#isInfo() */ @Override public boolean isInfo() { @@ -453,7 +453,7 @@ public boolean isInfo() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValidationProblem#isOk() + * @see org.chrysalix.transformation.ValidationProblem#isOk() */ @Override public boolean isOk() { @@ -463,7 +463,7 @@ public boolean isOk() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValidationProblem#isWarning() + * @see org.chrysalix.transformation.ValidationProblem#isWarning() */ @Override public boolean isWarning() { @@ -473,7 +473,7 @@ public boolean isWarning() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValidationProblem#message() + * @see org.chrysalix.transformation.ValidationProblem#message() */ @Override public String message() { @@ -483,7 +483,7 @@ public String message() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValidationProblem#severity() + * @see org.chrysalix.transformation.ValidationProblem#severity() */ @Override public Severity severity() { @@ -493,7 +493,7 @@ public Severity severity() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValidationProblem#sourceId() + * @see org.chrysalix.transformation.ValidationProblem#sourceId() */ @Override public String sourceId() { @@ -605,7 +605,7 @@ private void determineSeverity() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValidationProblems#isError() + * @see org.chrysalix.transformation.ValidationProblems#isError() */ @Override public boolean isError() { @@ -615,7 +615,7 @@ public boolean isError() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValidationProblems#isInfo() + * @see org.chrysalix.transformation.ValidationProblems#isInfo() */ @Override public boolean isInfo() { @@ -625,7 +625,7 @@ public boolean isInfo() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValidationProblems#isOk() + * @see org.chrysalix.transformation.ValidationProblems#isOk() */ @Override public boolean isOk() { @@ -635,7 +635,7 @@ public boolean isOk() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.ValidationProblems#isWarning() + * @see org.chrysalix.transformation.ValidationProblems#isWarning() */ @Override public boolean isWarning() { @@ -757,18 +757,18 @@ public TransformationImpl( final String tranformationId ) { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Transformation#add(org.polyglotter.transformation.Transformation.ModelType, + * @see org.chrysalix.transformation.Transformation#add(org.chrysalix.transformation.Transformation.ModelType, * org.modelspace.Model[]) */ @Override public void add( final ModelType modelType, - final Model... modelsBeingAdded ) throws PolyglotterException { + final Model... modelsBeingAdded ) throws ChrysalixException { CheckArg.notNull( modelType, "modelType" ); CheckArg.isNotEmpty( modelsBeingAdded, "modelsBeingAdded" ); for ( final Model model : modelsBeingAdded ) { if ( model == null ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingNullTransformationModel, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingNullTransformationModel, id() ); } @@ -785,13 +785,13 @@ public void add( final ModelType modelType, try { modelName = model.name(); } catch ( final ModelspaceException e ) { - throw new PolyglotterException( e, - PolyglotterI18n.errorAddingTransformationModel, + throw new ChrysalixException( e, + ChrysalixI18n.errorAddingTransformationModel, id(), modelType.name() ); } - throw new PolyglotterException( PolyglotterI18n.errorAddingTransformationModelWithName, + throw new ChrysalixException( ChrysalixI18n.errorAddingTransformationModelWithName, modelName, id(), modelType.name() ); @@ -806,20 +806,20 @@ public void add( final ModelType modelType, /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Transformation#add(org.polyglotter.transformation.Operation[]) + * @see org.chrysalix.transformation.Transformation#add(org.chrysalix.transformation.Operation[]) */ @Override - public void add( final Operation< ? >... operationsToAdd ) throws PolyglotterException { + public void add( final Operation< ? >... operationsToAdd ) throws ChrysalixException { CheckArg.isNotEmpty( operationsToAdd, "operationsToAdd" ); for ( final Operation< ? > operation : operationsToAdd ) { if ( operation == null ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingNullTransformationOperation, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingNullTransformationOperation, id() ); } if ( this.operations.contains( operation ) || !this.operations.add( operation ) ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingTransformationOperation, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingTransformationOperation, operation.descriptor().id(), id() ); } @@ -829,7 +829,7 @@ public void add( final Operation< ? >... operationsToAdd ) throws PolyglotterExc /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Transformation#id() + * @see org.chrysalix.transformation.Transformation#id() */ @Override public String id() { @@ -850,7 +850,7 @@ public String id() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Transformation#operations() + * @see org.chrysalix.transformation.Transformation#operations() */ @Override public Operation< ? >[] operations() { @@ -860,15 +860,15 @@ public String id() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Transformation#remove(org.modelspace.Model[]) + * @see org.chrysalix.transformation.Transformation#remove(org.modelspace.Model[]) */ @Override - public void remove( final Model... modelsBeingRemoved ) throws PolyglotterException { + public void remove( final Model... modelsBeingRemoved ) throws ChrysalixException { CheckArg.isNotEmpty( modelsBeingRemoved, "modelsBeingRemoved" ); for ( final Model model : modelsBeingRemoved ) { if ( model == null ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingNullTransformationModel, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingNullTransformationModel, id() ); } @@ -881,12 +881,12 @@ public void remove( final Model... modelsBeingRemoved ) throws PolyglotterExcept try { modelName = model.name(); } catch ( final ModelspaceException e ) { - throw new PolyglotterException( e, - PolyglotterI18n.errorRemovingUnaddedTransformationModel, + throw new ChrysalixException( e, + ChrysalixI18n.errorRemovingUnaddedTransformationModel, id() ); } - throw new PolyglotterException( PolyglotterI18n.errorRemovingUnaddedTransformationModelWithName, + throw new ChrysalixException( ChrysalixI18n.errorRemovingUnaddedTransformationModelWithName, modelName, id() ); } @@ -898,18 +898,18 @@ public void remove( final Model... modelsBeingRemoved ) throws PolyglotterExcept /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Transformation#remove(org.polyglotter.transformation.Transformation.ModelType, + * @see org.chrysalix.transformation.Transformation#remove(org.chrysalix.transformation.Transformation.ModelType, * org.modelspace.Model[]) */ @Override public void remove( final ModelType modelType, - final Model... modelsBeingRemoved ) throws PolyglotterException { + final Model... modelsBeingRemoved ) throws ChrysalixException { CheckArg.notNull( modelType, "modelType" ); CheckArg.isNotEmpty( modelsBeingRemoved, "modelsBeingRemoved" ); for ( final Model model : modelsBeingRemoved ) { if ( model == null ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingNullTransformationModel, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingNullTransformationModel, id() ); } @@ -922,12 +922,12 @@ public void remove( final ModelType modelType, try { modelName = model.name(); } catch ( final ModelspaceException e ) { - throw new PolyglotterException( e, - PolyglotterI18n.errorRemovingUnaddedTransformationModel, + throw new ChrysalixException( e, + ChrysalixI18n.errorRemovingUnaddedTransformationModel, id() ); } - throw new PolyglotterException( PolyglotterI18n.errorRemovingUnaddedTransformationModelWithName, + throw new ChrysalixException( ChrysalixI18n.errorRemovingUnaddedTransformationModelWithName, modelName, id() ); } @@ -947,13 +947,13 @@ public void remove( final ModelType modelType, try { modelName = model.name(); } catch ( final ModelspaceException e ) { - throw new PolyglotterException( e, - PolyglotterI18n.errorRemovingTransformationModel, + throw new ChrysalixException( e, + ChrysalixI18n.errorRemovingTransformationModel, id(), modelType.name() ); } - throw new PolyglotterException( PolyglotterI18n.errorRemovingTransformationModelWithName, + throw new ChrysalixException( ChrysalixI18n.errorRemovingTransformationModelWithName, modelName, id(), modelType.name() ); @@ -964,20 +964,20 @@ public void remove( final ModelType modelType, /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Transformation#remove(org.polyglotter.transformation.Operation[]) + * @see org.chrysalix.transformation.Transformation#remove(org.chrysalix.transformation.Operation[]) */ @Override - public void remove( final Operation< ? >... operationsToRemove ) throws PolyglotterException { + public void remove( final Operation< ? >... operationsToRemove ) throws ChrysalixException { CheckArg.isNotEmpty( operationsToRemove, "operationsToRemove" ); for ( final Operation< ? > operation : operationsToRemove ) { if ( operation == null ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingNullTransformationOperation, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingNullTransformationOperation, id() ); } if ( !this.operations.remove( operation ) ) { - throw new PolyglotterException( PolyglotterI18n.errorAddingOrRemovingTransformationOperation, + throw new ChrysalixException( ChrysalixI18n.errorAddingOrRemovingTransformationOperation, operation.descriptor().id(), id() ); } @@ -987,7 +987,7 @@ public void remove( final Operation< ? >... operationsToRemove ) throws Polyglot /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Transformation#sources() + * @see org.chrysalix.transformation.Transformation#sources() */ @Override public Model[] sources() { @@ -1011,7 +1011,7 @@ public Model[] sources() { /** * {@inheritDoc} * - * @see org.polyglotter.transformation.Transformation#targets() + * @see org.chrysalix.transformation.Transformation#targets() */ @Override public Model[] targets() { diff --git a/polyglotter-engine/src/main/java/org/polyglotter/transformation/ValidationProblem.java b/chrysalix-engine/src/main/java/org/chrysalix/transformation/ValidationProblem.java similarity index 91% rename from polyglotter-engine/src/main/java/org/polyglotter/transformation/ValidationProblem.java rename to chrysalix-engine/src/main/java/org/chrysalix/transformation/ValidationProblem.java index 0ba5398..9c17d3a 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/transformation/ValidationProblem.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/transformation/ValidationProblem.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,9 +21,9 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.transformation; +package org.chrysalix.transformation; -import org.polyglotter.common.CheckArg; +import org.chrysalix.common.CheckArg; /** * A problem created when validating a {@link Transformation transformation}-related object like an {@link Operation operation}. diff --git a/polyglotter-engine/src/main/java/org/polyglotter/transformation/ValidationProblems.java b/chrysalix-engine/src/main/java/org/chrysalix/transformation/ValidationProblems.java similarity index 87% rename from polyglotter-engine/src/main/java/org/polyglotter/transformation/ValidationProblems.java rename to chrysalix-engine/src/main/java/org/chrysalix/transformation/ValidationProblems.java index 641d0f1..9fa7abb 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/transformation/ValidationProblems.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/transformation/ValidationProblems.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,11 +21,11 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.transformation; +package org.chrysalix.transformation; import java.util.List; -import org.polyglotter.transformation.ValidationProblem.Severity; +import org.chrysalix.transformation.ValidationProblem.Severity; /** * A collection of {@link ValidationProblem validation problems}. diff --git a/polyglotter-engine/src/main/java/org/polyglotter/transformation/Value.java b/chrysalix-engine/src/main/java/org/chrysalix/transformation/Value.java similarity index 85% rename from polyglotter-engine/src/main/java/org/polyglotter/transformation/Value.java rename to chrysalix-engine/src/main/java/org/chrysalix/transformation/Value.java index ce463cf..0b07818 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/transformation/Value.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/transformation/Value.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,13 +21,13 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.transformation; +package org.chrysalix.transformation; import java.util.Collections; import java.util.Comparator; import java.util.List; -import org.polyglotter.PolyglotterException; +import org.chrysalix.ChrysalixException; /** * An input or output {@link Value value}. @@ -50,7 +50,7 @@ public int compare( final Value< Number > thisNumber, try { thisValue = thisNumber.get(); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { return 0; } @@ -58,7 +58,7 @@ public int compare( final Value< Number > thisNumber, try { thatValue = thatNumber.get(); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { return 0; } @@ -101,20 +101,20 @@ public int compare( final Value< Number > thisNumber, /** * @return the value (can be null) - * @throws PolyglotterException + * @throws ChrysalixException * if there is an error */ - T get() throws PolyglotterException; + T get() throws ChrysalixException; /** * @param newValue * the new value (can be null) - * @throws PolyglotterException + * @throws ChrysalixException * if an error occurs * @throws UnsupportedOperationException * if the value is not modifiable * @see ValueDescriptor#modifiable() */ - void set( final T newValue ) throws PolyglotterException; + void set( final T newValue ) throws ChrysalixException; } diff --git a/polyglotter-engine/src/main/java/org/polyglotter/transformation/ValueDescriptor.java b/chrysalix-engine/src/main/java/org/chrysalix/transformation/ValueDescriptor.java similarity index 92% rename from polyglotter-engine/src/main/java/org/polyglotter/transformation/ValueDescriptor.java rename to chrysalix-engine/src/main/java/org/chrysalix/transformation/ValueDescriptor.java index 703f076..f41c670 100644 --- a/polyglotter-engine/src/main/java/org/polyglotter/transformation/ValueDescriptor.java +++ b/chrysalix-engine/src/main/java/org/chrysalix/transformation/ValueDescriptor.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.transformation; +package org.chrysalix.transformation; import java.util.Comparator; diff --git a/polyglotter-engine/src/test/java/org/polyglotter/PolyglotterI18nTest.java b/chrysalix-engine/src/test/java/org/chrysalix/ChrysalixI18nTest.java similarity index 76% rename from polyglotter-engine/src/test/java/org/polyglotter/PolyglotterI18nTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/ChrysalixI18nTest.java index ec66616..d1a4557 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/PolyglotterI18nTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/ChrysalixI18nTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,9 +21,9 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter; +package org.chrysalix; -import org.polyglotter.common.BaseI8nTest; +import org.chrysalix.common.BaseI8nTest; @SuppressWarnings( "javadoc" ) -public class PolyglotterI18nTest extends BaseI8nTest {} +public class ChrysalixI18nTest extends BaseI8nTest {} diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/AbsoluteValueTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/AbsoluteValueTest.java similarity index 80% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/AbsoluteValueTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/AbsoluteValueTest.java index b3400ea..ff10e37 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/AbsoluteValueTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/AbsoluteValueTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.AbsoluteValue; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class AbsoluteValueTest { @@ -67,20 +68,20 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( DOUBLE_TERM.get() ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( ( FLOAT_TERM.get().floatValue() - this.operation.get().floatValue() ) < Math.ulp( FLOAT_TERM.get().floatValue() ), is( true ) ); @@ -88,13 +89,13 @@ public void shouldCalculateFloatTerm() throws PolyglotterException { } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( INT_TERM.get() ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ID, LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.abs( LONG_TERM.get().longValue() ) ) ); @@ -105,13 +106,13 @@ public void shouldCalculateLongTerm() throws PolyglotterException { } @Test - public void shouldCalculateNegativeDoubleTerm() throws PolyglotterException { + public void shouldCalculateNegativeDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE4_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.abs( DOUBLE4_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateNegativeIntegerTerm() throws PolyglotterException { + public void shouldCalculateNegativeIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT4_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.abs( INT4_TERM.get().intValue() ) ) ); } @@ -133,7 +134,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT4_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -141,7 +142,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -152,8 +153,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -169,12 +170,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.absoluteValueOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.absoluteValueOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.absoluteValueOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.absoluteValueOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/AbstractOperationTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/AbstractOperationTest.java similarity index 83% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/AbstractOperationTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/AbstractOperationTest.java index 4484660..91cacce 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/AbstractOperationTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/AbstractOperationTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsNull.notNullValue; @@ -30,11 +30,13 @@ import java.util.Iterator; +import org.chrysalix.ChrysalixException; +import org.chrysalix.operation.AbstractOperation; +import org.chrysalix.operation.Add; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; import org.junit.Before; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( "javadoc" ) public final class AbstractOperationTest { @@ -48,7 +50,7 @@ public void beforeEach() { } @Test - public void shouldAddMultipleinputs() throws PolyglotterException { + public void shouldAddMultipleinputs() throws ChrysalixException { this.operation.addInput( OperationTestConstants.STRING_DESCRIPTOR.id(), OperationTestConstants.STRING_1_TERM ); this.operation.addInput( OperationTestConstants.STRING_DESCRIPTOR.id(), OperationTestConstants.STRING_2_TERM ); this.operation.addInput( OperationTestConstants.STRING_DESCRIPTOR.id(), OperationTestConstants.STRING_3_TERM ); @@ -57,7 +59,7 @@ public void shouldAddMultipleinputs() throws PolyglotterException { } @Test - public void shouldAddMultipleTerms2() throws PolyglotterException { + public void shouldAddMultipleTerms2() throws ChrysalixException { this.operation.addInput( OperationTestConstants.STRING_DESCRIPTOR.id(), OperationTestConstants.STRING_1_TERM, OperationTestConstants.STRING_2_TERM, @@ -67,7 +69,7 @@ public void shouldAddMultipleTerms2() throws PolyglotterException { } @Test - public void shouldBeAbleToUseOperationAsTerm() throws PolyglotterException { + public void shouldBeAbleToUseOperationAsTerm() throws ChrysalixException { this.operation.addInput( OperationTestConstants.INT_DESCRIPTOR.id(), OperationTestConstants.INT_1_TERM ); final long term = 2; @@ -79,13 +81,13 @@ public void shouldBeAbleToUseOperationAsTerm() throws PolyglotterException { } @Test( expected = IllegalArgumentException.class ) - public void shouldFailAddingEmptyTerms() throws PolyglotterException { + public void shouldFailAddingEmptyTerms() throws ChrysalixException { this.operation.addInput( OperationTestConstants.STRING_DESCRIPTOR.id(), new Object[ 0 ] ); this.operation.addInput( OperationTestConstants.STRING_DESCRIPTOR.id(), ( Object[] ) new Value< ? >[ 0 ] ); } - @Test( expected = PolyglotterException.class ) - public void shouldFailAddingNullTerm() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldFailAddingNullTerm() throws ChrysalixException { this.operation.addInput( OperationTestConstants.STRING_DESCRIPTOR.id(), new Object[] { OperationTestConstants.STRING_1_TERM, null, @@ -93,7 +95,7 @@ public void shouldFailAddingNullTerm() throws PolyglotterException { } @Test( expected = IllegalArgumentException.class ) - public void shouldFailAddingNullTerms() throws PolyglotterException { + public void shouldFailAddingNullTerms() throws ChrysalixException { this.operation.addInput( OperationTestConstants.STRING_DESCRIPTOR.id(), ( Object[] ) null ); } @@ -103,12 +105,12 @@ public void shouldFailIfNullDescriptor() { } @Test( expected = IllegalArgumentException.class ) - public void shouldFailRemovingEmptyTerms() throws PolyglotterException { + public void shouldFailRemovingEmptyTerms() throws ChrysalixException { this.operation.removeInput( OperationTestConstants.STRING_DESCRIPTOR.id(), ( Object[] ) new Value< ? >[ 0 ] ); } @Test( expected = UnsupportedOperationException.class ) - public void shouldFailRemovingInputUsingIterator() throws PolyglotterException { + public void shouldFailRemovingInputUsingIterator() throws ChrysalixException { this.operation.addInput( OperationTestConstants.STRING_DESCRIPTOR.id(), OperationTestConstants.STRING_1_TERM ); final Iterator< Value< ? > > itr = this.operation.iterator(); @@ -116,14 +118,14 @@ public void shouldFailRemovingInputUsingIterator() throws PolyglotterException { itr.remove(); } - @Test( expected = PolyglotterException.class ) - public void shouldFailRemovingInutThatWasNotAdded() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldFailRemovingInutThatWasNotAdded() throws ChrysalixException { this.operation.removeInput( OperationTestConstants.STRING_DESCRIPTOR.id(), OperationTestConstants.STRING_1_TERM ); } - @Test( expected = PolyglotterException.class ) - public void shouldFailRemovingNullTerm() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldFailRemovingNullTerm() throws ChrysalixException { this.operation.addInput( OperationTestConstants.STRING_DESCRIPTOR.id(), new Object[] { OperationTestConstants.STRING_1_TERM, OperationTestConstants.STRING_2_TERM } ); @@ -134,7 +136,7 @@ public void shouldFailRemovingNullTerm() throws PolyglotterException { } @Test( expected = IllegalArgumentException.class ) - public void shouldFailRemovingNullTerms() throws PolyglotterException { + public void shouldFailRemovingNullTerms() throws ChrysalixException { this.operation.removeInput( OperationTestConstants.STRING_DESCRIPTOR.id(), ( Object[] ) null ); } @@ -149,7 +151,7 @@ public void shouldHaveEmpyIteratorAfterConstruction() { } @Test - public void shouldHaveIteratorSizeEqualToTermSize() throws PolyglotterException { + public void shouldHaveIteratorSizeEqualToTermSize() throws ChrysalixException { this.operation.addInput( OperationTestConstants.STRING_DESCRIPTOR.id(), OperationTestConstants.STRING_1_TERM, OperationTestConstants.STRING_2_TERM, @@ -171,7 +173,7 @@ public void shouldObtainDescriptor() { } @Test - public void shouldRemoveMultipleInputs() throws PolyglotterException { + public void shouldRemoveMultipleInputs() throws ChrysalixException { this.operation.addInput( OperationTestConstants.STRING_DESCRIPTOR.id(), OperationTestConstants.STRING_1_TERM, OperationTestConstants.STRING_2_TERM ); @@ -182,7 +184,7 @@ public void shouldRemoveMultipleInputs() throws PolyglotterException { } @Test - public void shouldRemoveOneTerm() throws PolyglotterException { + public void shouldRemoveOneTerm() throws ChrysalixException { this.operation.addInput( OperationTestConstants.STRING_DESCRIPTOR.id(), OperationTestConstants.STRING_1_TERM ); this.operation.removeInput( OperationTestConstants.STRING_DESCRIPTOR.id(), OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.inputs().size(), is( 0 ) ); diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/AddTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/AddTest.java similarity index 81% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/AddTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/AddTest.java index f20e163..ca90528 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/AddTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/AddTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Add; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class AddTest { @@ -59,7 +60,7 @@ public void beforeEach() { } @Test - public void shouldAddIntegerAndDouble() throws PolyglotterException { + public void shouldAddIntegerAndDouble() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), @@ -67,7 +68,7 @@ public void shouldAddIntegerAndDouble() throws PolyglotterException { } @Test - public void shouldAddMultipleinputs() throws PolyglotterException { + public void shouldAddMultipleinputs() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM, DOUBLE_TERM ); assertThat( this.operation.inputs().size(), is( 3 ) ); assertThat( this.operation.get(), @@ -75,14 +76,14 @@ public void shouldAddMultipleinputs() throws PolyglotterException { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateIntegerResult() throws PolyglotterException { + public void shouldCalculateIntegerResult() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); // JCR does not have int so must use long @@ -107,7 +108,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenAddingTermWithWrongType() throws PolyglotterException { + public void shouldHaveErrorWhenAddingTermWithWrongType() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM ); // will get rid of initial problems this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); // will cause a new problem assertThat( this.operation.problems().size(), is( 1 ) ); @@ -119,13 +120,13 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultWithOnlyOneTerm() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultWithOnlyOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.get(); } @@ -136,7 +137,7 @@ public void shouldNotBeAbleToModifyTermsList() { } @Test - public void shouldNotHaveProblemsWithTwoTermsOfCorrectType() throws PolyglotterException { + public void shouldNotHaveProblemsWithTwoTermsOfCorrectType() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT_TERM ); assertThat( this.operation.problems().isEmpty(), is( true ) ); assertThat( this.operation.problems().isOk(), is( true ) ); @@ -149,12 +150,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.addOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.addOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.addOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.addOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/ArcCosineTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/ArcCosineTest.java similarity index 80% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/ArcCosineTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/ArcCosineTest.java index 2cb798a..5379622 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/ArcCosineTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/ArcCosineTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.ArcCosine; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class ArcCosineTest { @@ -62,32 +63,32 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ArcCosine.TERM_DESCRIPTOR.id(), INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ArcCosine.TERM_DESCRIPTOR.id(), DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.acos( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ArcCosine.TERM_DESCRIPTOR.id(), FLOAT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.acos( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ArcCosine.TERM_DESCRIPTOR.id(), INT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.acos( INT_TERM.get().intValue() ) ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ArcCosine.TERM_DESCRIPTOR.id(), LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.acos( LONG_TERM.get().longValue() ) ) ); } @@ -109,7 +110,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ArcCosine.TERM_DESCRIPTOR.id(), INT_TERM ); this.operation.addInput( ArcCosine.TERM_DESCRIPTOR.id(), INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -117,7 +118,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ArcCosine.TERM_DESCRIPTOR.id(), OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -128,8 +129,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -145,12 +146,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.arcCosineOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.arcCosineOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.arcCosineOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.arcCosineOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/ArcSineTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/ArcSineTest.java similarity index 80% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/ArcSineTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/ArcSineTest.java index 4ecd338..ed912f0 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/ArcSineTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/ArcSineTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.ArcSine; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class ArcSineTest { @@ -62,32 +63,32 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ArcSine.TERM_DESCRIPTOR.id(), INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ArcSine.TERM_DESCRIPTOR.id(), DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.asin( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ArcSine.TERM_DESCRIPTOR.id(), FLOAT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.asin( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ArcSine.TERM_DESCRIPTOR.id(), INT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.asin( INT_TERM.get().intValue() ) ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ArcSine.TERM_DESCRIPTOR.id(), LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.asin( LONG_TERM.get().longValue() ) ) ); } @@ -109,7 +110,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ArcSine.TERM_DESCRIPTOR.id(), INT_TERM ); this.operation.addInput( ArcSine.TERM_DESCRIPTOR.id(), INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -117,7 +118,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ArcSine.TERM_DESCRIPTOR.id(), OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -128,8 +129,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -145,12 +146,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.arcSineOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.arcSineOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.arcSineOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.arcSineOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/ArcTangentTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/ArcTangentTest.java similarity index 80% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/ArcTangentTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/ArcTangentTest.java index e567fcf..46c388d 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/ArcTangentTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/ArcTangentTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.ArcTangent; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class ArcTangentTest { @@ -62,32 +63,32 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ArcTangent.TERM_DESCRIPTOR.id(), INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ArcTangent.TERM_DESCRIPTOR.id(), DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.atan( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ArcTangent.TERM_DESCRIPTOR.id(), FLOAT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.atan( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ArcTangent.TERM_DESCRIPTOR.id(), INT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.atan( INT_TERM.get().intValue() ) ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ArcTangent.TERM_DESCRIPTOR.id(), LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.atan( LONG_TERM.get().longValue() ) ) ); } @@ -110,7 +111,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ArcTangent.TERM_DESCRIPTOR.id(), INT_TERM ); this.operation.addInput( ArcTangent.TERM_DESCRIPTOR.id(), INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -118,7 +119,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ArcTangent.TERM_DESCRIPTOR.id(), OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -129,8 +130,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -146,12 +147,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.arcTangentOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.arcTangentOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.arcTangentOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.arcTangentOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/AverageTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/AverageTest.java similarity index 81% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/AverageTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/AverageTest.java index 32ddf43..c2fccc9 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/AverageTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/AverageTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Average; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class AverageTest { @@ -59,21 +60,21 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldAverageIntegerAndDouble() throws PolyglotterException { + public void shouldAverageIntegerAndDouble() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) ( ( INT_TERM.get().intValue() + DOUBLE_TERM.get().doubleValue() ) / 2 ) ) ); } @Test - public void shouldAverageMultipleinputs() throws PolyglotterException { + public void shouldAverageMultipleinputs() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM, DOUBLE_TERM ); assertThat( this.operation.inputs().size(), is( 3 ) ); assertThat( this.operation.get(), @@ -81,7 +82,7 @@ public void shouldAverageMultipleinputs() throws PolyglotterException { } @Test - public void shouldCalculateIntegerResult() throws PolyglotterException { + public void shouldCalculateIntegerResult() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.get().intValue(), is( ( INT_TERM.get().intValue() + INT2_TERM.get().intValue() ) / 2 ) ); @@ -94,7 +95,7 @@ public void shouldCreateOperation() { } @Test - public void shouldGetResultWithOnlyOneTerm() throws PolyglotterException { + public void shouldGetResultWithOnlyOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( ( Number ) INT_TERM.get().intValue() ) ); } @@ -111,7 +112,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenAveragingWithStringTerm() throws PolyglotterException { + public void shouldHaveErrorWhenAveragingWithStringTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM ); // will get rid of initial problems this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); // adds a problem assertThat( this.operation.problems().size(), is( 1 ) ); @@ -123,8 +124,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -134,7 +135,7 @@ public void shouldNotBeAbleToModifyTermsList() { } @Test - public void shouldNotHaveProblemsWithTwoTermsOfCorrectType() throws PolyglotterException { + public void shouldNotHaveProblemsWithTwoTermsOfCorrectType() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM ); assertThat( this.operation.problems().isEmpty(), is( true ) ); assertThat( this.operation.problems().isOk(), is( true ) ); @@ -147,12 +148,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.averageOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.averageOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.averageOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.averageOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/CeilingTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/CeilingTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/CeilingTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/CeilingTest.java index 73173da..d5cde07 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/CeilingTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/CeilingTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Ceiling; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class CeilingTest { @@ -61,26 +62,26 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( 13 ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( 0 ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( INT_TERM.get().intValue() ) ); } @@ -103,7 +104,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -111,7 +112,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -122,8 +123,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -139,12 +140,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.ceilingOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.ceilingOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.ceilingOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.ceilingOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/ConcatTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/ConcatTest.java similarity index 86% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/ConcatTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/ConcatTest.java index 5d3f415..b47f594 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/ConcatTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/ConcatTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Concat; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -//import org.polyglotter.TestConstants; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; +//import org.chrysalix.TestConstants; @SuppressWarnings( { "javadoc" } ) public final class ConcatTest { @@ -106,12 +107,12 @@ public void shouldHaveCorrectCategory() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.concatOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.concatOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.concatOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.concatOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/CosineTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/CosineTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/CosineTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/CosineTest.java index d1ab7b2..50228ef 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/CosineTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/CosineTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Cosine; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class CosineTest { @@ -63,32 +64,32 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.cos( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.cos( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.cos( INT_TERM.get().intValue() ) ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ID, LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.cos( LONG_TERM.get().longValue() ) ) ); } @@ -111,7 +112,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -119,7 +120,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -130,8 +131,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -147,12 +148,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.cosineOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.cosineOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.cosineOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.cosineOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/CountTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/CountTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/CountTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/CountTest.java index 399a80d..088ba1c 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/CountTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/CountTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Count; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class CountTest { @@ -59,26 +60,26 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Object > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateResultWithNoinputs() throws PolyglotterException { + public void shouldCalculateResultWithNoinputs() throws ChrysalixException { assertThat( this.operation.get(), is( 0 ) ); } @Test - public void shouldCountInputs() throws PolyglotterException { + public void shouldCountInputs() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM ); assertThat( this.operation.inputs().size(), is( 2 ) ); assertThat( this.operation.get(), is( 2 ) ); } @Test - public void shouldCountTermsOfDifferentTypes() throws PolyglotterException { + public void shouldCountTermsOfDifferentTypes() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, DOUBLE_TERM ); this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); @@ -114,12 +115,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.countOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.countOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.countOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.countOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/CubeRootTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/CubeRootTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/CubeRootTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/CubeRootTest.java index 9bf2277..4e61543 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/CubeRootTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/CubeRootTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.CubeRoot; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class CubeRootTest { @@ -63,32 +64,32 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.cbrt( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.cbrt( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.cbrt( INT_TERM.get().intValue() ) ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ID, LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.cbrt( LONG_TERM.get().longValue() ) ) ); } @@ -111,7 +112,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -119,7 +120,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -130,8 +131,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -147,12 +148,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.cubeRootOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.cubeRootOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.cubeRootOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.cubeRootOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/DecrementTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/DecrementTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/DecrementTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/DecrementTest.java index 5ac4e2d..3fa5bad 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/DecrementTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/DecrementTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Decrement; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class DecrementTest { @@ -57,7 +58,7 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Integer > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); @@ -70,7 +71,7 @@ public void shouldCreateOperation() { } @Test - public void shouldDecrement() throws PolyglotterException { + public void shouldDecrement() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( INT_TERM.get().intValue() - 1 ) ); } @@ -87,7 +88,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -95,7 +96,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotAnInteger() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotAnInteger() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -106,8 +107,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -123,12 +124,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.decrementOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.decrementOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.decrementOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.decrementOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/DivideTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/DivideTest.java similarity index 81% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/DivideTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/DivideTest.java index 9d27285..8eb2850 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/DivideTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/DivideTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,19 +21,20 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Divide; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class DivideTest { @@ -58,7 +59,7 @@ public void beforeEach() { } @Test - public void shouldCalculateIntegerResult() throws PolyglotterException { + public void shouldCalculateIntegerResult() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.get().intValue(), is( INT_TERM.get().intValue() / INT2_TERM.get().intValue() ) ); @@ -71,14 +72,14 @@ public void shouldCreateOperation() { } @Test - public void shouldDivideIntegerAndDouble() throws PolyglotterException { + public void shouldDivideIntegerAndDouble() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) ( INT_TERM.get().intValue() / DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldDivideMultipleinputs() throws PolyglotterException { + public void shouldDivideMultipleinputs() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM, DOUBLE_TERM ); assertThat( this.operation.inputs().size(), is( 3 ) ); assertThat( this.operation.get(), @@ -91,7 +92,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenDividingTermWithWrongType() throws PolyglotterException { + public void shouldHaveErrorWhenDividingTermWithWrongType() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM ); // will get rid of current problems this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -103,13 +104,13 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultWithOnlyOneTerm() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultWithOnlyOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.get(); } @@ -120,7 +121,7 @@ public void shouldNotBeAbleToModifyTermsList() { } @Test - public void shouldNotHaveProblemsWithTwoTermsOfCorrectType() throws PolyglotterException { + public void shouldNotHaveProblemsWithTwoTermsOfCorrectType() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM ); assertThat( this.operation.problems().isEmpty(), is( true ) ); assertThat( this.operation.problems().isOk(), is( true ) ); @@ -132,7 +133,7 @@ public void shouldNotHaveTermsAfterConstruction() { } @Test - public void shouldObtainTerm() throws PolyglotterException { + public void shouldObtainTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); @@ -140,12 +141,12 @@ public void shouldObtainTerm() throws PolyglotterException { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.divideOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.divideOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.divideOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.divideOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/FloorTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/FloorTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/FloorTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/FloorTest.java index a3b80e4..2e635a6 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/FloorTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/FloorTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Floor; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class FloorTest { @@ -61,26 +62,26 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( 12 ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( -1 ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( INT_TERM.get() ) ); } @@ -103,7 +104,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -111,7 +112,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -122,8 +123,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -139,12 +140,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.floorOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.floorOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.floorOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.floorOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/HyperbolicCosineTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/HyperbolicCosineTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/HyperbolicCosineTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/HyperbolicCosineTest.java index 4616767..b8da731 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/HyperbolicCosineTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/HyperbolicCosineTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.HyperbolicCosine; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class HyperbolicCosineTest { @@ -63,32 +64,32 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.cosh( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.cosh( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.cosh( INT_TERM.get().intValue() ) ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ID, LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.cosh( LONG_TERM.get().longValue() ) ) ); } @@ -111,7 +112,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -119,7 +120,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -130,8 +131,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -147,12 +148,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.hyperbolicCosineOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.hyperbolicCosineOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.hyperbolicCosineOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.hyperbolicCosineOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/HyperbolicSineTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/HyperbolicSineTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/HyperbolicSineTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/HyperbolicSineTest.java index 2348299..ae4f659 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/HyperbolicSineTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/HyperbolicSineTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.HyperbolicSine; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class HyperbolicSineTest { @@ -63,32 +64,32 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.sinh( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.sinh( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.sinh( INT_TERM.get().intValue() ) ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ID, LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.sinh( LONG_TERM.get().longValue() ) ) ); } @@ -111,7 +112,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -119,7 +120,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -130,8 +131,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -147,12 +148,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.hyperbolicSineOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.hyperbolicSineOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.hyperbolicSineOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.hyperbolicSineOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/HyperbolicTangentTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/HyperbolicTangentTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/HyperbolicTangentTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/HyperbolicTangentTest.java index f5f848d..726a295 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/HyperbolicTangentTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/HyperbolicTangentTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.HyperbolicTangent; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class HyperbolicTangentTest { @@ -63,32 +64,32 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.tanh( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.tanh( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.tanh( INT_TERM.get().intValue() ) ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ID, LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.tanh( LONG_TERM.get().longValue() ) ) ); } @@ -111,7 +112,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -119,7 +120,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -130,8 +131,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -147,12 +148,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.hyperbolicTangentOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.hyperbolicTangentOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.hyperbolicTangentOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.hyperbolicTangentOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/IncrementTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/IncrementTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/IncrementTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/IncrementTest.java index 4cfb380..09d9e62 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/IncrementTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/IncrementTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Increment; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class IncrementTest { @@ -57,7 +58,7 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Integer > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); @@ -81,7 +82,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -89,7 +90,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotAnInteger() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotAnInteger() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -101,13 +102,13 @@ public void shouldHaveProblemsAfterConstruction() { } @Test - public void shouldIncrement() throws PolyglotterException { + public void shouldIncrement() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( INT_TERM.get().intValue() + 1 ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -123,12 +124,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.incrementOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.incrementOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.incrementOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.incrementOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/Log10Test.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/Log10Test.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/Log10Test.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/Log10Test.java index d3010b1..0c80ea6 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/Log10Test.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/Log10Test.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Log10; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class Log10Test { @@ -63,32 +64,32 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.log10( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.log10( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.log10( INT_TERM.get().intValue() ) ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ID, LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.log10( LONG_TERM.get().longValue() ) ) ); } @@ -111,7 +112,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -119,7 +120,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -130,8 +131,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -147,12 +148,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.log10OperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.log10OperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.log10OperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.log10OperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/LogTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/LogTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/LogTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/LogTest.java index 8f305e1..f7b480b 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/LogTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/LogTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Log; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class LogTest { @@ -63,32 +64,32 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.log( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.log( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.log( INT_TERM.get().intValue() ) ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ID, LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.log( LONG_TERM.get().longValue() ) ) ); } @@ -111,7 +112,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -119,7 +120,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -130,8 +131,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -147,12 +148,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.logOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.logOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.logOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.logOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/MapTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/MapTest.java similarity index 92% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/MapTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/MapTest.java index 0b0a994..a87901c 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/MapTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/MapTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,18 +21,19 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsNull.nullValue; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.mock; +import org.chrysalix.ChrysalixException; +import org.chrysalix.operation.Map; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.Test; import org.modelspace.Model; -import org.polyglotter.PolyglotterException; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; @SuppressWarnings( { "javadoc" } ) public final class MapTest { @@ -57,7 +58,7 @@ public void beforeEach() { this.operation = new Map( OperationTestConstants.TEST_TRANSFORMATION ); } - @Test( expected = PolyglotterException.class ) + @Test( expected = ChrysalixException.class ) public void shouldFailGettingResultAfterConstruction() throws Exception { this.operation.get(); } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/MaxTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/MaxTest.java similarity index 81% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/MaxTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/MaxTest.java index 122fcd6..8ea3ddf 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/MaxTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/MaxTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Max; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class MaxTest { @@ -59,20 +60,20 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldBeAbleToGetResultWithOnlyOneTerm() throws PolyglotterException { + public void shouldBeAbleToGetResultWithOnlyOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.get(); } @Test - public void shouldCalculateIntegerResult() throws PolyglotterException { + public void shouldCalculateIntegerResult() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.get().intValue(), is( INT2_TERM.get().intValue() ) ); @@ -85,14 +86,14 @@ public void shouldCreateOperation() { } @Test - public void shouldFindMaxOfIntegerAndDouble() throws PolyglotterException { + public void shouldFindMaxOfIntegerAndDouble() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) DOUBLE_TERM.get().doubleValue() ) ); } @Test - public void shouldFindMaxOfMultipleinputs() throws PolyglotterException { + public void shouldFindMaxOfMultipleinputs() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM, DOUBLE_TERM ); assertThat( this.operation.inputs().size(), is( 3 ) ); assertThat( this.operation.get(), is( ( Number ) Integer.valueOf( INT2_TERM.get().intValue() ).doubleValue() ) ); @@ -110,7 +111,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenFindingMaxUsingStringTerm() throws PolyglotterException { + public void shouldHaveErrorWhenFindingMaxUsingStringTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM ); // will get rid of initial problems this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); // creates new problem assertThat( this.operation.problems().size(), is( 1 ) ); @@ -122,8 +123,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -133,7 +134,7 @@ public void shouldNotBeAbleToModifyTermsList() { } @Test - public void shouldNotHaveProblemsWithTwoTermsOfCorrectType() throws PolyglotterException { + public void shouldNotHaveProblemsWithTwoTermsOfCorrectType() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM ); assertThat( this.operation.problems().isEmpty(), is( true ) ); assertThat( this.operation.problems().isOk(), is( true ) ); @@ -146,12 +147,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.maxOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.maxOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.maxOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.maxOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/MedianTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/MedianTest.java similarity index 80% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/MedianTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/MedianTest.java index 63cc84b..cf46c48 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/MedianTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/MedianTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Median; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class MedianTest { @@ -61,20 +62,20 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldAllowResultWhenOneTerm() throws PolyglotterException { + public void shouldAllowResultWhenOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.get(); } @Test - public void shouldCalculateWithEvenNumberOfinputs() throws PolyglotterException { + public void shouldCalculateWithEvenNumberOfinputs() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM, DOUBLE_TERM, @@ -85,7 +86,7 @@ public void shouldCalculateWithEvenNumberOfinputs() throws PolyglotterException } @Test - public void shouldCalculateWithOddNumberOfinputs() throws PolyglotterException { + public void shouldCalculateWithOddNumberOfinputs() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM, DOUBLE_TERM ); assertThat( this.operation.get(), is( DOUBLE_TERM.get() ) ); // middle value } @@ -108,7 +109,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenStringTerm() throws PolyglotterException { + public void shouldHaveErrorWhenStringTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM ); // will get rid of current problems this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -120,8 +121,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -137,12 +138,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.medianOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.medianOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.medianOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.medianOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/MinTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/MinTest.java similarity index 81% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/MinTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/MinTest.java index 89661ae..aa071cd 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/MinTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/MinTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Min; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class MinTest { @@ -59,20 +60,20 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldBeAbleToGetResultWithOnlyOneTerm() throws PolyglotterException { + public void shouldBeAbleToGetResultWithOnlyOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.get(); } @Test - public void shouldCalculateIntegerResult() throws PolyglotterException { + public void shouldCalculateIntegerResult() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); // JCR does not have int so ise long @@ -86,14 +87,14 @@ public void shouldCreateOperation() { } @Test - public void shouldFindMinOfIntegerAndDouble() throws PolyglotterException { + public void shouldFindMinOfIntegerAndDouble() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Integer.valueOf( INT_TERM.get().intValue() ).doubleValue() ) ); } @Test - public void shouldFindMinOfMultipleinputs() throws PolyglotterException { + public void shouldFindMinOfMultipleinputs() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM, DOUBLE_TERM ); assertThat( this.operation.inputs().size(), is( 3 ) ); assertThat( this.operation.get(), is( ( Number ) Integer.valueOf( INT_TERM.get().intValue() ).doubleValue() ) ); @@ -111,7 +112,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenFindingMinUsingStringTerm() throws PolyglotterException { + public void shouldHaveErrorWhenFindingMinUsingStringTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM ); // will get rid of current problems this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -123,8 +124,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -134,7 +135,7 @@ public void shouldNotBeAbleToModifyTermsList() { } @Test - public void shouldNotHaveProblemsWithTwoTermsOfCorrectType() throws PolyglotterException { + public void shouldNotHaveProblemsWithTwoTermsOfCorrectType() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM ); assertThat( this.operation.problems().isEmpty(), is( true ) ); assertThat( this.operation.problems().isOk(), is( true ) ); @@ -147,12 +148,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.minOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.minOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.minOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.minOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/ModeTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/ModeTest.java similarity index 84% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/ModeTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/ModeTest.java index f28e11f..a8b4c6d 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/ModeTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/ModeTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsCollectionContaining.hasItems; @@ -30,14 +30,15 @@ import java.util.Arrays; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Mode; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class ModeTest { @@ -72,14 +73,14 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldAllowResultWithOneTerm() throws PolyglotterException { + public void shouldAllowResultWithOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.get(); } @@ -91,7 +92,7 @@ public void shouldCreateOperation() { } @Test - public void shouldFindOneNumber() throws PolyglotterException { + public void shouldFindOneNumber() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM, DOUBLE_TERM, @@ -105,7 +106,7 @@ public void shouldFindOneNumber() throws PolyglotterException { } @Test - public void shouldFindTwoNumbers() throws PolyglotterException { + public void shouldFindTwoNumbers() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM, DOUBLE_TERM, @@ -131,7 +132,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenStringTerm() throws PolyglotterException { + public void shouldHaveErrorWhenStringTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM ); // will get rid of current problems this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -143,8 +144,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -154,7 +155,7 @@ public void shouldNotBeAbleToModifyTermsList() { } @Test - public void shouldNotFindAMode() throws PolyglotterException { + public void shouldNotFindAMode() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM, DOUBLE_TERM, @@ -172,12 +173,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.modeOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.modeOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.modeOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.modeOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/ModulusTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/ModulusTest.java similarity index 85% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/ModulusTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/ModulusTest.java index d1282bd..a0691a0 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/ModulusTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/ModulusTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Modulus; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class ModulusTest { @@ -67,7 +68,7 @@ public void beforeEach() { } @Test - public void shouldAddTwoinputs() throws PolyglotterException { + public void shouldAddTwoinputs() throws ChrysalixException { this.operation.addInput( DIVIDEND_ID, DIVIDEND_INT_TERM ); this.operation.addInput( DIVISOR_ID, DIVISOR_INT_TERM ); assertThat( this.operation.inputs().size(), is( 2 ) ); @@ -78,7 +79,7 @@ public void shouldAddTwoinputs() throws PolyglotterException { } @Test - public void shouldCalculateDoubleinputs() throws PolyglotterException { + public void shouldCalculateDoubleinputs() throws ChrysalixException { this.operation.addInput( DIVIDEND_ID, DIVIDEND_DOUBLE_TERM ); this.operation.addInput( DIVISOR_ID, DIVISOR_DOUBLE_TERM ); assertThat( this.operation.get(), @@ -86,7 +87,7 @@ public void shouldCalculateDoubleinputs() throws PolyglotterException { } @Test - public void shouldCalculateFloatinputs() throws PolyglotterException { + public void shouldCalculateFloatinputs() throws ChrysalixException { this.operation.addInput( DIVIDEND_ID, DIVIDEND_FLOAT_TERM ); this.operation.addInput( DIVISOR_ID, DIVISOR_FLOAT_TERM ); assertThat( this.operation.get(), @@ -94,7 +95,7 @@ public void shouldCalculateFloatinputs() throws PolyglotterException { } @Test - public void shouldCalculateIntegerinputs() throws PolyglotterException { + public void shouldCalculateIntegerinputs() throws ChrysalixException { this.operation.addInput( DIVIDEND_ID, DIVIDEND_INT_TERM ); this.operation.addInput( DIVISOR_ID, DIVISOR_INT_TERM ); assertThat( this.operation.get(), @@ -102,7 +103,7 @@ public void shouldCalculateIntegerinputs() throws PolyglotterException { } @Test - public void shouldCalculateMixedinputs() throws PolyglotterException { + public void shouldCalculateMixedinputs() throws ChrysalixException { this.operation.addInput( DIVIDEND_ID, DIVIDEND_INT_TERM ); this.operation.addInput( DIVISOR_ID, DIVISOR_DOUBLE_TERM ); assertThat( this.operation.get(), is( DIVIDEND_INT_TERM.get().intValue() % DIVISOR_DOUBLE_TERM.get().doubleValue() ) ); @@ -126,7 +127,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenDividendTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenDividendTermIsNotANumber() throws ChrysalixException { this.operation.addInput( DIVIDEND_ID, OperationTestConstants.STRING_1_TERM ); this.operation.addInput( DIVISOR_ID, DIVISOR_INT_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -134,7 +135,7 @@ public void shouldHaveErrorWhenDividendTermIsNotANumber() throws PolyglotterExce } @Test - public void shouldHaveErrorWhenDivisorTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenDivisorTermIsNotANumber() throws ChrysalixException { this.operation.addInput( DIVIDEND_ID, DIVIDEND_INT_TERM ); this.operation.addInput( DIVISOR_ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -142,7 +143,7 @@ public void shouldHaveErrorWhenDivisorTermIsNotANumber() throws PolyglotterExcep } @Test - public void shouldHaveErrorWhenMoreThanOneDividend() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneDividend() throws ChrysalixException { this.operation.addInput( DIVIDEND_ID, DIVIDEND_INT_TERM ); this.operation.addInput( DIVIDEND_ID, DIVIDEND_INT_TERM ); this.operation.addInput( DIVISOR_ID, DIVISOR_DOUBLE_TERM ); @@ -151,7 +152,7 @@ public void shouldHaveErrorWhenMoreThanOneDividend() throws PolyglotterException } @Test - public void shouldHaveErrorWhenMoreThanOneDivisor() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneDivisor() throws ChrysalixException { this.operation.addInput( DIVIDEND_ID, DIVIDEND_INT_TERM ); this.operation.addInput( DIVISOR_ID, DIVISOR_DOUBLE_TERM ); this.operation.addInput( DIVISOR_ID, DIVISOR_DOUBLE_TERM ); @@ -164,8 +165,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -181,12 +182,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.modulusOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.modulusOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.modulusOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.modulusOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/MultiplyTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/MultiplyTest.java similarity index 81% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/MultiplyTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/MultiplyTest.java index c98e17e..5e4a67b 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/MultiplyTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/MultiplyTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Multiply; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class MultiplyTest { @@ -59,7 +60,7 @@ public void beforeEach() { } @Test - public void shouldCalculateIntegerResult() throws PolyglotterException { + public void shouldCalculateIntegerResult() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.get().intValue(), is( INT_TERM.get().intValue() * INT2_TERM.get().intValue() ) ); @@ -83,7 +84,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMultiplyingTermWithWrongType() throws PolyglotterException { + public void shouldHaveErrorWhenMultiplyingTermWithWrongType() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM ); // will get rid of current problems this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -96,27 +97,27 @@ public void shouldHaveProblemsAfterConstruction() { } @Test - public void shouldMultiplyIntegerAndDouble() throws PolyglotterException { + public void shouldMultiplyIntegerAndDouble() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) ( INT_TERM.get().intValue() * DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldMultiplyMultipleinputs() throws PolyglotterException { + public void shouldMultiplyMultipleinputs() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM, DOUBLE_TERM ); assertThat( this.operation.inputs().size(), is( 3 ) ); assertThat( this.operation.get(), is( ( Number ) ( INT_TERM.get().intValue() * INT2_TERM.get().intValue() * DOUBLE_TERM.get().doubleValue() ) ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultWithOnlyOneTerm() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultWithOnlyOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.get(); } @@ -127,7 +128,7 @@ public void shouldNotBeAbleToModifyTermsList() { } @Test - public void shouldNotHaveProblemsWithTwoTermsOfCorrectType() throws PolyglotterException { + public void shouldNotHaveProblemsWithTwoTermsOfCorrectType() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM ); assertThat( this.operation.problems().isEmpty(), is( true ) ); assertThat( this.operation.problems().isOk(), is( true ) ); @@ -139,7 +140,7 @@ public void shouldNotHaveTermsAfterConstruction() { } @Test - public void shouldObtainTerm() throws PolyglotterException { + public void shouldObtainTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); @@ -147,12 +148,12 @@ public void shouldObtainTerm() throws PolyglotterException { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.multiplyOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.multiplyOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.multiplyOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.multiplyOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/OperationTestConstants.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/OperationTestConstants.java similarity index 91% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/OperationTestConstants.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/OperationTestConstants.java index c87f8b4..f37c9ce 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/OperationTestConstants.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/OperationTestConstants.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,15 +21,17 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; - -import org.polyglotter.PolyglotterException; -import org.polyglotter.transformation.Operation; -import org.polyglotter.transformation.OperationDescriptor; -import org.polyglotter.transformation.Transformation; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; -import org.polyglotter.transformation.ValueDescriptor; +package org.chrysalix.operation; + +import org.chrysalix.ChrysalixException; +import org.chrysalix.operation.AbstractOperation; +import org.chrysalix.operation.AbstractOperationDescriptor; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.OperationDescriptor; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.ValueDescriptor; @SuppressWarnings( "javadoc" ) public class OperationTestConstants { @@ -90,7 +92,7 @@ public class OperationTestConstants { public static OperationDescriptor< Integer > TEST_OPERATION_DESCRIPTOR = new AbstractOperationDescriptor< Integer >( "outputDescriptorId", "operationDescription", - "org.polyglotter.TestConstants$TestOperation", + "org.chrysalix.TestConstants$TestOperation", Integer.class, TEST_INPUT_DESCRIPTORS ) { @@ -203,7 +205,7 @@ public TestOperation( final Transformation operationTransformation ) { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#calculate() + * @see org.chrysalix.operation.AbstractOperation#calculate() */ @Override protected Integer calculate() { @@ -212,7 +214,7 @@ protected Integer calculate() { for ( final Value< ? > integerValue : inputs( INT_DESCRIPTOR.id() ) ) { try { result += ( Integer ) integerValue.get(); - } catch ( final PolyglotterException e ) { + } catch ( final ChrysalixException e ) { throw new RuntimeException( e ); } } @@ -223,7 +225,7 @@ protected Integer calculate() { /** * {@inheritDoc} * - * @see org.polyglotter.operation.AbstractOperation#validate() + * @see org.chrysalix.operation.AbstractOperation#validate() */ @Override protected void validate() { diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/PowerOfEMinus1Test.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/PowerOfEMinus1Test.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/PowerOfEMinus1Test.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/PowerOfEMinus1Test.java index 0414012..8cdf8f0 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/PowerOfEMinus1Test.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/PowerOfEMinus1Test.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.PowerOfEMinus1; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class PowerOfEMinus1Test { @@ -63,32 +64,32 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.expm1( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.expm1( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.expm1( INT_TERM.get().intValue() ) ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ID, LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.expm1( LONG_TERM.get().longValue() ) ) ); } @@ -111,7 +112,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -119,7 +120,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -130,8 +131,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -147,12 +148,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.powerOfEMinus1OperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.powerOfEMinus1OperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.powerOfEMinus1OperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.powerOfEMinus1OperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/PowerOfETest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/PowerOfETest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/PowerOfETest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/PowerOfETest.java index 8dcd2bb..446aeb2 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/PowerOfETest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/PowerOfETest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.PowerOfE; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class PowerOfETest { @@ -63,32 +64,32 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.exp( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.exp( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.exp( INT_TERM.get().intValue() ) ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ID, LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.exp( LONG_TERM.get().longValue() ) ) ); } @@ -111,7 +112,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -119,7 +120,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -130,8 +131,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -147,12 +148,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.powerOfEOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.powerOfEOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.powerOfEOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.powerOfEOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/PowerTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/PowerTest.java similarity index 84% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/PowerTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/PowerTest.java index 0b7fcf1..3ad3a3a 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/PowerTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/PowerTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Power; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class PowerTest { @@ -66,7 +67,7 @@ public void beforeEach() { } @Test - public void shouldAddTwoinputs() throws PolyglotterException { + public void shouldAddTwoinputs() throws ChrysalixException { this.operation.addInput( BASE_ID, BASE_INT_TERM ); this.operation.addInput( EXP_ID, EXP_INT_TERM ); assertThat( this.operation.inputs().size(), is( 2 ) ); @@ -77,7 +78,7 @@ public void shouldAddTwoinputs() throws PolyglotterException { } @Test - public void shouldCalculateDoubleinputs() throws PolyglotterException { + public void shouldCalculateDoubleinputs() throws ChrysalixException { this.operation.addInput( BASE_ID, BASE_DOUBLE_TERM ); this.operation.addInput( EXP_ID, EXP_DOUBLE_TERM ); assertThat( this.operation.get(), @@ -85,7 +86,7 @@ public void shouldCalculateDoubleinputs() throws PolyglotterException { } @Test - public void shouldCalculateFloatinputs() throws PolyglotterException { + public void shouldCalculateFloatinputs() throws ChrysalixException { this.operation.addInput( BASE_ID, BASE_FLOAT_TERM ); this.operation.addInput( EXP_ID, EXP_FLOAT_TERM ); assertThat( this.operation.get(), @@ -110,7 +111,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenBaseIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenBaseIsNotANumber() throws ChrysalixException { this.operation.addInput( BASE_ID, OperationTestConstants.STRING_1_TERM ); this.operation.addInput( EXP_ID, EXP_DOUBLE_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -118,7 +119,7 @@ public void shouldHaveErrorWhenBaseIsNotANumber() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenExponentIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenExponentIsNotANumber() throws ChrysalixException { this.operation.addInput( BASE_ID, BASE_INT_TERM ); this.operation.addInput( EXP_ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -126,7 +127,7 @@ public void shouldHaveErrorWhenExponentIsNotANumber() throws PolyglotterExceptio } @Test - public void shouldHaveErrorWhenMoreThanOneBase() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneBase() throws ChrysalixException { this.operation.addInput( BASE_ID, BASE_DOUBLE_TERM ); this.operation.addInput( BASE_ID, BASE_INT_TERM ); this.operation.addInput( EXP_ID, EXP_DOUBLE_TERM ); @@ -135,7 +136,7 @@ public void shouldHaveErrorWhenMoreThanOneBase() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenMoreThanOneExponent() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneExponent() throws ChrysalixException { this.operation.addInput( BASE_ID, BASE_INT_TERM ); this.operation.addInput( EXP_ID, EXP_DOUBLE_TERM ); this.operation.addInput( EXP_ID, EXP_FLOAT_TERM ); @@ -148,8 +149,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -165,12 +166,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.powerOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.powerOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.powerOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.powerOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/RandomTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/RandomTest.java similarity index 81% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/RandomTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/RandomTest.java index c7ebb5e..499631b 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/RandomTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/RandomTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,17 +21,18 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Random; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; @SuppressWarnings( { "javadoc" } ) public final class RandomTest { @@ -44,7 +45,7 @@ public void beforeEach() { } @Test - public void shouldBeAbleToGetResultAfterConstruction() throws PolyglotterException { + public void shouldBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -82,12 +83,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.randomOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.randomOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.randomOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.randomOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/RoundTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/RoundTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/RoundTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/RoundTest.java index 82fc760..97d89ae 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/RoundTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/RoundTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Round; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class RoundTest { @@ -63,32 +64,32 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.round( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.round( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( ( Number ) INT_TERM.get().intValue() ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ID, LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) LONG_TERM.get().longValue() ) ); } @@ -111,7 +112,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -119,7 +120,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -130,8 +131,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -147,12 +148,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.roundOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.roundOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.roundOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.roundOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/SignTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/SignTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/SignTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/SignTest.java index 11d62ab..9e7dd74 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/SignTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/SignTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Sign; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class SignTest { @@ -67,44 +68,44 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( 1 ) ); } @Test - public void shouldCalculateDoubleZeroTerm() throws PolyglotterException { + public void shouldCalculateDoubleZeroTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_ZERO_TERM ); assertThat( this.operation.get(), is( 0 ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( -1 ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( 1 ) ); } @Test - public void shouldCalculateIntegerZeroTerm() throws PolyglotterException { + public void shouldCalculateIntegerZeroTerm() throws ChrysalixException { this.operation.addInput( ID, INT_ZERO_TERM ); assertThat( this.operation.get(), is( 0 ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ID, LONG_TERM ); assertThat( this.operation.get(), is( -1 ) ); } @@ -127,7 +128,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -135,7 +136,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -146,8 +147,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -163,12 +164,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.signOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.signOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.signOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.signOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/SineTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/SineTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/SineTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/SineTest.java index 71304b1..b86fd7c 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/SineTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/SineTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Sine; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class SineTest { @@ -63,32 +64,32 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.sin( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.sin( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.sin( INT_TERM.get().intValue() ) ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ID, LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.sin( LONG_TERM.get().longValue() ) ) ); } @@ -111,7 +112,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -119,7 +120,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -130,8 +131,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -147,12 +148,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.sineOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.sineOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.sineOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.sineOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/SquareRootTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/SquareRootTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/SquareRootTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/SquareRootTest.java index ff63e51..1ce055c 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/SquareRootTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/SquareRootTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.SquareRoot; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class SquareRootTest { @@ -63,32 +64,32 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.sqrt( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.sqrt( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.sqrt( INT_TERM.get().intValue() ) ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ID, LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.sqrt( LONG_TERM.get().longValue() ) ) ); } @@ -111,7 +112,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -119,7 +120,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -130,8 +131,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -147,12 +148,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.squareRootOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.squareRootOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.squareRootOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.squareRootOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/SubtractTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/SubtractTest.java similarity index 81% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/SubtractTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/SubtractTest.java index cb8f6f5..2abb3ca 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/SubtractTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/SubtractTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Subtract; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class SubtractTest { @@ -59,7 +60,7 @@ public void beforeEach() { } @Test - public void shouldCalculateIntegerResult() throws PolyglotterException { + public void shouldCalculateIntegerResult() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.get().intValue(), is( INT_TERM.get().intValue() - INT2_TERM.get().intValue() ) ); @@ -83,7 +84,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenSubtractingTermWithWrongType() throws PolyglotterException { + public void shouldHaveErrorWhenSubtractingTermWithWrongType() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM ); // will get rid of current problems this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -95,13 +96,13 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultWithOnlyOneTerm() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultWithOnlyOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.get(); } @@ -112,7 +113,7 @@ public void shouldNotBeAbleToModifyTermsList() { } @Test - public void shouldNotHaveProblemsWithTwoTermsOfCorrectType() throws PolyglotterException { + public void shouldNotHaveProblemsWithTwoTermsOfCorrectType() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM ); assertThat( this.operation.problems().isEmpty(), is( true ) ); assertThat( this.operation.problems().isOk(), is( true ) ); @@ -124,7 +125,7 @@ public void shouldNotHaveTermsAfterConstruction() { } @Test - public void shouldObtainTerm() throws PolyglotterException { + public void shouldObtainTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); @@ -132,16 +133,16 @@ public void shouldObtainTerm() throws PolyglotterException { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.subtractOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.subtractOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.subtractOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.subtractOperationName.text() ) ); } @Test - public void shouldSubtractIntegerAndDouble() throws PolyglotterException { + public void shouldSubtractIntegerAndDouble() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), @@ -149,7 +150,7 @@ public void shouldSubtractIntegerAndDouble() throws PolyglotterException { } @Test - public void shouldSubtractMultipleinputs() throws PolyglotterException { + public void shouldSubtractMultipleinputs() throws ChrysalixException { this.operation.addInput( ID, INT_TERM, INT2_TERM, DOUBLE_TERM ); assertThat( this.operation.inputs().size(), is( 3 ) ); assertThat( this.operation.get(), diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/TangentTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/TangentTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/TangentTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/TangentTest.java index a441e33..3708543 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/TangentTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/TangentTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.Tangent; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class TangentTest { @@ -63,32 +64,32 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.tan( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.tan( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.tan( INT_TERM.get().intValue() ) ) ); } @Test - public void shouldCalculateLongTerm() throws PolyglotterException { + public void shouldCalculateLongTerm() throws ChrysalixException { this.operation.addInput( ID, LONG_TERM ); assertThat( this.operation.get(), is( ( Number ) Math.tan( LONG_TERM.get().longValue() ) ) ); } @@ -111,7 +112,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -119,7 +120,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -130,8 +131,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -147,12 +148,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.tangentOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.tangentOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.tangentOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.tangentOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/ToDegreesTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/ToDegreesTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/ToDegreesTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/ToDegreesTest.java index 945b16e..c049b91 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/ToDegreesTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/ToDegreesTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.ToDegrees; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class ToDegreesTest { @@ -61,26 +62,26 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( Math.toDegrees( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( Math.toDegrees( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( Math.toDegrees( INT_TERM.get().intValue() ) ) ); } @@ -103,7 +104,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -111,7 +112,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -122,8 +123,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -139,12 +140,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.toDegreesOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.toDegreesOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.toDegreesOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.toDegreesOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/operation/ToRadiansTest.java b/chrysalix-engine/src/test/java/org/chrysalix/operation/ToRadiansTest.java similarity index 79% rename from polyglotter-engine/src/test/java/org/polyglotter/operation/ToRadiansTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/operation/ToRadiansTest.java index e781e0f..c3927a4 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/operation/ToRadiansTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/operation/ToRadiansTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,20 +21,21 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.operation; +package org.chrysalix.operation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; +import org.chrysalix.ChrysalixException; +import org.chrysalix.ChrysalixI18n; +import org.chrysalix.operation.ToRadians; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Value; +import org.chrysalix.transformation.OperationCategory.BuiltInCategory; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.polyglotter.PolyglotterException; -import org.polyglotter.PolyglotterI18n; -import org.polyglotter.transformation.OperationCategory.BuiltInCategory; -import org.polyglotter.transformation.TransformationFactory; -import org.polyglotter.transformation.Value; @SuppressWarnings( { "javadoc", "unchecked" } ) public final class ToRadiansTest { @@ -61,26 +62,26 @@ public void beforeEach() { } @Test - public void shouldAddOneTerm() throws PolyglotterException { + public void shouldAddOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.inputs().size(), is( 1 ) ); assertThat( ( Value< Number > ) this.operation.inputs().get( 0 ), is( INT_TERM ) ); } @Test - public void shouldCalculateDoubleTerm() throws PolyglotterException { + public void shouldCalculateDoubleTerm() throws ChrysalixException { this.operation.addInput( ID, DOUBLE_TERM ); assertThat( this.operation.get(), is( Math.toRadians( DOUBLE_TERM.get().doubleValue() ) ) ); } @Test - public void shouldCalculateFloatTerm() throws PolyglotterException { + public void shouldCalculateFloatTerm() throws ChrysalixException { this.operation.addInput( ID, FLOAT_TERM ); assertThat( this.operation.get(), is( Math.toRadians( FLOAT_TERM.get().floatValue() ) ) ); } @Test - public void shouldCalculateIntegerTerm() throws PolyglotterException { + public void shouldCalculateIntegerTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); assertThat( this.operation.get(), is( Math.toRadians( INT_TERM.get().intValue() ) ) ); } @@ -103,7 +104,7 @@ public void shouldHaveErrorsAfterConstruction() { } @Test - public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { + public void shouldHaveErrorWhenMoreThanOneTerm() throws ChrysalixException { this.operation.addInput( ID, INT_TERM ); this.operation.addInput( ID, INT2_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); @@ -111,7 +112,7 @@ public void shouldHaveErrorWhenMoreThanOneTerm() throws PolyglotterException { } @Test - public void shouldHaveErrorWhenTermIsNotANumber() throws PolyglotterException { + public void shouldHaveErrorWhenTermIsNotANumber() throws ChrysalixException { this.operation.addInput( ID, OperationTestConstants.STRING_1_TERM ); assertThat( this.operation.problems().size(), is( 1 ) ); assertThat( this.operation.problems().isError(), is( true ) ); @@ -122,8 +123,8 @@ public void shouldHaveProblemsAfterConstruction() { assertThat( this.operation.problems().isEmpty(), is( false ) ); } - @Test( expected = PolyglotterException.class ) - public void shouldNotBeAbleToGetResultAfterConstruction() throws PolyglotterException { + @Test( expected = ChrysalixException.class ) + public void shouldNotBeAbleToGetResultAfterConstruction() throws ChrysalixException { this.operation.get(); } @@ -139,12 +140,12 @@ public void shouldNotHaveTermsAfterConstruction() { @Test public void shouldProvideDescription() { - assertThat( this.operation.description(), is( PolyglotterI18n.toRadiansOperationDescription.text() ) ); + assertThat( this.operation.description(), is( ChrysalixI18n.toRadiansOperationDescription.text() ) ); } @Test public void shouldProvideName() { - assertThat( this.operation.name(), is( PolyglotterI18n.toRadiansOperationName.text() ) ); + assertThat( this.operation.name(), is( ChrysalixI18n.toRadiansOperationName.text() ) ); } } diff --git a/polyglotter-engine/src/test/java/org/polyglotter/test/BaseTest.java b/chrysalix-engine/src/test/java/org/chrysalix/test/BaseTest.java similarity index 88% rename from polyglotter-engine/src/test/java/org/polyglotter/test/BaseTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/test/BaseTest.java index 68cf1fb..b6d4b47 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/test/BaseTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/test/BaseTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix (http://chrysalix.org) * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.test; +package org.chrysalix.test; import java.io.ByteArrayInputStream; import java.io.File; @@ -34,11 +34,11 @@ import java.nio.file.SimpleFileVisitor; import java.nio.file.attribute.BasicFileAttributes; +import org.chrysalix.Chrysalix; import org.junit.After; import org.junit.Before; import org.junit.runner.RunWith; import org.mockito.MockitoAnnotations; -import org.polyglotter.Polyglotter; @RunWith( TestRunner.class ) @SuppressWarnings( "javadoc" ) @@ -73,13 +73,13 @@ public abstract class BaseTest { } } - private Polyglotter polyglotter; + private Chrysalix chrysalix; @After public void after() throws Exception { - if ( polyglotter != null ) { - polyglotter.close(); - polyglotter = null; + if ( chrysalix != null ) { + chrysalix.close(); + chrysalix = null; } deleteFolder( TEST_REPOSITORY_STORE_PARENT_PATH + "/modelerRepository" ); deleteFolder( System.getProperty( "java.io.tmpdir" ) + "/modeshape-binary-store" ); @@ -113,10 +113,10 @@ public FileVisitResult visitFile( final Path file, } ); } - public Polyglotter polyglotter() { - if ( polyglotter == null ) - polyglotter = new Polyglotter( TEST_REPOSITORY_STORE_PARENT_PATH, TEST_CONFIGURATION_PATH ); - return polyglotter; + public Chrysalix chrysalix() { + if ( chrysalix == null ) + chrysalix = new Chrysalix( TEST_REPOSITORY_STORE_PARENT_PATH, TEST_CONFIGURATION_PATH ); + return chrysalix; } protected InputStream stream( final String content ) { diff --git a/polyglotter-engine/src/test/java/org/polyglotter/test/TestRunner.java b/chrysalix-engine/src/test/java/org/chrysalix/test/TestRunner.java similarity index 92% rename from polyglotter-engine/src/test/java/org/polyglotter/test/TestRunner.java rename to chrysalix-engine/src/test/java/org/chrysalix/test/TestRunner.java index c6d109e..95a734c 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/test/TestRunner.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/test/TestRunner.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.test; +package org.chrysalix.test; import java.text.CharacterIterator; import java.text.StringCharacterIterator; diff --git a/polyglotter-engine/src/test/java/org/polyglotter/transformation/TransformationFactoryTest.java b/chrysalix-engine/src/test/java/org/chrysalix/transformation/TransformationFactoryTest.java similarity index 93% rename from polyglotter-engine/src/test/java/org/polyglotter/transformation/TransformationFactoryTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/transformation/TransformationFactoryTest.java index 09d5311..42be6bc 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/transformation/TransformationFactoryTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/transformation/TransformationFactoryTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,14 +21,18 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.transformation; +package org.chrysalix.transformation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsNull.notNullValue; import static org.junit.Assert.assertThat; +import org.chrysalix.operation.OperationTestConstants; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.ValidationProblem; +import org.chrysalix.transformation.ValidationProblems; +import org.chrysalix.transformation.Value; import org.junit.Test; -import org.polyglotter.operation.OperationTestConstants; @SuppressWarnings( "javadoc" ) public final class TransformationFactoryTest { diff --git a/polyglotter-engine/src/test/java/org/polyglotter/transformation/TransformationImplTest.java b/chrysalix-engine/src/test/java/org/chrysalix/transformation/TransformationImplTest.java similarity index 94% rename from polyglotter-engine/src/test/java/org/polyglotter/transformation/TransformationImplTest.java rename to chrysalix-engine/src/test/java/org/chrysalix/transformation/TransformationImplTest.java index 4b30c48..fedc6b4 100644 --- a/polyglotter-engine/src/test/java/org/polyglotter/transformation/TransformationImplTest.java +++ b/chrysalix-engine/src/test/java/org/chrysalix/transformation/TransformationImplTest.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.polyglotter.transformation; +package org.chrysalix.transformation; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsCollectionContaining.hasItems; @@ -33,12 +33,15 @@ import java.util.Iterator; import java.util.List; +import org.chrysalix.ChrysalixException; +import org.chrysalix.operation.OperationTestConstants; +import org.chrysalix.transformation.Operation; +import org.chrysalix.transformation.Transformation; +import org.chrysalix.transformation.TransformationFactory; +import org.chrysalix.transformation.Transformation.ModelType; import org.junit.Before; import org.junit.Test; import org.modelspace.Model; -import org.polyglotter.PolyglotterException; -import org.polyglotter.operation.OperationTestConstants; -import org.polyglotter.transformation.Transformation.ModelType; /** * Test class for the transformation class created by the factory. @@ -164,21 +167,21 @@ public void shouldFailAddingEmptyOperations() throws Exception { this.transformation.add( new Operation< ? >[ 0 ] ); } - @Test( expected = PolyglotterException.class ) + @Test( expected = ChrysalixException.class ) public void shouldFailAddingModelAgainWithSameModelType() throws Exception { final Model model = mock( Model.class ); this.transformation.add( Transformation.ModelType.SOURCE, model ); this.transformation.add( Transformation.ModelType.SOURCE, model ); } - @Test( expected = PolyglotterException.class ) + @Test( expected = ChrysalixException.class ) public void shouldFailAddingModelAgainWithSameModelType2() throws Exception { final Model model = mock( Model.class ); this.transformation.add( Transformation.ModelType.TARGET, model ); this.transformation.add( Transformation.ModelType.TARGET, model ); } - @Test( expected = PolyglotterException.class ) + @Test( expected = ChrysalixException.class ) public void shouldFailAddingModelAgainWithSameModelType3() throws Exception { final Model model = mock( Model.class ); this.transformation.add( Transformation.ModelType.SOURCE_TARGET, model ); @@ -190,7 +193,7 @@ public void shouldFailAddingModelAndNullModelType() throws Exception { this.transformation.add( null, mock( Model.class ) ); } - @Test( expected = PolyglotterException.class ) + @Test( expected = ChrysalixException.class ) public void shouldFailAddingNullModel() throws Exception { this.transformation.add( Transformation.ModelType.SOURCE, mock( Model.class ), null, mock( Model.class ) ); } @@ -200,7 +203,7 @@ public void shouldFailAddingNullModels() throws Exception { this.transformation.add( Transformation.ModelType.TARGET, ( Model[] ) null ); } - @Test( expected = PolyglotterException.class ) + @Test( expected = ChrysalixException.class ) public void shouldFailAddingNullOperation() throws Exception { this.transformation.add( mock( Operation.class ), null, mock( Operation.class ) ); } @@ -210,7 +213,7 @@ public void shouldFailAddingNullOperations() throws Exception { this.transformation.add( ( Operation< ? >[] ) null ); } - @Test( expected = PolyglotterException.class ) + @Test( expected = ChrysalixException.class ) public void shouldFailAddingOperationMultipleTimes() throws Exception { final Operation< ? > op = OperationTestConstants.TEST_OPERATION_DESCRIPTOR.newInstance( this.transformation ); this.transformation.add( op, mock( Operation.class ), op ); @@ -221,19 +224,19 @@ public void shouldFailRemovingEmptyModels() throws Exception { this.transformation.remove( new Model[ 0 ] ); } - @Test( expected = PolyglotterException.class ) + @Test( expected = ChrysalixException.class ) public void shouldFailRemovingModelThatWasNeverAdded() throws Exception { this.transformation.remove( mock( Model.class ) ); } - @Test( expected = PolyglotterException.class ) + @Test( expected = ChrysalixException.class ) public void shouldFailRemovingModelTypeThatWasNeverAdded() throws Exception { final Model model = mock( Model.class ); this.transformation.add( Transformation.ModelType.SOURCE, model ); this.transformation.remove( Transformation.ModelType.TARGET, model ); } - @Test( expected = PolyglotterException.class ) + @Test( expected = ChrysalixException.class ) public void shouldFailRemovingNullModel() throws Exception { final Model model = mock( Model.class ); this.transformation.add( Transformation.ModelType.SOURCE, model ); diff --git a/polyglotter-engine/src/test/resources/log4j.properties b/chrysalix-engine/src/test/resources/log4j.properties similarity index 84% rename from polyglotter-engine/src/test/resources/log4j.properties rename to chrysalix-engine/src/test/resources/log4j.properties index 2a386c1..31d7eeb 100644 --- a/polyglotter-engine/src/test/resources/log4j.properties +++ b/chrysalix-engine/src/test/resources/log4j.properties @@ -9,5 +9,5 @@ log4j.rootLogger=ERROR, stdout # Set up the default logging to be ERROR level, then override specific units log4j.logger.org.modeshape=WARN -log4j.logger.org.polyglotter=WARN -log4j.logger.org.modeshape.modeler=WARN +log4j.logger.org.chrysalix=WARN +log4j.logger.org.modelspace=WARN diff --git a/polyglotter-engine/src/test/resources/org/acme/RocketSkates.java b/chrysalix-engine/src/test/resources/org/acme/RocketSkates.java similarity index 84% rename from polyglotter-engine/src/test/resources/org/acme/RocketSkates.java rename to chrysalix-engine/src/test/resources/org/acme/RocketSkates.java index 8c9a297..a71bb1d 100644 --- a/polyglotter-engine/src/test/resources/org/acme/RocketSkates.java +++ b/chrysalix-engine/src/test/resources/org/acme/RocketSkates.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. diff --git a/polyglotter-engine/src/test/resources/org/acme/RocketSled.java b/chrysalix-engine/src/test/resources/org/acme/RocketSled.java similarity index 84% rename from polyglotter-engine/src/test/resources/org/acme/RocketSled.java rename to chrysalix-engine/src/test/resources/org/acme/RocketSled.java index 123e801..2e04d02 100644 --- a/polyglotter-engine/src/test/resources/org/acme/RocketSled.java +++ b/chrysalix-engine/src/test/resources/org/acme/RocketSled.java @@ -1,17 +1,17 @@ /* - * Polyglotter (http://polyglotter.org) + * Chrysalix * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * - * Polyglotter is free software. Unless otherwise indicated, all code in Polyglotter + * Chrysalix is free software. Unless otherwise indicated, all code in Chrysalix * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * - * Polyglotter is distributed in the hope that it will be useful, + * Chrysalix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. diff --git a/polyglotter-engine/src/test/resources/testConfig.json b/chrysalix-engine/src/test/resources/testConfig.json similarity index 54% rename from polyglotter-engine/src/test/resources/testConfig.json rename to chrysalix-engine/src/test/resources/testConfig.json index 6fd5fce..02f7544 100644 --- a/polyglotter-engine/src/test/resources/testConfig.json +++ b/chrysalix-engine/src/test/resources/testConfig.json @@ -1,7 +1,7 @@ { - "name" : "ModeShape Modeler Repository", + "name" : "Chrysalix Repository", "workspaces" : { - "predefined" : ["Modeler"], + "predefined" : ["Modelspace"], "default" : "default" }, "node-types" : ["metamodel.cnd"] diff --git a/eclipseFormatter.xml b/eclipseFormatter.xml index 7ca33c5..f77530c 100644 --- a/eclipseFormatter.xml +++ b/eclipseFormatter.xml @@ -1,6 +1,6 @@ - + @@ -286,6 +286,582 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eclipsePreferences.epf b/eclipsePreferences.epf index 5479ec4..a68b1ae 100644 --- a/eclipsePreferences.epf +++ b/eclipsePreferences.epf @@ -1,4 +1,4 @@ -#Wed May 21 14:37:27 CDT 2014 +#Wed Sep 17 16:10:11 CDT 2014 /instance/org.eclipse.jdt.ui/cleanup.always_use_parentheses_in_expressions=false /instance/org.eclipse.jdt.ui/cleanup.make_parameters_final=false /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning @@ -10,6 +10,7 @@ /instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.ondemandthreshold=99 /instance/org.eclipse.jdt.ui/cleanup.always_use_blocks=true /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error /instance/org.eclipse.jdt.ui/cleanup.remove_trailing_whitespaces=false /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error @@ -26,6 +27,7 @@ /instance/org.eclipse.jdt.ui/cleanup.use_blocks=false /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error /instance/org.eclipse.jdt.ui/cleanup.convert_to_enhanced_for_loop=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.debug.lineNumber=generate file_export_version=3.0 /instance/org.eclipse.jdt.ui/formatter_settings_version=12 /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private @@ -34,7 +36,7 @@ file_export_version=3.0 /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error /instance/org.eclipse.jdt.ui/cleanup.qualify_static_field_accesses_with_declaring_class=false /instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.typefilter.disabled=com.sun.*; -/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.enumIdentifier=error /instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.cleanupprofiles=\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n /instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.importorder=\#;java;javax;org;com; /instance/org.eclipse.jdt.ui/cleanup_profile=_Red Hat @@ -43,7 +45,7 @@ file_export_version=3.0 /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeUncheckedExceptions=enabled /instance/org.eclipse.jdt.ui/cleanup.use_parentheses_in_expressions=false \!/= -/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.compliance=1.4 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.compliance=1.7 /instance/org.eclipse.jdt.ui/cleanup.sort_members=true /instance/org.eclipse.jdt.ui/cleanup.use_this_for_non_static_field_access_only_if_necessary=true /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private @@ -54,23 +56,24 @@ file_export_version=3.0 /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning /instance/org.eclipse.jdt.ui/cleanup.make_variable_declarations_final=false /instance/org.eclipse.jdt.ui/cleanup.showwizard=false -/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore -/instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.formatterprofiles=\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +/instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.formatterprofiles=\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled /instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.keywordthis=false /instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.visibility.order=B,V,R,D, /instance/org.eclipse.jdt.ui/cleanup.add_missing_override_annotations=true /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled /instance/org.eclipse.jdt.ui/cleanup.remove_unnecessary_nls_tags=true -/instance/org.eclipse.jdt.ui/formatter_profile=_Polyglotter +/instance/org.eclipse.jdt.ui/formatter_profile=_Chrysalix /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error -/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 /instance/org.eclipse.jdt.ui/cleanup.organize_imports=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning /instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.formatterprofiles.version=12 /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.taskTags=jpav,TODO -/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled /instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.typefilter.enabled=java.awt.*;javax.swing.*;org.w3c.dom.*;quicktime.*;sun.*; +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled @org.eclipse.jdt.core=3.9.2.v20140114-1555 /instance/org.eclipse.jdt.ui/cleanup.remove_unused_private_types=true /instance/org.eclipse.jdt.ui/cleanup.add_missing_methods=false @@ -90,9 +93,10 @@ file_export_version=3.0 /instance/org.eclipse.jdt.ui/cleanup.remove_unused_private_methods=true /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled /instance/org.eclipse.jdt.ui/cleanup.add_generated_serial_version_id=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning /instance/org.eclipse.jdt.ui/cleanup.remove_trailing_whitespaces_ignore_empty=false /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning -/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.source=1.3 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.source=1.7 /instance/org.eclipse.jdt.ui/cleanup.use_this_for_non_static_method_access=false /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning /instance/org.eclipse.jdt.ui/cleanup.sort_members_all=false @@ -110,7 +114,8 @@ file_export_version=3.0 /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled /instance/org.eclipse.jdt.ui/cleanup.make_type_abstract_if_missing_method=false -/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.assertIdentifier=error /instance/org.eclipse.jdt.ui/cleanup.remove_unused_local_variables=false /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.emptyStatement=warning /instance/org.eclipse.jdt.ui/cleanup.make_local_variable_final=true @@ -129,4 +134,4 @@ file_export_version=3.0 /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning /instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.methodreturntype=true -/instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.text.custom_code_templates=