Este contenido no está disponible en el idioma seleccionado.
Chapter 8. ChangeSets
8.1. Changesets Copiar enlaceEnlace copiado en el portapapeles!
Copiar enlaceEnlace copiado en el portapapeles!
The changeset feature facilitates the building of knowledge bases without using the API. Changesets can include any number of resources. They can also support additional configuration information, which currently is only needed for decision tables.
The file
changeset.xml contains a list of resources for this. It can also point recursively to another changeset XML file.
8.2. Changeset Example Copiar enlaceEnlace copiado en el portapapeles!
Copiar enlaceEnlace copiado en el portapapeles!
A resource approach is employed that uses a prefix to indicate the protocol. All the protocols provided by
java.net.URL, such as "file" and "http", are supported, as well as an additional "classpath". Currently the type attribute must always be specified for a resource, as it is not inferred from the file name extension. This is demonstrated in the example below:
The above example can be used by changing the resource type to
CHANGE_SET:
8.3. ChangeSet XML Example Copiar enlaceEnlace copiado en el portapapeles!
Copiar enlaceEnlace copiado en el portapapeles!
This is an example of a basic ChangeSet XML schema:
8.4. ChangeSet Protocols Copiar enlaceEnlace copiado en el portapapeles!
Copiar enlaceEnlace copiado en el portapapeles!
The ChangeSet supports all the protocols provided by java.net.URL, such as "file" and "http", as well as an additional "classpath". The type attribute must always be specified for a resource, as it is not inferred from the file name extension.
Use the
file: prefix to signify the protocol for the resource.
Note
When using XML schema, the Class Loader will default to the one used by the Knowledge Builder unless the ChangeSet XML is itself loaded by the ClassPath resource, in which case it will use the Class Loader specified for that resource.
8.5. Loading the ChangeSet XML Copiar enlaceEnlace copiado en el portapapeles!
Copiar enlaceEnlace copiado en el portapapeles!
Procedure 8.1. Task
- Use the API to load your ChangeSet.
- Use this code to access the ChangeSet XML:
kbuilder.add( ResourceFactory.newUrlResource( url ), ResourceType.CHANGE_SET );
kbuilder.add( ResourceFactory.newUrlResource( url ), ResourceType.CHANGE_SET );Copy to Clipboard Copied! Toggle word wrap Toggle overflow
8.6. ChangeSet XML with Resource Configuration Example Copiar enlaceEnlace copiado en el portapapeles!
Copiar enlaceEnlace copiado en el portapapeles!
This example shows you how to incorporate resource configuration in your ChangeSet:
8.7. ChangeSet XML and Directories Copiar enlaceEnlace copiado en el portapapeles!
Copiar enlaceEnlace copiado en el portapapeles!
The following code allows you to add a directory's contents to the ChangeSet:
Note
Currently it is expected that all resources in that folder are of the same type. If you use the Knowledge Agent it will provide a continuous scanning for added, modified or removed resources and rebuild the cached Knowledge Base.