Examples of Marshaller


Examples of org.exolab.castor.xml.Marshaller

      writer.println( "Query result: " + results.next() );
    }
    writer.println( "Commit transaction" );
    db.commit();

    Marshaller     marshaller;

    marshaller = new Marshaller( writer );
    marshaller.setMapping( _mapping );

    db.begin();
    marshaller.marshal( db.load( Product.class, new Integer( 4 ) ) );
    computerOql = db.getOQLQuery( "SELECT c FROM myapp.Computer c" );
    results = computerOql.execute();
    while( results.hasMore() )
      marshaller.marshal( results.next() );
    db.commit();

    db.close();
  }
View Full Code Here

Examples of org.exolab.castor.xml.Marshaller

   
    try
    {
      mis = JRLoader.getLocationInputStream(MAPPING_FILE);

      Marshaller marshaller = new Marshaller(writer);

      Mapping mapping = new Mapping();
      mapping.loadMapping(
        new InputSource(mis)
        );
      marshaller.setMapping(mapping);

      marshaller.marshal(settings);
    }
    catch (IOException e)
    {
      throw new JRRuntimeException(e);
    }
View Full Code Here

Examples of org.hudsonci.utils.marshal.Marshaller

        File dir = getRoot();
        return (dir != null) ? new File(dir, path) : new File(path);
    }

    protected Marshaller getMarshaller(final XReference ref) {
        Marshaller m = ref.getMarshaller();
        if (m == null) {
            m = marshaller;
        }
        return m;
    }
View Full Code Here

Examples of org.infinispan.commons.marshall.Marshaller

      this.configuration = ctx.getConfiguration();
   }

   @Override
   public void start() throws PersistenceException {
      final Marshaller marshaller;
      if (configuration.marshaller() != null) {
         marshaller = Util.getInstance(configuration.marshaller(), ctx.getCache().getCacheConfiguration().classLoader());
      } else if (configuration.hotRodWrapping()) {
         marshaller = new HotRodEntryMarshaller(ctx.getByteBufferFactory());
      } else if (configuration.rawValues()) {
View Full Code Here

Examples of org.infinispan.marshall.Marshaller

         return super.visitPutKeyValueCommand(ctx, command);
      }

      private String unmarshall(Object key) throws Exception {
         Marshaller marshaller = new JBossMarshaller();
         return (String) marshaller.objectFromByteBuffer(((ByteArrayKey) key).getData());
      }
View Full Code Here

Examples of org.jboss.as.console.mbui.marshall.Marshaller

        window.center();
    }

    public void marshall(final Sample sample)
    {
        Marshaller m = new Marshaller();
        ModelNode node = m.marshall(sample.getDialog());


        HTMLPanel htmlPanel = new HTMLPanel("<pre>"+node.toString()+"</pre>");
        htmlPanel.setStyleName("fill-layout-width");
View Full Code Here

Examples of org.jboss.cache.marshall.Marshaller

    * nothing injected, nothing specified in Configuration.  Should use default factory.
    */
   public void testConstructionOrder1()
   {
      Class<Marshaller> componentToTest = Marshaller.class;
      Marshaller m = cr.getOrCreateComponent(null, componentToTest);
      assert m instanceof VersionAwareMarshaller;
      VersionAwareMarshaller vam = (VersionAwareMarshaller) m;
      vam.initReplicationVersions();
      m = (Marshaller) TestingUtil.extractField(vam, "defaultMarshaller");
      assert m instanceof CacheMarshaller210;
View Full Code Here

Examples of org.jboss.errai.marshalling.client.api.Marshaller

        buf.append(",");
      }
      key = entry.getKey();
      val = entry.getValue();

      final Marshaller valueMarshaller;
      buf.append("\"").append(key).append("\"");

      buf.append(":");

      if (val == null) {
        buf.append("null");
      }
      else {
        if ((val instanceof Number && !(val instanceof BigInteger || val instanceof BigDecimal))
                || val instanceof Boolean || val instanceof Character) {

          valueMarshaller = MarshallUtil.getQualifiedNumberMarshaller(val);
        }
        else {
          if (!ctx.getMappingContext().hasMarshaller(val.getClass().getName())) {
            val = val.toString();
            valueMarshaller = StringMarshaller.INSTANCE;
          }
          else {
            valueMarshaller = MarshallUtil.getMarshaller(val, ctx);
          }
        }
        buf.append(valueMarshaller.marshall(val, ctx));
      }
    }

    return buf.append("}").toString();
  }
View Full Code Here

Examples of org.jboss.marshalling.Marshaller

  static <T, E extends AdvancedExternalizer<T>> ExternalizerTestHelper<T, E> getInstance(E externalizer) {
    return new ExternalizerTestHelper<T, E>( externalizer );
  }

  byte[] marshall(T object) throws Exception {
    Marshaller marshaller = getMarshaller();
    ByteArrayOutputStream baos = new ByteArrayOutputStream();

    try {
      marshaller.start( Marshalling.createByteOutput( baos ) );
      externalizer.writeObject( marshaller, object );
      marshaller.finish();
    }
    finally {
      try {
        baos.close();
      }
View Full Code Here

Examples of org.jboss.remoting.marshal.Marshaller

   }

   public Object invoke(Invocation invocation) throws Throwable
   {
      // need to add marshaller to invocation so can be found by transport later on
      Marshaller marshaller = (Marshaller) invocation.getMetaData().getMetaData(RemotingInterceptorFactory.REMOTING,
            RemotingInterceptorFactory.MARSHALLER);

      if (marshaller != null)
      {
         client.setMarshaller(marshaller);
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.