org.nuiton.eugene.models.object
Class ObjectModelReader
java.lang.Object
org.nuiton.eugene.ModelReader<ObjectModel>
org.nuiton.eugene.models.object.ObjectModelReader
public class ObjectModelReader
- extends ModelReader<ObjectModel>
To read object model files into an memory object model.
Created: 26 oct. 2009
- Version:
- $Id: ObjectModelReader.java 1079 2011-06-28 09:15:23Z tchemit $
- Author:
- fdesbois
- Plexus component:
- role:
- "org.nuiton.eugene.ModelReader"
- role-hint:
- "objectmodel"
|
|
Method Summary |
protected ObjectModelAttribute |
getAttribute(ObjectModelClass clazz,
String name)
Retrieve an attribute from a clazz with its name. |
protected ObjectModelClassifier |
getClassifier(ObjectModel model,
String type,
String key,
String fqn)
|
protected List<ObjectModelElement> |
getObjectElements(ObjectModelClassifier omc,
String type,
String key,
String fqn,
String target,
String targetName)
|
protected Class<?> |
getTargetType(String target)
|
Properties |
loadModelProperties(File propFile,
ObjectModel model)
|
boolean |
loadModelTagValue(ObjectModel model,
String key,
String value)
|
boolean |
loadStereotype(ObjectModel model,
String key,
String value)
|
ObjectModel |
read(File... files)
Read files to produce a memory model. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TAGVALUE
public static final String TAGVALUE
- See Also:
- Constant Field Values
STEREOTYPE
public static final String STEREOTYPE
- See Also:
- Constant Field Values
OPERATION
public static final String OPERATION
- See Also:
- Constant Field Values
ATTRIBUTE
public static final String ATTRIBUTE
- See Also:
- Constant Field Values
CLASS
public static final String CLASS
- See Also:
- Constant Field Values
propertiesPattern
protected Pattern propertiesPattern
- Pattern to define tag values authorized at classifier level in the model
properties file.
L'expression réguliere match les chaines de type
..[name]..[tag]
fr.isisfish.entities.Population.class.stereotype=entity
fr.isisfish.entities.Population.class.tagvalue.persistenceType=flatfile
fr.isisfish.entities.Population.attribute.name.stereotype=...
fr.isisfish.entities.Population.attribute.name.tagvalue.pk=topiaId
fr.isisfish.entities.Population.operation.getRegion.stereotype=...
fr.isisfish.entities.Population.operation.getRegion.tagvalue.pk=...
stereotypePattern
protected Pattern stereotypePattern
modelTagValuePattern
protected Pattern modelTagValuePattern
- Pattern to define tag values authorized at model level in the model
properties file.
- Since:
- 2.3
MODEL
public static final String MODEL
- See Also:
- Constant Field Values
ObjectModelReader
public ObjectModelReader()
read
public ObjectModel read(File... files)
throws IOException
- Description copied from class:
ModelReader
- Read files to produce a memory model.
- Specified by:
read in class ModelReader<ObjectModel>
- Parameters:
files - les noms des fichiers existant contenant du XML représentant
des ObjectModel. Il est automatiquement recherche un fichier de
propriété associé a ce fichier pour pouvoir ajouter des
stereotype ou des tag value sur les class, attribute ou operation
- Returns:
- the new model builded from files
- Throws:
IOException - if any IO errors while reading files
getAttribute
protected ObjectModelAttribute getAttribute(ObjectModelClass clazz,
String name)
- Retrieve an attribute from a
clazz with its name.
This method manage the association class case to explore participants
attributes if needed.
- Parameters:
clazz - where the attribute need to be findname - attribute name to find
- Returns:
- the attribute found or null
loadModelProperties
public Properties loadModelProperties(File propFile,
ObjectModel model)
throws IOException
- Throws:
IOException
loadModelTagValue
public boolean loadModelTagValue(ObjectModel model,
String key,
String value)
loadStereotype
public boolean loadStereotype(ObjectModel model,
String key,
String value)
getTargetType
protected Class<?> getTargetType(String target)
getClassifier
protected ObjectModelClassifier getClassifier(ObjectModel model,
String type,
String key,
String fqn)
getObjectElements
protected List<ObjectModelElement> getObjectElements(ObjectModelClassifier omc,
String type,
String key,
String fqn,
String target,
String targetName)
Copyright © 2004-2012 CodeLutin. All Rights Reserved.