Package org.apache.shindig.gadgets.parse.caja

Examples of org.apache.shindig.gadgets.parse.caja.CajaHtmlParser$Serializer


   *
   * @param conf Configuration to use
   * @return A new, configured, Serializer
   */
  public Serializer createSerializer(Configuration conf) {
    Serializer serializer = ReflectionUtils.newInstance(serializerClass, conf);
    SerDes.initSerializer(serializer, conf, columnInfo, serializerParams);
    return serializer;
  }
View Full Code Here


    OutputInfo oti = outputConf.readOutputTableInfo();

    HiveUtils.setRCileNumColumns(conf, oti.getColumnInfo().size());
    HadoopUtils.setOutputKeyWritableClass(conf, NullWritable.class);

    Serializer serializer = oti.createSerializer(conf);
    HadoopUtils.setOutputValueWritableClass(conf,
        serializer.getSerializedClass());

    org.apache.hadoop.mapred.OutputFormat baseOutputFormat =
        ReflectionUtils.newInstance(oti.getOutputFormatClass(), conf);
    // CHECKSTYLE: stop LineLength
    org.apache.hadoop.mapred.RecordWriter<WritableComparable, Writable> baseWriter =
View Full Code Here

    HiveOutputFormat<?, ?> hiveOutputFormat = null;
    Class<? extends Writable> outputClass = null;
    boolean isCompressed = conf.getCompressed();
    TableDesc tableInfo = conf.getTableInfo();
    try {
      Serializer serializer = (Serializer) tableInfo.getDeserializerClass().newInstance();
      serializer.initialize(null, tableInfo.getProperties());
      outputClass = serializer.getSerializedClass();
      hiveOutputFormat = conf.getTableInfo().getOutputFileFormatClass().newInstance();
    } catch (SerDeException e) {
      throw new HiveException(e);
    } catch (InstantiationException e) {
      throw new HiveException(e);
View Full Code Here

  public void setUp() throws Exception {
    super.setUp();

    DOMImplementation dom = new ParseModule.DOMImplementationProvider().get();
    GadgetHtmlParser neko =  new NekoSimplifiedHtmlParser(dom);
    GadgetHtmlParser caja =  new CajaHtmlParser(dom);

    // FIXME: Caja has trouble with the NekoSimplifiedHtmlParser
    // Disabling neko for now
    parsers = ImmutableList.of(/*neko, */caja);

 
View Full Code Here

  @Before
  public void setUp() {
    super.setUp();
    ParseModule.DOMImplementationProvider domImpl =
        new ParseModule.DOMImplementationProvider();
    htmlParser = new CajaHtmlParser(domImpl.get());
  }
View Full Code Here

  @Before
  public void setUp() {
    rewriter = new BaseTagRemoverRewriter();
    domImpl = new ParseModule.DOMImplementationProvider();
    parser = new CajaHtmlParser(domImpl.get());
  }
View Full Code Here

    super.setUp();
    injector = Guice.createInjector(
        new PropertiesModule(), new DefaultGuiceModule(), new OAuthModule());
    ParseModule.DOMImplementationProvider domImpl =
        new ParseModule.DOMImplementationProvider();
    htmlParser = new CajaHtmlParser(domImpl.get());
    serializer = new CajaHtmlSerializer();
    ContainerConfig config = new FakeContainerConfig(injector.getInstance(ContainerConfig.class));
    proxyUriManager = new DefaultProxyUriManager(config, null);
  }
View Full Code Here

  public void setUp() throws Exception {
    doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
    GadgetHtmlParser neko = new NekoSimplifiedHtmlParser(
            new ParseModule.DOMImplementationProvider().get());

    GadgetHtmlParser caja = new CajaHtmlParser(
            new ParseModule.DOMImplementationProvider().get());

    parsers = ImmutableList.of(neko, caja);
  }
View Full Code Here

    featureConfig = EasyMock.createMock(ContentRewriterFeature.Config.class);

    ProxyUriManager proxyUriManager = new DefaultProxyUriManager(config, null);
    rewriter = new ImageResizeRewriter(proxyUriManager, factory);
    domImpl = new ParseModule.DOMImplementationProvider();
    parser = new CajaHtmlParser(domImpl.get());
    EasyMock.expect(factory.get(EasyMock.isA(HttpRequest.class))).andReturn(featureConfig).anyTimes();
    EasyMock.expect(factory.get(EasyMock.isA(GadgetSpec.class))).andReturn(featureConfig).anyTimes();
    EasyMock.expect(config.getString(CONTAINER, DefaultProxyUriManager.PROXY_HOST_PARAM))
        .andReturn("shindig.com").anyTimes();
    EasyMock.expect(config.getString(CONTAINER, DefaultProxyUriManager.PROXY_PATH_PARAM))
View Full Code Here

  public void setUp() throws Exception {
    super.setUp();

    DOMImplementation dom = new ParseModule.DOMImplementationProvider().get();
    GadgetHtmlParser neko =  new NekoSimplifiedHtmlParser(dom);
    GadgetHtmlParser caja =  new CajaHtmlParser(dom);

    // FIXME: Caja has trouble with the NekoSimplifiedHtmlParser
    // Disabling neko for now
    parsers = ImmutableList.of(/*neko, */caja);

 
View Full Code Here

TOP

Related Classes of org.apache.shindig.gadgets.parse.caja.CajaHtmlParser$Serializer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.