Examples of Serializer


Examples of org.apache.axis2.databinding.Serializer

                DeserializerFactory dser = tmr.getDeserializerFactory(type);
                elDesc.setDeserializerFactory(dser);
            }

            if (elDesc.getRawSerializer() == null) {
                Serializer ser = tmr.getSerializer(type);
                elDesc.setSerializer(ser);
            }

            if (addDesc)
                desc.addField(elDesc);
View Full Code Here

Examples of org.apache.clerezza.rdf.core.serializedform.Serializer

                IOUtils.write(EntityToJSON.toJSON(rep).toString(4), entityStream,encoding);
            } catch (JSONException e) {
                throw new WebApplicationException(e, Status.INTERNAL_SERVER_ERROR);
            }
        } else { // RDF
            Serializer ser = ContextHelper.getServiceFromContext(Serializer.class, servletContext);
            ser.serialize(entityStream, EntityToRDF.toRDF(rep), mediaTypeString);
        }
       
    }
View Full Code Here

Examples of org.apache.cocoon.serialization.Serializer

     */
    public InputStream getInputStream()
    throws IOException {

        ComponentSelector serializerSelector = null;
        Serializer serializer = null;
        try {

            serializerSelector = (ComponentSelector) this.manager.lookup(Serializer.ROLE + "Selector");
            serializer = (Serializer)serializerSelector.select("xml");
            ByteArrayOutputStream os = new ByteArrayOutputStream();
            serializer.setOutputStream(os);

            this.toSAX(serializer);

            return new ByteArrayInputStream(os.toByteArray());
        } catch (ComponentException cme) {
View Full Code Here

Examples of org.apache.directmemory.serialization.Serializer

            g.writeNumberField( DirectMemoryConstants.EXPIRES_IN_FIELD_NAME, request.getExpiresIn() );

            // FIXME take care of NPE
            // cache content generation
            Serializer serializer = request.getSerializer();
            // if no Object users are able to pass a string content
            byte[] bytes = request.getObject() != null
                ? request.getSerializer().serialize( request.getObject() )
                : request.getCacheContent();

            g.writeFieldName( DirectMemoryConstants.CACHE_CONTENT_FIELD_NAME );
            g.writeBinary( bytes );

            if ( serializer != null )
            {
                g.writeStringField( DirectMemoryConstants.SERIALIZER_FIELD_NAME, serializer.getClass().getName() );
            }

            g.writeEndObject();
            g.close();
        }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.Serializer

    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

Examples of org.apache.hadoop.io.serializer.Serializer

        os.writeInt(inputIndex);
        writeObject(targetOps, os);
        os.writeInt(wrappedSplits.length);
        os.writeUTF(wrappedSplits[0].getClass().getName());
        SerializationFactory sf = new SerializationFactory(conf);
        Serializer s =
            sf.getSerializer(wrappedSplits[0].getClass());
        s.open((OutputStream) os);
        for (int i = 0; i < wrappedSplits.length; i++)
        {
            // The correct call sequence for Serializer is, we shall open, then serialize, but we shall not close
            s.serialize(wrappedSplits[i]);
        }
       
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.io.Serializer

                return artifacts;
            }
        }

        // add extra
        Serializer ser = new DocViewSerializer(aggregate);
        artifacts.add(parent, name, ext, type, ser, 0);

        // add binaries
        Collection<Property> bins = aggregate.getBinaries();
        if (bins != null && !bins.isEmpty()) {
View Full Code Here

Examples of org.apache.muse.core.serializer.Serializer

                                              Class type,
                                              QName qname)
        throws SoapFault
    {
        SerializerRegistry registry = SerializerRegistry.getInstance();
        Serializer ser = registry.getSerializer(type);       
        Element[] xml = new Element[properties.length];
       
        for (int n = 0; n < properties.length; ++n)
            xml[n] = ser.toXML(properties[n], qname);
       
        return xml;
    }
View Full Code Here

Examples of org.apache.ode.bpel.o.Serializer

     */
    private CBPInfo loadCBPInfo(File f) {
        InputStream is = null;
        try {
            is = new FileInputStream(f);
            Serializer ofh = new Serializer(is);
            CBPInfo info = new CBPInfo(ofh.type,ofh.guid,f);
            return info;
        } catch (Exception e) {
            throw new ContextException("Couldn't read compiled BPEL process " + f.getAbsolutePath(), e);
        } finally {
View Full Code Here

Examples of org.apache.ode.bpel.rapi.Serializer

     * @throws java.io.IOException
     * @throws ClassNotFoundException
     */
    private ProcessModel deserializeCompiledProcess(InputStream is) throws IOException, ClassNotFoundException {
        ProcessModel compiledProcess;
        Serializer ofh = new Serializer(is);
        compiledProcess = (ProcessModel) ofh.readPModel();
        return compiledProcess;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.