Class ModelExtensionReader
- java.lang.Object
-
- org.nuiton.eugene.models.extension.io.ModelExtensionReader
-
- All Implemented Interfaces:
ModelExtensionFileParserCallback
public class ModelExtensionReader extends Object implements ModelExtensionFileParserCallback
Created on 09/09/16.- Since:
- 3.0
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Field Summary
Fields Modifier and Type Field Description protected ObjectModelmodelprotected booleanstrictLoadingprotected TagValueMetadatasProvidertagValueMetadatasProviderprotected TagValuesStoretagValuesStoreprotected booleanverbose
-
Constructor Summary
Constructors Constructor Description ModelExtensionReader(boolean verbose, boolean strictLoading, ObjectModel model)
-
Method Summary
-
-
-
Field Detail
-
verbose
protected final boolean verbose
-
strictLoading
protected final boolean strictLoading
-
model
protected final ObjectModel model
-
tagValueMetadatasProvider
protected final TagValueMetadatasProvider tagValueMetadatasProvider
-
tagValuesStore
protected final TagValuesStore tagValuesStore
-
-
Constructor Detail
-
ModelExtensionReader
public ModelExtensionReader(boolean verbose, boolean strictLoading, ObjectModel model)
-
-
Method Detail
-
read
public void read(File modelExtension) throws IOException, InvalidTagValueSyntaxException, InvalidStereotypeSyntaxException
-
onModelTagValueFound
public boolean onModelTagValueFound(String tag, String value)
- Specified by:
onModelTagValueFoundin interfaceModelExtensionFileParserCallback
-
onModelStereotypeFound
public boolean onModelStereotypeFound(String stereotype)
- Specified by:
onModelStereotypeFoundin interfaceModelExtensionFileParserCallback
-
onPackageTagValueFound
public boolean onPackageTagValueFound(String packageName, String tag, String value)
- Specified by:
onPackageTagValueFoundin interfaceModelExtensionFileParserCallback
-
onPackageStereotypeFound
public boolean onPackageStereotypeFound(String packageName, String stereotype)
- Specified by:
onPackageStereotypeFoundin interfaceModelExtensionFileParserCallback
-
onClassTagValueFound
public boolean onClassTagValueFound(String className, String tag, String value)
- Specified by:
onClassTagValueFoundin interfaceModelExtensionFileParserCallback
-
onClassStereotypeFound
public boolean onClassStereotypeFound(String className, String stereotype)
- Specified by:
onClassStereotypeFoundin interfaceModelExtensionFileParserCallback
-
onAttributeTagValueFound
public boolean onAttributeTagValueFound(String className, String attributeName, String tag, String value)
- Specified by:
onAttributeTagValueFoundin interfaceModelExtensionFileParserCallback
-
onAttributeStereotypeFound
public boolean onAttributeStereotypeFound(String className, String attributeName, String stereotype)
- Specified by:
onAttributeStereotypeFoundin interfaceModelExtensionFileParserCallback
-
getClassifier
protected ObjectModelClassifier getClassifier(String fqn)
-
getAttribute
protected ObjectModelAttribute getAttribute(ObjectModelClassifier clazz, String name)
Retrieve an attribute from aclazzwith itsname. 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
-
getInheritedAttribute
protected ObjectModelAttribute getInheritedAttribute(ObjectModelClassifier clazz, String name)
-
-