Skip Headers

Oracle Internet File System Setup and Administration Guide
Release 9.0.2

Part Number A95995-01
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

6
Managing Objects Used by Developers with Oracle 9iFS Manager

The Developer's section of the Oracle 9iFS Manager allows you to control objects often used by developers within Oracle 9iFS. Many of these tasks can be performed using XML. For more information, see the Oracle Internet File System Developer Reference.

Topics include:

The Developer's Section of Oracle 9iFS Manager

Oracle Internet File System (Oracle 9iFS) is a development platform for content management applications written using Java and XML. For developers, using Oracle 9iFS offers several specific advantages:

What does adding these customized components to an Oracle 9iFS mean for you, the administrator?

As a system administrator, developers may ask you to perform simple development tasks involving the objects shown in the Developer's section of Oracle 9iFS Manager (see Figure 6-1, "Developer's Section of Oracle 9iFS Manager"). Or, you may assign developers administrative privileges so that they may perform these tasks themselves. For more information on developing applications with Oracle 9iFS, see the Oracle Internet File System Developer Reference.

Figure 6-1 Developer's Section of Oracle 9iFS Manager

Text description of 1newifsm.gif follows.

Text description of the illustration 1newifsm.gif

Managing Class Objects

Using Oracle 9iFS Manager, you can create, modify, and delete class objects. A class object represents a class whose instances are persistently stored and managed by the Oracle 9iFS repository. During installation, Oracle 9iFS creates a number of class objects. Some of these are used internally; others are for commonly encountered data types in content management applications. An application can use the class objects provided, or create its own by subclassing them. Each class object may define one or more attributes for its data. In addition to these, a class object inherits the attributes of its superclass.

You can subclass an existing class by creating a new class object and specifying the parent class for the new class object. The new class object inherits all the attributes of the parent class and allows you to define additional attributes. For example, to create a custom document type, you would create a new class object, such as Purchase Order with a parent class of Document, and specify any additional attributes you want associated with the purchase order (Due Date, Customer Number, etc.). You can subclass object types using Oracle 9iFS Manager by creating new class objects.

Class Hierarchy

Table 6-1, "Class Hierarchy Descriptions" describes each classof the class hierarchy. Note that the classes are subdivided into three groups under each abstract superclass: public object, system object, and schema object. The class hierarchy shows which child classes inherit from which parent classes. For example, Primary User Profile is a child class of User Profile and inherits all the attributes of User Profile. You can add or create new classes through subclassing.

Table 6-1 Class Hierarchy Descriptions

Class Description

PublicObject

An object that can be secured by an ACL, can be foldered, and can be versioned. These objects are most likely the objects that end-users will interact with. Both folders and documents are subclasses of public object.

Document

The public object which contains content.

Folder

Resembles a directory tree, containing other public objects.

SearchObject

A complex search definition that is persistent.

SelectorObject

A simple search definition that is persistent.

AccessControlList

A group of at least one Access Control Entry that defines the security access of the object(s) with which it is associated.

SystemAccessControlList

An Access Control List that is uniquely named across the system.

ClassAccessControlList

Controls who is allowed to create the class with which it is associated.

Category

An additional way to group objects that span across classes.

MountPoint

Specifies a mountpoint and its folder path.

InterMediaSource

Represents metadata extracted from multimedia files.

Family

Defines a group or "family" of versioned objects--the top-most object in the versioning hierarchy.

VersionSeries

The second object of the versioning hierarchy. A version series tracks the group of versioned objects.

UserProfile

Stores profile information on a Directory User.

PrimaryUserProfile

Contain information related to a DirectoryUser such as home folder, default ACLs, etc.

ExtendedUserProfile

Intended to be used to store application-specific user information.

ApplicationObject

Objects intended to be extended for application-specific behavior.

NodeConfiguration

Defines configuration information for a node.

PropertyBundle

A group of properties.

ValueDefaultPropertyBundle

A value default whose value points to a property bundle.

ValueDomainPropertyBundle

A value domain whose value points to a property bundle.

PolicyPropertyBundle

A group of policies.

ServiceConfiguration

A group of properties used to configure a service.

ServerConfiguration

A group of properties used to configure a service.

ContentQuota

Limits the amount of content space a user may consume.

Server

A managed Oracle 9iFS application.

VersionDescription

The third object in the versioning hierarchy. A version description points to the actual versioned public object.

DirectoryObject

Defines either a user or a group.

DirectoryUser

Defines an Oracle 9iFS user and specifies the credential manager used for authentication.

DirectoryGroup

Defines a group of users or other groups.

SystemObject

Objects that manage the foundation of Oracle 9iFS. Only system administrators can directly access these objects.

Policy

Governs additional behavior of the class with which it is associated.

AccessControlEntry

One entry of an Access Control List (ACL) that specifies the access level for a given user or group.

Format

The format of a document's content; used to determine if the document should be indexed for content searching.

Media

Specifies where the document's content is stored.

MediaLOB

Specifies content to be stored in a database LOB.

MediaBLOB

Specifies content to be stored in a database BLOB.

MediaTextBLOB

Specifies a MediaTextBlob to store content.

ExtendedPermission

Extended customer-defined permissions.

PermissionBundle

Defines a group of permissions for ease of use in managing ACLs.

Relationship

Associates two objects with one another.

FolderRelationship

Specifies a folder's contained items and eliminates cycles.

FolderPathRelationship

Specifies a folder's contained items; forcing unique names within each level of the folder tree and eliminating cycles.

GroupMemberRelationship

Specifies the members (a user or group) of a group.

ContentObject

Contains the actual content of a document.

Property

A name/value pair, used to store ad hoc information.

SchemaObject

Abstract superclass for other Oracle 9iFS objects that define and manage data.

ClassObject

Represents a class whose instances are managed by Oracle 9iFS.

Attribute

Represents an attribute of a ClassObject.

ClassDomain

Defines a list of valid classes for an object type attribute.

ValueDomain

Defines a list of valid values for an attribute.

ValueDefault

Defines a default value for an attribute.

Persistent Domain Configuration

To manage the domain configuration, note that three class objects have been added to the Oracle 9iFS class hierarchy:

Creating Class Objects

Creating a new class object involves the following tasks:

  1. Define the class object information, including the class object name, superclass, and server classpath.

  2. Add extended attributes to the class object. Extended attributes are attributes particularly defined for this class object. Inherited attributes are attributes of the parent class object or superclass and cannot be modified.

Define the Class Object Information

To create a new class object, use the Create Class Object window:

Figure 6-2 Create Class Object Window

Text description of 5classge.gif follows.

Text description of the illustration 5classge.gif

  1. Click Create on the toolbar.

  2. Select Class Object from the Select Object Type dialog. You can also use the Create Like option.

  3. Click Create. The Create Class Object window displays.

  4. Enter information in the following fields:

    • Name (required)--The name of the new class object. Each class object must have a unique name

    • Superclass--The superclass of the new class object. Every class object must have a superclass. The superclass can be any class object that is not "final."

    • Bean Classpath--The fully-qualified name of the Java class that is instantiated to represent the instances of the new class object in the development ("beans") API. It defaults to the bean classpath of the superclass class object. It is recommended that you accept this default. If the default is accepted, you can access the extended attributes of an instance of the new class object by calling the getAttribute and setAttribute methods inherited from oracle.ifs.beans.LibraryObject. If you specify a value other than the default, you must manually create a new Java class whose name is the value specified. You must compile this new class and ensure it is in the Java classpath before instances of the new class object can be instantiated. This is an advanced topic.

    • Server Classpath--The fully qualified name of the Java class that is instantiated to represent the instances of the new class object in the extensibility ("server") API. Defaults to the server classpath of the superclass class object. It is recommended that you accept this default. If you accept the default, you can access the extended attributes of an instance of the new class object by calling the getAttribute and setAttribute methods inherited from oracle.ifs.server.S_LibraryObject. If you specify a value other than the default, you must manually create a new Java class whose name is the value specified. You must compile this new class and ensure it is in the Java classpath before instances of the new class object can be instantiated. This is an advanced topic.

    • Selector Classpath--Defaults to the superclass selector classpath. Always accept this default. Changing this value is not supported for this release.

    • Description (optional)--A description of the new class object.

    • Access Control--The class ACL for the new class object. Class ACLs control who can perform certain operations on instances of the class object, such as creating new instances of a class object.

    • Is Abstract--Check this box to make the new class object "abstract." Abstract class objects cannot be instantiated. Making a class object abstract is only useful if you intend to further subclass it (with those subclasses being non-abstract).

    • Is Final--Check this box to make the new class object "final." Final class objects cannot be subclassed.

  5. If extended attributes are not needed for this class object, click Create. If you intend to create extended attributes, see "Adding Extended Attributes".

Viewing Class Object Information

  1. On the Create Class Object window, select the object from the General tab.

  2. Click View. The Attribute tab displays showing the object information (see Figure 6-3).

Figure 6-3 Create Class Object: Attribute Tab

Text description of 5classat.gif follows.

Text description of the illustration 5classat.gif

Adding Extended Attributes

When subclassing objects, to create extended attributes, use the Add button on thee the Attribute tab on the Create Class Object window to display the Class Object Attribute Definition window (see Figure 6-4).

Figure 6-4 Class Object Attribute Definition Window

Text description of 5attdefa.gif follows.

Text description of the illustration 5attdefa.gif

  1. Enter information in the following fields:

    • Name (required)--The name of the attribute. Each attribute must have a name that is unique across the other attributes of the new class object as well as all the attributes it inherits from its superclasses.

    • Description--A description for the new attribute.

    • Referential Integrity--Allows the referential integrity behavior of the new attribute to be defined. Referential integrity rules apply only to attributes of the following datatypes: PublicObject, DirectoryObject, PublicObject_Array, and DirectoryObject_Array The referential integrity rule value is ignored for all other datatypes. For these four datatypes, a referential integrity rule value of Restrict prevents a PublicObject or DirectoryObject (or subclass) referenced by instances of this attribute from being freed. This is analogous to a "Delete Restrict" database constraint. A referential integrity rule value of Clear allows a PublicObject or DirectoryObject (or subclass) referenced by instances of this attribute to be freed, causing the value of the referencing attribute (or attribute element, for array-type attributes) to become null.

    • Is Required--If checked, instances of the attribute must have a non-null value. Oracle 9iFS treats zero-length, i.e., "empty," STRING attributes as null.

    • Is Unique--If checked, each non-null instance of the attribute must have a unique value.

    • Is Indexed--If checked, the attribute is indexed. This allows searches and selectors that are qualified by the attribute to perform more quickly.

    • Datatype--Select a datatype from the drop-down list.

    • Length--For a data type of string, the maximum length of instances of the attribute, in bytes. The number of characters to which this corresponds depends upon both the database character set and the value stored.

    • Scale--Unused for this release.

    • Is Settable--In creating a new instance of this class object, whether a value for this attribute can be explicitly set in the definition class for this class object. If unchecked, the attribute is "system-set," meaning that its value can be only be set in the extensibility ("server") API.

    • Read Only--Whether the value of this attribute in an existing instance of this class object can be updated. If checked, the attribute is "non-updateable," and can only be changed in the extensibility API. Making an attribute read only is useful for enforcing business rules that prevent data from changing over time.

    • Class Domain--Applies only to attribute of the following data types: PublicObject, DirectoryObject, SystemObject, SchemaObject, PublicObject_Array, DirectoryObject_Array, SystemObject_Array, and SchemaObject_Array. Specifies an optional class domain on attributes of these datatypes. A class domain performs basic data validation upon creating an instance of a class object or updating the attributes of an existing instance of a class object. For example, without a class domain, a PublicObject attribute could be set to any PublicObject: a Document, a Folder, etc. You could use a class domain to restrict this to, for example, only Documents, or only Documents and any subclasses of Documents. See "Creating a Class Domain" for more information on class domains.

    • Value Domain--Specifies an optional value domain for the new attribute. A value domain performs basic data validation upon creating an instance of a class object or updating the attributes of an existing class object. For example, a value domain could ensure a STRING attribute is a valid color-- "red," "green," "blue"--or an INTEGER attribute lies within a certain range-- 0 to 10 inclusive. See "Creating New Value Domains" for more information on value domains.

    • Value Default--Specifies an optional default value for the new attribute. In creating a new instance of a class object, Oracle 9iFS sets this value for this attribute if no value is otherwise provided. See the "Creating a New Value Default" for more information on value defaults.

    • Edit Custom Attribute Client Privileges--Click the Advanced button to edit privileges. The privileges you can set to true or false are webui.displayable, webui.updateable, webui.searchable; winui.displayable, winui.updateable, winui.searchable; and admintool.displayable, admintool.updateable, admintool.searchable.

    • Is Value Domain Validated--Specifies whether the value domain applied to this attribute is enforced; in other words, in creating a new instance of this class object or updating an existing instance of this class object, whether Oracle 9iFS ensures the value of this attribute (if set or changed) lies within the specified value domain.

  2. Click OK.

  3. On the Create Class Object window, click Create. To edit custom client privileges, click Advanced. Continue with "Modifying Class Objects".

Modifying Class Objects

The only modifications allowed for class objects are adding or editing an extended attribute and modifying the privileges of attributes.

  1. Select the class object to edit in the Navigator.

  2. On the property sheet, click the Attribute tab.

  3. Select the extended attribute to "Edit" and click Edit.

  4. On the Class Object Attribute Definition window, edit the appropriate fields and click OK.

  5. Click Apply on the property sheet.

Editing Custom Client Privileges

You edit custom client privileges on the Modify Privileges dialog (see Figure 6-5).

Figure 6-5 Modify Privileges Dialog

Text description of 5modpriv.gif follows.

Text description of the illustration 5modpriv.gif

  1. On the Create Class Object window, click Create. To edit custom client privileges, click Advanced. The Modify privileges dialog displays (seeFigure 6-5). You can only modify the value of the privilege name.

  2. Click the value of the privilege to modify. The value is automatically set to the counter-value. For example, if a value is set as true, when clicked, it is set to false.

  3. When all values have been set, click OK.

  4. When all the information has been entered on the ClassObject Attribute Definition dialog, click OK.

  5. On the Create Class Object window, click Create.

Class Domains

Using Oracle 9iFS Manager, you can create and modify class domains. A class domain is used in conjunction with class objects. For attributes that point to objects, you can limit values to specific classes by using class domains. For example, the AccessControlList attribute for public objects has a class domain which restricts the value to objects of the AccessControlList class.

Why Use a Class Domain?

Each attribute has a datatype, such as int or String. As you would expect, Oracle 9iFS supports:

In addition, Oracle 9iFS supports four top-level object datatypes unique to Oracle 9iFS:

You can use a value domain to validate any of these four datatypes. But, if you want to be more specific and limit an attribute's value instance of a single class, you need a validation technique to ensure that the value entered is not, for example, just any Public Object, but specifically, a Document object. In this case, you would use a class domain to specify the single class that the attribute's datatype must match.

If an attribute's datatype is a subclass of one of the four unique Oracle 9iFS top-level datatypes listed above, you can specify a class domain on that attribute (see Figure 6-6). Oracle 9iFS will throw an exception if the attribute is of any other class.

Figure 6-6 Create Class Domain Dialog

Text description of 5classdo.gif follows.

Text description of the illustration 5classdo.gif

Creating a Class Domain

  1. Click Create on the toolbar.

  2. Select Class Domain from the Select Object Type dialog. You can also use the Create Like option.

  3. Click Create. The Create Class Domain dialog displays (Figure 6-6).

  4. Enter information in the following fields:

    • Name (required)--The name of the new class domain. Each class domain must have a unique name.

    • Type--Choose Enumerated Classes to include only the classes listed in the Classes field in the new class domain. Choose Enumerated Classes and Subclasses to include the classes listed in the Classes field and any of their subclasses.

    • Description (optional)--A description of the class domain.

    • Classes--The classes in the class domain. In creating a new instance of a class object or updating an existing instance of a class object, the values of any attributes to which this class domain has been applied, if set or changed, must be instances of one of these classes (or their subclasses, if Type is Enumerated Classes and Subclasses).

  5. Click Create.

Modifying Class Domains

When modifying a class domain, the Description field is the only field that can be updated. To modify a selected class domain:

  1. Select the class domain to be modified.

  2. Enter a new description on the property sheet.

  3. Click Apply.

Deleting Class Domains

If a class domain is deleted, the data validation performed by that class domain no longer occurs. To delete a class domain:

  1. Select the class domain to be deleted.

  2. Click Delete on the toolbar.

  3. Click Yes at the prompt.

Value Domains

In many cases, the number of possible valid values for an attribute is limited. A frequently used form of data validation takes the value entered and checks it against a list of valid values, returning an error message if the value entered is not valid.

A value domain is a separate class which can contain a list of values used by developers for custom applications. You can limit attribute values to specific values by using value domains. Limiting the possible values helps with data validation. User input is checked against the list, and if the input value is not on the list, Oracle 9iFS throws an exception. Use the Create Value Domain window (Figure 6-7).

Figure 6-7 Create Value Domain Dialog

Text description of 5valdomc.gif follows.

Text description of the illustration 5valdomc.gif

Creating New Value Domains

To create a new value domain with Oracle 9iFS Manager:

  1. Click the Create button on the toolbar.

  2. Select Value Domain from the Select Object Type dialog. You can also use the Create Like option.

  3. Click Create. The Create Value Domain dialog displays (Figure 6-7).

  4. Enter information in the following fields:

    • Name (required)--The name of the new value domain. Each value domain must have a unique name.

    • Datatype--The datatype of the value domain. This determines to which attributes the new value domain may be applied. For example, an INTEGER_ARRAY value domain may be applied to attributes whose datatypes are either INTEGER or INTEGER_ARRAY.

    • Type--The type of the value domain.

      • Enumerated values: the acceptable values in the value domain are defined by a set. For example, the integer values 1, 2, 3, 5, 7.

      • An inclusive range, defined by a minimum and maximum. For example, the integer values 0 to 10, inclusive.

      • An inclusive minimum. For example, the integers greater-than-or-equal-to 3.

      • An inclusive maximum. For example, the integer values less-than-or-equal-to 14.

      • An exclusive range, defined by a minimum and maximum. For example, the integer values 14 to 69, not including either 14 or 69.

      • An exclusive minimum. For example, the integers greater-than 3 (but not including 3 itself).

      • An exclusive maximum. For example the integers less-than 14 (but not including 14 itself).

    • Enumerated values--Applies only if Type is Enumerated Values. The values in the set, one per line.

    • Minimum--Applies only for certain Types. The minimum value.

    • Maximum--Applies only for certain Types. The maximum value.

  5. If the datatype selected is either DirectoryObjectArray, SchemaObjectArray, SystemObjectArray, or PublicObjectArray, then click the Edit Values button and click Create Search to search for objects to add to this value domain.

  6. Click Create.

Modifying Value Domains

You can make the following modifications to value domains:

Note: To find a specific value, click the Create Search button.

To modify a value domain description:

  1. Select the value domain to be modified in the Navigator.

  2. On the property sheet, enter a new description.

  3. Click Apply.

  4. You can only modify the enumerated values if the datatype is of a non-primitive type.

To set object-type values for a value domain:

  1. Select the value domain to be modified in the Navigator. Make sure this value domain is of a non-primitive type.

  2. On the property sheet, click Edit Values. The Select Object Value dialog displays.

  3. Using the Select Object Value dialog, you can add and remove object values, or search for object values to add. This dialog does not allow you to create an object.

To add an object value:

  1. In the Available Objects list, select an object value to add.

  2. Click Add to add it to the Selected Objects list.

To remove an object value:

  1. In the Selected Objects list, select an object value to remove.

  2. Click Remove. The object is moved to the Available Objects list.

Value Defaults

Value defaults are particularly useful if you need to apply the same default value to a large number of attributes. Using a value default lets you specify the default value once, and apply it to many attributes. If the default value needs to be changed, you can then change the value default in one place, and all attributes that use the value default will now have access to the new value (see Figure 6-8).

By using value defaults, you can specify an initial value for an attribute. If no value is set, the repository sets the default value for the attribute. Should the default value be outside the value domain when the value domain validation is on, the Oracle 9iFS server throws an exception upon setting the attribute with the invalid default value.

Figure 6-8 Create Value Default Window

Text description of 5valdefc.gif follows.

Text description of the illustration 5valdefc.gif

Creating a New Value Default

To create a new value default with Oracle 9iFS Manager:

  1. Click Create on the toolbar.

  2. Select Value Default from the Select Object Type dialog. You can also use the Create Like option.

  3. Click Create. The Create Value Default window displays (see Figure 6-8).

  4. Enter information in the following fields:

    • Name (required)--The name of the new value default. Each value default must have a unique name.

    • Datatype--The datatype of the new value default. This determines to which attributes the new value default may be applied. For example, an INTEGER value default may be applied to attributes whose data type is either INTEGER or INTEGER_ARRAY. However, an INTEGER_ARRAY value default may only be applied to attributes whose data type is INTEGER_ARRAY.

    • Description (optional)--A description for the value default.

    • Values--The value of the new value default.

  5. Select the Multi-valued checkbox if this value default is to have more than one value. Indirectly, you are creating a Value Default Property Bundle. This is how multiple values can be stored for a value default.

    • If you checked the Multi-valued checkbox or the datatype you selected is a class object or class object array, click the Edit Value button.

    • If you checked the Multi-valued checkbox, click the Add Primitive Value button to add a value. Click the Select Values button to add a class object.

    • If you did not select the Multi-valued checkbox, click the Create Search button to search for an object to add to this value default.

  6. Click Create.

Example

Assume that ExpenseReport has an attribute called ApproverName. You could use a value default on ApproverName to specify the name of your department's vice president, Chris Stevens. When an ExpenseReport object is created, "Chris Stevens" would be the default Approver Name. This same ApproverName attribute might be used for approving hiring requests, as well as approving expense reports. If there was a reorganization and Kim Naser became the new vice president, you could change the value default object, and the new name would become the default approver for both expense reports and hiring requests.


Note:

Changing the value default in this way would not affect any earlier expense reports or hiring requests, which would continue to indicate "Chris Stevens." Only expense reports or hiring requests created after the ValueDefault was updated to "Kim Naser" would have the new name.


Modifying Value Defaults

You can modify the Description field and set primitive-type values in the Enumerated Values list. Only one object can be added at a time.

To modify the description of a value default:

  1. Select the value default to be modified in the Navigator.

  2. Enter a new description using the property sheet.

  3. Click Apply.

You can edit any non-multi-type value default. If the value default is multi-typed, you can click Edit Value to open the Multi-value Editor (see Figure 6-9, "Edit Multi-valued Object Dialog"). Using the Multi-value Editor, you can add/edit primitive values, but only view non-primitive values.

Figure 6-9 Edit Multi-valued Object Dialog

Text description of 5multval.gif follows.

Text description of the illustration 5multval.gif

To set object type values for a value default:

  1. Select the value default to be modified in the Navigator. Make sure this value default is of a primitive type.

  2. On the property sheet, click Edit Values. The Edit Multi-valued Object dialog displays (see .Figure 6-9)

  3. Select the name or value of the value for which you want to modify. When it is highlighted, type a new name or value for the value and then click outside of the field. The name or value is modified.

  4. Select the datatype of the value you want to modify. When selected, an arrow appears next to the datatype to indicate a drop-down list.

  5. From the drop-down list, select a new datatype. 

Using Java Server Pages

Java Server Pages (JSPs) are a way to create web-based applications based on Oracle 9iFS. (In fact, the Oracle 9iFS Web interface uses JSPs.) JSPs use JavaBeans to extract data from the repository and display information on the Web by generating HTML documents. Although JSPs provide a way for users to view and manipulate documents, providing functionality parallel to that of renderers, using a JSP is not technically "rendering" because it does not involve a specific renderer class. The JSP lookup is created with Oracle 9iFS Manager by registering the JSP.

JSP Execution

The /ifs/jsp-bin folder is provided for developers to place JSPs in to be executed. The list of these JSP-executable directories, however, is configurable. To add more JSP-executable directories, modify the property IFS.SERVER.PROTOCOL.DAV.Jsp.AllowedDirs in the domain configuration.


Note:

You cannot remove either of the two default directories.


Registering JSPs

You do not have to register a JSP for it to execute. You do have to register it if you want the JSP to be the way you display a particular class through the Web. Using Oracle 9iFS Manager, you can view, register, and edit JSPs. When a JSP is added, it is added to the JSP registry.

To register a JSP, use the Java Server Page (JSP) Lookup Register window (Figure 6-10):

Figure 6-10 Java Server Page (JSP) Lookup Register Window

Text description of 5regjsp.gif follows.

Text description of the illustration 5regjsp.gif

  1. From the Object menu, select Register.

  2. Select Java Server Page (JSP) Lookup from the Select Object Type dialog.

  3. Click Register. The Java Server Page (JSP) Lookup Register Window displays with the existing registered JSPs listed (see Figure 6-10).

  4. Click Add. The Java Server Page Lookup Entry window displays (see Figure 6-11).

  5. Enter information in the following fields:

    • Classname--Select a classname for the JSP.

    • Mimetype--Select a mimetype for the JSP.

    • Java Server Page--Enter the JSP information. This is the complete path of the JSP inside of the Oracle 9iFS repository.

  6. Click OK.

  7. Click OK on the Java Server Page (JSP) Lookup Registry Window to return to the Oracle 9iFS Manager Navigator.

Figure 6-11 Java Server Page Lookup Entry Window

Text description of 5jspent.gif follows.

Text description of the illustration 5jspent.gif

Parsers

At its simplest, parsing simply means reading a document and performing some automated data extraction. Parsing occurs when a document is being inserted or updated, and may involve storing the resultant parts of the document inside the repository. Since the platform itself supports such a broad spectrum of document types, the parsing framework necessarily supports a wide variety of parsing scenarios. The parsing behavior assigned to new or existing file types can be managed using the Oracle 9iFS Manager.

Oracle 9iFS exposes this parsing framework in several ways. In addition to relatively easy customization, the Oracle 9iFS Java API includes classes and interfaces that can be extended to handle additional use cases and business problems. These custom objects can easily be deployed within the existing parsing framework, minimizing your work.

When you want to create objects in Oracle 9iFS, you can either use the standard parsers provided, or, if your application requires special treatment, you can create a custom parser.

Associating the Parser with a File Extension

Parsers are associated with file extensions, where the parser is invoked by Oracle 9iFS when a file of corresponding extension is stored in the system. The parser will process the file according to the functionality implemented by the parser. Parsers and file extensions are registered in the ParserLookupByFileExtension property bundle. For example, Oracle 9iFS associates the parser "IfsXmlParser" with the "xml" file extension. In this way, the "IfsXmlParser" is invoked whenever a file with the "xml" file extension is stored in the system. (See "Registering Parsers" for information on how to associate a parser with a file extension using Oracle 9iFS Manager.)

Custom parsers can invoke other parsers, including IfsSimpleXmlParser, during the parsing process. This feature is important to compound documents, which may create instances of multiple Oracle 9iFS subclasses, perhaps based on a variety of XML or other file formats. Custom parsers also give you control over whether you create a Document Object Model (DOM) object during parsing.

For more information on working with custom parsers, see the Oracle Internet File System Developer Reference.

XML Parsing Framework

The IfsXmlParser is the standard XML parser class that is registered for the "xml" file extension. The IfsXmlParser creates an object in the Oracle 9iFS repository from an XML document body and is used as the default parser for all XML documents stored in Oracle 9iFS. The parser provides a flexible mechanism for invoking different XML parsers, based on the content of the XML file. These XML parsers are registered in the XmlParserLookup property bundle.

When the IfsXmlParser finds an XML Namespace specified for the root element of the XML file, it invokes the parser associated with the specified namespace in the XmlParserLookup property bundle. If there is no entry for the namespace in the property bundle, IfsXmlParser looks for an entry associated with the key CustomXmlParser. If there is no such entry, the parser invokes the LiteralDocumentParser, which simply stores the document.

When there is no namespace specified for the root element, the IfsXmlParser will check to see if the root element is the name of an Oracle 9iFS class, or one of "SimpleUser" or "ObjectList," and, if so, it will invoke the parser associated with the key IfsDefaultNamespace in the XmlParserLookup property bundle. If the root element is not the name of an Oracle 9iFS class, or one of "SimpleUser" or "ObjectList," then the IfsXmlParser will look for an entry associated with the key CustomXmlParser and invoke the parser pointed to by that key. If there is no CustomXmlParser, IfsXmlParser will invoke the LiteralDocumentParser.

Out of the box, the XmlParserLookup property bundle has the following parser entries:

Table 6-2 XmlParserLookup Property Bundle

Name Value

IfsDefaultNamespace

http://xmlns.oracle.com/ifs

http://xmlns.oracle.com/ifs

oracle.ifs.beans.parsers.IfsSimpleXmlParser

LiteralDocumentParser

oracle.ifs.beans.parsers.LiteralDocumentParser

As shown in Figure 6-12, "Parsing Sequence", the XML parsing framework is invoked when a document is inserted or updated through one of the default protocols provided with the Oracle 9iFS.

Figure 6-12 Parsing Sequence

Text description of 5parsflw.gif follows.

Text description of the illustration 5parsflw.gif

Changing the IfsDefaultNamespace Property Value

The Oracle 9iFS XML parser examines the root element of the document during pre-parsing. If there is no namespace associated with the root element, AND, the root element represents an Oracle 9iFS class (or one of ObjectList or SimpleUser), then the parser invokes the parser associated with the namespace pointed to by the property IfsDefaultNamespace, whose default value is http://xmlns.oracle.com/ifs, which, in turn, points to the Oracle 9iFS simple xml parser.

In the given example, the first XML file will change the value of IfsDefaultNamespace. When the second XML file is dropped in, since there is no namespace associated with the root element, AND, the root element represents an Oracle 9iFS class, the parser tries to use the parser associated with the namespace pointed to by the property IfsDefaultNamespace. But such parser has not been defined yet, hence the exception.

There are two workarounds:

  1. Create the property representing the custom parser and namespace first, and then change the value of IfsDefaultNamespace.

  2. Carry out both actions in a single XML file.

Additionally, once the parser gets into this erroneous state, where no more XML files can be parsed, to fix the problem (since there is no way to get to the IfsSimpleXmlParser via the IfsDefaultNamespace), the workaround is to specify the Oracle 9iFS namespace in the XML file that is either trying to reset IfsDefaultNamespace back to its original form, or to add the new property associating the new namespace with the new custom parser. For example:

<?xml version = '1.0' standalone = 'yes'?> <PROPERTYBUNDLE xmlns="http://xmlns.oracle.com/ifs">
<update reftype="valuedefault">XmlParserLookup</update> 
<properties> 
 
<property> 
 
<name>IfsDefaultNamespace</name> 
</property> </properties> </PROPERTYBUNDLE>

In general, if you want to use a namespace-specific parser based on the namespace used in your XML files, you need not change the value of IfsDefaultNamespace. Instead, add a new property whose name is the namespace name and whose value is the intended parser class. The intended use of the property, IfsDefaultNamespace, is to allow people who want to write their own custom parser to handle XML files whose root element is an Oracle 9iFS class, to be able to do so without having to add a namespace to all their XML files. To continue creating Oracle 9iFS objects (such as a PropertyBundle) using XML, their custom parser should have the required functionality to enable it.

DTD Validation

The Oracle 9iFS parser framework lets the XML parser validate your XML file against a Document Type Definition (DTD). A DTD describes the structure of an XML document and specifies various validation rules that the document must follow. If the document does not conform to the expected structure of these rules--for example, a required element is missing--the document is invalid. The DTD information can be embedded in the document itself, or it can reside at a URL; e.g., the Oracle 9iFS system itself.

There is a property called IfsDefaultDTDValidation defined in XmlParserLookup. Oracle 9iFS uses this property to determine whether or not to validate XML documents that are handled by the LiteralDocumentParser. Custom parsers that are registered in the XmlParserLookup property bundle can also use this property to determine whether or not to validate XML files. The default value of IfsDefaultDTDValidation is FALSE; that is, DTD validation is turned off by default.

If the XML parser discovers that a file is invalid, an error is generated that you can trap in a parser callback mechanism or some other piece of an application. Additionally, the protocol server used to upload the file displays an error message.

If the file is not valid, Oracle 9iFS does not store it. The user needs to correct the errors in the file and upload it again.

Registering Parsers

Using Oracle 9iFS Manager, you can register custom parsers created for special applications, and edit or delete parsers. When a parser is added, it is added to the parser registry.

  1. From the Object menu, select Register.

  2. Select Parser Lookup from the Select Object Type dialog and click Register.

    The Parser Lookup Registry Window displays the existing parsers by extension and XML parsers listed.

Figure 6-13 Parser Lookup Registry Window

Text description of 5parsloo.gif follows.

Text description of the illustration 5parsloo.gif

This dialog provides three functions:

Registering a Parser by Extension

If you've created a parser for a particular document type, you will register it by the document extension on the Parser by Extension tab (see Figure 6-14). For example, if you want to enable the ClassSelection parser, you need to register it with any extension with which you want to associate it.

Figure 6-14 Parser Lookup Registry Window: Parser by Extension Tab

Text description of 5parsloo.gif follows.

Text description of the illustration 5parsloo.gif

  1. On the Parser Lookup Registry window, click the Parser by Extension tab.

  2. Click Add on the Parser by Extension tab. The Parser Lookup Entry dialog displays (see Figure 6-15).

  3. Select an extension for the custom parser.

  4. Enter the parser classname and click OK.

  5. Click OK on the Parser Lookup Registry Window to return to the Oracle 9iFS Manager Navigator.

Figure 6-15 Parser Lookup Entry Dialog

Text description of 5crepars.gif follows.

Text description of the illustration 5crepars.gif

Registering an XML Parser

To register an XML parser, use the XML Parser tab on the Parser Lookup Registry window (Figure 6-16):

Figure 6-16 Parser Lookup Registry Window: XML Parser Tab

Text description of 5xmllook.gif follows.

Text description of the illustration 5xmllook.gif

  1. On the Parser Lookup Registry window, click the XML Parser tab.

  2. Select the DTD validation by default box to perform DTD validation by default.

  3. Select the Roundtrip Enabled box to save all comments and unrecognized tags when creating instances of DOCUMENT class or its subclasses, so that this file can be rendered in its original form.

  4. Click Add in the XML Parser box. The XML Parser Lookup Entry dialog displays (Figure 6-17).

  5. Enter a name or an XML namespace for the XML Parser. The name should either be an XML namespace or CustomXmlParser.

  6. Enter a parser classname.

  7. Click OK.

Figure 6-17 XML Parser Lookup Entry Dialog

Text description of 5xmlpars.gif follows.

Text description of the illustration 5xmlpars.gif

Registering an Object Type Lookup by File Extension (for the ClassSelection Parser)

A common way to customizeOracle 9iFS is to create subclasses of Document and add custom attributes to them. You can specify the default Document subclass instance to be created when a document is inserted into the repository, through any Oracle 9iFS protocol. To use this feature, your subclass must be associated with a certain file extension. The ultimate goal is that when a file is inserted into the repository, an instance of the desired subclass is created. Two simple steps are required to invoke this behavior:

Figure 6-18 Parser Lookup Registry Window: Extension to ClassObject Tab

Text description of 5parscla.gif follows.

Text description of the illustration 5parscla.gif

For example, say you have determined a set of custom attributes for the following three subclasses of Document: Presentation, Memo, and Report. You want all .ppt files to become instances of Presentation, all .mem files to become instances of Memo, and all other files to be saved as instances of Report. The first thing to do is to cause all files to invoke the ClassSelectionParser. In this case, all files are designated to invoke the ClassSelectionParser by setting the Key to equal an asterisk, and setting the Value to the ClassSelectionParser's fully qualified name.

Next, the ClassSelectionParser needs to know which subclass to invoke for which file suffix. This key/value bundle is placed in the ObjectTypeLookupByFileExtension property bundle.

With these registrations done, all documents inserted into the repository will be instances of either the MyReport, MyMemo, or MyPresentation class objects.


Note:

ClassSelectionParser registration can be accomplished using the XML parsing framework itself. Detailed instructions on invoking the ClassSelectionParser are included in the Oracle Internet File System Developer Reference.


Deleting a Parsed XML File

If you use "parse on upload" when loading XML files, the XML files are not saved in the system once parsing is complete. To delete the class objects and class instances created, you can delete them through the Web interface if they are foldered. If they are unfoldered, use the Command Line Utility Protocol (CUP):

  1. Login to CUP using the ifsshell command.

  2. Once you are in the shell, issue the following command:

    login system/manager
    ls -class <CLASSNAME> "name='<NAMEOFTHE INSTANCE>'" -attr name
    
    

    The output will contain the name of the instances and their IDs will be in parentheses.

  3. Once you have the ID:

    rm -id <ID>
    
    
  4. Once you have deleted the instances, you can now delete the CLASSOBJECT in the same way. Enter:

    ls -class classobject  "name='<NAMEOFTHE CLASSOBJECT>'" -attr name
    
    

Then:

rm -id <ID OF THE CLASSOBJECT>.

Note that you cannot delete the object unless it has no dependencies. If there are still any instances left, you cannot delete the classobject.

Renderers

A renderer accesses information stored in Oracle 9iFS and outputs the information in a certain format. In a sense, it is the opposite of a parser. While the information output by a renderer may be identical to the document as it was input, it doesn't have to be. Once information has been stored in Oracle 9iFS, it can be rendered in any format the developer defines. For example, a custom XML renderer can perform the following task:

Data can be combined from several documents and displayed as a single, new document. For example, information that is collected from e-mail messages may be displayed dynamically in a Web browser window.

The rendered representation is typically some combination of the following:

The following table lists the Oracle 9iFS standard renderer classes provided out-of-the-box.

Class Description

Simple XML Renderer

Generates a complete XML representation of a LibraryObject.

Content Renderer

Renders the content of a document.

Registering Renderers

Using Oracle 9iFS Manager, you can register and edit custom renderers. When a renderer is added, it is added to the renderer registry.

To add and register a renderer, use the Renderer Lookup Registry window (Figure 6-19):

Figure 6-19 Renderer Lookup Registry Window

Text description of 5renlook.gif follows.

Text description of the illustration 5renlook.gif

  1. From the Object menu, select Register.

  2. Select Renderer Lookup from the Select Object Type dialog.

  3. Click Register. The Renderer Lookup Registry Window displays (see Figure 6-19).

  4. Click Add to add an entry for a custom renderer in the registry.

  5. On the Register Renderer dialog (see Figure 6-20) , enter information in the following fields:

    • Name (required)--The name of the renderer.

    • Operation--The renderer policy key.

    • Implementation Name--The renderer implementation class name.

  6. Select from the Available Classes the classes to be associated with this renderer.

  7. Press the Add button to include the selected classes.

  8. Click OK.

  9. Click OK on the Renderer Lookup Registry Window to return to the Oracle 9iFS Manager Navigator.

Figure 6-20 Register Renderer Dialog

Text description of 5render.gif follows.

Text description of the illustration 5render.gif

Formats (Mimetypes)

Oracle 9iFS associates a format (mimetype) with each document. The format of a document specifies the way the document information is stored, retrieved, and rendered. Internet browsers need to know the format of documents to determine how to store content and index their contents. The format determines:

You can either:

Creating a Format/Mimetype

To create a format or mimetype, use the Create Format dialog (Figure 6-21) :

Figure 6-21 Create Format Dialog

Text description of 5creform.gif follows.

Text description of the illustration 5creform.gif

  1. Using Oracle 9iFS Manager, click the Create button on the toolbar.

  2. Select Format/Mimetype from the Select Object Type dialog. You can also use the Create Like option.

  3. Click Create. The Create Format dialog displays (see Figure 6-21).

  4. Enter information in the following fields:

    • Name (required)--The name of the format/mimetype.

    • Mimetype--Specifies the type of content stored in Oracle 9iFS.

    • Extension--Specifies the default extension to use for storing Oracle 9iFS content as a file.

    • Is Binary--Determines whether the content stored in Oracle 9iFS is of binary type.

    • Is Indexed--Determines whether the content of this format should be indexed in Oracle 9iFS.

  5. Click Create.

Modifying Formats/Mimetypes

  1. In Oracle 9iFS Manager, expand the Formats/Mimetypes folder under Developer's Tasks to display the formats/mimetypes associated with the repository.

  2. Select the format/mimetype to be modified.

  3. On the property sheet, modify the following fields:

    • Mimetype

    • Extension

    • Is Binary

    • Is Indexed

  4. Click Apply.

Deleting Formats/Mimetypes

  1. Select the format/mimetype to be deleted.

  2. Click Delete on the toolbar.

  3. Click Yes at the prompt.

Working with Categories

Categories are new attributes that you can apply to any file or folder in Oracle 9iFS. A category is a package of attributes that you define in Oracle 9iFS Manager. These are then visible to users through the Windows interface. You cannot create an instance of Category; however, you can create a subclass of the Category class. You can then assign a category to a file or edit the attributes of a category using the Windows interface.

Oracle 9iFS lets you define arbitrary metadata, called categories, that you can apply to any file or folder. Previously, extended attributes were based on the type of file: for example, you could add the ReadyForPublication property to all HTML files. Now, with categories, you can define one set of related attributes and then apply them to any file or folder. For example, you could define a category that describes all the information needed in a review process-NextReviewer, ReadyForPublication, and so forth-and then apply them to HTML, GIF, JPG, AVI, or any other files that form your web site.

Out of the box, Oracle 9iFS provides several categories (see Figure 6-22, "Out-of-the-box Categories"):

Figure 6-22 Out-of-the-box Categories

Text description of 5catob.gif follows.

Text description of the illustration 5catob.gif

Using Oracle interMedia Annotator, Oracle 9iFS automatically extracts color depth, play length, closed caption text, and other types of information encoded in audio, video, and image files, then makes this information into searchable and editable attributes of these files.

This feature requires that the Oracle Text option for Oracle 9iFS is enabled.

Subclassing a Category Class

If you subclass one of these existing categories, the subclass inherits the attributes and behavior of that category.

You can always subclass an existing class to add attributes. To create a subclass of Category, attributes are added to the class. To create an instance of a Category, use a CategoryDefinition.

For more information on subclassing, see the Oracle Internet File System Developer Reference.

The ACL of a category cannot be altered directly. The ACL of a category is derived from the associated public object; therefore, you must alter the ACL of that public object.

InterMedia Annotator Overview

The most efficient way to make use of the various characteristics of different file types is to obtain metadata automatically. You can then use the custom attributes to search and perform other custom processing to certain types of files with minimal user intervention.

Previously, to extract existing metadata from multimedia files, you were required to write your own parser to extract this data and associate the parser with the appropriate file extension. In fact, this is still the preferred strategy for dealing with exotic file types. However, for the majority of multimedia files, you can use the automatic metadata extraction capability built into Oracle 9iFS.

A set of categories has been pre-defined for multimedia files, and special handling has been added so that when audio, video, and image files are inserted into the repository, the metadata accompanying these files is extracted and used to populate categories for these files. To perform this "offline" extraction of metadata, the interMediaAnnotator agent identifies new multimedia content and invokes the appropriate interMedia Annotator parsing engine.

Oracle 9iFS uses only a subset of the capabilities of interMedia. For more information on the rich content capabilities of interMedia, consult the interMedia Java Classes User's Guide and Reference.

NOTE: In case you want to disable this automatic extraction of multimedia metadata, you can halt the interMediaAnnotator agent.

Metadata Embedded in Multimedia Files

Examples of typical multimedia metadata include the number of colors in an image, the sound quality in an audio file, and the compression format for a video file. Using Oracle 9iFS, you can extract extra metadata that exists in many multimedia file formats and associate that metadata with Oracle 9iFS files. By associating the metadata with Oracle 9iFS, it becomes searchable using the Oracle 9iFS API. The text track; for example, closed captioning for a video, may be extracted and searched.

Viewing Multimedia Categories

Using Oracle 9iFS Manager, you can search on categories then use the Property Inspector to view the attributes of the category (see Figure 6-23, "Property Inspector: Categories Tab").

Figure 6-23 Property Inspector: Categories Tab

Text description of 5picats.gif follows.

Text description of the illustration 5picats.gif

Categories are also visible from a Windows client machine with the Oracle 9iFS Utilities for Release 9.0.1 (see Figure 6-24, "Add a Category to a File with the Oracle 9iFS Utilities").

Figure 6-24 Add a Category to a File with the Oracle 9iFS Utilities

Text description of 5addcat.gif follows.

Text description of the illustration 5addcat.gif

Using interMedia Categories

Because they are based on the Category class, you can use these metadata objects the same way you use categories.

Text Captioning Closed. Caption text tracks accompanying a video or audio file are extracted using this same process.

Searching on Extracted Text. This integration facilitates Oracle Text indexing on any text track present in the multimedia content, so you do not have to modify code to benefit from this enhancement.

The Oracle 9iFS repository. Identifies files containing multimedia content recognized by the interMedia Annotator. Using the interMediaAnnotatorAgent, interMedia Annotator components are invoked to parse these files and the resulting metadata is associated with those Oracle 9iFS documents.


Go to previous page Go to next page
Oracle
Copyright © 1999, 2002 Oracle Corporation.

All Rights Reserved.
Go To Table Of Contents
Contents
Go To Index
Index