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 sink 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<?> sinkType)
      • Exports

        public Exports​(String sinkType)
    • Method Detail

      • addExport

        public void addExport​(Export export)
      • getSinkTypes

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

        public boolean hasExports()
      • getExport

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

        public Sink[] createSinks()
      • extractSinks

        public static List<Object> extractSinks​(Sink[] sinks,
                                                Exports exports)
        Will return the Objects contained in the sinks array. If the corresponding Export for that sink type was configured with an extract property only that portion of the sink will be returned.
        Parameters:
        sinks - The sinks produced by a Smooks filtering operation.
        exports - The exports.
        Returns:
        List Either the sinks 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.