Ejemplo n.º 1
0
 /**
  * Takes a line and looks for an archive group tag. If one is found, the information from the tag
  * is returned as an <CODE>ArchiveGroup</CODE>. If a tag is found, the data in the tag is stored
  * in the <CODE>HashMap</CODE> provided.
  *
  * @param currentLine The line in which to look for the archive tag.
  * @param template The <CODE>Template</CODE> to which the <CODE>ArchiveGroup</CODE> belongs.
  * @return The archive request tag data as an instance of <CODE>ArchiveGroup</CODE>, <CODE>null
  *     </CODE> if the line passed in does not contain an arFile tag.
  */
 private ArchiveGroup parseArchiveGroupTag(String currentLine, Template template) {
   ArchiveGroup archiveTag;
   Matcher currentMatcher = archiveRequestPattern.matcher(currentLine);
   if (currentMatcher.find()) {
     String fileName = currentMatcher.group(1);
     archiveTag = template.getArchiveGroup(fileName);
     if (archiveTag == null) {
       File groupFile = new File(fileName);
       archiveTag = new ArchiveGroup(groupFile.getParent(), groupFile.getName());
       template.addArchiveGroup(archiveTag);
     }
   } else archiveTag = null;
   return archiveTag;
 }