SMWP - Page Class |
|||||
Introduction |
4.12 Create Page ClassSyntax simple (no page references)
Creates an page class which is used for XML representation of one or more fragment classes. The page class is defined upon one foundation fragment class which must have the same set of parameters (line 5). If the names of the parameters between page class and foundation fragment class differ they have to be mapped against each other (line 6,7). The page class is a logical construct upon which XML documents are generated. The name of the XML documents is set by using the filename as prefix (line 2) and parameter values as suffix: systemID = filename { "_" parameterValue }. The generation approach which is used when database updates occur is specified by line 3,4. coreSMWP uses the incremental updates of the XML documents which are affected by the database modification. puffOfFragements recreates all XML documents of affected page classes while onTheFly is used for regenerating XML documents for all page classes. This prototype implements the generation approach coreSMWP only. The root element of the XML documents uses the element name and namespace provided by line13, 14. Preconitions
Syntax complete (including internal and external page references)
Example 18 CREATE PAGE CLASS wines<region> Creates the page class wines<region> using the prefix "wines/wines_region" as prefix for all XML documents generated. XML documents are created upon this page class are named wines/wines_region_chia, wines/wines_region_rioja, wines/wines_region_styr. The page class uses the fragment class wines<region> as foundation fragment class which contains the same parameter set as the page class itself. An additional fragment class wineries<region> is mapped to the page class. The root element name is wines_region using the namespace http://dke.uni-linz.ac.at/smwp to create a qualified element. Example 19 CREATE PAGE CLASS wineries<region> This example defines a page class containing a foundation fragment class and one mapped fragment class. The mapped fragment class regions<id> uses the parameter id which is an semantically identical to the parameter region used by wineries<region>. In order to use the parameter id a mapping is neccesary which states that the parameter id is equal to the parameter region. Example 20 CREATE PAGE CLASS wines<region>
Text
4.13 Edit Page Class4.13.1 Add Fragment Class to Page ClassSyntax simple (no external and internal links) "ALTER PAGE CLASS" className
4.13.2 Remove Fragment Class from Page ClassSyntax "ALTER PAGE CLASS" className Removes the fragment class mapping to an page class. All mapped fragment
classes can be removed from a page class except its foundation fragment
class. Preconditions
Example X ALTER PAGE CLASS wines<region> Removes the fragment class mapping for wineries<region> to the page class wines<region>. All XML documents for this page class are automatically being regenerated. 4.14 Delete Page ClassSyntax "DROP PAGE CLASS" className; Text Example X DROP PAGE CLASS wineries<region>; Text 4.15 Display Page ClassSyntax "SHOW PAGE CLASS" ( className | * ) ";" Using this statement works for two options. Either displaying a list of all generated page classes, or displaying information about one specific page class. The list of generated page classes outputs their names. The detail information about one page class contains its name, parameters, foundation fragment class, fragment classes and its publication specification. Example 24 SHOW PAGE CLASS *; Displays a list of all generated page classes. Example 25 SHOW PAGE CLASS wines<region>; Displays detailed information about the page class wines<region>. ![]() Figure 14 : Console showing page class details
|