Examples of marshal()


Examples of org.apdplat.platform.util.XMLFactory.marshal()

    public String toXml() {
        XMLFactory factory = new XMLFactory(Page.class, getModelClass());
        String xml = null;
        try {
            xml = factory.marshal(this);
        } catch (Exception e) {
            LOG.error("生成XML出错",e);
        }
        return xml;
    }
View Full Code Here

Examples of org.docx4j.convert.out.flatOpcXml.FlatOpcXmlCreator.marshal()

      wordMLPackage.save(new java.io.File(inputfilepath) );
      System.out.println("Saved " + inputfilepath);
    } else {
         // Show the Flat OPC XML
      FlatOpcXmlCreator worker = new FlatOpcXmlCreator(wordMLPackage);
      worker.marshal(System.out);
    }
   
    System.out.println("Done.");
       
  }
View Full Code Here

Examples of org.docx4j.openpackaging.contenttype.ContentTypeManager.marshal()

     
     
      // 3. Save [Content_Types].xml
      ContentTypeManager ctm = p.getContentTypeManager();
          out.putNextEntry(new ZipEntry("[Content_Types].xml"));
          ctm.marshal(out);
          out.closeEntry();
         
      // 4. Start with _rels/.rels

//      <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
View Full Code Here

Examples of org.drools.guvnor.models.guided.dtable.backend.util.GuidedDTBRDRLPersistence.marshal()

            if ( desc != null && desc.length() > 0 ) {
                sb.append( "//" + desc + "\n" );
            }

            GuidedDTBRDRLPersistence drlMarshaller = new GuidedDTBRDRLPersistence( rowDataProvider );
            String rule = drlMarshaller.marshal( rm );
            sb.append( rule );
            sb.append( "\n" );
        }

        return sb.toString();
View Full Code Here

Examples of org.drools.ide.common.server.util.BRLPersistence.marshal()

        String[] sources = new String[assets.length];

        BRLPersistence converter = BRXMLPersistence.getInstance();
        for (int i = 0; i < assets.length; i++) {
            sources[i] = converter.marshal((RuleModel) assets[i].getContent());
        }

        return sources;
    }
}
View Full Code Here

Examples of org.drools.ide.common.server.util.GuidedDTDRLPersistence.marshal()

    };



    GuidedDTDRLPersistence p = GuidedDTDRLPersistence.getInstance();
    String drl = p.marshal(dt);


    assertTrue(drl.indexOf("from row number") > -1);
    assertTrue(drl.indexOf("rating == ( age * 0.2 )") > 0);
    assertTrue(drl.indexOf("f2 : Driver( eval( age > 7 ))") > 0);
View Full Code Here

Examples of org.drools.ide.common.server.util.ScenarioXMLPersistence.marshal()

    public void testToXML() {
    ScenarioXMLPersistence p = ScenarioXMLPersistence.getInstance();

    Scenario sc = new Scenario();

    String s = p.marshal(sc);
    assertNotNull(s);

    sc = getDemo();

    s = p.marshal(sc);
View Full Code Here

Examples of org.drools.marshalling.ObjectMarshallingStrategy.marshal()

        if ( object != null ) {
            ObjectMarshallingStrategy strategy = objectMarshallingStrategyStore.getStrategyObject( object );

            Integer index = context.getStrategyIndex( strategy );
            _handle.setStrategyIndex( index.intValue() );
            _handle.setObject( ByteString.copyFrom( strategy.marshal( context.strategyContext.get( strategy ),
                                                                      context,
                                                                      object ) ) );
        }

        return _handle.build();
View Full Code Here

Examples of org.drools.workbench.models.commons.backend.rule.BRLPersistence.marshal()

public class BRLPersistenceTest {

    @Test
    public void testGenerateEmptyXML() {
        final BRLPersistence p = BRXMLPersistence.getInstance();
        final String xml = p.marshal( new RuleModel() );
        assertNotNull( xml );
        assertFalse( xml.equals( "" ) );

        assertTrue( xml.startsWith( "<rule>" ) );
        assertTrue( xml.endsWith( "</rule>" ) );
View Full Code Here

Examples of org.drools.workbench.models.guided.dtable.backend.util.GuidedDTBRDRLPersistence.marshal()

            if ( desc != null && desc.length() > 0 ) {
                sb.append( "//" + desc + "\n" );
            }

            GuidedDTBRDRLPersistence drlMarshaller = new GuidedDTBRDRLPersistence( rowDataProvider );
            String rule = drlMarshaller.marshal( rm );
            sb.append( rule );
            sb.append( "\n" );
        }

        return sb.toString();
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.