Ignore:
Timestamp:
2012-07-30T20:57:25+12:00 (12 years ago)
Author:
ak19
Message:

Updated addLinkMetaNames to deal with weblinks (for the Pointing To Docs On The Web tutorial) and equivdoc links (for the Associated Files tutorial), so that these can be referenced as other gsf:link types rather than as gsf:metadata for starting tag, anchor and closing tag. The last three were tested against the tutorials and they worked, but would like the format statements to be in a more GS3 way. For now the gsf:link type=equivdoc works with the changes in config_format, but still have issues with weblink because of the webicon. Once that's fixed, will commit config_format.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/Action.java

    r26031 r26038  
    145145        // makes use of 'assocfilepath' so need to make sure it's asked for
    146146
     147        boolean getEquivLinkMeta = false;
     148
    147149        NodeList link_nodes = format.getElementsByTagName("gsf:link");
    148150        for (int i = 0; i < link_nodes.getLength(); i++)
     
    155157                meta_names.add("srclinkFile");
    156158            }
     159            else if (type.equals("web")) {
     160                    meta_names.add("weblink");
     161                meta_names.add("webicon");
     162                meta_names.add("/weblink");
     163            }
     164            else if (type.equals("equivdoc")) {
     165                getEquivLinkMeta = true;
     166            }
    157167        }
    158168
     
    160170        // so that we can build up the equivlink from the metadata components it needs
    161171        link_nodes = format.getElementsByTagName("gsf:equivlinkgs3");
    162         if (link_nodes.getLength() > 0)
     172        if (getEquivLinkMeta || link_nodes.getLength() > 0)
    163173        {
    164174            String[] equivlink_metanames = { "equivDocIcon", "equivDocLink", "/equivDocLink" };
Note: See TracChangeset for help on using the changeset viewer.