Class InstanceSerializer.InstanceSerializationVisitor

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void endInstance​(java.lang.Object o, VodmlTypeInfo v, boolean firstVisit)
      perform an action at the end of the instance.
      void leaf​(java.lang.Object o, VodmlTypeInfo v, boolean firstVisit)
      perform an action on a "leaf" object i.e.
      void startInstance​(java.lang.Object o, VodmlTypeInfo v, boolean firstVisit)
      perform an action at the start of an object instance.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InstanceSerializationVisitor

        public InstanceSerializationVisitor​(java.io.PrintWriter w)
        Parameters:
        w - where the instance is written to.
    • Method Detail

      • startInstance

        public void startInstance​(java.lang.Object o,
                                  VodmlTypeInfo v,
                                  boolean firstVisit)
        perform an action at the start of an object instance. overrides @see org.ivoa.vodml.nav.ModelInstanceTraverser.Visitor#startInstance(java.lang.Object, org.ivoa.vodml.nav.VodmlTypeInfo, boolean)
        Specified by:
        startInstance in interface ModelInstanceTraverser.Visitor
        Parameters:
        o - the object.
        v - the vodml model information for the object.
        firstVisit - if true this is the first visit to this particular instance.
      • leaf

        public void leaf​(java.lang.Object o,
                         VodmlTypeInfo v,
                         boolean firstVisit)
        perform an action on a "leaf" object i.e. has no model children. overrides @see org.ivoa.vodml.nav.ModelInstanceTraverser.FullVisitor#leaf(java.lang.Object, org.ivoa.vodml.nav.VodmlTypeInfo, boolean)
        Specified by:
        leaf in interface ModelInstanceTraverser.FullVisitor
        Parameters:
        o - the object.
        v - the vodml model information for the object.
        firstVisit - if true this is the first visit to this particular instance.
      • endInstance

        public void endInstance​(java.lang.Object o,
                                VodmlTypeInfo v,
                                boolean firstVisit)
        perform an action at the end of the instance. overrides @see org.ivoa.vodml.nav.ModelInstanceTraverser.FullVisitor#endInstance(java.lang.Object, org.ivoa.vodml.nav.VodmlTypeInfo, boolean)
        Specified by:
        endInstance in interface ModelInstanceTraverser.FullVisitor
        Parameters:
        o - the object.
        v - the vodml model information for the object.
        firstVisit - if true this is the first visit to this particular instance.