Class Exports

  • All Implemented Interfaces:
    ContentHandler

    public class Exports
    extends Object
    implements ContentHandler
    An Exports instance holds a Map of Exports that Smooks produces/exports.

    The map uses the type of of result as its key and the Export as its value.
    Since:
    1.4
    Author:
    Daniel Bevenius
    • Constructor Detail

      • Exports

        public Exports()
      • Exports

        public Exports​(Export export)
      • Exports

        public Exports​(Set<Export> exportTypes)
      • Exports

        public Exports​(Class<?> resultType)
      • Exports

        public Exports​(String resultType)
    • Method Detail

      • addExport

        public void addExport​(Export export)
      • getResultTypes

        public Set<Class<?>> getResultTypes()
      • hasExports

        public boolean hasExports()
      • getExport

        public Export getExport​(Class<?> type)
      • createResults

        public Result[] createResults()
      • extractResults

        public static List<Object> extractResults​(Result[] results,
                                                  Exports exports)
        Will return the Objects contained in the results array. If the corresponding Export for that result type was configured with an extract property only that portion of the result will be returned.
        Parameters:
        results - The results produced by a Smooks filtering operation.
        exports - The exports.
        Returns:
        List Either the results unchanged if no 'extract' was configured or if an 'extract' was configured in the corresponding Export then only the object identified will be returned in the list of objects.