HWCT-1500: Profiles
HyperWorks Collaboration Tools profiles are a collection of content types, parsers and customizations using HyperWorks Collaboration Tools APIs and Tcl/tk scripting.
In this tutorial, you will learn how to create a Profile for managing Microsoft Office documents within a HyperWorks Collaboration Tools library.
- Metadata associated with the content
- Dependencies between the metadata
- Relationships that can be created between the content type and others
Any type of information or file can be managed by HyperWorks Collaboration Tools, provided it can be described using the appropriate content definition format.
- At the root of the document is the element ContentType, with name as a mandatory attribute. It contains a list of metadata.
- Each metadata has name and type as required attributes. There are many other attributes, listed below, and best seen by example.
- If the “mandatory” attribute is true, then this attribute must have a value when the content is published to the library. In this case, it is good practice to specify a “defaultvalue”.
- Metadata may have a set of valid values.
- name (mandatory - string): name of metadata.
- type (mandatory - string): metadata value type. Should be one of string, int, float, boolean.
- dname (boolean): if it is true then the metadata is used as name for the
related content.Note: dname can only be true for one metadata per content definition.
- editable (boolean): if it is true then the metadata is editable.
- displayable (boolean): if it is true then the metadata is displayed.
- mandatory (boolean): if it is true then the metadata is required to be filled by you when creating content.
- displayName (string): metadata display name.
- defaultvalue (string): metadata default value.
- category (string): metadata category.
A parser automatically extracts information from files when they are added to a library. The extracted information is stored as content metadata, or as indexed metadata, and can be used when searching for contents in the Organize browser. Searches can be metadata-based or full-text based.
Update the librarypreferences.xml File
A typical profile consists of the following: Install.tcl: To install the profile, libraryprofiles.xml: Contains path to Content definitions, parsers and custom integration .tcl files, and Main folder: Contains custom scripts, content definition .xml files and parser .tcl files.
Create Content Definition for Office Documents
Now you will create content definition for office documents. The folder \Profile_Main\ContentDefinitions contains all the content definition files of a profile. Since you are creating only one content definition for this profile the start package has only one content .xml file. A profile can have multiple content definitions.
Parser Tcl Code
In the previous step you edited the parser.xml file to point to the appropriate Tcl code. Now you will take a look at the parser Tcl code. For simplicity the start package code does not need any editing.
Customize the Organize Browser
Now you will work on the customization of the Organize browser. Via profiles you can add your own custom context menus, toolbar icons and also have custom procedures which will be run before or after a lifecycle operation. For example, if you want to display a message saying "Check in successful" after a content is checked in you could add this message as part of the post check-in call. Refer to the HyperWorks Collaboration Tools Profiles documentation for more details.
In this exercise you will edit an existing context menu procedure to show a message when it is clicked from the Organize browser.
Install a Profile
Create a New Library Using the Office Profile
Add a New Content to the Office Library
In the previous step you created a new library using the Office profile. Now you will add a PowerPoint document to this library.
View the Custom Context Menu
Now you will review the action of adding a new custom context menu.
Summary
In this tutorial you created a new profile, added a new content definition, added a new parser, and customized the context menu to display the file name.
HyperWorks Collaboration Tools profiles can be used to do so much more. Refer to the HyperWorks Collaboration Tools Profiles and API documentation for more information.