此内容没有您所选择的语言版本。
10.16. Declaring a Metadata Attribute with Fact Types Example
This is an example of declaring metadata attributes for fact types and attributes. There are two metadata items declared for the fact type (
@author and @dateOfCreation) and two more defined for the name attribute (@key and @maxLength). The @key metadata has no required value, and so the parentheses and the value were omitted:
import java.util.Date
declare Person
@author( Bob )
@dateOfCreation( 01-Feb-2009 )
name : String @key @maxLength( 30 )
dateOfBirth : Date
address : Address
end