Java Doc for MetafacadeMappings.java in  » UML » AndroMDA-3.2 » org » andromda » core » metafacade » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » UML » AndroMDA 3.2 » org.andromda.core.metafacade 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.andromda.core.namespace.BaseNamespaceComponent
      org.andromda.core.metafacade.MetafacadeMappings

MetafacadeMappings
public class MetafacadeMappings extends BaseNamespaceComponent (Code)
The Metafacade mapping class. Used to map metafacade objects to metamodel objects.
author:
   Chad Brandon
See Also:   MetafacadeMapping
See Also:   org.andromda.core.common.XmlObjectFactory

Inner Class :static interface Condition

Field Summary
final protected  CollectioninProcessMappings
    

Stores the mappings which are currently "in process" (within the MetafacadeMappings.getMapping(Object,String,Collection) .

final protected  CollectioninProcessMetafacades
    

Stores the metafacades which are currently "in process" (within the MetafacadeMappings.getMapping(Object,String,Collection) .



Method Summary
public  voidaddMapping(MetafacadeMapping mapping)
     Adds a MetafacadeMapping instance to the set of current mappings.
public  voidaddPropertyReference(String reference)
     Adds a language mapping reference.
static  MapgetAllMetafacadeMappingInstances()
     Stores every metafacade mapping instance, this is used from MetafacadeUtils.getInheritedMappingClassName(MetafacadeMapping) .
final protected  ListgetContextHierarchy(String context)
     Retrieves all inherited contexts (including the root context) from the given context and returns a list containing all of them.
final  ClassgetDefaultMetafacadeClass(String namespace)
     Gets the defaultMetafacadeClass, first looks for it in the namespace mapping, if it can't find it it then takes the default mappings, setting.
protected  MetafacadeMappinggetMapping(Object mappingObject, String context, Collection stereotypes)
    

Retrieves the MetafacadeMapping belonging to the unique key created from the mappingObject's class, context and given stereotypes.

protected  ListgetMappingObjectHierarchy(Object mappingObject)
     Retrieves the hiearchy of class names of the given mappingObject.
Parameters:
  mappingObject - the object from which to retrieve the hierarchy.
protected  CollectiongetMappings()
     Retrieves all child MetafacadeMapping instances belonging to this metafacade mappings instance.
public  ClassgetMetafacadeInterface(Class metafacadeClass)
     Gets the class of the metafacade interface that belongs to the given metafacadeClass.
public  MetafacadeMappinggetMetafacadeMapping(Object mappingObject, String namespace, String context, Collection stereotypes)
    

Attempts to get the MetafacadeMapping identified by the given mappingClass,context and stereotypes, from the mappings for the given namespace.

public  MetafacadeMappingsgetModelMetafacadeMappings(String metafacadeModelNamespace)
     Should be used used instead of "this", retrieves the appropriate metafacade mappings instance based on the current model type.
Parameters:
  metafacadeModelNamespace - the namespace that contains a metafacade model facade implementation.
public  CollectiongetPropertyReferences()
     Gets all property references defined in this mappings instance.
public  voidinitialize()
     Initializes this mappings instance, which includes discovery of all metafacade mappings instances on the classpath.
public static  MetafacadeMappingsnewInstance()
     Constructs a new instance of this class.
final  voidregisterAllProperties()
     Registers all namespace properties in the shared MetafacadeFactory instance.
final  voidregisterProperties(String namespace, Collection propertyReferences, String metafacadeName)
     Registers the defined property references properties in the metafacade factory.
public  voidsetDefaultMetafacadeClass(String defaultMetafacadeClass)
     Sets the default metafacade class to use if no other is found for the mapping class.
public  voidsetMetaclassPattern(String metaclassPattern)
     Sets the pattern of the metaclass implementations based on a metaclass interface name.
final  voidshutdown()
     Performs shutdown procedures for the factory.
public  StringtoString()
    

Field Detail
inProcessMappings
final protected Collection inProcessMappings(Code)

Stores the mappings which are currently "in process" (within the MetafacadeMappings.getMapping(Object,String,Collection) . This means the mapping is being processed by the MetafacadeMappings.getMapping(Object,String,Collection) operation. We store these "in process" mappings in order to keep track of the mappings currently being evaluated so we avoid stack over flow errors MetafacadeMappings.getMapping(Object,String,Collection) when finding mappings that are mapped to super metafacade properties.

Note: visibility is defined as protected in order to improve inner class access performance.




inProcessMetafacades
final protected Collection inProcessMetafacades(Code)

Stores the metafacades which are currently "in process" (within the MetafacadeMappings.getMapping(Object,String,Collection) . This means the metafacade being processed by the MetafacadeMappings.getMapping(Object,String,Collection) operation. We store these "in process" metafacades in order to keep track of the metafacades currently being evaluated so we avoid stack over flow errors MetafacadeMappings.getMapping(Object,String,Collection) when finding metafacades that are mapped to super metafacade properties.

Note: visibility is defined as protected in order to improve inner class access performance.






Method Detail
addMapping
public void addMapping(MetafacadeMapping mapping)(Code)
Adds a MetafacadeMapping instance to the set of current mappings.
Parameters:
  mapping - the MetafacadeMapping instance.



addPropertyReference
public void addPropertyReference(String reference)(Code)
Adds a language mapping reference. This are used to populate metafacade impl classes with mapping files (such as those that map from model types to Java, JDBC, SQL types, etc). If its added here as opposed to each child MetafacadeMapping, then the reference will apply to all mappings.
Parameters:
  reference - the name of the reference.



getAllMetafacadeMappingInstances
static Map getAllMetafacadeMappingInstances()(Code)
Stores every metafacade mapping instance, this is used from MetafacadeUtils.getInheritedMappingClassName(MetafacadeMapping) . all metafacade mapping instances.



getContextHierarchy
final protected List getContextHierarchy(String context)(Code)
Retrieves all inherited contexts (including the root context) from the given context and returns a list containing all of them. Note that the visibilty of this operation is protected to improve inner class access performance.
Parameters:
  context - the root contexts a list containing all inherited contexts



getDefaultMetafacadeClass
final Class getDefaultMetafacadeClass(String namespace)(Code)
Gets the defaultMetafacadeClass, first looks for it in the namespace mapping, if it can't find it it then takes the default mappings, setting. Returns the defaultMetafacadeClass.



getMapping
protected MetafacadeMapping getMapping(Object mappingObject, String context, Collection stereotypes)(Code)

Retrieves the MetafacadeMapping belonging to the unique key created from the mappingObject's class, context and given stereotypes. It's IMPORTANT to note that contexts have a higher priority than stereotypes. This allows us to retrieve mappings based on the following combinations:

  • A single stereotype no context
  • A single stereotype with a context
  • metafacade properties no context
  • metafacade properties with a context
  • multiple stereotypes no context
  • multiple stereotypes with a context

NOTE: mapping properties are inherited from super metafacades.


Parameters:
  mappingObject - an instance of the class to which the mappingapplies.
Parameters:
  stereotypes - the stereotypes to check.
Parameters:
  context - the context within the namespace for which the mappingapplies (has 'root' in the name because of the fact that we alsosearch the context inheritance hiearchy started with this 'root'context). MetafacadeMapping (or null if none was found matching thecriteria).



getMappingObjectHierarchy
protected List getMappingObjectHierarchy(Object mappingObject)(Code)
Retrieves the hiearchy of class names of the given mappingObject.
Parameters:
  mappingObject - the object from which to retrieve the hierarchy. a list containing all inherited class names.



getMappings
protected Collection getMappings()(Code)
Retrieves all child MetafacadeMapping instances belonging to this metafacade mappings instance. the collection of MetafacadeMapping instances



getMetafacadeInterface
public Class getMetafacadeInterface(Class metafacadeClass)(Code)
Gets the class of the metafacade interface that belongs to the given metafacadeClass. the metafacade interface Class.



getMetafacadeMapping
public MetafacadeMapping getMetafacadeMapping(Object mappingObject, String namespace, String context, Collection stereotypes)(Code)

Attempts to get the MetafacadeMapping identified by the given mappingClass,context and stereotypes, from the mappings for the given namespace. If it can not be found, it will search the default mappings and return that instead.

IMPORTANT: The context will take precedence over any stereotypes with the mapping.


Parameters:
  mappingObject - the meta object for the mapping we are trying to find.
Parameters:
  namespace - the namespace (i.e. a cartridge, name, etc.)
Parameters:
  context - to which the mapping applies (note this takes precendence over stereotypes).
Parameters:
  stereotypes - collection of sterotype names. We'll check to see if the mapping for the givenmappingClass is defined for it.



getModelMetafacadeMappings
public MetafacadeMappings getModelMetafacadeMappings(String metafacadeModelNamespace)(Code)
Should be used used instead of "this", retrieves the appropriate metafacade mappings instance based on the current model type.
Parameters:
  metafacadeModelNamespace - the namespace that contains a metafacade model facade implementation. the MetafacadeMappings instance.



getPropertyReferences
public Collection getPropertyReferences()(Code)
Gets all property references defined in this mappings instance. the map of property references (names and values).



initialize
public void initialize()(Code)
Initializes this mappings instance, which includes discovery of all metafacade mappings instances on the classpath.



newInstance
public static MetafacadeMappings newInstance()(Code)
Constructs a new instance of this class. MetafacadeMappings



registerAllProperties
final void registerAllProperties()(Code)
Registers all namespace properties in the shared MetafacadeFactory instance.



registerProperties
final void registerProperties(String namespace, Collection propertyReferences, String metafacadeName)(Code)
Registers the defined property references properties in the metafacade factory.
Parameters:
  propertyReferences - the property references to register.
Parameters:
  metafacadeName - the name of the metafacade under which to registerthe properties.
Parameters:
  namespace - the namespace of the property reference.



setDefaultMetafacadeClass
public void setDefaultMetafacadeClass(String defaultMetafacadeClass)(Code)
Sets the default metafacade class to use if no other is found for the mapping class.
Parameters:
  defaultMetafacadeClass - the default metafacade class.



setMetaclassPattern
public void setMetaclassPattern(String metaclassPattern)(Code)
Sets the pattern of the metaclass implementations based on a metaclass interface name. This should only be set on a metafacade mappings instances that is marked as shared.
Parameters:
  metaclassPattern - the pattern for the meta classes.



shutdown
final void shutdown()(Code)
Performs shutdown procedures for the factory. This should be called ONLY when MetafacadeFactory.shutdown is called.



toString
public String toString()(Code)

See Also:   java.lang.Object.toString



Methods inherited from org.andromda.core.namespace.BaseNamespaceComponent
public String getNamespace()(Code)(Java Doc)
public URL getResource()(Code)(Java Doc)
public void setNamespace(String namespace)(Code)(Java Doc)
public void setResource(URL resource)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.