Activator.java 1.06 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  org.apache.tika.parser.Parser
 *  org.osgi.framework.BundleActivator
 *  org.osgi.framework.BundleContext
 *  org.osgi.framework.ServiceRegistration
 */
package com.adobe.internal.pdf.tika;

import com.adobe.internal.pdf.tika.GibsonParser;
import java.util.Dictionary;
import java.util.Hashtable;
import org.apache.tika.parser.Parser;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;

public class Activator
implements BundleActivator {
    private ServiceRegistration parserService;

    public void start(BundleContext context) throws Exception {
        Hashtable<String, Integer> properties = new Hashtable<String, Integer>();
        properties.put("service.ranking", 100);
        this.parserService = context.registerService(Parser.class.getName(), (Object)new GibsonParser(), properties);
    }

    public void stop(BundleContext context) throws Exception {
        this.parserService.unregister();
    }
}