1 package net.sourceforge.rpgee.resources.openrpg.tree;
2
3 import java.io.IOException;
4 import java.net.URL;
5
6 import net.sourceforge.rpgee.resources.Resource;
7 import net.sourceforge.rpgee.resources.exceptions.ResourceException;
8
9 import org.apache.commons.lang.NotImplementedException;
10 import org.apache.commons.logging.Log;
11 import org.apache.commons.logging.LogFactory;
12
13 public class OpenRpg1TreeResourceManager implements net.sourceforge.rpgee.resources.ResourceLoader {
14 private static Log log = LogFactory.getLog(OpenRpg1TreeResourceManager.class);
15
16 /**
17 * Loads the xml from a URL. A parser is then used to have access to the tree for doing queries against it.
18 *
19 * @param treeData URL from which to load the xml. The XML has to conform to the OpenRPG1 format.
20 */
21 public OpenRpg1TreeResourceManager(URL treeData) throws ResourceException {
22 super();
23 try {
24 Object x = treeData.getContent();
25 log.debug("Acquired resource " + x);
26 } catch (IOException e) {
27 log.debug("Error acquiring resource from " + treeData, e);
28 throw new ResourceException(e,"resource.error.io-error");
29 }
30 }
31
32 public Resource getResourceByIdentifier(String identifier) {
33 log.debug("Attempting to load " + identifier);
34
35 throw new NotImplementedException();
36 }
37 }