public class XMLSurveyFinder extends java.lang.Object implements SurveyFinder
Modifier and Type | Class and Description |
---|---|
static class |
XMLSurveyFinder.SurveyLink |
Constructor and Description |
---|
XMLSurveyFinder()
Set up the SurveyFinder and populate the map.
|
XMLSurveyFinder(boolean dump) |
Modifier and Type | Method and Description |
---|---|
void |
dump()
Create a cached translation between survey names and files.
|
Survey |
find(java.lang.String shortName)
Do we have this survey?
|
java.lang.String |
findFile(java.lang.String shortName)
Find the survey file given the short name
|
java.lang.String[] |
getSurveys()
What surveys do we know about?
|
protected void |
getSurveysFromMainifest()
Get surveys from a user manifest.
|
protected void |
getSurveysFromManifest(boolean dump) |
protected void |
getSurveysFromRoot()
Get the surveys in the document root area
|
protected void |
getSurveysFromUser()
Get user specified surveys
|
protected boolean |
loadSurveyCacheFromFile(java.lang.String hashFile) |
protected boolean |
loadSurveyCacheFromUrl(java.lang.String url) |
protected java.lang.String |
localCacheName()
Get path to the local cache using the path to the jar file
being executed.
|
static void |
main(java.lang.String[] args)
Main class.
|
protected java.lang.String |
manifestName() |
protected void |
manifestToHash()
Read XML files to populate survey hash in memory.
|
void |
read(java.lang.String file) |
protected java.lang.String |
remoteCacheName() |
public XMLSurveyFinder()
public XMLSurveyFinder(boolean dump)
public void dump()
public void read(java.lang.String file)
protected void getSurveysFromRoot()
protected void getSurveysFromUser()
protected void getSurveysFromMainifest()
protected void getSurveysFromManifest(boolean dump)
protected java.lang.String localCacheName()
protected java.lang.String remoteCacheName()
protected java.lang.String manifestName()
protected void manifestToHash()
protected boolean loadSurveyCacheFromUrl(java.lang.String url)
protected boolean loadSurveyCacheFromFile(java.lang.String hashFile)
public Survey find(java.lang.String shortName)
find
in interface SurveyFinder
public java.lang.String findFile(java.lang.String shortName)
public java.lang.String[] getSurveys()
getSurveys
in interface SurveyFinder
public static void main(java.lang.String[] args)