All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openxma.dsl.common.DslConstants Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
package org.openxma.dsl.common;

import java.util.Set;

import com.google.common.collect.Sets;

public class DslConstants {
    public static final String CLASSPATH_SCHEME = "classpath";
    /**
     * dsl file extensions
     */
    public final static String OPENXMA_CORE_FILE_EXTENSION = "xmadsl";
    public final static String OPENXMA_DOM_FILE_EXTENSION = "dml";
    public final static String OPENXMA_POM_FILE_EXTENSION = "pml";
    public final static String OPENXMA_XMA_FILE_EXTENSION = "xma";
    public final static String[] PML_EXTENSIONS = { OPENXMA_POM_FILE_EXTENSION };
    public final static String[] DOM_EXTENSIONS = { OPENXMA_DOM_FILE_EXTENSION, OPENXMA_CORE_FILE_EXTENSION };
    public final static String[] DSL_EXTENSIONS = { OPENXMA_POM_FILE_EXTENSION, OPENXMA_DOM_FILE_EXTENSION, OPENXMA_CORE_FILE_EXTENSION };
    public final static String[] NO_EXTENSIONS = {};
    /**
     * library resources
     */
    public static final String STANDARD_LIBRARY = "/org/openxma/dsl/lang/Library.xmadsl";
    public static final String STANDARD_STYLES = "/org/openxma/dsl/lang/Styles.xmadsl";
    public static final String STANDARD_LIBRARY_NAMESPACE = "org.openxma.lang";
    public static final String STANDARD_STYLES_NAMESPACE = "org.openxma.styles";

    public static final String STANDARD_LIBRARY_URI = CLASSPATH_SCHEME + ":"
            + STANDARD_LIBRARY;
    private static final Set MODEL_FILE_EXTENSIONS = Sets.newHashSet(
            OPENXMA_CORE_FILE_EXTENSION, OPENXMA_DOM_FILE_EXTENSION,
            OPENXMA_POM_FILE_EXTENSION);
    /**
     * java types
     */
    public static final String PACKAGE_JAVA_LANG = "java.lang.";

    /**
     * @param fileExtension
     *            to test
     * @return true of false whether the given file extension is a known openXMA
     *         model file extension
     */
    public static boolean isValidModelFileExtension(String fileExtension) {
        return fileExtension != null
                && MODEL_FILE_EXTENSIONS.contains(fileExtension);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy