Class Snippet

java.lang.Object
org.gedcomx.test.Snippet
All Implemented Interfaces:
Serializable, SerializationProcessListener

public class Snippet extends Object implements Serializable, SerializationProcessListener
A code snippet.
Author:
Mike Gardiner and Ryan Heaton
See Also:
  • Constructor Details

    • Snippet

      public Snippet()
      The default constructor
    • Snippet

      public Snippet(String description)
    • Snippet

      public Snippet(String xml, String json)
    • Snippet

      public Snippet(String xml, String json, String description)
  • Method Details

    • getXml

      public String getXml()
      The xml code associated with this snippet.
      Returns:
      The xml code associated with this snippet.
    • setXml

      public void setXml(String xml)
      The xml code associated with this snippet.
      Parameters:
      xml - The xml code associated with this snippet.
    • xmlProcessed

      public void xmlProcessed(Object reference, Class<?> instanceClass, jakarta.xml.bind.JAXBContext context, String xml)
      Specified by:
      xmlProcessed in interface SerializationProcessListener
    • getJson

      public String getJson()
      The json code associated with this snippet.
      Returns:
      The json code associated with this snippet.
    • setJson

      public void setJson(String json)
      The json code associated with this snippet.
      Parameters:
      json - The json code associated with this snippet.
    • jsonProcessed

      public void jsonProcessed(Object reference, Class<?> instanceClass, com.fasterxml.jackson.databind.ObjectMapper mapper, String json)
      Specified by:
      jsonProcessed in interface SerializationProcessListener
    • getDescription

      public String getDescription()
      Returns:
      A description
    • setDescription

      public void setDescription(String description)
      Parameters:
      description - - A description