MVEL 2.0 Orb Tags
This page contains a list of all orb-tags available out-of-the-box
in the MVEL 2.0 templating engine.
@{} Expression
Orb
The expression orb is the most rudimentary form of orb-tag. It contains a
value expression which will be evaluated to a string, and appended to the output
template. For example:
Hello, my name is @{person.name}
@code{}
Silent Code Tag
The silent code tag allows you to execute MVEL expression code in your
template. It does not return a value and does not affect the formatting of the
template in any way.
@code{age = 23; name = 'John Doe'}
@{name} is @{age} years old.
This template will evaluate to: John Doe is 23 years old.
@if{}-@else{}
Control Flow Tags
The @if{} and @else{} tags provide full if-then-else
functionality in MVEL Templates. For example:
@if{foo != bar}
Foo not a bar!
@else{bar != cat}
Bar is not a cat!
@else{}
Foo may be a Bar or a Cat!
@end{}
|
Termination of blocks
All blocks in MVEL Templates must be terminated with an @end{} orb,
except in cases of an if-then-else structure, where @else{} tags denote the
termination of the previous control
statement.
|
@foreach{}
Foreach iteration
The foreach tag allows you to iterate either collections or arrays in your
template. Note: that the syntax for foreach has changed in MVEL Templates 2.0 to
standardize the foreach notation with that of the MVEL language itself.
@foreach{item : products}
- @{item.serialNumber}
@end{}
MVEL 2.0 requires you specify an iteration variable. While MVEL 1.2
assumed the name item if you did not specify an alias, this has been
dropped due to some complaints about that default action.
Multi-iteration
You can iterate more than one collection in a single foreach loop at one time
by comma-separating the iterations:
@foreach{var1 : set1, var2 : set2}
@{var1}-@{var2}
@end{}
Delimiting
You can automatically add a text delimiter to an iteration by specifying the
iterator in @end{} tag.
@foreach{item : people}@{item.name}@end{', '}
This would return something like: John, Mary,
Joseph.
@include{}
Include Template File
You may include a template file into an MVEL template using this tag.
@include{'header.mv'}
This is a test template.
You may also execute an MVEL expression inside an include tag by adding a
semicolon after the template name:
@include{'header.mv'; title='Foo Title'}
@includeNamed{}
Include a Named Template
Named templates are templates that have been precompiled and passed to the
runtime via a TemplateRegistry, or templates that have been declared within the
template itself. You simply include
You may also execute MVEL code in an @includeNamed{} tag, just as with the
@include{} tag.
@includeNamed{'fooTemplate'}
@includeNamed{'footerTemplate', showSomething=true}
@declare{}
Declare a Template
In addition to including external templates from external files, and passing
them in programmatically, you can declare a template from within a template.
Which allows you to do things like this:
@declare{'personTemplate'}
Name: @{name}
Age: @{age}
@end{}
@includeNamed{'personTemplate'; name='John Doe'; age=22}
@comment{}
Comment tag
The comment tag allows you add an invisible comment to the template. For
example:
@comment{
This is a comment
}
Hello: @{name}!
分享到:
相关推荐
ORB算法的MATLAB实现
Opencv+VS C++实现ORB算法
ORB_SLAM3源码(附带详细注释)
ORB-SLAM2源码详解尽管可以用于立体视觉,ORB-SLAM2主要是单目SLAM系统,也就是只有一个相机(摄像头)的系统,主要用于特征识别,自主导航。ORB-SLAM2的硬件传感器也就是这一种,当然也可以加入其它传感器,比如IMU...
ORB-SLAM3原文
ORB 是 Oriented Fast and Rotated Brief 的简称,可以用来对图像中的关键点快速创建特征向量,这些特征向量可以用来识别图像中的对象。其中,Fast 和 Brief 分别是特征检测算法和向量创建算法。ORB 首先会从图像中...
ORB算法最大的特点就是计算速度快,这首先得益于使用FAST检测特征点
ORB(Oriented FAST and Rotated BRIEF)是一种快速特征点提取和描述的算法。这个算法是由Ethan Rublee, Vincent Rabaud, Kurt Konolige以及Gary R.Bradski在2011年一篇名为“ORB:An Efficient Alternative to SIFT...
ORB_SLAM3官方标定文档的中文版
针对目前视觉SLAM(同时定位与地图构建)系统只能输出相机的运动轨迹图而不能生成用于路径规划和导航地图的缺点,提出了一种基于ORB-SLAM2的网格地图实时构建算法。首先,建立了一个适用于视觉SLAM的逆传感器模型...
ORB算法实现特征点匹配
对位姿变换较小的两幅图提取各自的ORB特征并进行匹配
ORB-SLAM 它是一个完整的 SLAM 系统,包括视觉里程计、跟踪、回环检测,是一种完全基于稀疏特征点的单目 SLAM 系统,同时还有单目、双目、RGBD 相机的接口。资源包含ORB-SLAM2和ORB-SLAM3详细的中文注释版本的源码。
精品技术类ppt模板tech_beat_orb003
ORB_SLAM2 特征法SLAM 单目 双目 RGBD * ORB主要借鉴了PTAM的思想,借鉴的工作主要有 * Rubble的ORB特征点; * DBow2的place recognition用于闭环检测; * Strasdat的闭环矫正和covisibility graph思想; * 以及...
成功将ORB_SLAM-master移植到window系统中,采用VS2012编程,自己编译成功的。希望对大家有帮助。
ORBSLAM2源码详细注释
使用python-opencv实现用ORB算法实现特征点匹配,代码量较低,内容较少。
此资源包里包括ORB_SLAM2算法源码以及发布位姿信息所需要的文件,以及对应的文件正确的放置位置。仅供参考。