Examples of ModelWriter


Examples of org.apache.maven.model.io.ModelWriter

    @Test
    public void testModelWriter()
        throws Exception
    {
        StringWriter sw = new StringWriter();
        ModelWriter writer = new YamlModelWriter();
        Model model = getModel();
        Properties p = new Properties();
        p.setProperty( "FOO", "BAR" );
        model.setProperties( p );
        writer.write( sw, null, model );
        System.out.println( sw.toString() );
    }
View Full Code Here

Examples of org.apache.maven.model.io.ModelWriter

    //
    testMavenModelForCompleteness(xmlModel);
    //
    // Write out the Atom POM
    //
    ModelWriter writer = new AtomModelWriter();
    StringWriter w = new StringWriter();
    writer.write(w, new HashMap<String, Object>(), xmlModel);

    // Let's take a look at see what's there
    System.out.println(w.toString());

    //
View Full Code Here

Examples of org.mapstruct.ap.writer.ModelWriter

        return null;
    }

    private void writeToSourceFile(Filer filer, Mapper model) {
        ModelWriter modelWriter = new ModelWriter();

        createSourceFile( model, modelWriter, filer );

        if ( model.getDecorator() != null ) {
            createSourceFile( model.getDecorator(), modelWriter, filer );
View Full Code Here

Examples of org.slim3.datastore.json.ModelWriter

     *
     * @return JSON string
     */
    public String modelToJson(final Object model, int maxDepth){
        StringBuilder b = new StringBuilder();
        JsonWriter w = new JsonWriter(b, new ModelWriter() {
            @Override
            public void write(JsonWriter writer, Object model, int maxDepth,
                    int currentDepth) {
                invokeModelToJson(
                    Datastore.getModelMeta(model.getClass()),
View Full Code Here

Examples of org.slim3.datastore.json.ModelWriter

     */
    public String modelsToJson(final Object[] models, int maxDepth){
        int n = models.length;
        if(n == 0) return "[]";
        StringBuilder b = new StringBuilder();
        JsonWriter w = new JsonWriter(b, new ModelWriter() {
            @Override
            public void write(JsonWriter writer, Object model, int maxDepth,
                    int currentDepth) {
                invokeModelToJson(
                    Datastore.getModelMeta(model.getClass()),
View Full Code Here

Examples of org.slim3.datastore.json.ModelWriter

     *
     * @return JSON string
     */
    public String modelsToJson(final Iterable<?> models, int maxDepth){
        StringBuilder b = new StringBuilder();
        JsonWriter w = new JsonWriter(b, new ModelWriter() {
            @Override
            public void write(JsonWriter writer, Object model, int maxDepth,
                    int currentDepth) {
                invokeModelToJson(
                    Datastore.getModelMeta(model.getClass()),
View Full Code Here

Examples of org.slim3.datastore.json.ModelWriter

     *
     * @return JSON string
     */
    public String modelToJson(final Object model, int maxDepth){
        StringBuilder b = new StringBuilder();
        JsonWriter w = new JsonWriter(b, new ModelWriter() {
            public void write(JsonWriter writer, Object model, int maxDepth,
                    int currentDepth) {
                invokeModelToJson(
                    Datastore.getModelMeta(model.getClass()),
                    writer, model, maxDepth, currentDepth + 1);
View Full Code Here

Examples of org.slim3.datastore.json.ModelWriter

     *
     * @return JSON string
     */
    public String modelToJson(final Object model, int maxDepth){
        StringBuilder b = new StringBuilder();
        JsonWriter w = new JsonWriter(b, new ModelWriter() {
            @Override
            public void write(JsonWriter writer, Object model, int maxDepth,
                    int currentDepth) {
                invokeModelToJson(
                    Datastore.getModelMeta(model.getClass()),
View Full Code Here

Examples of org.slim3.datastore.json.ModelWriter

     */
    public String modelsToJson(final Object[] models, int maxDepth){
        int n = models.length;
        if(n == 0) return "[]";
        StringBuilder b = new StringBuilder();
        JsonWriter w = new JsonWriter(b, new ModelWriter() {
            @Override
            public void write(JsonWriter writer, Object model, int maxDepth,
                    int currentDepth) {
                invokeModelToJson(
                    Datastore.getModelMeta(model.getClass()),
View Full Code Here

Examples of org.slim3.datastore.json.ModelWriter

     *
     * @return JSON string
     */
    public String modelToJson(final Object model, int maxDepth) {
        StringBuilder b = new StringBuilder();
        JsonWriter w = new JsonWriter(b, new ModelWriter() {
            @Override
            public void write(JsonWriter writer, Object model, int maxDepth,
                    int currentDepth) {
                invokeModelToJson(
                    Datastore.getModelMeta(model.getClass()),
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.