58 Remapping

If you plan to publish from a source system whose schema differs from the default schema defined by the Content Integration Platform, you will have to update the flex family corresponding to the source system and possibly mappings.xml , depending on how the schema differ.

This chapter contains the following sections:

58.1 When to Remap

A commonly made schema change is adding a new attribute or attributes. For remapping procedures for adding a new attribute, see Section 58.2.1, "File Systems" or Section 58.2.2, "Microsoft SharePoint Systems" as necessary.

Note:

Procedures in the rest of this chapter call for updates to the default mappings.xml file and the default flex families, both supplied as part of the Content Integration Platform. If you wish to create your own flex family, see the Oracle Fusion Middleware WebCenter Sites Developer's Guide for instructions. When creating your own flex family, keep in mind the source system's default flex family as a model. Basic procedures for remapping to a custom flex family remain the same (except for the names you choose for the family and its members).If you create flex filters (for either a default flex family or a custom flex family), makes sure to add the corresponding jar files to both the WebCenter Sites and the Sites Agent Services applications.

58.2 Remapping Procedures

This section contains the following topics:

58.2.1 File Systems

If you create new attributes for documents of type Document and wish to propagate the attributes to WebCenter Sites, you must update the FileSystem flex family with the new attributes. You must also update mappings.xml if the new attributes will be named differently on the WebCenter Sites side. (A list of default attributes and document types is available in Chapter 60, "File Systems: Default Mapping Specifications."

To update the flex family and mappings.xml

  1. Stop the Content Integration Agent.

  2. Follow the remapping procedures in Table 58-1, "Remapping File System Schema". For descriptions of tags and parameters, see Table 58-2, "Mapping File System Data to Oracle WebCenter Sites".

  3. Test your changes by running a publishing session. For instructions, see Chapter 56, "Publishing."

Table 58-1 Remapping File System Schema

File System WebCenter Sites Content Integration Agent: mappings.xml

If you add a new attribute.

Create a FileSystem Attribute asset.

Create the attribute in the FileSystem flex family and assign the attribute to the relevant asset type definition. For instructions, see Section 59.1, "Adding a New Attribute" and take note of the Value fields in step 5.

Map the new attribute in mappings.xml only if the attribute is named differently on the WebCenter Sites side. Map the attribute within the <descriptor-mapping> tag, and nest the tag in the relevant object type mapping (example below).

For example, CreationDate

Example fs_CreationDate

In this example, the CreationDate attribute belongs to the Document file type. Nest the attribute in the Document type mapping.

<assettype-mappingsourceid="Document"targetid="FileSystem_Document;fs_document"id="fs_document"><descriptor-mappingsourceid="CreationDate"targetid="fs_CreationDate"type="static" />

</assettype-mapping>


Tags and Parameters for Mapping File System Data to Oracle WebCenter Sites

<assettype-mappingsourceid="FileType" targetid="ChildAssetType|ParentAssetType; 
      ChildDefinitionInstance|ParentDefinitionInstance" id="assettypeMappingID">
  <descriptor-mappingsourceid="FileSystemAttribute" targetid="CSAttribute"/>
</assettype-mapping>

Table 58-2 Mapping File System Data to Oracle WebCenter Sites

Tag Parameter Parameter Description

assettype-mapping

sourceid

Specifies the type of document that will be published.

Legal values: Document | Folder

assettype-mapping

targetid

WebCenter Sites' counterpart to sourceid.

For document objects, targetid takes the following value:

ChildAssetType;ChildDefinitionInstance

  • ChildAssetType : Stores file system documents.

Default value: FileSystem_Document

  • ChildDefinitionInstance :

  • Asset of type FileSystem Child Definition.

  • Defines the type of document that will be stored in ChildAssetType.

Default value: fs_document

Sample value: pdfDoc

Example:

If sourceid="pdfDoc" then targetid could be targetid="FileSystem_Document;fs_pdfDoc"

that is, the (child) asset type named FileSystem_Document stores documents of type fs_pdfDoc.

Note: If you were to map a folder type, targetid would take the following value:

ParentAssetType;ParentDefinitionInstance

  • ParentAssetType :

  • Stores file system folders.

Default value: FileSystem_Folder

  • ParentDefinitionInstance :

  • Asset of type FileSystem Parent Definition.

  • Defines the type of folder that will be stored in ParentAssetType.

Default value: fs_folder

For more information about the FileSystem flex family, see Chapter 60, "File Systems: Default Mapping Specifications."

assettype-mapping

id

Unique value that identifies the asset type mapping.

descriptor-mapping

sourceid

Attribute's name in the file system.

descriptor-mapping

targetid

Attribute's name in WebCenter Sites.


58.2.2 Microsoft SharePoint Systems

If you add new attributes and/or document types for the documents you will publish, you must update the SharePoint flex family accordingly. You may also have to update mappings.xml, as explained in this section. (A list of default attributes and document types is available in Chapter 60, "File Systems: Default Mapping Specifications."

To modify the flex family and mappings.xml

  1. Stop the Content Integration Agent.

  2. Follow the remapping procedures in Table 58-3, "Remapping Microsoft SharePoint Schema". For descriptions of tags and parameters, see Table 58-4, "Mapping Microsoft SharePoint Data to Oracle WebCenter Sites"

  3. Test your changes by running a publishing session. For instructions, see Chapter 56, "Publishing."

Table 58-3 Remapping Microsoft SharePoint Schema

MS SharePoint WebCenter Sites Content Integration Agent: mappings.xml

If you add a new attribute.

Create a SharePoint Attribute asset.Create the attribute in the SharePoint flex family and assign the attribute to the relevant asset type definition.

For instructions, see Section 59.1, "Adding a New Attribute" and take note of the Value fields in step 5.

Map the new attribute in mappings.xml only if the attribute is named differently on the WebCenter Sites side. Map the attribute within the <descriptor-mapping> tag, and nest the tag in the relevant object type mapping (example below).

For example, CreationDate

sp_CreationDate

In this example, the CreationDate attribute belongs to the Document content type. Nest the attribute in the Document type definition.

<assettype-mapping sourceid="Document" targetid="SharePoint_Document;sp_document" id="sp_PDF" extends="sp_item"><descriptor-mappingsourceid="CreationDate"targetid="sp_CreationDate"/></assettype-mapping>

If you add a new document type.

Create a SharePoint Child Definition asset.For instructions on creating child definition assets, see Chapter 59, "Adding Assets to a Flex Family."

Map the new document type in mappings.xml , using the <assettype-mapping> tag.

For example, PDF

sp_PDF

<assettype-mapping sourceid="PDF" targetid="SharePoint_Document;sp_PDF"id="sp_PDF" extends="sp_item"></assettype-mapping>

If you add a new attribute and new document type.

  1. Create a SharePoint Attribute asset.

    Create the attribute in the SharePoint flex family. For instructions, see Chapter 59, "Adding Assets to a Flex Family" and take note of the Value fields in step 5 of Section 59.1, "Adding a New Attribute."

  2. Create a SharePoint Child Definition asset.

    When creating the child definition asset, assign the new attribute to the asset. For instructions, see Chapter 59, "Adding Assets to a Flex Family."

  1. Map the new document type in mappings.xml , using the <assettype-mapping> tag (example below).

  2. Map the new attribute in mappings.xmlonly if the attribute is named differently on the WebCenter Sites side. Map the attribute within the <descriptor-mapping> tag, and nest the tag in the relevant object type mapping (example below).

For example, Attribute:

CreationDate

New Document type:

PDF

Attribute:

sp_CreationDate

New Document type:

sp_PDF

<assettype-mapping

sourceid="PDF" targetid="SharePoint_Document;sp_PDF"

id="sp_PDF" extends="sp_item">

<descriptor-mapping

sourceid="CreationDate"

targetid="sp_CreationDate" />

</assettype-mapping>

If you add a new picture type.

Mapping a new picture type is analogous to mapping a document type. The targetid parameter takes the value SharePoint_Document;

<ChildDefinitionInstance>

 

58.2.2.1 Tags and Parameters for Mapping Microsoft SharePoint Data to Oracle WebCenter Sites

<assettype-mappingsourceid="SharePointContentType"
      targetid="ChildAssetType|ParentAssetType; 
      ChildDefinitionInstance|ParentDefinitionInstance" 
      id="assettypeMappingID" extends="sp_item">
   <descriptor-mappingsourceid="SharePointAttribute" targetid="CSAttribute"/>
</assettype-mapping>

Table 58-4 Mapping Microsoft SharePoint Data to Oracle WebCenter Sites

Tag Parameter Parameter Description

assettype-mapping

sourceid

Specifies the type of content that will be published.

Default value: Document | Picture | Folder

assettype-mapping

targetid

WebCenter Sites' counterpart to sourceid.

For document and picture objects, targetid takes the following value:

ChildAssetType;ChildDefinitionInstance

ChildAssetType: Stores SharePoint documents and pictures.

Default value: SharePoint_Document

ChildDefinitionInstance

Asset of type SharePoint Child Definition.

Defines the type of document (or picture) that will be stored in ChildAssetType.

Default value: sp_document | sp_picture

Sample values: pdfDoc

Example:

If sourceid="pdfDoc", then targetid could be targetid="SharePoint_Document;sp_pdfDoc"

that is, the (child) asset type named SharePoint_Document stores documents of type sp_pdfDoc.

Note: If you were to map a folder type, targetid would take the following value:

ParentAssetType;ParentDefinitionInstance

ParentAssetType: Stores SharePoint folders

Default value: SharePoint_Folder

ParentDefinitionInstance:

Asset of type SharePoint Parent Definition.

Defines the type of folder that will be stored in ParentAssetType.

Default value: sp_folder

For more information about the SharePoint flex family, see Chapter 60, "File Systems: Default Mapping Specifications."

assettype-mapping

id

Unique value that identifies the asset type mapping.

By default, assettypeMappingID takes the following values:

sp_document | sp_picture | sp_folder

The extends parameter is a pointer to the mapping id for the next higher-level object in the schema hierarchy. Because the Microsoft SharePoint content model requires that content types always have item defined as one of their top-level objects, the extends parameter will always be used, although it is not technically a required field. Including the extends parameter allows attributes defined in parent types to be inherited by child types, starting at the item level. By default: extends=sp_item

descriptor-mapping

sourceid

Attribute's name in the Microsoft SharePoint system.

descriptor-mapping

targetid

Attribute's name in WebCenter Sites.