org.mod4j.crossx.broker
Class CrossxLocation

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

public class CrossxLocation
extends java.lang.Object

This class is a singleton with static members only. It keeps all cross reference information for DSL models for one location The location is identified with the 'name'

Author:
Jos Warmer

Constructor Summary
CrossxLocation(java.lang.String theName)
          Create a new CrossxLocation for location named 'theName'
 
Method Summary
 void addModelInfo(ModelInfo modelinfo)
          Add modelinfo to this location, remove previous modelinfo is this exists from the same resource
 java.util.List<Symbol> findAll(java.lang.String symbolType)
          Find all names of symbols of type 'elemType'.
 java.util.List<Symbol> findAllFromModel(java.lang.String modelname, java.lang.String elemType)
          Find all symbols of type 'elemType'.
 java.util.List<Symbol> findAllSymbols(java.lang.String symbolType)
          Find all symbols of type 'symbolType'.
 java.util.List<Symbol> findAllSymbolsFromModel(java.lang.String modelname, java.lang.String elemType)
           
 java.util.List<ModelInfo> getAll()
           
 java.lang.String getName()
          Get the name of this location
 Symbol lookup(java.lang.String model, java.lang.String name, java.lang.String symbolType)
          Find the symbol with name 'name' and type 'type'.
 void removeModelInfo(java.lang.String resource)
           
 void setPrintWriter(java.io.PrintWriter pw)
          Sets 'pw' as the output writer for this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrossxLocation

public CrossxLocation(java.lang.String theName)
Create a new CrossxLocation for location named 'theName'

Parameters:
theName -
Method Detail

getName

public java.lang.String getName()
Get the name of this location

Returns:

getAll

public java.util.List<ModelInfo> getAll()

addModelInfo

public void addModelInfo(ModelInfo modelinfo)
Add modelinfo to this location, remove previous modelinfo is this exists from the same resource

Parameters:
modelinfo -

removeModelInfo

public void removeModelInfo(java.lang.String resource)

lookup

public Symbol lookup(java.lang.String model,
                     java.lang.String name,
                     java.lang.String symbolType)
Find the symbol with name 'name' and type 'type'.

Parameters:
name -
symbolType -
Returns:
The name of the resource if the element is found, null if it isn't found

findAll

public java.util.List<Symbol> findAll(java.lang.String symbolType)
Find all names of symbols of type 'elemType'.

Parameters:
symbolType -
Returns:
The list of names (String) of all found symbols. If there is no such symbol, an empty list.

findAllSymbols

public java.util.List<Symbol> findAllSymbols(java.lang.String symbolType)
Find all symbols of type 'symbolType'.

Parameters:
elemType -
Returns:
The list of names (String) of all found symbols. If there is no such symbol, an empty list.

findAllFromModel

public java.util.List<Symbol> findAllFromModel(java.lang.String modelname,
                                               java.lang.String elemType)
Find all symbols of type 'elemType'.

Parameters:
elemType -
Returns:
The list of names (String) of all found symbols. If there is no such symbol, an empty list.

findAllSymbolsFromModel

public java.util.List<Symbol> findAllSymbolsFromModel(java.lang.String modelname,
                                                      java.lang.String elemType)

setPrintWriter

public void setPrintWriter(java.io.PrintWriter pw)
Sets 'pw' as the output writer for this object. Should use proper logging for this ...

Parameters:
pw -


Copyright © 2010 Mod4j. All Rights Reserved.