Loading ...
Sorry, an error occurred while loading the content.

File - faq.txt

Expand Messages
  • JSX-ideas@yahoogroups.com
    JSX FAQ - 14 November 2001 ======= JSX instantly XML-enables applications, by re-implementing the Serialization API for XML. FAQ Contents: (1). Background (2).
    Message 1 of 30 , Jun 4, 2002
    • 0 Attachment
      JSX FAQ - 14 November 2001
      =======

      JSX instantly XML-enables applications, by re-implementing the Serialization
      API for XML.

      FAQ Contents:
      (1). Background
      (2). Using the Serialization API
      (3). Using JSX

      If your question is not answered here, please try the homepage:
      http://www.csse.monash.edu.au/~bren/JSX/
      or mailing list:
      http://groups.yahoo.com/group/JSX-ideas/messages

      ------------------------------------------------------------------------------


      (1). Background
      ===============

      (1.1) JSX stands for...?
      Java Serialization to XML

      (1.2) What does JOS stand for?
      Java Object Serialization (sometimes referred to as "Java's own Serialization")

      (1.3) What are the uses of JSX?
      - Long-term persistence - XML can be modified directly.
      - A transparent protocol for communicating between different components,
      that is easy to debug, and able to cope with different objects.
      - Configuration files.
      - A debugging tool - dumping object state.

      (1.4) What are the benefits of JSX?
      - A human-readable form of normally invisible objects
      - A human-edtiable form, for entering and editing objects
      - A human-comprehendible wire/file protocol for object and data exchange
      between other applications and languages

      (1.5) What are the goals of JSX?
      To be able to instantly XML-enable applications, without needing to change
      them at all.
      - to produce a "human comprehendible" XML representation of object graphs,
      that is readable and robust under human edits.
      - in the long-term, to help users handle the inevitable evolution of objects

      - a direct JOS replacement.
      - replaceable *by* JOS. Thus, JSX should not pollute the Serialization API -
      and so JSX can only add functionality through its constructors, using the
      Config object.





      (2). Using the Serialization API
      ================================

      (2.1). Where's a good tutorial?
      "Advanced Object Serialization", by John Zukowski (August 2001)
      http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

      (2.2). How do I write my own readObject() and writeObject() methods?
      Here's the signatures:
      private void readObject(ObjectInputStream ois)
      throws ClassNotFoundException, IOException {
      //your code here
      }
      private writeObject(ObjectOutputStream oos)
      throws IOException {
      //your code here
      }


      (2.3). How do I use GetField?
      It can only be used within a readObject() method that you have coded for your
      class, and is called by the serialization system.

      See example in:
      http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
      It's almost halfway through, under the heading: "Using ObjectStreamField"



      (3). Using JSX
      ==============

      (3.1). How do I use Config?

      Config is used to configure JSX for both input and output. You create the
      Config object, set it, and then pass it into the constructor of either an
      ObjIn or ObjOut. For example:

      Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
      ObjectInputStream in = new ObjIn(cfg); //pass it in

      Note that the option setting can be chained. Check the source code
      (Config.java) for more options.

      For the above example, "handler" is used like an event handler. A common
      approach is to subclass the default implementation with your own anonymous
      class:

      NoSuchFieldHandler handler = new NoSuchFieldHandler() {
      public String noSuchField(Class c, String fieldName) {
      if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
      return "theNewFieldName";
      else
      throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in "+c);
      }
      };
      //NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
      //Eg. could use two: first tier maps classes to HashMaps, which in turn maps
      //old fieldnames to new fieldnames.
    • egroups_yow
      Hi Marti, I m developing an interesting idea for back-compatibility, which ... The idea is to serialize a Memento object that represents the Originating
      Message 2 of 30 , Jun 16, 2002
      • 0 Attachment
        Hi Marti,

        I'm developing an interesting idea for back-compatibility, which
        seems to be very powerful, and may suit your needs:

        > we have more faith in developers to update the read/write
        > object method in Java while they are editing the object
        > than in their ability to go and update the external scripts
        > in XSLT, which they do not know. Either way, BW compatibility
        > is hard to maintain, as you probably know.

        The idea is to serialize a "Memento" object that represents the
        Originating object. This gives you a level of indirection, so that
        the mapping code between the two representations can change to cope
        with updates. It gives many of the benefits of
        serialPersistentFields, but is higher-level and simpler.

        I intend to write an article for JavaWorld, and would love to be able
        to use as an example some of your code (or if JPL objects, if you
        could come up with a similiar "real life" example - you'd be
        credited, of course).


        Cheers,
        Brendan
        PS: If anyone else is interested, or has comments or ideas on this,
        please reply. I'll be posting a draft of the article very soon.


        > >Thanks for your well-detailed bug report - it made it easy to track
        > >down the bug, and fix it. The fix is now available, as
        > >JSX0.9.8.3.jar.
        > >
        > >Your inference that it was to do with primitive fields was correct.
        > > > If I change the "y" member of Evolve to wrapper type Integer
        > > > rather than primitive int, it works. Am I doing something wrong?
        > >
        > >However: it may be easier to use XSLT to map to different names
        > >between the Java objects and XML (this requires two XSLT scripts,
        > >for writing and reading).
        > >
        > >If it is not mapping that you need this
        > >for, but coping with evolution of classes, you only to write one
        > >XSLT script, to map from the old version of the XML to the new
        > >version. This has the advantage of updating the XML in
        > >accordance with the fieldnames used in the Java code (which is less
        > >confusing).
        > >
        > >But I'm guessing on what you need it for here! What do you need it
        > >for? ;-)
        > >
        > >
        > >Cheers,
        > >Brendan
        > >
        > >
        > >To unsubscribe from this group, send an email to:
        > >JSX-ideas-unsubscribe@e...
        > >
        > >
        > >
        > >Your use of Yahoo! Groups is subject to
        http://docs.yahoo.com/info/terms/
      • JSX-ideas@yahoogroups.com
        JSX FAQ - 14 November 2001 ======= JSX instantly XML-enables applications, by re-implementing the Serialization API for XML. FAQ Contents: (1). Background (2).
        Message 3 of 30 , Jul 3, 2002
        • 0 Attachment
          JSX FAQ - 14 November 2001
          =======

          JSX instantly XML-enables applications, by re-implementing the Serialization
          API for XML.

          FAQ Contents:
          (1). Background
          (2). Using the Serialization API
          (3). Using JSX

          If your question is not answered here, please try the homepage:
          http://www.csse.monash.edu.au/~bren/JSX/
          or mailing list:
          http://groups.yahoo.com/group/JSX-ideas/messages

          ------------------------------------------------------------------------------


          (1). Background
          ===============

          (1.1) JSX stands for...?
          Java Serialization to XML

          (1.2) What does JOS stand for?
          Java Object Serialization (sometimes referred to as "Java's own Serialization")

          (1.3) What are the uses of JSX?
          - Long-term persistence - XML can be modified directly.
          - A transparent protocol for communicating between different components,
          that is easy to debug, and able to cope with different objects.
          - Configuration files.
          - A debugging tool - dumping object state.

          (1.4) What are the benefits of JSX?
          - A human-readable form of normally invisible objects
          - A human-edtiable form, for entering and editing objects
          - A human-comprehendible wire/file protocol for object and data exchange
          between other applications and languages

          (1.5) What are the goals of JSX?
          To be able to instantly XML-enable applications, without needing to change
          them at all.
          - to produce a "human comprehendible" XML representation of object graphs,
          that is readable and robust under human edits.
          - in the long-term, to help users handle the inevitable evolution of objects

          - a direct JOS replacement.
          - replaceable *by* JOS. Thus, JSX should not pollute the Serialization API -
          and so JSX can only add functionality through its constructors, using the
          Config object.





          (2). Using the Serialization API
          ================================

          (2.1). Where's a good tutorial?
          "Advanced Object Serialization", by John Zukowski (August 2001)
          http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

          (2.2). How do I write my own readObject() and writeObject() methods?
          Here's the signatures:
          private void readObject(ObjectInputStream ois)
          throws ClassNotFoundException, IOException {
          //your code here
          }
          private writeObject(ObjectOutputStream oos)
          throws IOException {
          //your code here
          }


          (2.3). How do I use GetField?
          It can only be used within a readObject() method that you have coded for your
          class, and is called by the serialization system.

          See example in:
          http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
          It's almost halfway through, under the heading: "Using ObjectStreamField"



          (3). Using JSX
          ==============

          (3.1). How do I use Config?

          Config is used to configure JSX for both input and output. You create the
          Config object, set it, and then pass it into the constructor of either an
          ObjIn or ObjOut. For example:

          Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
          ObjectInputStream in = new ObjIn(cfg); //pass it in

          Note that the option setting can be chained. Check the source code
          (Config.java) for more options.

          For the above example, "handler" is used like an event handler. A common
          approach is to subclass the default implementation with your own anonymous
          class:

          NoSuchFieldHandler handler = new NoSuchFieldHandler() {
          public String noSuchField(Class c, String fieldName) {
          if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
          return "theNewFieldName";
          else
          throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in "+c);
          }
          };
          //NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
          //Eg. could use two: first tier maps classes to HashMaps, which in turn maps
          //old fieldnames to new fieldnames.
        • JSX-ideas@yahoogroups.com
          JSX FAQ - 14 November 2001 ======= JSX instantly XML-enables applications, by re-implementing the Serialization API for XML. FAQ Contents: (1). Background (2).
          Message 4 of 30 , Aug 4, 2002
          • 0 Attachment
            JSX FAQ - 14 November 2001
            =======

            JSX instantly XML-enables applications, by re-implementing the Serialization
            API for XML.

            FAQ Contents:
            (1). Background
            (2). Using the Serialization API
            (3). Using JSX

            If your question is not answered here, please try the homepage:
            http://www.csse.monash.edu.au/~bren/JSX/
            or mailing list:
            http://groups.yahoo.com/group/JSX-ideas/messages

            ------------------------------------------------------------------------------


            (1). Background
            ===============

            (1.1) JSX stands for...?
            Java Serialization to XML

            (1.2) What does JOS stand for?
            Java Object Serialization (sometimes referred to as "Java's own Serialization")

            (1.3) What are the uses of JSX?
            - Long-term persistence - XML can be modified directly.
            - A transparent protocol for communicating between different components,
            that is easy to debug, and able to cope with different objects.
            - Configuration files.
            - A debugging tool - dumping object state.

            (1.4) What are the benefits of JSX?
            - A human-readable form of normally invisible objects
            - A human-edtiable form, for entering and editing objects
            - A human-comprehendible wire/file protocol for object and data exchange
            between other applications and languages

            (1.5) What are the goals of JSX?
            To be able to instantly XML-enable applications, without needing to change
            them at all.
            - to produce a "human comprehendible" XML representation of object graphs,
            that is readable and robust under human edits.
            - in the long-term, to help users handle the inevitable evolution of objects

            - a direct JOS replacement.
            - replaceable *by* JOS. Thus, JSX should not pollute the Serialization API -
            and so JSX can only add functionality through its constructors, using the
            Config object.





            (2). Using the Serialization API
            ================================

            (2.1). Where's a good tutorial?
            "Advanced Object Serialization", by John Zukowski (August 2001)
            http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

            (2.2). How do I write my own readObject() and writeObject() methods?
            Here's the signatures:
            private void readObject(ObjectInputStream ois)
            throws ClassNotFoundException, IOException {
            //your code here
            }
            private writeObject(ObjectOutputStream oos)
            throws IOException {
            //your code here
            }


            (2.3). How do I use GetField?
            It can only be used within a readObject() method that you have coded for your
            class, and is called by the serialization system.

            See example in:
            http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
            It's almost halfway through, under the heading: "Using ObjectStreamField"



            (3). Using JSX
            ==============

            (3.1). How do I use Config?

            Config is used to configure JSX for both input and output. You create the
            Config object, set it, and then pass it into the constructor of either an
            ObjIn or ObjOut. For example:

            Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
            ObjectInputStream in = new ObjIn(cfg); //pass it in

            Note that the option setting can be chained. Check the source code
            (Config.java) for more options.

            For the above example, "handler" is used like an event handler. A common
            approach is to subclass the default implementation with your own anonymous
            class:

            NoSuchFieldHandler handler = new NoSuchFieldHandler() {
            public String noSuchField(Class c, String fieldName) {
            if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
            return "theNewFieldName";
            else
            throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in "+c);
            }
            };
            //NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
            //Eg. could use two: first tier maps classes to HashMaps, which in turn maps
            //old fieldnames to new fieldnames.
          • JSX-ideas@yahoogroups.com
            JSX FAQ - 14 November 2001 ======= JSX instantly XML-enables applications, by re-implementing the Serialization API for XML. FAQ Contents: (1). Background (2).
            Message 5 of 30 , Sep 4, 2002
            • 0 Attachment
              JSX FAQ - 14 November 2001
              =======

              JSX instantly XML-enables applications, by re-implementing the Serialization
              API for XML.

              FAQ Contents:
              (1). Background
              (2). Using the Serialization API
              (3). Using JSX

              If your question is not answered here, please try the homepage:
              http://www.csse.monash.edu.au/~bren/JSX/
              or mailing list:
              http://groups.yahoo.com/group/JSX-ideas/messages

              ------------------------------------------------------------------------------


              (1). Background
              ===============

              (1.1) JSX stands for...?
              Java Serialization to XML

              (1.2) What does JOS stand for?
              Java Object Serialization (sometimes referred to as "Java's own Serialization")

              (1.3) What are the uses of JSX?
              - Long-term persistence - XML can be modified directly.
              - A transparent protocol for communicating between different components,
              that is easy to debug, and able to cope with different objects.
              - Configuration files.
              - A debugging tool - dumping object state.

              (1.4) What are the benefits of JSX?
              - A human-readable form of normally invisible objects
              - A human-edtiable form, for entering and editing objects
              - A human-comprehendible wire/file protocol for object and data exchange
              between other applications and languages

              (1.5) What are the goals of JSX?
              To be able to instantly XML-enable applications, without needing to change
              them at all.
              - to produce a "human comprehendible" XML representation of object graphs,
              that is readable and robust under human edits.
              - in the long-term, to help users handle the inevitable evolution of objects

              - a direct JOS replacement.
              - replaceable *by* JOS. Thus, JSX should not pollute the Serialization API -
              and so JSX can only add functionality through its constructors, using the
              Config object.





              (2). Using the Serialization API
              ================================

              (2.1). Where's a good tutorial?
              "Advanced Object Serialization", by John Zukowski (August 2001)
              http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

              (2.2). How do I write my own readObject() and writeObject() methods?
              Here's the signatures:
              private void readObject(ObjectInputStream ois)
              throws ClassNotFoundException, IOException {
              //your code here
              }
              private writeObject(ObjectOutputStream oos)
              throws IOException {
              //your code here
              }


              (2.3). How do I use GetField?
              It can only be used within a readObject() method that you have coded for your
              class, and is called by the serialization system.

              See example in:
              http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
              It's almost halfway through, under the heading: "Using ObjectStreamField"



              (3). Using JSX
              ==============

              (3.1). How do I use Config?

              Config is used to configure JSX for both input and output. You create the
              Config object, set it, and then pass it into the constructor of either an
              ObjIn or ObjOut. For example:

              Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
              ObjectInputStream in = new ObjIn(cfg); //pass it in

              Note that the option setting can be chained. Check the source code
              (Config.java) for more options.

              For the above example, "handler" is used like an event handler. A common
              approach is to subclass the default implementation with your own anonymous
              class:

              NoSuchFieldHandler handler = new NoSuchFieldHandler() {
              public String noSuchField(Class c, String fieldName) {
              if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
              return "theNewFieldName";
              else
              throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in "+c);
              }
              };
              //NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
              //Eg. could use two: first tier maps classes to HashMaps, which in turn maps
              //old fieldnames to new fieldnames.
            • JSX-ideas@yahoogroups.com
              JSX FAQ - 14 November 2001 ======= JSX instantly XML-enables applications, by re-implementing the Serialization API for XML. FAQ Contents: (1). Background (2).
              Message 6 of 30 , Oct 1, 2002
              • 0 Attachment
                JSX FAQ - 14 November 2001
                =======

                JSX instantly XML-enables applications, by re-implementing the Serialization
                API for XML.

                FAQ Contents:
                (1). Background
                (2). Using the Serialization API
                (3). Using JSX

                If your question is not answered here, please try the homepage:
                http://www.csse.monash.edu.au/~bren/JSX/
                or mailing list:
                http://groups.yahoo.com/group/JSX-ideas/messages

                ------------------------------------------------------------------------------


                (1). Background
                ===============

                (1.1) JSX stands for...?
                Java Serialization to XML

                (1.2) What does JOS stand for?
                Java Object Serialization (sometimes referred to as "Java's own Serialization")

                (1.3) What are the uses of JSX?
                - Long-term persistence - XML can be modified directly.
                - A transparent protocol for communicating between different components,
                that is easy to debug, and able to cope with different objects.
                - Configuration files.
                - A debugging tool - dumping object state.

                (1.4) What are the benefits of JSX?
                - A human-readable form of normally invisible objects
                - A human-edtiable form, for entering and editing objects
                - A human-comprehendible wire/file protocol for object and data exchange
                between other applications and languages

                (1.5) What are the goals of JSX?
                To be able to instantly XML-enable applications, without needing to change
                them at all.
                - to produce a "human comprehendible" XML representation of object graphs,
                that is readable and robust under human edits.
                - in the long-term, to help users handle the inevitable evolution of objects

                - a direct JOS replacement.
                - replaceable *by* JOS. Thus, JSX should not pollute the Serialization API -
                and so JSX can only add functionality through its constructors, using the
                Config object.





                (2). Using the Serialization API
                ================================

                (2.1). Where's a good tutorial?
                "Advanced Object Serialization", by John Zukowski (August 2001)
                http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

                (2.2). How do I write my own readObject() and writeObject() methods?
                Here's the signatures:
                private void readObject(ObjectInputStream ois)
                throws ClassNotFoundException, IOException {
                //your code here
                }
                private writeObject(ObjectOutputStream oos)
                throws IOException {
                //your code here
                }


                (2.3). How do I use GetField?
                It can only be used within a readObject() method that you have coded for your
                class, and is called by the serialization system.

                See example in:
                http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
                It's almost halfway through, under the heading: "Using ObjectStreamField"



                (3). Using JSX
                ==============

                (3.1). How do I use Config?

                Config is used to configure JSX for both input and output. You create the
                Config object, set it, and then pass it into the constructor of either an
                ObjIn or ObjOut. For example:

                Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
                ObjectInputStream in = new ObjIn(cfg); //pass it in

                Note that the option setting can be chained. Check the source code
                (Config.java) for more options.

                For the above example, "handler" is used like an event handler. A common
                approach is to subclass the default implementation with your own anonymous
                class:

                NoSuchFieldHandler handler = new NoSuchFieldHandler() {
                public String noSuchField(Class c, String fieldName) {
                if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
                return "theNewFieldName";
                else
                throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in "+c);
                }
                };
                //NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
                //Eg. could use two: first tier maps classes to HashMaps, which in turn maps
                //old fieldnames to new fieldnames.
              • JSX-ideas@yahoogroups.com
                JSX FAQ - 14 November 2001 ======= JSX instantly XML-enables applications, by re-implementing the Serialization API for XML. FAQ Contents: (1). Background (2).
                Message 7 of 30 , Nov 1, 2002
                • 0 Attachment
                  JSX FAQ - 14 November 2001
                  =======

                  JSX instantly XML-enables applications, by re-implementing the Serialization
                  API for XML.

                  FAQ Contents:
                  (1). Background
                  (2). Using the Serialization API
                  (3). Using JSX

                  If your question is not answered here, please try the homepage:
                  http://www.csse.monash.edu.au/~bren/JSX/
                  or mailing list:
                  http://groups.yahoo.com/group/JSX-ideas/messages

                  ------------------------------------------------------------------------------


                  (1). Background
                  ===============

                  (1.1) JSX stands for...?
                  Java Serialization to XML

                  (1.2) What does JOS stand for?
                  Java Object Serialization (sometimes referred to as "Java's own Serialization")

                  (1.3) What are the uses of JSX?
                  - Long-term persistence - XML can be modified directly.
                  - A transparent protocol for communicating between different components,
                  that is easy to debug, and able to cope with different objects.
                  - Configuration files.
                  - A debugging tool - dumping object state.

                  (1.4) What are the benefits of JSX?
                  - A human-readable form of normally invisible objects
                  - A human-edtiable form, for entering and editing objects
                  - A human-comprehendible wire/file protocol for object and data exchange
                  between other applications and languages

                  (1.5) What are the goals of JSX?
                  To be able to instantly XML-enable applications, without needing to change
                  them at all.
                  - to produce a "human comprehendible" XML representation of object graphs,
                  that is readable and robust under human edits.
                  - in the long-term, to help users handle the inevitable evolution of objects

                  - a direct JOS replacement.
                  - replaceable *by* JOS. Thus, JSX should not pollute the Serialization API -
                  and so JSX can only add functionality through its constructors, using the
                  Config object.





                  (2). Using the Serialization API
                  ================================

                  (2.1). Where's a good tutorial?
                  "Advanced Object Serialization", by John Zukowski (August 2001)
                  http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

                  (2.2). How do I write my own readObject() and writeObject() methods?
                  Here's the signatures:
                  private void readObject(ObjectInputStream ois)
                  throws ClassNotFoundException, IOException {
                  //your code here
                  }
                  private writeObject(ObjectOutputStream oos)
                  throws IOException {
                  //your code here
                  }


                  (2.3). How do I use GetField?
                  It can only be used within a readObject() method that you have coded for your
                  class, and is called by the serialization system.

                  See example in:
                  http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
                  It's almost halfway through, under the heading: "Using ObjectStreamField"



                  (3). Using JSX
                  ==============

                  (3.1). How do I use Config?

                  Config is used to configure JSX for both input and output. You create the
                  Config object, set it, and then pass it into the constructor of either an
                  ObjIn or ObjOut. For example:

                  Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
                  ObjectInputStream in = new ObjIn(cfg); //pass it in

                  Note that the option setting can be chained. Check the source code
                  (Config.java) for more options.

                  For the above example, "handler" is used like an event handler. A common
                  approach is to subclass the default implementation with your own anonymous
                  class:

                  NoSuchFieldHandler handler = new NoSuchFieldHandler() {
                  public String noSuchField(Class c, String fieldName) {
                  if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
                  return "theNewFieldName";
                  else
                  throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in "+c);
                  }
                  };
                  //NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
                  //Eg. could use two: first tier maps classes to HashMaps, which in turn maps
                  //old fieldnames to new fieldnames.
                • JSX-ideas@yahoogroups.com
                  JSX FAQ - 14 November 2001 ======= JSX instantly XML-enables applications, by re-implementing the Serialization API for XML. FAQ Contents: (1). Background (2).
                  Message 8 of 30 , Dec 1, 2002
                  • 0 Attachment
                    JSX FAQ - 14 November 2001
                    =======

                    JSX instantly XML-enables applications, by re-implementing the Serialization
                    API for XML.

                    FAQ Contents:
                    (1). Background
                    (2). Using the Serialization API
                    (3). Using JSX

                    If your question is not answered here, please try the homepage:
                    http://www.csse.monash.edu.au/~bren/JSX/
                    or mailing list:
                    http://groups.yahoo.com/group/JSX-ideas/messages

                    ------------------------------------------------------------------------------


                    (1). Background
                    ===============

                    (1.1) JSX stands for...?
                    Java Serialization to XML

                    (1.2) What does JOS stand for?
                    Java Object Serialization (sometimes referred to as "Java's own Serialization")

                    (1.3) What are the uses of JSX?
                    - Long-term persistence - XML can be modified directly.
                    - A transparent protocol for communicating between different components,
                    that is easy to debug, and able to cope with different objects.
                    - Configuration files.
                    - A debugging tool - dumping object state.

                    (1.4) What are the benefits of JSX?
                    - A human-readable form of normally invisible objects
                    - A human-edtiable form, for entering and editing objects
                    - A human-comprehendible wire/file protocol for object and data exchange
                    between other applications and languages

                    (1.5) What are the goals of JSX?
                    To be able to instantly XML-enable applications, without needing to change
                    them at all.
                    - to produce a "human comprehendible" XML representation of object graphs,
                    that is readable and robust under human edits.
                    - in the long-term, to help users handle the inevitable evolution of objects

                    - a direct JOS replacement.
                    - replaceable *by* JOS. Thus, JSX should not pollute the Serialization API -
                    and so JSX can only add functionality through its constructors, using the
                    Config object.





                    (2). Using the Serialization API
                    ================================

                    (2.1). Where's a good tutorial?
                    "Advanced Object Serialization", by John Zukowski (August 2001)
                    http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

                    (2.2). How do I write my own readObject() and writeObject() methods?
                    Here's the signatures:
                    private void readObject(ObjectInputStream ois)
                    throws ClassNotFoundException, IOException {
                    //your code here
                    }
                    private writeObject(ObjectOutputStream oos)
                    throws IOException {
                    //your code here
                    }


                    (2.3). How do I use GetField?
                    It can only be used within a readObject() method that you have coded for your
                    class, and is called by the serialization system.

                    See example in:
                    http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
                    It's almost halfway through, under the heading: "Using ObjectStreamField"



                    (3). Using JSX
                    ==============

                    (3.1). How do I use Config?

                    Config is used to configure JSX for both input and output. You create the
                    Config object, set it, and then pass it into the constructor of either an
                    ObjIn or ObjOut. For example:

                    Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
                    ObjectInputStream in = new ObjIn(cfg); //pass it in

                    Note that the option setting can be chained. Check the source code
                    (Config.java) for more options.

                    For the above example, "handler" is used like an event handler. A common
                    approach is to subclass the default implementation with your own anonymous
                    class:

                    NoSuchFieldHandler handler = new NoSuchFieldHandler() {
                    public String noSuchField(Class c, String fieldName) {
                    if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
                    return "theNewFieldName";
                    else
                    throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in "+c);
                    }
                    };
                    //NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
                    //Eg. could use two: first tier maps classes to HashMaps, which in turn maps
                    //old fieldnames to new fieldnames.
                  • JSX-ideas@yahoogroups.com
                    JSX FAQ - 14 November 2001 ======= JSX instantly XML-enables applications, by re-implementing the Serialization API for XML. FAQ Contents: (1). Background (2).
                    Message 9 of 30 , Jan 1, 2003
                    • 0 Attachment
                      JSX FAQ - 14 November 2001
                      =======

                      JSX instantly XML-enables applications, by re-implementing the Serialization
                      API for XML.

                      FAQ Contents:
                      (1). Background
                      (2). Using the Serialization API
                      (3). Using JSX

                      If your question is not answered here, please try the homepage:
                      http://www.csse.monash.edu.au/~bren/JSX/
                      or mailing list:
                      http://groups.yahoo.com/group/JSX-ideas/messages

                      ------------------------------------------------------------------------------


                      (1). Background
                      ===============

                      (1.1) JSX stands for...?
                      Java Serialization to XML

                      (1.2) What does JOS stand for?
                      Java Object Serialization (sometimes referred to as "Java's own Serialization")

                      (1.3) What are the uses of JSX?
                      - Long-term persistence - XML can be modified directly.
                      - A transparent protocol for communicating between different components,
                      that is easy to debug, and able to cope with different objects.
                      - Configuration files.
                      - A debugging tool - dumping object state.

                      (1.4) What are the benefits of JSX?
                      - A human-readable form of normally invisible objects
                      - A human-edtiable form, for entering and editing objects
                      - A human-comprehendible wire/file protocol for object and data exchange
                      between other applications and languages

                      (1.5) What are the goals of JSX?
                      To be able to instantly XML-enable applications, without needing to change
                      them at all.
                      - to produce a "human comprehendible" XML representation of object graphs,
                      that is readable and robust under human edits.
                      - in the long-term, to help users handle the inevitable evolution of objects

                      - a direct JOS replacement.
                      - replaceable *by* JOS. Thus, JSX should not pollute the Serialization API -
                      and so JSX can only add functionality through its constructors, using the
                      Config object.





                      (2). Using the Serialization API
                      ================================

                      (2.1). Where's a good tutorial?
                      "Advanced Object Serialization", by John Zukowski (August 2001)
                      http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

                      (2.2). How do I write my own readObject() and writeObject() methods?
                      Here's the signatures:
                      private void readObject(ObjectInputStream ois)
                      throws ClassNotFoundException, IOException {
                      //your code here
                      }
                      private writeObject(ObjectOutputStream oos)
                      throws IOException {
                      //your code here
                      }


                      (2.3). How do I use GetField?
                      It can only be used within a readObject() method that you have coded for your
                      class, and is called by the serialization system.

                      See example in:
                      http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
                      It's almost halfway through, under the heading: "Using ObjectStreamField"



                      (3). Using JSX
                      ==============

                      (3.1). How do I use Config?

                      Config is used to configure JSX for both input and output. You create the
                      Config object, set it, and then pass it into the constructor of either an
                      ObjIn or ObjOut. For example:

                      Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
                      ObjectInputStream in = new ObjIn(cfg); //pass it in

                      Note that the option setting can be chained. Check the source code
                      (Config.java) for more options.

                      For the above example, "handler" is used like an event handler. A common
                      approach is to subclass the default implementation with your own anonymous
                      class:

                      NoSuchFieldHandler handler = new NoSuchFieldHandler() {
                      public String noSuchField(Class c, String fieldName) {
                      if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
                      return "theNewFieldName";
                      else
                      throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in "+c);
                      }
                      };
                      //NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
                      //Eg. could use two: first tier maps classes to HashMaps, which in turn maps
                      //old fieldnames to new fieldnames.
                    • JSX-ideas@yahoogroups.com
                      JSX FAQ - 14 November 2001 ======= JSX instantly XML-enables applications, by re-implementing the Serialization API for XML. FAQ Contents: (1). Background (2).
                      Message 10 of 30 , Feb 1, 2003
                      • 0 Attachment
                        JSX FAQ - 14 November 2001
                        =======

                        JSX instantly XML-enables applications, by re-implementing the Serialization
                        API for XML.

                        FAQ Contents:
                        (1). Background
                        (2). Using the Serialization API
                        (3). Using JSX

                        If your question is not answered here, please try the homepage:
                        http://www.csse.monash.edu.au/~bren/JSX/
                        or mailing list:
                        http://groups.yahoo.com/group/JSX-ideas/messages

                        ------------------------------------------------------------------------------


                        (1). Background
                        ===============

                        (1.1) JSX stands for...?
                        Java Serialization to XML

                        (1.2) What does JOS stand for?
                        Java Object Serialization (sometimes referred to as "Java's own Serialization")

                        (1.3) What are the uses of JSX?
                        - Long-term persistence - XML can be modified directly.
                        - A transparent protocol for communicating between different components,
                        that is easy to debug, and able to cope with different objects.
                        - Configuration files.
                        - A debugging tool - dumping object state.

                        (1.4) What are the benefits of JSX?
                        - A human-readable form of normally invisible objects
                        - A human-edtiable form, for entering and editing objects
                        - A human-comprehendible wire/file protocol for object and data exchange
                        between other applications and languages

                        (1.5) What are the goals of JSX?
                        To be able to instantly XML-enable applications, without needing to change
                        them at all.
                        - to produce a "human comprehendible" XML representation of object graphs,
                        that is readable and robust under human edits.
                        - in the long-term, to help users handle the inevitable evolution of objects

                        - a direct JOS replacement.
                        - replaceable *by* JOS. Thus, JSX should not pollute the Serialization API -
                        and so JSX can only add functionality through its constructors, using the
                        Config object.





                        (2). Using the Serialization API
                        ================================

                        (2.1). Where's a good tutorial?
                        "Advanced Object Serialization", by John Zukowski (August 2001)
                        http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

                        (2.2). How do I write my own readObject() and writeObject() methods?
                        Here's the signatures:
                        private void readObject(ObjectInputStream ois)
                        throws ClassNotFoundException, IOException {
                        //your code here
                        }
                        private writeObject(ObjectOutputStream oos)
                        throws IOException {
                        //your code here
                        }


                        (2.3). How do I use GetField?
                        It can only be used within a readObject() method that you have coded for your
                        class, and is called by the serialization system.

                        See example in:
                        http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
                        It's almost halfway through, under the heading: "Using ObjectStreamField"



                        (3). Using JSX
                        ==============

                        (3.1). How do I use Config?

                        Config is used to configure JSX for both input and output. You create the
                        Config object, set it, and then pass it into the constructor of either an
                        ObjIn or ObjOut. For example:

                        Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
                        ObjectInputStream in = new ObjIn(cfg); //pass it in

                        Note that the option setting can be chained. Check the source code
                        (Config.java) for more options.

                        For the above example, "handler" is used like an event handler. A common
                        approach is to subclass the default implementation with your own anonymous
                        class:

                        NoSuchFieldHandler handler = new NoSuchFieldHandler() {
                        public String noSuchField(Class c, String fieldName) {
                        if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
                        return "theNewFieldName";
                        else
                        throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in "+c);
                        }
                        };
                        //NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
                        //Eg. could use two: first tier maps classes to HashMaps, which in turn maps
                        //old fieldnames to new fieldnames.
                      • JSX-ideas@yahoogroups.com
                        JSX FAQ - 14 November 2001 ======= JSX instantly XML-enables applications, by re-implementing the Serialization API for XML. FAQ Contents: (1). Background (2).
                        Message 11 of 30 , Mar 1, 2003
                        • 0 Attachment
                          JSX FAQ - 14 November 2001
                          =======

                          JSX instantly XML-enables applications, by re-implementing the Serialization
                          API for XML.

                          FAQ Contents:
                          (1). Background
                          (2). Using the Serialization API
                          (3). Using JSX

                          If your question is not answered here, please try the homepage:
                          http://www.csse.monash.edu.au/~bren/JSX/
                          or mailing list:
                          http://groups.yahoo.com/group/JSX-ideas/messages

                          ------------------------------------------------------------------------------


                          (1). Background
                          ===============

                          (1.1) JSX stands for...?
                          Java Serialization to XML

                          (1.2) What does JOS stand for?
                          Java Object Serialization (sometimes referred to as "Java's own Serialization")

                          (1.3) What are the uses of JSX?
                          - Long-term persistence - XML can be modified directly.
                          - A transparent protocol for communicating between different components,
                          that is easy to debug, and able to cope with different objects.
                          - Configuration files.
                          - A debugging tool - dumping object state.

                          (1.4) What are the benefits of JSX?
                          - A human-readable form of normally invisible objects
                          - A human-edtiable form, for entering and editing objects
                          - A human-comprehendible wire/file protocol for object and data exchange
                          between other applications and languages

                          (1.5) What are the goals of JSX?
                          To be able to instantly XML-enable applications, without needing to change
                          them at all.
                          - to produce a "human comprehendible" XML representation of object graphs,
                          that is readable and robust under human edits.
                          - in the long-term, to help users handle the inevitable evolution of objects

                          - a direct JOS replacement.
                          - replaceable *by* JOS. Thus, JSX should not pollute the Serialization API -
                          and so JSX can only add functionality through its constructors, using the
                          Config object.





                          (2). Using the Serialization API
                          ================================

                          (2.1). Where's a good tutorial?
                          "Advanced Object Serialization", by John Zukowski (August 2001)
                          http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

                          (2.2). How do I write my own readObject() and writeObject() methods?
                          Here's the signatures:
                          private void readObject(ObjectInputStream ois)
                          throws ClassNotFoundException, IOException {
                          //your code here
                          }
                          private writeObject(ObjectOutputStream oos)
                          throws IOException {
                          //your code here
                          }


                          (2.3). How do I use GetField?
                          It can only be used within a readObject() method that you have coded for your
                          class, and is called by the serialization system.

                          See example in:
                          http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
                          It's almost halfway through, under the heading: "Using ObjectStreamField"



                          (3). Using JSX
                          ==============

                          (3.1). How do I use Config?

                          Config is used to configure JSX for both input and output. You create the
                          Config object, set it, and then pass it into the constructor of either an
                          ObjIn or ObjOut. For example:

                          Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
                          ObjectInputStream in = new ObjIn(cfg); //pass it in

                          Note that the option setting can be chained. Check the source code
                          (Config.java) for more options.

                          For the above example, "handler" is used like an event handler. A common
                          approach is to subclass the default implementation with your own anonymous
                          class:

                          NoSuchFieldHandler handler = new NoSuchFieldHandler() {
                          public String noSuchField(Class c, String fieldName) {
                          if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
                          return "theNewFieldName";
                          else
                          throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in "+c);
                          }
                          };
                          //NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
                          //Eg. could use two: first tier maps classes to HashMaps, which in turn maps
                          //old fieldnames to new fieldnames.
                        • JSX-ideas@yahoogroups.com
                          JSX FAQ - 14 November 2001 ======= JSX instantly XML-enables applications, by re-implementing the Serialization API for XML. FAQ Contents: (1). Background (2).
                          Message 12 of 30 , Apr 1, 2003
                          • 0 Attachment
                            JSX FAQ - 14 November 2001
                            =======

                            JSX instantly XML-enables applications, by re-implementing the Serialization
                            API for XML.

                            FAQ Contents:
                            (1). Background
                            (2). Using the Serialization API
                            (3). Using JSX

                            If your question is not answered here, please try the homepage:
                            http://www.csse.monash.edu.au/~bren/JSX/
                            or mailing list:
                            http://groups.yahoo.com/group/JSX-ideas/messages

                            ------------------------------------------------------------------------------


                            (1). Background
                            ===============

                            (1.1) JSX stands for...?
                            Java Serialization to XML

                            (1.2) What does JOS stand for?
                            Java Object Serialization (sometimes referred to as "Java's own Serialization")

                            (1.3) What are the uses of JSX?
                            - Long-term persistence - XML can be modified directly.
                            - A transparent protocol for communicating between different components,
                            that is easy to debug, and able to cope with different objects.
                            - Configuration files.
                            - A debugging tool - dumping object state.

                            (1.4) What are the benefits of JSX?
                            - A human-readable form of normally invisible objects
                            - A human-edtiable form, for entering and editing objects
                            - A human-comprehendible wire/file protocol for object and data exchange
                            between other applications and languages

                            (1.5) What are the goals of JSX?
                            To be able to instantly XML-enable applications, without needing to change
                            them at all.
                            - to produce a "human comprehendible" XML representation of object graphs,
                            that is readable and robust under human edits.
                            - in the long-term, to help users handle the inevitable evolution of objects

                            - a direct JOS replacement.
                            - replaceable *by* JOS. Thus, JSX should not pollute the Serialization API -
                            and so JSX can only add functionality through its constructors, using the
                            Config object.





                            (2). Using the Serialization API
                            ================================

                            (2.1). Where's a good tutorial?
                            "Advanced Object Serialization", by John Zukowski (August 2001)
                            http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

                            (2.2). How do I write my own readObject() and writeObject() methods?
                            Here's the signatures:
                            private void readObject(ObjectInputStream ois)
                            throws ClassNotFoundException, IOException {
                            //your code here
                            }
                            private writeObject(ObjectOutputStream oos)
                            throws IOException {
                            //your code here
                            }


                            (2.3). How do I use GetField?
                            It can only be used within a readObject() method that you have coded for your
                            class, and is called by the serialization system.

                            See example in:
                            http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
                            It's almost halfway through, under the heading: "Using ObjectStreamField"



                            (3). Using JSX
                            ==============

                            (3.1). How do I use Config?

                            Config is used to configure JSX for both input and output. You create the
                            Config object, set it, and then pass it into the constructor of either an
                            ObjIn or ObjOut. For example:

                            Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
                            ObjectInputStream in = new ObjIn(cfg); //pass it in

                            Note that the option setting can be chained. Check the source code
                            (Config.java) for more options.

                            For the above example, "handler" is used like an event handler. A common
                            approach is to subclass the default implementation with your own anonymous
                            class:

                            NoSuchFieldHandler handler = new NoSuchFieldHandler() {
                            public String noSuchField(Class c, String fieldName) {
                            if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
                            return "theNewFieldName";
                            else
                            throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in "+c);
                            }
                            };
                            //NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
                            //Eg. could use two: first tier maps classes to HashMaps, which in turn maps
                            //old fieldnames to new fieldnames.
                          • JSX-ideas@yahoogroups.com
                            JSX FAQ - 14 November 2001 ======= JSX instantly XML-enables applications, by re-implementing the Serialization API for XML. FAQ Contents: (1). Background (2).
                            Message 13 of 30 , May 1 11:27 AM
                            • 0 Attachment
                              JSX FAQ - 14 November 2001
                              =======

                              JSX instantly XML-enables applications, by re-implementing the Serialization
                              API for XML.

                              FAQ Contents:
                              (1). Background
                              (2). Using the Serialization API
                              (3). Using JSX

                              If your question is not answered here, please try the homepage:
                              http://www.csse.monash.edu.au/~bren/JSX/
                              or mailing list:
                              http://groups.yahoo.com/group/JSX-ideas/messages

                              ------------------------------------------------------------------------------


                              (1). Background
                              ===============

                              (1.1) JSX stands for...?
                              Java Serialization to XML

                              (1.2) What does JOS stand for?
                              Java Object Serialization (sometimes referred to as "Java's own Serialization")

                              (1.3) What are the uses of JSX?
                              - Long-term persistence - XML can be modified directly.
                              - A transparent protocol for communicating between different components,
                              that is easy to debug, and able to cope with different objects.
                              - Configuration files.
                              - A debugging tool - dumping object state.

                              (1.4) What are the benefits of JSX?
                              - A human-readable form of normally invisible objects
                              - A human-edtiable form, for entering and editing objects
                              - A human-comprehendible wire/file protocol for object and data exchange
                              between other applications and languages

                              (1.5) What are the goals of JSX?
                              To be able to instantly XML-enable applications, without needing to change
                              them at all.
                              - to produce a "human comprehendible" XML representation of object graphs,
                              that is readable and robust under human edits.
                              - in the long-term, to help users handle the inevitable evolution of objects

                              - a direct JOS replacement.
                              - replaceable *by* JOS. Thus, JSX should not pollute the Serialization API -
                              and so JSX can only add functionality through its constructors, using the
                              Config object.





                              (2). Using the Serialization API
                              ================================

                              (2.1). Where's a good tutorial?
                              "Advanced Object Serialization", by John Zukowski (August 2001)
                              http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

                              (2.2). How do I write my own readObject() and writeObject() methods?
                              Here's the signatures:
                              private void readObject(ObjectInputStream ois)
                              throws ClassNotFoundException, IOException {
                              //your code here
                              }
                              private writeObject(ObjectOutputStream oos)
                              throws IOException {
                              //your code here
                              }


                              (2.3). How do I use GetField?
                              It can only be used within a readObject() method that you have coded for your
                              class, and is called by the serialization system.

                              See example in:
                              http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
                              It's almost halfway through, under the heading: "Using ObjectStreamField"



                              (3). Using JSX
                              ==============

                              (3.1). How do I use Config?

                              Config is used to configure JSX for both input and output. You create the
                              Config object, set it, and then pass it into the constructor of either an
                              ObjIn or ObjOut. For example:

                              Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
                              ObjectInputStream in = new ObjIn(cfg); //pass it in

                              Note that the option setting can be chained. Check the source code
                              (Config.java) for more options.

                              For the above example, "handler" is used like an event handler. A common
                              approach is to subclass the default implementation with your own anonymous
                              class:

                              NoSuchFieldHandler handler = new NoSuchFieldHandler() {
                              public String noSuchField(Class c, String fieldName) {
                              if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
                              return "theNewFieldName";
                              else
                              throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in "+c);
                              }
                              };
                              //NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
                              //Eg. could use two: first tier maps classes to HashMaps, which in turn maps
                              //old fieldnames to new fieldnames.
                            • JSX-ideas@yahoogroups.com
                              JSX FAQ - 14 November 2001 ======= JSX instantly XML-enables applications, by re-implementing the Serialization API for XML. FAQ Contents: (1). Background (2).
                              Message 14 of 30 , Jun 1, 2003
                              • 0 Attachment
                                JSX FAQ - 14 November 2001
                                =======

                                JSX instantly XML-enables applications, by re-implementing the Serialization
                                API for XML.

                                FAQ Contents:
                                (1). Background
                                (2). Using the Serialization API
                                (3). Using JSX

                                If your question is not answered here, please try the homepage:
                                http://www.csse.monash.edu.au/~bren/JSX/
                                or mailing list:
                                http://groups.yahoo.com/group/JSX-ideas/messages

                                ------------------------------------------------------------------------------


                                (1). Background
                                ===============

                                (1.1) JSX stands for...?
                                Java Serialization to XML

                                (1.2) What does JOS stand for?
                                Java Object Serialization (sometimes referred to as "Java's own Serialization")

                                (1.3) What are the uses of JSX?
                                - Long-term persistence - XML can be modified directly.
                                - A transparent protocol for communicating between different components,
                                that is easy to debug, and able to cope with different objects.
                                - Configuration files.
                                - A debugging tool - dumping object state.

                                (1.4) What are the benefits of JSX?
                                - A human-readable form of normally invisible objects
                                - A human-edtiable form, for entering and editing objects
                                - A human-comprehendible wire/file protocol for object and data exchange
                                between other applications and languages

                                (1.5) What are the goals of JSX?
                                To be able to instantly XML-enable applications, without needing to change
                                them at all.
                                - to produce a "human comprehendible" XML representation of object graphs,
                                that is readable and robust under human edits.
                                - in the long-term, to help users handle the inevitable evolution of objects

                                - a direct JOS replacement.
                                - replaceable *by* JOS. Thus, JSX should not pollute the Serialization API -
                                and so JSX can only add functionality through its constructors, using the
                                Config object.





                                (2). Using the Serialization API
                                ================================

                                (2.1). Where's a good tutorial?
                                "Advanced Object Serialization", by John Zukowski (August 2001)
                                http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

                                (2.2). How do I write my own readObject() and writeObject() methods?
                                Here's the signatures:
                                private void readObject(ObjectInputStream ois)
                                throws ClassNotFoundException, IOException {
                                //your code here
                                }
                                private writeObject(ObjectOutputStream oos)
                                throws IOException {
                                //your code here
                                }


                                (2.3). How do I use GetField?
                                It can only be used within a readObject() method that you have coded for your
                                class, and is called by the serialization system.

                                See example in:
                                http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
                                It's almost halfway through, under the heading: "Using ObjectStreamField"



                                (3). Using JSX
                                ==============

                                (3.1). How do I use Config?

                                Config is used to configure JSX for both input and output. You create the
                                Config object, set it, and then pass it into the constructor of either an
                                ObjIn or ObjOut. For example:

                                Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
                                ObjectInputStream in = new ObjIn(cfg); //pass it in

                                Note that the option setting can be chained. Check the source code
                                (Config.java) for more options.

                                For the above example, "handler" is used like an event handler. A common
                                approach is to subclass the default implementation with your own anonymous
                                class:

                                NoSuchFieldHandler handler = new NoSuchFieldHandler() {
                                public String noSuchField(Class c, String fieldName) {
                                if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
                                return "theNewFieldName";
                                else
                                throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in "+c);
                                }
                                };
                                //NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
                                //Eg. could use two: first tier maps classes to HashMaps, which in turn maps
                                //old fieldnames to new fieldnames.
                              • JSX-ideas@yahoogroups.com
                                JSX FAQ - 14 November 2001 ======= JSX instantly XML-enables applications, by re-implementing the Serialization API for XML. FAQ Contents: (1). Background (2).
                                Message 15 of 30 , Jul 1, 2003
                                • 0 Attachment
                                  JSX FAQ - 14 November 2001
                                  =======

                                  JSX instantly XML-enables applications, by re-implementing the Serialization
                                  API for XML.

                                  FAQ Contents:
                                  (1). Background
                                  (2). Using the Serialization API
                                  (3). Using JSX

                                  If your question is not answered here, please try the homepage:
                                  http://www.csse.monash.edu.au/~bren/JSX/
                                  or mailing list:
                                  http://groups.yahoo.com/group/JSX-ideas/messages

                                  ------------------------------------------------------------------------------


                                  (1). Background
                                  ===============

                                  (1.1) JSX stands for...?
                                  Java Serialization to XML

                                  (1.2) What does JOS stand for?
                                  Java Object Serialization (sometimes referred to as "Java's own Serialization")

                                  (1.3) What are the uses of JSX?
                                  - Long-term persistence - XML can be modified directly.
                                  - A transparent protocol for communicating between different components,
                                  that is easy to debug, and able to cope with different objects.
                                  - Configuration files.
                                  - A debugging tool - dumping object state.

                                  (1.4) What are the benefits of JSX?
                                  - A human-readable form of normally invisible objects
                                  - A human-edtiable form, for entering and editing objects
                                  - A human-comprehendible wire/file protocol for object and data exchange
                                  between other applications and languages

                                  (1.5) What are the goals of JSX?
                                  To be able to instantly XML-enable applications, without needing to change
                                  them at all.
                                  - to produce a "human comprehendible" XML representation of object graphs,
                                  that is readable and robust under human edits.
                                  - in the long-term, to help users handle the inevitable evolution of objects

                                  - a direct JOS replacement.
                                  - replaceable *by* JOS. Thus, JSX should not pollute the Serialization API -
                                  and so JSX can only add functionality through its constructors, using the
                                  Config object.





                                  (2). Using the Serialization API
                                  ================================

                                  (2.1). Where's a good tutorial?
                                  "Advanced Object Serialization", by John Zukowski (August 2001)
                                  http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

                                  (2.2). How do I write my own readObject() and writeObject() methods?
                                  Here's the signatures:
                                  private void readObject(ObjectInputStream ois)
                                  throws ClassNotFoundException, IOException {
                                  //your code here
                                  }
                                  private writeObject(ObjectOutputStream oos)
                                  throws IOException {
                                  //your code here
                                  }


                                  (2.3). How do I use GetField?
                                  It can only be used within a readObject() method that you have coded for your
                                  class, and is called by the serialization system.

                                  See example in:
                                  http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
                                  It's almost halfway through, under the heading: "Using ObjectStreamField"



                                  (3). Using JSX
                                  ==============

                                  (3.1). How do I use Config?

                                  Config is used to configure JSX for both input and output. You create the
                                  Config object, set it, and then pass it into the constructor of either an
                                  ObjIn or ObjOut. For example:

                                  Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
                                  ObjectInputStream in = new ObjIn(cfg); //pass it in

                                  Note that the option setting can be chained. Check the source code
                                  (Config.java) for more options.

                                  For the above example, "handler" is used like an event handler. A common
                                  approach is to subclass the default implementation with your own anonymous
                                  class:

                                  NoSuchFieldHandler handler = new NoSuchFieldHandler() {
                                  public String noSuchField(Class c, String fieldName) {
                                  if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
                                  return "theNewFieldName";
                                  else
                                  throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in "+c);
                                  }
                                  };
                                  //NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
                                  //Eg. could use two: first tier maps classes to HashMaps, which in turn maps
                                  //old fieldnames to new fieldnames.
                                • JSX-ideas@yahoogroups.com
                                  JSX FAQ - 14 November 2001 ======= JSX instantly XML-enables applications, by re-implementing the Serialization API for XML. FAQ Contents: (1). Background (2).
                                  Message 16 of 30 , Aug 1, 2003
                                  • 0 Attachment
                                    JSX FAQ - 14 November 2001
                                    =======

                                    JSX instantly XML-enables applications, by re-implementing the Serialization
                                    API for XML.

                                    FAQ Contents:
                                    (1). Background
                                    (2). Using the Serialization API
                                    (3). Using JSX

                                    If your question is not answered here, please try the homepage:
                                    http://www.csse.monash.edu.au/~bren/JSX/
                                    or mailing list:
                                    http://groups.yahoo.com/group/JSX-ideas/messages

                                    ------------------------------------------------------------------------------


                                    (1). Background
                                    ===============

                                    (1.1) JSX stands for...?
                                    Java Serialization to XML

                                    (1.2) What does JOS stand for?
                                    Java Object Serialization (sometimes referred to as "Java's own Serialization")

                                    (1.3) What are the uses of JSX?
                                    - Long-term persistence - XML can be modified directly.
                                    - A transparent protocol for communicating between different components,
                                    that is easy to debug, and able to cope with different objects.
                                    - Configuration files.
                                    - A debugging tool - dumping object state.

                                    (1.4) What are the benefits of JSX?
                                    - A human-readable form of normally invisible objects
                                    - A human-edtiable form, for entering and editing objects
                                    - A human-comprehendible wire/file protocol for object and data exchange
                                    between other applications and languages

                                    (1.5) What are the goals of JSX?
                                    To be able to instantly XML-enable applications, without needing to change
                                    them at all.
                                    - to produce a "human comprehendible" XML representation of object graphs,
                                    that is readable and robust under human edits.
                                    - in the long-term, to help users handle the inevitable evolution of objects

                                    - a direct JOS replacement.
                                    - replaceable *by* JOS. Thus, JSX should not pollute the Serialization API -
                                    and so JSX can only add functionality through its constructors, using the
                                    Config object.





                                    (2). Using the Serialization API
                                    ================================

                                    (2.1). Where's a good tutorial?
                                    "Advanced Object Serialization", by John Zukowski (August 2001)
                                    http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

                                    (2.2). How do I write my own readObject() and writeObject() methods?
                                    Here's the signatures:
                                    private void readObject(ObjectInputStream ois)
                                    throws ClassNotFoundException, IOException {
                                    //your code here
                                    }
                                    private writeObject(ObjectOutputStream oos)
                                    throws IOException {
                                    //your code here
                                    }


                                    (2.3). How do I use GetField?
                                    It can only be used within a readObject() method that you have coded for your
                                    class, and is called by the serialization system.

                                    See example in:
                                    http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
                                    It's almost halfway through, under the heading: "Using ObjectStreamField"



                                    (3). Using JSX
                                    ==============

                                    (3.1). How do I use Config?

                                    Config is used to configure JSX for both input and output. You create the
                                    Config object, set it, and then pass it into the constructor of either an
                                    ObjIn or ObjOut. For example:

                                    Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
                                    ObjectInputStream in = new ObjIn(cfg); //pass it in

                                    Note that the option setting can be chained. Check the source code
                                    (Config.java) for more options.

                                    For the above example, "handler" is used like an event handler. A common
                                    approach is to subclass the default implementation with your own anonymous
                                    class:

                                    NoSuchFieldHandler handler = new NoSuchFieldHandler() {
                                    public String noSuchField(Class c, String fieldName) {
                                    if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
                                    return "theNewFieldName";
                                    else
                                    throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in "+c);
                                    }
                                    };
                                    //NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
                                    //Eg. could use two: first tier maps classes to HashMaps, which in turn maps
                                    //old fieldnames to new fieldnames.
                                  • JSX-ideas@yahoogroups.com
                                    JSX FAQ - 14 November 2001 ======= JSX instantly XML-enables applications, by re-implementing the Serialization API for XML. FAQ Contents: (1). Background (2).
                                    Message 17 of 30 , Sep 1, 2003
                                    • 0 Attachment
                                      JSX FAQ - 14 November 2001
                                      =======

                                      JSX instantly XML-enables applications, by re-implementing the Serialization
                                      API for XML.

                                      FAQ Contents:
                                      (1). Background
                                      (2). Using the Serialization API
                                      (3). Using JSX

                                      If your question is not answered here, please try the homepage:
                                      http://www.csse.monash.edu.au/~bren/JSX/
                                      or mailing list:
                                      http://groups.yahoo.com/group/JSX-ideas/messages

                                      ------------------------------------------------------------------------------


                                      (1). Background
                                      ===============

                                      (1.1) JSX stands for...?
                                      Java Serialization to XML

                                      (1.2) What does JOS stand for?
                                      Java Object Serialization (sometimes referred to as "Java's own Serialization")

                                      (1.3) What are the uses of JSX?
                                      - Long-term persistence - XML can be modified directly.
                                      - A transparent protocol for communicating between different components,
                                      that is easy to debug, and able to cope with different objects.
                                      - Configuration files.
                                      - A debugging tool - dumping object state.

                                      (1.4) What are the benefits of JSX?
                                      - A human-readable form of normally invisible objects
                                      - A human-edtiable form, for entering and editing objects
                                      - A human-comprehendible wire/file protocol for object and data exchange
                                      between other applications and languages

                                      (1.5) What are the goals of JSX?
                                      To be able to instantly XML-enable applications, without needing to change
                                      them at all.
                                      - to produce a "human comprehendible" XML representation of object graphs,
                                      that is readable and robust under human edits.
                                      - in the long-term, to help users handle the inevitable evolution of objects

                                      - a direct JOS replacement.
                                      - replaceable *by* JOS. Thus, JSX should not pollute the Serialization API -
                                      and so JSX can only add functionality through its constructors, using the
                                      Config object.





                                      (2). Using the Serialization API
                                      ================================

                                      (2.1). Where's a good tutorial?
                                      "Advanced Object Serialization", by John Zukowski (August 2001)
                                      http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

                                      (2.2). How do I write my own readObject() and writeObject() methods?
                                      Here's the signatures:
                                      private void readObject(ObjectInputStream ois)
                                      throws ClassNotFoundException, IOException {
                                      //your code here
                                      }
                                      private writeObject(ObjectOutputStream oos)
                                      throws IOException {
                                      //your code here
                                      }


                                      (2.3). How do I use GetField?
                                      It can only be used within a readObject() method that you have coded for your
                                      class, and is called by the serialization system.

                                      See example in:
                                      http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
                                      It's almost halfway through, under the heading: "Using ObjectStreamField"



                                      (3). Using JSX
                                      ==============

                                      (3.1). How do I use Config?

                                      Config is used to configure JSX for both input and output. You create the
                                      Config object, set it, and then pass it into the constructor of either an
                                      ObjIn or ObjOut. For example:

                                      Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
                                      ObjectInputStream in = new ObjIn(cfg); //pass it in

                                      Note that the option setting can be chained. Check the source code
                                      (Config.java) for more options.

                                      For the above example, "handler" is used like an event handler. A common
                                      approach is to subclass the default implementation with your own anonymous
                                      class:

                                      NoSuchFieldHandler handler = new NoSuchFieldHandler() {
                                      public String noSuchField(Class c, String fieldName) {
                                      if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
                                      return "theNewFieldName";
                                      else
                                      throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in "+c);
                                      }
                                      };
                                      //NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
                                      //Eg. could use two: first tier maps classes to HashMaps, which in turn maps
                                      //old fieldnames to new fieldnames.
                                    Your message has been successfully submitted and would be delivered to recipients shortly.