thinkmap.xmlconfig.tags
Class Namespace

java.lang.Object
  extended by thinkmap.xmlconfig.tags.Namespace
All Implemented Interfaces:
IConfigTag

public class Namespace
extends Object
implements IConfigTag

Namespace allows tags to be defined within a certain xml namespace.


Nested Class Summary
 class Namespace.URIAlias
           
 
Field Summary
protected  Map<String,Plugin> registeredElements
           
protected  Map<String,TypeConverterEntry> typeConverters
           
 
Constructor Summary
Namespace()
           
Namespace(String prefix)
           
 
Method Summary
 void addAlias(Alias alias)
           
 void addImport(Import i)
           
 void addPlugin(Plugin p)
           
 void addPriority(Priority p)
           
 void addTypeConverter(TypeConverterEntry p)
           
 void addURIAlias(Namespace.URIAlias alias)
           
 XObject build(Assembler assembler, ConfigElement thisElement, ConfigElement parent, XObject object, XObject parentObject)
           
protected  boolean canConstruct(Class<?> c)
           
 Plugin createPlugin()
           
 Namespace.URIAlias createURIAlias()
           
 Method getAlias(Class<?> c, String name)
           
 IBuilder getBuilderforElement(String elementName)
           
 ClassLoader getClassLoader()
           
 Plugin getPlugin(String elementName)
           
 int getPriority(Method m)
           
 Set<String> getRegisteredElements()
           
protected  Method getSuperMethod(Method m)
           
 ITypeConverter getTypeConverter(Class<?> c)
           
 String getURI()
          Get this namespace's primary URI.
 String[] getURIs()
          Get all of the URI's that this namespace is known under, including the primary URI and any aliases.
 boolean isSimpleType(Class<?> c)
           
 Class<?> loadClass(String className)
           
 Method parseMethod(String method)
           
 void setClassLoader(ClassLoader cl)
           
 void setURI(String uri)
          Set this namespace's primary URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

typeConverters

protected Map<String,TypeConverterEntry> typeConverters

registeredElements

protected Map<String,Plugin> registeredElements
Constructor Detail

Namespace

public Namespace()

Namespace

public Namespace(String prefix)
Method Detail

getURI

public String getURI()
Get this namespace's primary URI.

Returns:
Returns the URI.

setURI

public void setURI(String uri)
Set this namespace's primary URI. This is the namespace name.

Parameters:
prefix - The URI to set.

getURIs

public String[] getURIs()
Get all of the URI's that this namespace is known under, including the primary URI and any aliases.

Returns:
all of the URI's that this namespace is known under.

createPlugin

public Plugin createPlugin()

addURIAlias

public void addURIAlias(Namespace.URIAlias alias)

createURIAlias

public Namespace.URIAlias createURIAlias()

addAlias

public void addAlias(Alias alias)
              throws XMLException
Throws:
XMLException

getAlias

public Method getAlias(Class<?> c,
                       String name)

getBuilderforElement

public IBuilder getBuilderforElement(String elementName)
                              throws XMLException
Throws:
XMLException

addPlugin

public void addPlugin(Plugin p)
               throws XMLException
Throws:
XMLException

addTypeConverter

public void addTypeConverter(TypeConverterEntry p)
                      throws XMLException
Throws:
XMLException

addPriority

public void addPriority(Priority p)
                 throws XMLException
Throws:
XMLException

getPriority

public int getPriority(Method m)

getSuperMethod

protected Method getSuperMethod(Method m)

parseMethod

public Method parseMethod(String method)
                   throws XMLException
Throws:
XMLException

loadClass

public Class<?> loadClass(String className)
                   throws Exception
Throws:
Exception

getTypeConverter

public ITypeConverter getTypeConverter(Class<?> c)
                                throws XMLException
Throws:
XMLException

addImport

public void addImport(Import i)

setClassLoader

public void setClassLoader(ClassLoader cl)

getClassLoader

public ClassLoader getClassLoader()

getRegisteredElements

public Set<String> getRegisteredElements()

getPlugin

public Plugin getPlugin(String elementName)

build

public XObject build(Assembler assembler,
                     ConfigElement thisElement,
                     ConfigElement parent,
                     XObject object,
                     XObject parentObject)
              throws XMLException
Specified by:
build in interface IConfigTag
Throws:
XMLException

isSimpleType

public boolean isSimpleType(Class<?> c)

canConstruct

protected boolean canConstruct(Class<?> c)


Copyright © 2013 Thinkmap, Inc. All Rights Reserved.