#
Annotation Files

###### Identifier:

org.eclipse.jst.jsf.contentmodel.annotations.annotationFiles

###### Since:

WTP 1.5

###### Description:

Adds annotation meta-data to a content model. An extending plugin may only create one annotation file for a given URI.

###### Configuration Markup:

<!ELEMENT extension (annotationFile+)>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #IMPLIED

name CDATA #IMPLIED>

<!ELEMENT annotationFile EMPTY>

<!ATTLIST annotationFile

uri CDATA #REQUIRED

location CDATA #REQUIRED

locator CDATA #IMPLIED

parser CDATA #IMPLIED>

File used to map annotations to a tag library content model. The file assigns properties to a tag element or attribute.

- uri - Content model URI being annotated. eg. "http://java.sun.com/jsf/core". This can, of course, be any string that the consumer wishes to use as a key.
- location - Location of the annotation file. If no locator is provided, it will use the default `CMPluginRelativeSourceFileLocator` which will find the file in a location relative to the plugin. eg. /metadata/jsf_core.xml
- locator - Class implementing the abstract `CMAnnotationSourceFileLocator` class. Responsible for locating the annotation file and returning an InputStream to the parser and returning a `ResourceBundle` if there is one. If a locator is not supplied, the default implementation for a plugin relative file, `CMPluginRelativeSourceFileLocator` will be used.
- parser - The name of the parser class used to fill the internal model. If not specified the default, `CMAnnotationFileParser`, will be used which conforms to the default schema `http://org.eclipse.jst.jsf.contentmodel.annotations/grammarAnnotationSchema`. If parser is provided, it must implement `ICMAnnotationFileParser`.

###### API Information:

The parser, if specified, must implement `ICMAnnotationFileParser` to create `CMElementAnnotation` and `CMAttributeAnnotations` in the `CMAnnotationMap`.