copyright The Portico Project 2008.

org.portico.impl.hla1516.fomparser
Class FOM

java.lang.Object
  extended by org.portico.impl.hla1516.fomparser.FOM

public class FOM
extends Object

This is the main class for the IEEE-1516 XML style FOM parser.


Field Summary
private  ObjectModel fom
           
 
Constructor Summary
FOM()
           
 
Method Summary
private  void attachAttributes(Element oClass, OCMetadata parent)
           
private  void attachParameters(Element iClass, ICMetadata parent)
           
static ObjectModel parseFOM(URL fed)
          This method will take the XML FOM at the given URL and attempt to process it.
 ObjectModel process(Element element)
           
private  ICMetadata processIC(Element element, ICMetadata parent)
           
private  ICMetadata processInteractions(Element element)
           
private  OCMetadata processObjects(Element element)
           
private  OCMetadata processOC(Element element, OCMetadata parent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fom

private ObjectModel fom
Constructor Detail

FOM

public FOM()
Method Detail

process

public ObjectModel process(Element element)
                    throws com.lbf.commons.config.ConfigurationException
Throws:
com.lbf.commons.config.ConfigurationException

processObjects

private OCMetadata processObjects(Element element)
                           throws com.lbf.commons.config.ConfigurationException
Throws:
com.lbf.commons.config.ConfigurationException

processOC

private OCMetadata processOC(Element element,
                             OCMetadata parent)
                      throws com.lbf.commons.config.ConfigurationException
Throws:
com.lbf.commons.config.ConfigurationException

attachAttributes

private void attachAttributes(Element oClass,
                              OCMetadata parent)
                       throws com.lbf.commons.config.ConfigurationException
Throws:
com.lbf.commons.config.ConfigurationException

processInteractions

private ICMetadata processInteractions(Element element)
                                throws com.lbf.commons.config.ConfigurationException
Throws:
com.lbf.commons.config.ConfigurationException

processIC

private ICMetadata processIC(Element element,
                             ICMetadata parent)
                      throws com.lbf.commons.config.ConfigurationException
Throws:
com.lbf.commons.config.ConfigurationException

attachParameters

private void attachParameters(Element iClass,
                              ICMetadata parent)
                       throws com.lbf.commons.config.ConfigurationException
Throws:
com.lbf.commons.config.ConfigurationException

parseFOM

public static ObjectModel parseFOM(URL fed)
                            throws hla.rti1516.CouldNotOpenFDD,
                                   hla.rti1516.ErrorReadingFDD
This method will take the XML FOM at the given URL and attempt to process it. If there is a problem locating the URL or fetching the stream with which to read it, a CouldNotOpenFDD exception will be thrown. If there is a problem reading the FOM, or its structure is not correct, an ErrorReadingFDD exception will be thrown.

If the FOM is correct and can be processed successfully, it will be turned into an ObjectModel and returned.

Parameters:
fed - The URL location of the fed file (could be local or remote)
Returns:
An ObjectModel representing the FOM from the given location
Throws:
hla.rti1516.CouldNotOpenFDD - If the fed file can not be located or there is an error opening it
hla.rti1516.ErrorReadingFDD - If the fed file is invalid or there is a problem reading it from the stream.

copyright The Portico Project 2008.