Skip navigation links

appian-typetransformer 1.3 API

A library for manipulating TypedValue objects.

See: Description

Packages 
Package Description
com.appiancorp.ps.plugins.typetransformer  
com.appiancorp.ps.plugins.typetransformer.util  
com.appiancorp.ps.plugins.typetransformer.visitor  

A library for manipulating TypedValue objects.

Usage

See AppianTypeFactory for example usage.

Data Types

All the data types and structures are represented as combinations of the following three objects:
  1. AppianList represents a list of something (strings, cdts, dictionaries, a mix of those, etc).
  2. AppianObject represents a single complex type (i.e a CDT or Dictionary).
  3. AppianPrimitive represents a single base type value (i.e an integer, long, float, String, date, etc)

Visitors

The visitor pattern has been implemented to reduce the effort required to navigate the complex tree structures. See the visitor package for default implementations.

When should I use it?

Serialising to a new format (XML, JSON, Excel, DOCX, HTML, etc), searching for data, etc are all good use cases for this pattern. For example, this is used by TypedValueAppianElementVisitor to convert to a TypedValue.

Debugging

Help! I can't work out this data structure. The StringAppianElementVisitor will print the outline of the data structure with a JSON-like syntax:

  try (Writer w : new PrintWriter(System.out)) {
    AppianTypeFactory.walkElementTree(startElement, new StringAppianElementVisitor(w));
  }
  
Skip navigation links

Copyright © 2018 Appian Corporation. All rights reserved.