billroper: (Default)
One more round of rearrangements on my Java code and the XML serialization logic that I've built on top of the StAX XML API seems to be working pretty well.

In other news, the new LJ home page is really ugly.
billroper: (Default)
I am gradually figuring out more and more about how to work with Java types, enums, autoboxing, and generics, which is important when you're doing inbound XML serialization, as you end up needing to create a lot of objects. I've written a bunch of little utility routines that keep my XML consistent and the resulting XML document is making successful round trips, which I find very encouraging.

Eventually, I will have written enough utilities to cover all of my current cases. Right now, I'm still at the stage where I go to serialize another class and go, "Whoops! Time to write some more serialization code..."
billroper: (Default)
I've now got a mostly-working XML serialization implementation in Java built on top of the StAX API. I have successfully written data out. Tomorrow, I will see if I can read it back in. :)

I know that there will be pieces of this and that which I'll be adding to the implementation for some time as I deal with different types of data. But it's a start...
billroper: (Default)
Today was spent working through the Cloneable interface and creating copy constructors for the various classes I've been working on. Despite various dire warnings that I found via Google about the problems with the Cloneable interface, it appears to be one that we're using around here, so I will just have to use it carefully. :)

In other news, I sent off an e-mail that may result in stress reduction. We'll see how that goes...

Behind

May. 15th, 2013 11:23 pm
billroper: (Default)
As Operation Learn Java In a Week continues, I'm getting behind on several things that I would rather not be behind on.

[livejournal.com profile] daisy_knotwise is going out of town to the Women's Drum Weekend that Sally is organizing. Maybe after Katie and Julie go to sleep...

(However, Gretchen advises me that when I'm out of town, the girls never go to sleep. This could be a flaw in my otherwise clever plan.)
billroper: (Default)
I spent today immersed in Java generics, trying to figure out how to write an abstract base class using generics that would do everything that I wanted it to do. I've coded something up and sent it to one of the fellows in the shop who is a good bit further along with Java coding than I am (since I am at less than a week, that wouldn't be saying a lot, but apparently he's quite good) and we'll see what he has to say about my questions on the subject.

The thing that's causing me the problem is that I'm building a tree of items (in arbitrary order, so it doesn't look like there's anything in the Collection classes that quite does what I need) where each node in the tree has a unique key. Normally, that key is a String and needs to be searched for in a case-insensitive fashion. But in one of the cases where I want to use this generic tree class, the key is going to be a complex object, because when I'm storing time periods, you can't really compare any sort of reasonable human-readable String using a normal String comparison and get the right answer.

I'm trying to code a Find function and pass it my arbitrary generic Key and I'm having a real problem getting it to work. Maybe what I should be doing is actually storing the TreeItems in a Tree and putting a HashMap into the Tree to solve the Find problem. Except right now, I'm storing just one reference to the HashMap in the root object for the Tree.

Of course, if the generic Tree class extends the generic TreeItem class, I could probably get that trick to work... :)

Profile

billroper: (Default)
billroper

March 2026

S M T W T F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25262728
293031    

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 26th, 2026 06:45 pm
Powered by Dreamwidth Studios