Package org.jlab.utils
Class ClaraYaml
java.lang.Object
org.jlab.utils.ClaraYaml
Read a CLARA YAML file, convert it to JSON (because that's what COATJAVA
 uses elsewhere), and provide the same filtering that CLARA does when it
 presents a service its EngineData.
- Author:
- baltzell
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionorg.json.JSONObjectGet the service's configuration as presented by CLARA.static org.json.JSONObjectEmulate the way CLARA parses the full YAML and presents it in EngineData.static voidList<org.json.JSONObject>services()Get a list of services.voidshow()Print it to the screen, nicely.voidshowFiltered(String serviceName) Print the service's configuration as presented by CLARA.booleanvalid()Whether it parsed ok.
- 
Constructor Details- 
ClaraYaml
 
- 
- 
Method Details- 
validpublic boolean valid()Whether it parsed ok.- Returns:
 
- 
showpublic void show()Print it to the screen, nicely.
- 
showFilteredPrint the service's configuration as presented by CLARA.- Parameters:
- serviceName-
 
- 
servicesGet a list of services.- Returns:
- services
 
- 
schemaDirectory
- 
filterGet the service's configuration as presented by CLARA.- Parameters:
- serviceName-
- Returns:
- json object
 
- 
filterEmulate the way CLARA parses the full YAML and presents it in EngineData. The "global" and "service" subsections in the "configuration" section get squashed into one namespace, and service-specific keys override any globals of the same name.- Parameters:
- claraJson- the full CLARA YAML contents
- serviceName- the name of the service in CLARA YAML (not class name)
- Returns:
- data in the format the given CLARA service would see
 
- 
main
 
-