FileDocCategorySizeDatePackage
ConditionalProcessing.javaAPI DocphoneME MR2 API (J2ME)5517Wed May 02 18:00:34 BST 2007com.sun.perseus.model

ConditionalProcessing

public final class ConditionalProcessing extends Object
ConditionalProcessing is a helper class which handles the conditional processing decisions for Perseus classes.
version
$Id: ConditionalProcessing.java,v 1.3 2006/06/29 10:47:30 ln156897 Exp $

Fields Summary
public static final String[]
SUPPORTED_FEATURES
Required Features for SVG Tiny
public static final String
USER_LANGUAGE
The user language IMPL NOTE : Make this configurable, at least at Perseus load time.
Constructors Summary
private ConditionalProcessing()
Disallow instanciation


           
      
    
Methods Summary
public static booleancheckExtensions(java.lang.String[] requiredExtensions)
There are currently no supported extensions in Perseus

param
requiredExtensions the array of required extensions to test
return
false

        return false;
    
public static booleancheckFeatures(java.lang.String[] requiredFeatures)
The list of supported features: http://www.w3.org/TR/SVG11/feature#CoreAttribute http://www.w3.org/TR/SVG11/feature#BasicStructure http://www.w3.org/TR/SVG11/feature#BasicPaintAttribute http://www.w3.org/TR/SVG11/feature#BasicGraphicsAttribute http://www.w3.org/TR/SVG11/feature#XlinkAttribute http://www.w3.org/TR/SVG11/feature#ConditionalProcessing http://www.w3.org/TR/SVG11/feature#Shape http://www.w3.org/TR/SVG11/feature#Image http://www.w3.org/TR/SVG11/feature#BasicText http://www.w3.org/TR/SVG11/feature#BasicFont http://www.w3.org/TR/SVGMobile/Tiny/feature#base The list of unsupported features: http://www.w3.org/TR/SVG11/feature#Hyperlinking http://www.w3.org/TR/SVG11/feature#Animation http://www.w3.org/TR/SVG11/feature#Extensibility http://www.w3.org/TR/SVGMobile/Tiny/feature#interactivity http://www.w3.org/TR/SVGMobile/Tiny/feature#all

param
requiredFeatures the set of features to check
return
true if all the features in the input array are supported.

        for (int i = 0; i < requiredFeatures.length; i++) {
            // Check that the feature is supported
            if (!isFeatureSupported(requiredFeatures[i])) {
                return false;
            }
        }
        return true;
    
public static booleancheckLanguage(java.lang.String[] systemLanguage)
The user language preference is controlled by this class

param
systemLanguage the set of languages to check
return
true if the user language matches one of the systemLanguage item.s

        for (int i = 0; i < systemLanguage.length; i++) {
            if (USER_LANGUAGE == systemLanguage[i]) {
                return true;
            }
        }
        return false;
    
public static booleanisFeatureSupported(java.lang.String requiredFeature)

param
requiredFeature the feature to check
return
true if the input feature is supported, i.e. if it is one of the supported features
see
#SUPPORTED_FEATURES

        for (int i = 0; i < SUPPORTED_FEATURES.length; i++) {
            if (requiredFeature == SUPPORTED_FEATURES[i]) {
                return true;
            }
        }
        return false;