Java Code Examples for com.thoughtworks.xstream.XStream#getMapper()

The following examples show how to use com.thoughtworks.xstream.XStream#getMapper() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Serializer.java    From jease with GNU General Public License v3.0 5 votes vote down vote up
public Serializer() {
	xstream = new XStream();
	xstream.registerConverter(new BlobConverter());
	nodeConverter = new SingleValueConverterWrapper(new NodeConverter());
	nodeArrayConverter = new DelegateArrayConverter(nodeConverter,
			xstream.getMapper());
}
 
Example 2
Source File: RelationSetConverters.java    From depan with Apache License 2.0 5 votes vote down vote up
public static void configXStream(XStream xstream) {
  Mapper mapper = xstream.getMapper();
  new ForValue(RelationSets.ALL).registerWithTag(
      xstream, RELATION_SET_ALL_TAG);
  new ForValue(RelationSets.EMPTY).registerWithTag(
      xstream, RELATION_SET_EMPTY_TAG);

  new ForArray(mapper).registerWithTag(
      xstream, RELATION_SET_ARRAY_TAG);
  new ForSimple(mapper).registerWithTag(
      xstream, RELATION_SET_SIMPLE_TAG);
  new ForSingle(mapper).registerWithTag(
      xstream, RELATION_SET_SINGLE_TAG);
}
 
Example 3
Source File: ExportToolContentService.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public FileConverter(XStream xstream) {
    this.defaultConverter = new ReflectionConverter(xstream.getMapper(), xstream.getReflectionProvider());
}
 
Example 4
Source File: ViewDocumentConverter.java    From depan with Apache License 2.0 4 votes vote down vote up
public static ViewDocumentConverter configXStream(XStream xstream) {
  ViewDocumentConverter result =
      new ViewDocumentConverter(xstream.getMapper());
  result.registerWithTag(xstream, VIEW_INFO_TAG);
  return result;
}
 
Example 5
Source File: NodeListDocumentConverter.java    From depan with Apache License 2.0 4 votes vote down vote up
public static NodeListDocumentConverter configXStream(XStream xstream) {
  NodeListDocumentConverter result =
      new NodeListDocumentConverter(xstream.getMapper());
  result.registerWithTag(xstream, NODE_LIST_INFO_TAG);
  return result;
}