org.ow2.jasmine.jadort.service.implementation
Class TopologyReader

java.lang.Object
  extended by org.ow2.jasmine.jadort.service.implementation.TopologyReader

public class TopologyReader
extends java.lang.Object

Helper class that reads topology files.

Author:
Malek Chahine, S. Ali Tokmen

Field Summary
static java.lang.String XSD_PATH_DEPLOYME
           
static java.lang.String XSD_PATH_JADORT
           
 
Constructor Summary
TopologyReader()
           
 
Method Summary
protected static org.ow2.jasmine.jadort.api.entities.topology.ConnectorBean createJMXConnectorBean(URLConnector urlConnector)
           
static org.ow2.jasmine.jadort.api.entities.topology.TopologyBean loadDeployMETopology(java.io.File xmlTopoFile)
           
static org.ow2.jasmine.jadort.api.entities.topology.TopologyBean loadJadortSpecificTopology(java.io.File xmlTopoFile)
           
protected static
<T> T
loadSchemaAndFile(java.lang.String xsdPath, java.lang.Class<T> rootClass, java.io.File xmlFile)
          Verifies an XML file against an XSD and instantiates it using a given class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XSD_PATH_JADORT

public static final java.lang.String XSD_PATH_JADORT
See Also:
Constant Field Values

XSD_PATH_DEPLOYME

public static final java.lang.String XSD_PATH_DEPLOYME
See Also:
Constant Field Values
Constructor Detail

TopologyReader

public TopologyReader()
Method Detail

loadJadortSpecificTopology

public static org.ow2.jasmine.jadort.api.entities.topology.TopologyBean loadJadortSpecificTopology(java.io.File xmlTopoFile)
                                                                                            throws javax.xml.bind.UnmarshalException,
                                                                                                   org.ow2.jasmine.jadort.api.JadortServiceException
Parameters:
xmlTopoFile - JaDOrT-specific topology XML file to load.
Throws:
javax.xml.bind.UnmarshalException
org.ow2.jasmine.jadort.api.JadortServiceException
See Also:
loadSchemaAndFile(String, Class, File)

loadDeployMETopology

public static org.ow2.jasmine.jadort.api.entities.topology.TopologyBean loadDeployMETopology(java.io.File xmlTopoFile)
                                                                                      throws javax.xml.bind.UnmarshalException,
                                                                                             org.ow2.jasmine.jadort.api.JadortServiceException
Parameters:
xmlTopoFile - JASMINe Deploy ME topology XML file to load.
Throws:
javax.xml.bind.UnmarshalException
org.ow2.jasmine.jadort.api.JadortServiceException
See Also:
loadSchemaAndFile(String, Class, File)

loadSchemaAndFile

protected static <T> T loadSchemaAndFile(java.lang.String xsdPath,
                                         java.lang.Class<T> rootClass,
                                         java.io.File xmlFile)
                              throws org.ow2.jasmine.jadort.api.JadortServiceException,
                                     javax.xml.bind.UnmarshalException
Verifies an XML file against an XSD and instantiates it using a given class.

Parameters:
xsdPath - XSD file path.
rootClass - Root class used for instantiating JAXB.
xmlFile - XML to load.
Returns:
XML loaded using JAXB and the rootClass.
Throws:
org.ow2.jasmine.jadort.api.JadortServiceException - If loading fails.
javax.xml.bind.UnmarshalException - If parsing fails (file doesn't correspond to XSD).

createJMXConnectorBean

protected static org.ow2.jasmine.jadort.api.entities.topology.ConnectorBean createJMXConnectorBean(URLConnector urlConnector)
Parameters:
urlConnector - URLConnector for which to create a JMXConnector bean.
Returns:
JMXConnector bean for the given urlConnector.


Copyright © 2009 OW2 Consortium. All Rights Reserved.