Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

net.jxta.ext.config
Class Resource  view Resource download Resource.java

java.lang.Object
  extended bynet.jxta.ext.config.Resource
Direct Known Subclasses:
ResourceManager

public class Resource
extends java.lang.Object

Version:
$Id: Resource.java,v 1.15 2004/07/31 07:44:34 gonzo Exp $

Field Summary
private static java.lang.String EXCEPTION_PREFIX
           
private static java.lang.String FILE_SEPERATOR
           
private static java.lang.Object lock
           
private static java.lang.String PATH_DELIMITER
           
private  java.util.List resources
           
private  org.jdom.Element root
           
private static java.lang.String ROOT
           
private static boolean VERBOSE
           
 
Constructor Summary
Resource()
          Constructor for the Resource object
 
Method Summary
 boolean contains(java.lang.String key)
           
 java.lang.String get(java.lang.String key)
          Description of the Method
 java.lang.String get(java.lang.String key, java.lang.String d)
          Description of the Method
 java.util.List getAll(java.lang.String key)
          Gets the all attribute of the Resource object
 java.util.List getAll(java.lang.String key, java.lang.String d)
          Gets the all attribute of the Resource object
 boolean getBoolean(java.lang.String key)
          Gets the boolean attribute of the Resource object
 boolean getBoolean(java.lang.String key, boolean d)
          Gets the boolean attribute of the Resource object
 boolean getBoolean(java.lang.String key, java.lang.Boolean d)
          Gets the boolean attribute of the Resource object
 char getChar(java.lang.String key)
          Gets the char attribute of the Resource object
 char getChar(java.lang.String key, java.lang.Character d)
          Gets the char attribute of the Resource object
 java.lang.Class getClass(java.lang.String key)
          Gets the class attribute of the Resource object
 java.lang.Class getClass(java.lang.String key, java.lang.Class d)
          Gets the class attribute of the Resource object
 java.util.List getClasses(java.lang.String key)
          Gets the classes attribute of the Resource object
 java.util.List getClasses(java.lang.String key, java.net.URL d)
          Gets the classes attribute of the Resource object
 java.awt.Color getColor(java.lang.String key)
          Gets the color attribute of the Resource object
 java.awt.Color getColor(java.lang.String key, java.awt.Color d)
          Gets the color attribute of the Resource object
private  org.jdom.Element getElement(java.io.InputStream is)
          Gets the element attribute of the Resource object
 float getFloat(java.lang.String key)
          Gets the float attribute of the Resource object
 float getFloat(java.lang.String key, java.lang.Float d)
          Gets the float attribute of the Resource object
 int getInt(java.lang.String key)
          Gets the int attribute of the Resource object
 int getInt(java.lang.String key, int d)
          Gets the int attribute of the Resource object
 int getInt(java.lang.String key, java.lang.Integer d)
          Gets the int attribute of the Resource object
 long getLong(java.lang.String key)
          Gets the long attribute of the Resource object
 long getLong(java.lang.String key, long d)
          Gets the long attribute of the Resource object
 long getLong(java.lang.String key, java.lang.Long d)
          Gets the long attribute of the Resource object
 Resource getResource(java.lang.String key)
           
 java.io.InputStream getResourceAsStream(java.lang.String resource)
          Gets the resourceAsStream attribute of the Resource object
 java.io.InputStream getResourceAsStream(java.lang.String resource, java.lang.Class clazz)
          Gets the resourceAsStream attribute of the Resource object
 java.util.List getResources(java.lang.String key)
           
private  org.jdom.Document getRootDocument()
          Gets the rootDocument attribute of the Resource object
private  org.jdom.Document getRootDocument(boolean isClone)
          Gets the rootDocument attribute of the Resource object
private  org.jdom.Element getRootElement(java.io.InputStream is)
          Gets the rootElement attribute of the Resource object
private  org.jdom.Element getRootElement(java.net.URL resource)
          Gets the rootElement attribute of the Resource object
 java.net.URI getURI(java.lang.String key)
          Gets the URI attribute of the Resource object
 java.net.URI getURI(java.lang.String key, java.net.URI d)
          Gets the URI attribute of the Resource object
 java.util.List getURIs(java.lang.String key)
          Gets the URIs attribute of the Resource object
 java.util.List getURIs(java.lang.String key, java.net.URI d)
          Gets the URIs attribute of the Resource object
 java.net.URL getURL(java.lang.String key)
          Gets the URL attribute of the Resource object
 java.net.URL getURL(java.lang.String key, java.net.URL d)
          Gets the URL attribute of the Resource object
 java.util.List getURLs(java.lang.String key)
          Gets the URLs attribute of the Resource object
 java.util.List getURLs(java.lang.String key, java.net.URL d)
          Gets the URLs attribute of the Resource object
private  java.lang.Object getValue(java.lang.String key)
          Gets the value attribute of the Resource object
private  java.lang.Object getValue(java.lang.String key, boolean isClone)
          Gets the value attribute of the Resource object
private  java.lang.String getValue(java.lang.String key, java.lang.String d)
          Gets the value attribute of the Resource object
private  java.util.List getValues(java.lang.String key)
          Gets the values attribute of the Resource object
private  java.util.List getValues(java.lang.String key, java.lang.String d)
          Gets the values attribute of the Resource object
private  XPath getXP(java.lang.String key)
          Gets the xP attribute of the Resource object
 void load(java.io.File resource)
          Description of the Method
 void load(java.io.InputStream is)
          Description of the Method
private  void load(java.lang.Object resource, org.jdom.Element element)
          Description of the Method
 void load(java.lang.String resource)
          Description of the Method
 void load(java.lang.String resource, java.lang.Class clazz)
          Description of the Method
 void load(java.net.URL resource)
          Description of the Method
private  void process(java.lang.Object resource)
          Description of the Method
private  void process(java.lang.Object resource, java.lang.Class clazz)
          Description of the Method
 void set(java.lang.String key)
          Description of the Method
 void set(java.lang.String key, java.lang.String value)
          Description of the Method
 java.lang.String toString()
          Description of the Method
static java.net.URL toURL(java.io.File f)
          Description of the Method
static java.net.URL toURL(java.lang.String s)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ROOT

private static final java.lang.String ROOT
See Also:
Constant Field Values

PATH_DELIMITER

private static final java.lang.String PATH_DELIMITER
See Also:
Constant Field Values

FILE_SEPERATOR

private static final java.lang.String FILE_SEPERATOR

EXCEPTION_PREFIX

private static final java.lang.String EXCEPTION_PREFIX
See Also:
Constant Field Values

lock

private static final java.lang.Object lock

VERBOSE

private static final boolean VERBOSE
See Also:
Constant Field Values

resources

private java.util.List resources

root

private org.jdom.Element root
Constructor Detail

Resource

public Resource()
Constructor for the Resource object

Method Detail

toURL

public static java.net.URL toURL(java.lang.String s)
                          throws ConversionException
Description of the Method


toURL

public static java.net.URL toURL(java.io.File f)
                          throws ConversionException
Description of the Method


load

public void load(java.net.URL resource)
          throws ResourceNotFoundException
Description of the Method


load

public void load(java.lang.String resource)
          throws ResourceNotFoundException
Description of the Method


load

public void load(java.io.File resource)
          throws ResourceNotFoundException,
                 java.net.MalformedURLException
Description of the Method


load

public void load(java.lang.String resource,
                 java.lang.Class clazz)
          throws ResourceNotFoundException
Description of the Method


load

public void load(java.io.InputStream is)
          throws ResourceNotFoundException
Description of the Method


getResourceAsStream

public java.io.InputStream getResourceAsStream(java.lang.String resource)
Gets the resourceAsStream attribute of the Resource object


getResourceAsStream

public java.io.InputStream getResourceAsStream(java.lang.String resource,
                                               java.lang.Class clazz)
Gets the resourceAsStream attribute of the Resource object


get

public java.lang.String get(java.lang.String key)
Description of the Method


get

public java.lang.String get(java.lang.String key,
                            java.lang.String d)
Description of the Method


getInt

public int getInt(java.lang.String key)
           throws ConversionException
Gets the int attribute of the Resource object


getInt

public int getInt(java.lang.String key,
                  int d)
Gets the int attribute of the Resource object


getInt

public int getInt(java.lang.String key,
                  java.lang.Integer d)
           throws ConversionException
Gets the int attribute of the Resource object


getLong

public long getLong(java.lang.String key)
             throws ConversionException
Gets the long attribute of the Resource object


getLong

public long getLong(java.lang.String key,
                    long d)
Gets the long attribute of the Resource object


getLong

public long getLong(java.lang.String key,
                    java.lang.Long d)
             throws ConversionException
Gets the long attribute of the Resource object


getFloat

public float getFloat(java.lang.String key)
               throws ConversionException
Gets the float attribute of the Resource object


getFloat

public float getFloat(java.lang.String key,
                      java.lang.Float d)
               throws ConversionException
Gets the float attribute of the Resource object


getBoolean

public boolean getBoolean(java.lang.String key)
Gets the boolean attribute of the Resource object


getBoolean

public boolean getBoolean(java.lang.String key,
                          boolean d)
Gets the boolean attribute of the Resource object


getBoolean

public boolean getBoolean(java.lang.String key,
                          java.lang.Boolean d)
Gets the boolean attribute of the Resource object


getChar

public char getChar(java.lang.String key)
             throws ConversionException
Gets the char attribute of the Resource object


getChar

public char getChar(java.lang.String key,
                    java.lang.Character d)
             throws ConversionException
Gets the char attribute of the Resource object


getURL

public java.net.URL getURL(java.lang.String key)
                    throws ConversionException
Gets the URL attribute of the Resource object


getURL

public java.net.URL getURL(java.lang.String key,
                           java.net.URL d)
                    throws ConversionException
Gets the URL attribute of the Resource object


getURLs

public java.util.List getURLs(java.lang.String key)
                       throws ConversionException
Gets the URLs attribute of the Resource object


getURLs

public java.util.List getURLs(java.lang.String key,
                              java.net.URL d)
                       throws ConversionException
Gets the URLs attribute of the Resource object


getURI

public java.net.URI getURI(java.lang.String key)
                    throws ConversionException
Gets the URI attribute of the Resource object


getURI

public java.net.URI getURI(java.lang.String key,
                           java.net.URI d)
                    throws ConversionException
Gets the URI attribute of the Resource object


getURIs

public java.util.List getURIs(java.lang.String key)
                       throws ConversionException
Gets the URIs attribute of the Resource object


getURIs

public java.util.List getURIs(java.lang.String key,
                              java.net.URI d)
                       throws ConversionException
Gets the URIs attribute of the Resource object


getColor

public java.awt.Color getColor(java.lang.String key)
                        throws ConversionException
Gets the color attribute of the Resource object


getColor

public java.awt.Color getColor(java.lang.String key,
                               java.awt.Color d)
                        throws ConversionException
Gets the color attribute of the Resource object


getResource

public Resource getResource(java.lang.String key)

getResources

public java.util.List getResources(java.lang.String key)

getClass

public java.lang.Class getClass(java.lang.String key)
                         throws ConversionException
Gets the class attribute of the Resource object


getClass

public java.lang.Class getClass(java.lang.String key,
                                java.lang.Class d)
                         throws ConversionException
Gets the class attribute of the Resource object


getClasses

public java.util.List getClasses(java.lang.String key)
                          throws ConversionException
Gets the classes attribute of the Resource object


getClasses

public java.util.List getClasses(java.lang.String key,
                                 java.net.URL d)
                          throws ConversionException
Gets the classes attribute of the Resource object


set

public void set(java.lang.String key)
Description of the Method


set

public void set(java.lang.String key,
                java.lang.String value)
Description of the Method


getAll

public java.util.List getAll(java.lang.String key)
Gets the all attribute of the Resource object


getAll

public java.util.List getAll(java.lang.String key,
                             java.lang.String d)
Gets the all attribute of the Resource object


contains

public boolean contains(java.lang.String key)

toString

public java.lang.String toString()
Description of the Method


process

private void process(java.lang.Object resource)
              throws ResourceNotFoundException
Description of the Method


process

private void process(java.lang.Object resource,
                     java.lang.Class clazz)
              throws ResourceNotFoundException
Description of the Method


getElement

private org.jdom.Element getElement(java.io.InputStream is)
                             throws org.jdom.JDOMException,
                                    java.io.IOException
Gets the element attribute of the Resource object


getRootElement

private org.jdom.Element getRootElement(java.net.URL resource)
                                 throws org.jdom.JDOMException,
                                        java.io.IOException
Gets the rootElement attribute of the Resource object


getRootElement

private org.jdom.Element getRootElement(java.io.InputStream is)
                                 throws org.jdom.JDOMException,
                                        java.io.IOException
Gets the rootElement attribute of the Resource object


load

private void load(java.lang.Object resource,
                  org.jdom.Element element)
Description of the Method


getValue

private java.lang.String getValue(java.lang.String key,
                                  java.lang.String d)
Gets the value attribute of the Resource object


getValue

private java.lang.Object getValue(java.lang.String key)
Gets the value attribute of the Resource object


getValue

private java.lang.Object getValue(java.lang.String key,
                                  boolean isClone)
Gets the value attribute of the Resource object


getValues

private java.util.List getValues(java.lang.String key,
                                 java.lang.String d)
Gets the values attribute of the Resource object


getValues

private java.util.List getValues(java.lang.String key)
Gets the values attribute of the Resource object


getXP

private XPath getXP(java.lang.String key)
Gets the xP attribute of the Resource object


getRootDocument

private org.jdom.Document getRootDocument()
Gets the rootDocument attribute of the Resource object


getRootDocument

private org.jdom.Document getRootDocument(boolean isClone)
Gets the rootDocument attribute of the Resource object