org.ow2.jonas.deployment.common
Class CommonsSchemas

java.lang.Object
  extended by org.ow2.jonas.deployment.common.CommonsSchemas
All Implemented Interfaces:
Schemas
Direct Known Subclasses:
AppClientSchemas, ClusterDaemonSchemas, ConnectorSchemas, DomainSchemas, EarSchemas, EjbjarSchemas, JaxrpcMappingSchemas, JonasAppClientSchemas, JonasConnectorSchemas, JonasEarSchemas, JonasEjbjarSchemas, JonasWebAppSchemas, WebAppSchemas, WsSchemas

public abstract class CommonsSchemas
extends Object
implements Schemas

This class defines the declarations of the default Java EE 5 Schemas.

Author:
Florent Benoit

Constructor Summary
CommonsSchemas()
          Build a new object for Schemas handling.
 
Method Summary
protected static void addSchemas(String[] schemas)
          Add to our repository the given local schemas.
static String getHeaderForElement(String element, String schema)
           
static String getHeaderForStandardElement(String element, String schema)
           
protected static String getLastSchema(String[] schemas, String packageName)
           
 List<String> getlocalSchemas()
          Gets the URLs of the local schemas.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonsSchemas

public CommonsSchemas()
Build a new object for Schemas handling.

Method Detail

getlocalSchemas

public List<String> getlocalSchemas()
Gets the URLs of the local schemas.

Specified by:
getlocalSchemas in interface Schemas
Returns:
the URLs of the local schemas

addSchemas

protected static void addSchemas(String[] schemas)
                          throws IllegalStateException
Add to our repository the given local schemas.

Parameters:
schemas - schemas to add to the repository
Throws:
IllegalStateException - if the dtds is not found as resource

getHeaderForElement

public static String getHeaderForElement(String element,
                                         String schema)
Parameters:
element - name of the root element (jonas-ejb-jar, ...)
schema - XML Schema
Returns:
a header for the right element with last element

getHeaderForStandardElement

public static String getHeaderForStandardElement(String element,
                                                 String schema)
Parameters:
element - name of the root element (jonas-ejb-jar, ...)
schema - XML Schema
Returns:
a header for the right element with last element

getLastSchema

protected static String getLastSchema(String[] schemas,
                                      String packageName)
Parameters:
schemas - array of schema locations
packageName - package name to remove from schema location.
Returns:
Returns the last Schema for a given set of schemas.


Copyright © 2010 OW2 Consortium. All Rights Reserved.