question re: declaredMacro tag

2 views
Skip to first unread message

Emily Greenfest-Allen

unread,
Aug 8, 2011, 1:36:55 PM8/8/11
to strategies...@googlegroups.com
Hi all-

Could you explain to me the use of macros defined by the "declaredMacro"
tag, e.g.

<declaredMacro name="TOXO_COMMENT_SCHEMA" usedBy="model"
includeProjects="ToxoDB"/>
<declaredMacro name="MERCATOR_OUTPUT_DIR" usedBy="perl"
includeProjects="CryptoDB,PlasmoDB,ToxoDB,TriTrypDB" />

(from the apiCommonModel.xml). How does this differ from macros defined
in a model.prop or webapp.prop files.

What's the envisioned use case for each -- i.e., in what situations
would we define a macro in the model.prop as opposed to in the
<>Model.xml file?

Thanks

Emily

Emily Greenfest-Allen

unread,
Sep 9, 2011, 11:20:11 AM9/9/11
to strategies...@googlegroups.com
Just reposting the following -- if any one gets a chance, I'd appreciate a response :)

Thanks,

Emily

Jerric Gao

unread,
Sep 9, 2011, 11:27:34 AM9/9/11
to strategies...@googlegroups.com

Hi Emily,

 

Sorry for the late response. The declaredMacro is used to check if a required macro is defined in the model.prop file. If you have a <declaredMacro> in the model file, but the macro is not present in model.prop, WDK will throw out an exception on loading time.

 

Jerric

Emily Greenfest-Allen

unread,
Sep 9, 2011, 11:31:48 AM9/9/11
to strategies...@googlegroups.com
Jerric-

Thanks.  What's the difference between the usedBy="model" and usedBy="perl" attributes?  Are both of these validating the model.prop or is the usedBy="perl" looking in a different properties file?

-Emily

Jerric Gao

unread,
Sep 9, 2011, 11:35:12 AM9/9/11
to strategies...@googlegroups.com

Wdk will validate both; the usedBy is just a indicator of where the macro will be used. If usedBY=”model”, wdk will substitute the macro in the model file with the value defined in model.prop. the userBy=”perl” is a specific property used by EuPathDB projects, and WDK just simply ignore it.

Reply all
Reply to author
Forward
0 new messages