Bulkloader Guide
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The BulkLoader is a command-line application that is capable of loading content and metadata into a configured virtual content repository. The BulkLoader scans the user defined file system hierarchy and loads all of the folders and files, along with their defined metadata into the specified repository. The BulkLoader supports all content types, such as HTML
, .jpg
, or .gif
.
Note: You cannot use the BulkLoader to load content into a BEA repository if library services have been enabled for that repository.
This document contains information on the following subjects:
The following sequence describes how the BulkLoader locates files:
Note: If the file or folder is not an absolute path, then it is assumed to be relative to the content root specified by the -d
option.
Note: If it is a hidden file (or folder) and the +hidden
option was not specified, then the file or folder is ignored.
Note: The -match
and -ignore
options only apply to files and folders not listed on the command line; in other words, they apply only to those found by recursing into a folder. The patterns specified with the -match
and -ignore
options (and the -htmlPat
options, for that matter) should be DOS-style patterns: '*'
matches any set of characters, '?'
matches any one character. Sets of characters (for example, [aceg]
) are not supported.
Note: Files with an extension matching the extension specified by -mdext
(.md.properties
by default) are always ignored.
<mdext>
where <mdext>
is the extension specified by the -mdext
option. The default filename it looks for is dir.md.properties
. If this file exists and is readable by the user, the BulkLoader loads it as a Java-style properties file of name=value properties. If the folder is actually a subfolder entered because +recurse was not specified and the +inheritProps
option is not specified, then the properties from dir.md.properties
is added to the properties from the parent folders. All files in the folder and all files in any subfolder gain these metadata properties.-mdext
extension. So, for example, if the file is called image.gif
, the BulkLoader looks for a file called image.gif.md.properties
. In order to load a file as a content node, the nodeType must be specified in the metadata. This may either be inherited from the folder md.properties, or specified in the file md.properties
. The file along with the metadata to create must adhere to the rules defined in the specified nodeType. For example, if the node type specifies that a property named "author" is required, then there must be a metadata property named author with a value.+metaparse
option was not specified, then the BulkLoader parses the HTML, looking for <meta>
tags and <title>
tags. The BulkLoader determines if a file is an HTML file by using the filename patterns specified by the -htmlPat
options. If no -htmlPat
patterns are specified, then *.htm
and *.html
are used. The BulkLoader loads into the file's properties any <meta>
tags that contain name and content values found anywhere in the file (not just in the HTML head section). Additionally, it pulls the title from the <title></title> and set it as "title".-filter
option). The LoaderFilter may assign additional metadata to the file. When the BulkLoader starts up, it looks for a content\com\bea\content\loader\bulk
file in the classpath. From that, it looks for a loader.defFilters
property. This is the colon-separated list of LoaderFilter class names the BulkLoader should always load. Unless that file is modified, the BulkLoader will load an ImageLoaderFilter, which will pull the width and height from *.gif
, *.jpg
, *.png
, and *.xbm
image files.In summary, the BulkLoader gathers metadata for a document from the following sources (in this order):
dir.md.properties
file.dir.md.properties
file..md.properties
file.<meta>
tags.
To load content with the Bulkloader:
Content Types define the available values for a given property, including whether it can contain multiple values. When you create a content type, you are creating a corresponding md.properties
file for that piece of content.
For example, If you create a content type for a specific piece of content, such as logo.gif
, your metadata file is logo.gif.md.properties
. if you create metatdata for a directory that contains several content files, your metadata file is dir.md.properties
. The dir.md.properties
file defines properties that can be inherited by children but can be overridden by md.properties
files for specific content.
In a later step, you will configure the individual properties (metadata) for your content types.
For more information about configuring a repository and creating conent types, see the documetation for the Administration Portal.
Note: This directory should eventually contain only the content you want loaded because in a later step, you will point the Bulkloader to this directory, and it will load everything in it.
dir.md.properties
file for a directory full of content, you simply point the file to the correct content type. For examplemd.properties
file for a specific piece of content, you will have to ad more specific metadata information. For example:@ECHO OFF
REM #########################################################################
REM # (c) BEA SYSTEMS INC. All rights reserved
REM #
REM ##########################################################################
SETLOCAL
SET PLATFORM_HOME=C:\bea\weblogic81
FOR %%i IN ("%PLATFORM_HOME%") DO SET PLATFORM_HOME=%%~fsi
SET PORTAL_HOME=%PLATFORM_HOME%\portal
SET P13N_HOME=%PLATFORM_HOME%\p13n
CALL %PLATFORM_HOME%\common\bin\commEnv.cmd
@rem **************************************************************************
@rem Set any additional CLASSPATH information below
@rem **************************************************************************
setCLASSPATH=%POINTBASE_CLASSPATH%;%WEBLOGIC_CLASSPATH%;%P13N_HOME%\lib\p13n_system.jar;%PORTAL_HOME%\lib\content.jar;%PORTAL_HOME%\lib\content_system.jar;%CLASSPATH%
REM Set some defaults
if "%CM_DATA%"=="" set CM_DATA=..\db\data\sample\cm_data
%JAVA_HOME%\bin\java -classpath %CLASSPATH% com.bea.content.loader.bulk.BulkLoader -verbose -repository "BEA Repository" -application portalApp -d %CM_DATA% Ads%*
ENDLOCAL
![]() |
![]() |
![]() |