OCL expressions are evaluated and don't remain just comments (which is the case in Rational Software Architect today).
OCL表达式会得到评价,并且仍然不会得到注释(这就是今天Rational Software Architect的实例)。
Using constraints, and in particular OCL, can benefit you as you work toward these goals.
当您向这些目标前进时,利用约束条件,并且特别是OCL,可以使您受益。
However, additional expertise is needed to understand OCL, when to use it, and what best practices are when you use it.
然而,理解ocl需要额外的专家经验,什么时候使用它,以及使用它时的最佳实践是什么。
A proven approach to add precision to a model is through the use of constraints and OCL.
向模型添加精确度的一种已证实的方法是通过使用约束和OCL。
The OCL queries free developers from the burden of the underlying XML data model and allow them to concentrate on the object model of their application, which they usually know very well.
OCL查询语言使开发人员从基础XML数据模型解脱出来,允许他们将重点放在其应用程序的对象模型上(这也是他们非常熟悉的部分)。
After completing them, the generation of instances and the evaluation of the OCL expressions can begin.
在完成之后,实例的生成和OCL表达式的评价就可以开始了。
Therefore, we have combined UML and OCL to help analysts improve the quality of domain models.
因此,我们拥有合并的UML与OCL,来帮助分析员提高域模型的质量。
The expressions written in OCL can be interpreted without ambiguities by people in different roles, such as an analyst and a developer, for example.
以OCL 写成的表达式可以得到理解,并且不会在不同角色的人员之间产生差异,这些人员例如分析员,开发员。
To create a precise and complete model, we need both UML diagrams and OCL expressions.
为了创建一个精确且完整的模型,我们需要UML图表及OCL表达式。
In addition, it is possible to query the XML files as EMF objects using an object-oriented query language: object Constraint language (OCL).
此外,还可以使用以下这种面向对象的查询语言将XML文件作为EMF对象进行查询:对象约束语言(ocl)。
This tool also provides all nine diagram types, diagram export, XML Metadata Interchange (XMI) integration, and Object Constraint Language (OCL) support.
该工具还提供了所有九种图表类型、图表导出、XMl元数据交换(XMI)集成,并且支持对象约束语言(ocl)。
The mechanisms for writing such constraints using a language such as OCL have been fully specified.
这个机制使用比如像OCL这样的语言描述那些限制,它已经被充分的说明了。
On one hand, it generates instances of a certain model, and it verifies automatically whether they are compatible with the existing OCL constraints.
一方面,它生成了特定模型的实例,并自动确认它们是否与已有的OCL约束兼容。
Use the OCL to more formally specify the business rules in the domain model and the behavior contracts for objects and components.
使用OCL更形式化地指定域模型中的业务规则和对象与组件的行为契约。
In addition to spotting the anti-pattern and knowing how to fix the solution, you also need to know how to detail the solution using OCL.
除了定位反模式,并了解如何修复解决方案,您还需要知道如何用ocl详述解决方案。
If this looks a bit complex, remember that you don't have to use this technique all the time, and you can use simple textual notes rather than OCL if you prefer.
如果这看起来有一点复杂,那么记得无需一直使用该技术,如果您喜欢,可以使用简单的文本注释而不用ocl。
The goal of this tutorial is to add textual constraints in OCL to restrict undesired instances of the model, and thus reach higher levels of maturity (See the Resources [1] section for more details).
本教程的目的是添加ocl的文本约束条件来限制模型的非期望的实例,并且因而达到更高的成熟级别(参见参考资料[1],了解更多详情)。
There are not many applications that can interpret constraints written in OCL.
有很多程序不能理解以ocl写成的约束。
If you are comfortable in writing OCL, you can add a note to the model detailing the fact that a manager cannot manage herself, as shown in Figure 10.
如果您会写ocl,那么您可以向模型添加注明,详细说明经理不能管理自己的事实,如图10所示。
The union of the user-modeled stereotype and the intersection of its meta-model extensions is used as the OCL context when the constraint is defined.
当一个约束被定义时,用户模型化的原型联合和元模型扩展的交集被用于OCL上下文。
The supported version of the OCL is 2.0, matching the supported UML definition (2.1).
OCL所支持的版本为2.0,与uml定义所支持的相匹配(2.1)。
Expressing such (relatively) local constraints is straight forward using OCL or OCL-like languages.
要表示这些(相对的)局部约束,可以直接使用OCL或者类似于ocl的语言。
The element with the constraint's stereotype applied to it is used as the OCL context during the evaluation of the constraint.
使用约束的原型应用的元素,被用于OCL上下文,在约束评估时。
Another advantage of OCL-based constraints is that they are more consistent with how OMG defines UML constraints (please see the Resources section for more information).
另一个基于OCL约束的优点是,他们会被OM g定义的UML约束更好的支持(请参阅参考资料部分得到更多信息)。
Generate the necessary constraint in OCL, as shown in Figure 13.
用ocl生成必要的约束,如图13所示。
To understand the information in this section, you should be familiar with the OCL specification (see the Resources section for more information).
想要了解这部分内容的更多信息,您需要熟悉OCL 的规范(参阅参考资料 部分获取更多信息)。
OCL (Object Constraint Language) was developed to fill this gap.
您可以开发ocl(对象约束语言)来填补这个空白。
Ability to query the data using an object-oriented query language: object Constraint language (OCL).
能够使用以下面向对象的查询语言对数据进行查询:对象约束语言(Object Constraint Language,OCL)。
Here is an example of an OCL query, using the optional OCL report manifest entries.
下面是一个OCL查询的例子,使用可选择的OCL报告显示入口。
In fact, you must dust off UML's obscure Object Constraint Language (OCL) and an OCL code generator to achieve the same functionality.
事实上,您必须通过uml晦涩的对象约束语言(Object Constraint Language,OCL),并使用OCL代码生成器,才能实现相同的功能。
应用推荐