Package com.thoughtworks.xstream

Examples of com.thoughtworks.xstream.XStream.addImplicitCollection()


    public static XStream newXStreamMarshaller(ClassLoader classLoader) {
        XStream xstream = new XStream();
        xstream.setClassLoader(classLoader);
        setAliases(xstream);

        xstream.addImplicitCollection(BatchExecutionCommandImpl.class, "commands");

        registerConverters(xstream);

        return xstream;
    }
View Full Code Here


  public Map<User, Status> getFriends() {
    XStream xstream = new XStream();
    xstream.alias("status", Status.class);
    xstream.alias("users", UserStatusList.class);
    xstream.alias("user", UserStatus.class);
    xstream.addImplicitCollection(UserStatusList.class, "users");
    xstream.aliasField("protected", UserStatus.class, "protect");   //can't use "protected"
    xstream.omitField(Status.class, "truncated");
    xstream.omitField(Status.class, "source");
    xstream.omitField(Status.class, "location");
    xstream.omitField(Status.class, "description");
View Full Code Here

  public Map<User, Status> getFriends() {
    XStream xstream = new XStream();
    xstream.alias("status", Status.class);
    xstream.alias("users", UserStatusList.class);
    xstream.alias("user", User.class);
    xstream.addImplicitCollection(UserStatusList.class, "users");
    xstream.aliasField("protected", User.class, "protect");   //can't use "protected"
    xstream.omitField(Status.class, "truncated");
    xstream.omitField(Status.class, "source");
    xstream.omitField(Status.class, "location");
    xstream.omitField(Status.class, "description");
View Full Code Here

    xstream.registerLocalConverter(SBMLError.class, "shortmessage", new MessageConverter("shortmessage"));
   
    xstream.alias("message", Message.class);
    xstream.alias("shortmessage", Message.class);

    xstream.addImplicitCollection(SBMLErrorLog.class, "options",
        "option", Option.class);
    xstream.addImplicitCollection(SBMLErrorLog.class,
        "validationErrors", "problem", SBMLError.class);

    xstream.aliasField("error", SBMLErrorLog.class, "status");
View Full Code Here

    xstream.alias("message", Message.class);
    xstream.alias("shortmessage", Message.class);

    xstream.addImplicitCollection(SBMLErrorLog.class, "options",
        "option", Option.class);
    xstream.addImplicitCollection(SBMLErrorLog.class,
        "validationErrors", "problem", SBMLError.class);

    xstream.aliasField("error", SBMLErrorLog.class, "status");
    xstream.aliasField("warning", SBMLErrorLog.class, "status");
    xstream.aliasField("no-errors", SBMLErrorLog.class, "status");
View Full Code Here

    xstream.registerLocalConverter(SBMLError.class, "shortmessage", new MessageConverter("shortmessage"));
   
    xstream.alias("message", Message.class);
    xstream.alias("shortmessage", Message.class);

    xstream.addImplicitCollection(SBMLErrorLog.class, "options",
        "option", Option.class);
    xstream.addImplicitCollection(SBMLErrorLog.class,
        "validationErrors", "problem", SBMLError.class);

    xstream.aliasField("error", SBMLErrorLog.class, "status");
View Full Code Here

    xstream.alias("message", Message.class);
    xstream.alias("shortmessage", Message.class);

    xstream.addImplicitCollection(SBMLErrorLog.class, "options",
        "option", Option.class);
    xstream.addImplicitCollection(SBMLErrorLog.class,
        "validationErrors", "problem", SBMLError.class);

    xstream.aliasField("error", SBMLErrorLog.class, "status");
    xstream.aliasField("warning", SBMLErrorLog.class, "status");
    xstream.aliasField("no-errors", SBMLErrorLog.class, "status");
View Full Code Here

   
   
    XStream stream = new XStream();
    stream.processAnnotations(CrescentCollections.class);
    stream.alias( "collections", CrescentCollections.class );
    stream.addImplicitCollection( CrescentCollections.class, "crescentCollections" );
   
    logger.info("collectionsXmlLocation : {}", collectionsXmlLocation);
   
    ResourceLoader resourceLoader = new ResourceLoader(collectionsXmlLocation);
    InputStream inputStream = resourceLoader.getInputStream();
View Full Code Here

        // XStream xstream = new XStream( new JettisonMappedXmlDriver() );
        XStream xstream = new XStream();
        // xstream.setMode( XStream.NO_REFERENCES );
        xstream.processAnnotations( BatchExecutionImpl.class );
        xstream.addImplicitCollection( BatchExecutionImpl.class,
                                       "commands" );

        xstream.alias( "batch-execution",
                       BatchExecutionImpl.class );
        xstream.alias( "insert",
View Full Code Here

    for (String name : collectionNames) {
      xstream.alias(name, enhancedType);
    }

    for (Class type : typesToEnhance) {
      xstream.addImplicitCollection(enhancedType, "elements", xstream.getMapper().serializedClass(type), type);
    }

    for (Class customType : realTypes.values()) {
      xstream.addImplicitCollection(customType, "link", "link", DefaultRelation.class);
    }
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.