public class MessagesSourceCrawler extends Object
Constructor and Description |
---|
MessagesSourceCrawler(LogChannelInterface log,
List<String> sourceDirectories,
String singleMessagesFile,
List<SourceCrawlerXMLFolder> xmlFolders) |
Modifier and Type | Method and Description |
---|---|
void |
addKeyOccurrence(KeyOccurrence occ)
Add a key occurrence to the list of occurrences.
|
void |
crawl() |
List<String> |
getFilesToAvoid() |
KeyOccurrence |
getKeyOccurrence(String key,
String selectedMessagesPackage) |
List<KeyOccurrence> |
getKeyOccurrences(String sourceFolder)
Get the unique package-key
|
List<String> |
getMessagesPackagesList(String sourceFolder) |
List<KeyOccurrence> |
getOccurrencesForPackage(String messagesPackage)
Get all the key occurrences for a certain messages package.
|
String[] |
getScanPhrases() |
String |
getSingleMessagesFile() |
List<String> |
getSourceDirectories() |
Map<String,Map<String,List<KeyOccurrence>>> |
getSourcePackageOccurrences() |
void |
lookForOccurrencesInFile(String sourceFolder,
org.apache.commons.vfs2.FileObject javaFile)
Look for additional occurrences of keys in the specified file.
|
void |
setFilesToAvoid(List<String> filesToAvoid) |
void |
setScanPhrases(String[] scanPhrases) |
void |
setSingleMessagesFile(String singleMessagesFile) |
void |
setSourceDirectories(List<String> sourceDirectories) |
void |
setSourcePackageOccurrences(Map<String,Map<String,List<KeyOccurrence>>> sourcePackageOccurrences) |
public MessagesSourceCrawler(LogChannelInterface log, List<String> sourceDirectories, String singleMessagesFile, List<SourceCrawlerXMLFolder> xmlFolders)
sourceDirectories
- The source directories to crawl throughsingleMessagesFile
- the messages file if there is only one, otherwise: nullpublic List<String> getSourceDirectories()
public void setSourceDirectories(List<String> sourceDirectories)
sourceDirectories
- The source directories to crawl throughpublic void setFilesToAvoid(List<String> filesToAvoid)
filesToAvoid
- the files to avoidpublic void addKeyOccurrence(KeyOccurrence occ)
occ
- The key occurrence to addpublic void lookForOccurrencesInFile(String sourceFolder, org.apache.commons.vfs2.FileObject javaFile) throws IOException
sourceFolder
- The folder the java file and messages files live injavaFile
- The java source file to examineIOException
- In case there is a problem accessing the specified source file.public List<String> getMessagesPackagesList(String sourceFolder)
public List<KeyOccurrence> getOccurrencesForPackage(String messagesPackage)
sourceFolder
- the source folder to referencemessagesPackage
- the package to hunt forpublic KeyOccurrence getKeyOccurrence(String key, String selectedMessagesPackage)
public String getSingleMessagesFile()
public void setSingleMessagesFile(String singleMessagesFile)
singleMessagesFile
- the singleMessagesFile to setpublic String[] getScanPhrases()
public void setScanPhrases(String[] scanPhrases)
scanPhrases
- the scanPhrases to setpublic Map<String,Map<String,List<KeyOccurrence>>> getSourcePackageOccurrences()
public void setSourcePackageOccurrences(Map<String,Map<String,List<KeyOccurrence>>> sourcePackageOccurrences)
public List<KeyOccurrence> getKeyOccurrences(String sourceFolder)
sourceFolder
- Copyright © 2019 Hitachi Vantara. All rights reserved.