org.argouml.uml
Class ProfileJava
java.lang.Object
org.argouml.uml.Profile
org.argouml.uml.ProfileJava
- public class ProfileJava
- extends Profile
This class implements the abstract class Profile for use in modelling
Java language projects. Eventually, this class may be replaced by
a configurable profile.
TODO: (MVW) I see only little Java specific stuff here.
Most of this should be moved to a ProfileUML.java file, which
should be used by default.
TODO: (MVW) Document the use of "argo.defaultModel" in
the argo.user.properties file.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
private static final Logger LOG
instance
private static ProfileJava instance
defaultModel
private Object defaultModel
ProfileJava
private ProfileJava()
getInstance
public static ProfileJava getInstance()
- Returns:
- the instance of this class
formatElement
public String formatElement(Object element,
Object namespace)
- Description copied from class:
Profile
- This method produces a string that represents the specific
model element in the context of the specified namespace.
- Specified by:
formatElement
in class Profile
- Parameters:
element
- element to represent.namespace
- context namespace (may be null).
- Returns:
- a string representing the model element
- See Also:
Profile.formatElement(java.lang.Object,
java.lang.Object)
defaultAssocEndName
protected String defaultAssocEndName(Object assocEnd,
Object namespace)
- Parameters:
assocEnd
- the given association end namenamespace
- the namespace
- Returns:
- the default name for the given associationend
defaultAssocName
protected String defaultAssocName(Object assoc,
Object ns)
- This function creates a default association name from its ends.
- Parameters:
assoc
- the given associationns
- the namespace
- Returns:
- the default association name
defaultGeneralizationName
protected String defaultGeneralizationName(Object gen,
Object namespace)
- Parameters:
gen
- the given Generalizationnamespace
- the namespace
- Returns:
- the default generalization name
defaultName
protected String defaultName(Object element,
Object namespace)
- Parameters:
element
- the given modelelementnamespace
- the namespace
- Returns:
- a default name for this modelelement
getPathSeparator
protected String getPathSeparator()
- Returns:
- the path separator (currently ".")
buildPath
private void buildPath(StringBuffer buffer,
Object element,
String pathSep)
- Parameters:
buffer
- (out) the buffer that will contain the path buildelement
- the given modelelementpathSep
- the path separator character(s)
getElementSeparator
protected String getElementSeparator()
- Returns:
- the string that separates elements
getEmptyCollection
protected String getEmptyCollection()
- Returns:
- the string that represents an empty collection
formatCollection
public String formatCollection(Iterator iter,
Object namespace)
- Description copied from class:
Profile
- This method produces a string the represents the collection
of model elements in the context of the specified namespace.
- Specified by:
formatCollection
in class Profile
- Parameters:
iter
- iterator over collectionnamespace
- context namespace (may be null).
- Returns:
- a string representing the collection
- See Also:
Profile.formatCollection(java.util.Iterator,
java.lang.Object)
getProfileModel
public Object getProfileModel()
- Specified by:
getProfileModel
in class Profile
- Returns:
- the UML Model that contains the profile model
- See Also:
Profile.getProfileModel()
loadProfileModel
public static Object loadProfileModel()
- This function loads the model object containing the default model from
either property "argo.defaultModel", or "/org/argouml/default.xmi".
May result in null, if the files are not found.
- Returns:
- the model object