| 51 | === Supporting Annotations in Existing (Non-FDO) Schema === |
| 52 | |
| 53 | In order for the FDO API to be able to detect and support Annotation defined in existing schemas such as Oracle, the schema being read must support the Annotation metadata tables as mandated by the OGC Simple Feature Access Specification. The metadata can be exposed as a set of tables or views. |
| 54 | |
| 55 | ==== OGC Annotation Metadata Table ==== |
| 56 | |
| 57 | As specified in the OGC Simaple Access Specification, the following CREATE TABLE statement creates an appropriately structured table to be included in the schema, describing how text is stored in a feature table. This should be either an actual metadata table or an updateable view. |
| 58 | |
| 59 | There is no requirement that the annotated feature have any other attributes. Unattributed annotations are in essence context-free, and may be used to place any text on the data, such as collection metadata or notes to user about unusual situations of which he may wish to be aware. |
| 60 | |
| 61 | {{{ |
| 62 | CREATE TABLE ANNOTATION_TEXT_METADATA AS |
| 63 | { |
| 64 | F_TABLE_CATALOG AS CHARACTER VARYING NOT NULL, |
| 65 | F_TABLE_SCHEMA AS CHARACTER VARYING NOT NULL, |
| 66 | F_TABLE_NAME AS CHARACTER VARYING NOT NULL, |
| 67 | F_TEXT_KEY_COLUMN AS CHARACTER VARYING NOT NULL, |
| 68 | F_TEXT_ENVELOPE_COLUMN AS CHARACTER VARYING NOT NULL, |
| 69 | A_ELEMENT_TABLE_CATALOG AS CHARACTER VARYING NOT NULL, |
| 70 | A_ELEMENT_TABLE_SCHEMA AS CHARACTER VARYING NOT NULL, |
| 71 | A_ELEMENT_TABLE_NAME AS CHARACTER VARYING NOT NULL, |
| 72 | A_ELEMENT_TEXT_KEY_COLUMN AS CHARACTER VARYING NOT NULL |
| 73 | A_ELEMENT_TEXT_SEQ_COLUMN AS CHARACTER VARYING NOT NULL |
| 74 | A_ELEMENT_TEXT_VALUE_COLUMN AS CHARACTER VARYING NOT NULL, |
| 75 | A_ELEMENT_TEXT_LEADERLINE_COLUMN AS CHARACTER VARYING NOT NULL, |
| 76 | A_ELEMENT_TEXT_LOCATION_COLUMN AS CHARACTER VARYING NOT NULL, |
| 77 | A_ELEMENT_TEXT_ATTRIBUTES_COLUMN AS CHARACTER VARYING NOT NULL, |
| 78 | A_TEXT_DEFAULT_EXPRESSION AS CHARACTER VARYING, |
| 79 | A_TEXT_DEFAULT_ATTRIBUTES AS CHARACTER VARYING |
| 80 | } |
| 81 | }}} |
| 82 | |