Back to index

wims  3.65+svn20090927
Public Member Functions
fr.ove.openmath.jome.model.FormulaResourcesManager Class Reference

The resources manager for the formula. More...

Inheritance diagram for fr.ove.openmath.jome.model.FormulaResourcesManager:
Inheritance graph
[legend]
Collaboration diagram for fr.ove.openmath.jome.model.FormulaResourcesManager:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FormulaResourcesManager (String resourcesName)
 Constructor.
String getClassName (String property)
 Returns the class name corresponding to the specified property.
Integer getArity (String property)
 Returns the arity resource corresponding to the specified property.
String getPrioritiesIdentifier (String property)
int getAsOperatorPriority (String property)
 Returns the as operator resource corresponding to the specified property.
int getAsOperandPriority (String property)
 Returns the as operand resource corresponding to the specified property.
String accessResource (String resource, int index)
 Returns the index-th resource of the specified property.
String getResourceString (String prop)
 Get the raw string for the given property.
String[] getResourceStrings (String prop)
 Get the resource strings for the given property.

Detailed Description

The resources manager for the formula.


Author:
© 2000 DIRAT Laurent
Version:
2.1 10/01/2000

Definition at line 39 of file FormulaResourcesManager.java.


Constructor & Destructor Documentation

Constructor.

Parameters:
resourcesNamethe name of the resources file.
he name is specified without the ".properties" extension. If the property file is located in a package, the fully qualified name (e.g. my.package.filename) must be used.

Definition at line 46 of file FormulaResourcesManager.java.

                                                         {
        super(resourcesName);
    }

Member Function Documentation

String fr.ove.utils.CachingResourcesManager.accessResource ( String  resource,
int  index 
) [inline, inherited]

Returns the index-th resource of the specified property.

Parameters:
propertyNamethe name of the property
indexthe index of the resource

Definition at line 40 of file CachingResourcesManager.java.

                                                             {
        String property = null;
        
        if (!cachedResource.equals(resource)) {
            String[] properties = getResourceStrings(resource);
            if ((index >= 0) && (index < properties.length)) {
                property = properties[index];
                cachedResource = resource;
                cachedProperties = properties;
            }
        }
        else if ((index >= 0) && (index < cachedProperties.length))
            property = cachedProperties[index];
        
        return property;
        
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Integer fr.ove.openmath.jome.model.FormulaResourcesManager.getArity ( String  property) [inline]

Returns the arity resource corresponding to the specified property.

Parameters:
propertythe specified property

Definition at line 62 of file FormulaResourcesManager.java.

                                             {
        String arity = accessResource(property, 2);
        Integer value = null; // On choisi un Integer putôt qu'un int pour des retours possibles de null
        
        if (arity != null) {
            try {
                value = Integer.valueOf(arity);
            }
            catch (NumberFormatException fne) {
                System.out.println("Wrong operator arity : " + property);
            }
        }
        
        return value;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the as operand resource corresponding to the specified property.

Parameters:
propertythe specified property

Definition at line 104 of file FormulaResourcesManager.java.

                                                     {
        String priority = accessResource(property, 1);
        int value = 0;
        
        try {
            value = Integer.valueOf(priority).intValue();
        }
        catch (NumberFormatException fne) {
            System.out.println("Wrong specification of as operand priority : " + priority);
        }
        
        return value;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the as operator resource corresponding to the specified property.

Parameters:
propertythe specified property

Definition at line 86 of file FormulaResourcesManager.java.

                                                      {
        String priority = accessResource(property, 0);
        int value = 0;
        
        try {
            value = Integer.valueOf(priority).intValue();
        }
        catch (NumberFormatException fne) {
            System.out.println("Wrong specification of as operator priority : " + priority);
        }
        
        return value;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the class name corresponding to the specified property.

Parameters:
propertythe specified property

Definition at line 54 of file FormulaResourcesManager.java.

                                                {
        return accessResource(property, 0);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 78 of file FormulaResourcesManager.java.

                                                           {
        return accessResource(property, 1);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

String fr.ove.utils.ResourcesManager.getResourceString ( String  prop) [inline, inherited]

Get the raw string for the given property.

Definition at line 43 of file ResourcesManager.java.

                                                 {
        String str;
        try {
            str = resources.getString(prop);
        } 
        catch (MissingResourceException mre) {
            str = null;
        }

        return str;
    }

Here is the caller graph for this function:

String [] fr.ove.utils.ResourcesManager.getResourceStrings ( String  prop) [inline, inherited]

Get the resource strings for the given property.

Definition at line 58 of file ResourcesManager.java.

                                                     {
        return tokenize(getResourceString (prop));
    }

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: