org.mod4j.crossx.broker
Class CrossxBroker

java.lang.Object
  extended by org.mod4j.crossx.broker.CrossxBroker

public class CrossxBroker
extends java.lang.Object

This class contains all operations that are needed in the oAW xTend, xPand and Checks files. Therefore all methods need to be static.

Author:
jwa11799

Method Summary
static java.util.List<Symbol> findAllFromModel(java.lang.String modelname, java.util.List<java.lang.String> symbolTypes)
          Find all symbol names with type in 'symbolTypes' within models named 'modelname'
static java.util.List<Symbol> findAllFromModel(java.lang.String modelname, java.lang.String symbolType)
          Find all symbol names with type 'symbolType' within models named 'modelname'
static java.util.List<Symbol> findAllFromModel(java.lang.String modelname, java.lang.String symbolName, java.util.List<java.lang.String> symbolTypes)
          Find all symbols with type in 'symbolTypes' within models named 'modelname' with name 'symbolName'
static java.util.List<ModelInfo> findAllModels()
          Find all models within the workspace
static java.util.List<ModelInfo> findAllModels(java.util.List<java.lang.String> types)
           
static java.util.List<ModelInfo> findAllModelsInProject(java.lang.String project)
          Find all models within project with name 'project'
static java.util.List<ModelInfo> findAllModelsInProject(java.lang.String project, java.util.List<java.lang.String> types)
          Find all models within project with name 'project'
static java.util.List<Symbol> findAllSubSymbols(Symbol symbol, java.lang.String symbolType)
          Find all subsymbols of 'symbol' that have the type 'symbolType'
static java.util.List<Symbol> findAllSymbols(java.lang.String project, java.lang.String symboltype)
          Find all symbols of type 'symboltype' in project 'project'
static java.util.List<Symbol> findAllSymbolsFromModel(java.lang.String project, java.lang.String modelname, java.lang.String symbolType)
          Find all symbol names with type 'symbolType' within models named 'modelname' and within the project named 'project'
static LiteralSymbolProperty getLiteralProperty(Symbol symbol, java.lang.String propertyName)
          Get the property named 'propertyname' or null if no such property exists
static SymbolProperty getProperty(Symbol symbol, java.lang.String propertyName)
          Get the property named 'propertyname' or null if no such property exists
static java.lang.String getPropertyValue(Symbol symbol, java.lang.String propertyName)
          Get the value of the property name 'propertyname' or null if no such property exists.
static ReferenceSymbolProperty getReferenceProperty(Symbol symbol, java.lang.String propertyName)
          Get the property named 'propertyname' or null if no such property exists
static Symbol getSubSymbol(Symbol mainSymbol, java.lang.String symbolName)
           
static boolean hasProperty(Symbol symbol, java.lang.String propertyName, java.lang.String propertyValue)
           
static Symbol lookupReference(ReferenceSymbolProperty ref)
           
static Symbol lookupSymbol(java.lang.String model, java.lang.String symbolname, java.lang.String symbolType)
          Lookup a symbol in a model of a certain type
static Symbol lookupSymbolWithProperty(java.lang.String model, java.lang.String symbolname, java.lang.String type, java.lang.String propertyName, java.lang.String propertyValue)
           
static Symbol lookupSymbolWithSubsymbol(java.lang.String model, java.lang.String symbolname, java.lang.String symboltype, java.lang.String subsymbolType, java.lang.String subsymbolName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

lookupReference

public static Symbol lookupReference(ReferenceSymbolProperty ref)

lookupSymbol

public static Symbol lookupSymbol(java.lang.String model,
                                  java.lang.String symbolname,
                                  java.lang.String symbolType)
Lookup a symbol in a model of a certain type

Parameters:
model - The model in which to look for the symbol
symbolname - The name of the symbol to find
symbolType - The type of the symbol to find
Returns:
the symbol found, or null if no such symbol could be found

findAllFromModel

public static java.util.List<Symbol> findAllFromModel(java.lang.String modelname,
                                                      java.lang.String symbolType)
Find all symbol names with type 'symbolType' within models named 'modelname'

Parameters:
modelname -
symbolType -
Returns:

findAllFromModel

public static java.util.List<Symbol> findAllFromModel(java.lang.String modelname,
                                                      java.util.List<java.lang.String> symbolTypes)
Find all symbol names with type in 'symbolTypes' within models named 'modelname'

Parameters:
modelname -
symbolTypes -
Returns:

findAllFromModel

public static java.util.List<Symbol> findAllFromModel(java.lang.String modelname,
                                                      java.lang.String symbolName,
                                                      java.util.List<java.lang.String> symbolTypes)
Find all symbols with type in 'symbolTypes' within models named 'modelname' with name 'symbolName'

Parameters:
modelname -
symbolName -
symbolTypes -
Returns:

findAllSymbolsFromModel

public static java.util.List<Symbol> findAllSymbolsFromModel(java.lang.String project,
                                                             java.lang.String modelname,
                                                             java.lang.String symbolType)
Find all symbol names with type 'symbolType' within models named 'modelname' and within the project named 'project'

Parameters:
project -
modelname -
symbolType -
Returns:

findAllModels

public static java.util.List<ModelInfo> findAllModels()
Find all models within the workspace

Returns:

findAllModels

public static java.util.List<ModelInfo> findAllModels(java.util.List<java.lang.String> types)

findAllModelsInProject

public static java.util.List<ModelInfo> findAllModelsInProject(java.lang.String project)
Find all models within project with name 'project'

Parameters:
project -
Returns:

findAllModelsInProject

public static java.util.List<ModelInfo> findAllModelsInProject(java.lang.String project,
                                                               java.util.List<java.lang.String> types)
Find all models within project with name 'project'

Parameters:
project -
Returns:

lookupSymbolWithProperty

public static Symbol lookupSymbolWithProperty(java.lang.String model,
                                              java.lang.String symbolname,
                                              java.lang.String type,
                                              java.lang.String propertyName,
                                              java.lang.String propertyValue)

lookupSymbolWithSubsymbol

public static Symbol lookupSymbolWithSubsymbol(java.lang.String model,
                                               java.lang.String symbolname,
                                               java.lang.String symboltype,
                                               java.lang.String subsymbolType,
                                               java.lang.String subsymbolName)

hasProperty

public static boolean hasProperty(Symbol symbol,
                                  java.lang.String propertyName,
                                  java.lang.String propertyValue)
Parameters:
classname -
Returns:
Returns true of a BusinessClass with the name path exists in any model in the workspace

getPropertyValue

public static java.lang.String getPropertyValue(Symbol symbol,
                                                java.lang.String propertyName)
Get the value of the property name 'propertyname' or null if no such property exists. Only returns values of literal symbol properties, not of regference properties.

Parameters:
symbol - The symbolf for which the property is looked up
propertyName - The name of the property too find
Returns:

getProperty

public static SymbolProperty getProperty(Symbol symbol,
                                         java.lang.String propertyName)
Get the property named 'propertyname' or null if no such property exists

Parameters:
symbol - The symbol for which the property is looked up
propertyName - The name of the property too find
Returns:

getReferenceProperty

public static ReferenceSymbolProperty getReferenceProperty(Symbol symbol,
                                                           java.lang.String propertyName)
Get the property named 'propertyname' or null if no such property exists

Parameters:
symbol - The symbol for which the property is looked up
propertyName - The name of the property too find
Returns:

getLiteralProperty

public static LiteralSymbolProperty getLiteralProperty(Symbol symbol,
                                                       java.lang.String propertyName)
Get the property named 'propertyname' or null if no such property exists

Parameters:
symbol - The symbol for which the property is looked up
propertyName - The name of the property too find
Returns:

getSubSymbol

public static Symbol getSubSymbol(Symbol mainSymbol,
                                  java.lang.String symbolName)

findAllSubSymbols

public static java.util.List<Symbol> findAllSubSymbols(Symbol symbol,
                                                       java.lang.String symbolType)
Find all subsymbols of 'symbol' that have the type 'symbolType'

Parameters:
symbol -
symbolType -
Returns:

findAllSymbols

public static java.util.List<Symbol> findAllSymbols(java.lang.String project,
                                                    java.lang.String symboltype)
Find all symbols of type 'symboltype' in project 'project'

Parameters:
project -
symboltype -
Returns:


Copyright © 2010 Mod4j. All Rights Reserved.