Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Captain Awesome's ResourceFactory  (Read 1552 times)
0 Members and 1 Guest are viewing this topic.
Offline Captain Awesome

Junior Member


Medals: 2


Hi


« Posted 2010-11-10 01:13:03 »

Hello!
I have tried a lot of different resource loaders (that loads objects from xml), however I never found one that suited my needs. I didn't want to extend another class, I didn't want to create other objects in order to get my final object. All I wanted was to call one method and get the complete object without any hassle.

That's when I started working on my own resourceloader. My ResourceFactory can load .xml files from InputStreams, files and urls. It supports parenting, objects within objects and java.util.List.
You can download it at: http://www.trololol.se/java/
There is also a tutorial there which explains everything in detail.

If you have any questions or suggestions, feel free to post them here.
Offline Captain Awesome

Junior Member


Medals: 2


Hi


« Reply #1 - Posted 2010-11-10 01:26:56 »

Woops, I see I might have posted this in the wrong section. Could a mod move it to "Engines, Libraries and Tools" board?
Offline lhkbob

JGO Knight


Medals: 32



« Reply #2 - Posted 2010-11-10 05:50:22 »

What about this, http://xstream.codehaus.org/?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline cylab

JGO Knight


Medals: 30



« Reply #3 - Posted 2010-11-10 09:45:20 »

I think he is not after a deserialization system, but wants to have some sort of registry for him to create predefined resources on demand, so xstream won't cut it.

Mathias - I Know What [you] Did Last Summer!
Offline Captain Awesome

Junior Member


Medals: 2


Hi


« Reply #4 - Posted 2010-11-10 10:18:50 »

I think he is not after a deserialization system, but wants to have some sort of registry for him to create predefined resources on demand, so xstream won't cut it.

Yeah, that is pretty much what I wanted to do
Offline Captain Awesome

Junior Member


Medals: 2


Hi


« Reply #5 - Posted 2010-11-17 13:22:18 »

I just released an update to this, which includes some methods to add, remove and save nodes within java. Also, you can now specify a method which will be run when an object is created.

Also, I'm releasing the source code here: http://www.trololol.se/java/ResourceFactory.rar. You may do whatever you want with it Smiley


Have fun
Offline Nate

JGO Wizard


Medals: 81
Projects: 3


Esoteric Software


« Reply #6 - Posted 2010-11-17 20:19:57 »

I think he is not after a deserialization system, but wants to have some sort of registry for him to create predefined resources on demand, so xstream won't cut it.

I don't see how what Captain Awesome is doing is any different than Xstream or other serialization.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Try the Free Demo of Revenge of the Titans

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (84 views)
2013-05-17 21:29:12

alaslipknot (92 views)
2013-05-16 21:24:48

gouessej (123 views)
2013-05-16 00:53:38

gouessej (117 views)
2013-05-16 00:17:58

theagentd (127 views)
2013-05-15 15:01:13

theagentd (114 views)
2013-05-15 15:00:54

StreetDoggy (158 views)
2013-05-14 15:56:26

kutucuk (180 views)
2013-05-12 17:10:36

kutucuk (180 views)
2013-05-12 15:36:09

UnluckyDevil (187 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.085 seconds with 21 queries.