Ignore:
Timestamp:
2005-02-08T14:29:02+13:00 (19 years ago)
Author:
mdewsnip
Message:

Replaced all "dependant" with "dependent" (mgw5).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gems/MSMUtils.java

    r8971 r8978  
    7575    }
    7676
    77     /** Method to add an attribute element to the given element. This method makes use of the language_dependant attribute of the document to not only determine if the attribute is language dependant, but also to see whether a Language element should be created if doesn't already exist.
     77    /** Method to add an attribute element to the given element. This method makes use of the language_dependent attribute of the document to not only determine if the attribute is language dependent, but also to see whether a Language element should be created if doesn't already exist.
    7878     * @param element_element the Element to add the attribute element to
    7979     * @param attribute_name_str the name of the new attribute to add as a String
    8080     * @param language_code_str the two letter code String of the language this attribute is to be added as
    8181     * @param value_str the String to be assigned as the attribute elements value
    82      * @see org.greenstone.gatherer.msm.MSMUtils#isAttributeLanguageDependant
     82     * @see org.greenstone.gatherer.msm.MSMUtils#isAttributeLanguageDependent
    8383     * @see org.greenstone.gatherer.msm.MSMUtils#setValue(Element, String)
    8484     * @see org.greenstone.gatherer.util.StaticStrings#ATTRIBUTE_ELEMENT
     
    9696
    9797    // Start off by determining if we have to add this node in the new multilingual optimized way
    98     if(isAttributeLanguageDependant(document, attribute_name_str)) {
     98    if(isAttributeLanguageDependent(document, attribute_name_str)) {
    9999        boolean found = false;
    100100        // Try to retrieve a language element for the given language code
     
    428428     * @param language_code_str the two letter code String indicating the desired language
    429429     * @see org.greenstone.gatherer.msm.MSMUtils#getValue
    430      * @see org.greenstone.gatherer.msm.MSMUtils#isAttributeLanguageDependant
     430     * @see org.greenstone.gatherer.msm.MSMUtils#isAttributeLanguageDependent
    431431     * @see org.greenstone.gatherer.util.StaticStrings#ATTRIBUTE_ELEMENT
    432432     * @see org.greenstone.gatherer.util.StaticStrings#CODE_ATTRIBUTE
     
    441441    Document document = element_element.getOwnerDocument();
    442442    // Determine if the attribute is language specific
    443     if(isAttributeLanguageDependant(document, attribute_name_str)) {
     443    if(isAttributeLanguageDependent(document, attribute_name_str)) {
    444444        NodeList language_elements = element_element.getElementsByTagName(StaticStrings.LANGUAGE_ELEMENT);
    445445        for(int i = 0; !found && i < language_elements.getLength(); i++) {
     
    738738     * @param document the Document for which we wish to check the language requirements
    739739     * @param attribute_name_str the name of the attribute we a testing as a String
    740      * @see org.greenstone.gatherer.util.StaticStrings#LANGUAGEDEPENDANT_ATTRIBUTE
     740     * @see org.greenstone.gatherer.util.StaticStrings#LANGUAGEDEPENDENT_ATTRIBUTE
    741741     * Modified by Matthew Whyte 4/02/05
    742742     */
    743     static private boolean isAttributeLanguageDependant(Document document, String attribute_name_str)
     743    static private boolean isAttributeLanguageDependent(Document document, String attribute_name_str)
    744744    {
    745745    //gives a list of comma seperated language specific attributes.
    746     String language_specific_attributes = document.getDocumentElement().getAttribute(StaticStrings.LANGUAGEDEPENDANT_ATTRIBUTE).toLowerCase();
     746    String language_specific_attributes = document.getDocumentElement().getAttribute(StaticStrings.LANGUAGEDEPENDENT_ATTRIBUTE).toLowerCase();
    747747    //System.err.println("lang_specific: " + language_specific_attributes); //debug
    748748
     
    759759    }
    760760
    761     /** Determine if the given document is a legacy MDS or a new multilingual one. The easiest way to tell is whether there is a language_dependant attribute in the document element.
     761    /** Determine if the given document is a legacy MDS or a new multilingual one. The easiest way to tell is whether there is a language_dependent attribute in the document element.
    762762     * @param document the Document to test
    763763     * @return true if this is an old mds, false otherwise
    764      * @see org.greenstone.gatherer.util.StaticStrings#LANGUAGEDEPENDANT_ATTRIBUTE
     764     * @see org.greenstone.gatherer.util.StaticStrings#LANGUAGEDEPENDENT_ATTRIBUTE
    765765     * @see org.greenstone.gatherer.util.StaticStrings#EMPTY_STR
    766766     */
    767767    static private boolean isLegacyMDS(Document document) {
    768     ///ystem.err.println("isLegacyMDS(): l_d = " + document.getDocumentElement().getAttribute(StaticStrings.LANGUAGEDEPENDANT_ATTRIBUTE));
    769     return (document.getDocumentElement().getAttribute(StaticStrings.LANGUAGEDEPENDANT_ATTRIBUTE)).equals(StaticStrings.EMPTY_STR);
     768    ///ystem.err.println("isLegacyMDS(): l_d = " + document.getDocumentElement().getAttribute(StaticStrings.LANGUAGEDEPENDENT_ATTRIBUTE));
     769    return (document.getDocumentElement().getAttribute(StaticStrings.LANGUAGEDEPENDENT_ATTRIBUTE)).equals(StaticStrings.EMPTY_STR);
    770770    }
    771771
     
    809809     * @param value_str the value String which also must match before we remove anything
    810810     * @return true if the desired attribute was successfully found and removed, false otherwise
    811      * @see org.greenstone.gatherer.msm.MSMUtils#isAttributeLanguageDependant
     811     * @see org.greenstone.gatherer.msm.MSMUtils#isAttributeLanguageDependent
    812812     * @see org.greenstone.gatherer.msm.MSMUtils#getValue(Node)
    813813     * @see org.greenstone.gatherer.util.StaticStrings#ATTRIBUTE_ELEMENT
     
    820820    //Determine the if this is one of the language specific attributes.
    821821    //This can sometimes give a false result, if an attribute is made language specific half way through creation of a metadata set (or vice versa).
    822     if(isAttributeLanguageDependant(element_element.getOwnerDocument(), attribute_name_str))
     822    if(isAttributeLanguageDependent(element_element.getOwnerDocument(), attribute_name_str))
    823823        {
    824824        /*
Note: See TracChangeset for help on using the changeset viewer.