- java.lang.Object
-
- org.tentackle.model.impl.ModelEntityImpl
-
- All Implemented Interfaces:
ModelEntity
public class ModelEntityImpl extends java.lang.Object implements ModelEntity
Entity as a component of a model.- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description ModelEntityImpl(Entity entity, java.lang.String fileName)Creates a model entity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EntitygetEntity()Gets the entity.java.io.FilegetFile()Gets the model file.java.lang.StringgetFileName()Gets the filename.booleanhasChanged()Returns whether the modelfile has changed.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ModelEntityImpl
public ModelEntityImpl(Entity entity, java.lang.String fileName) throws ModelException
Creates a model entity.- Parameters:
entity- the entityfileName- the modelfile's filename- Throws:
ModelException- if file does not exist or is not a regular file
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getEntity
public Entity getEntity()
Gets the entity.- Specified by:
getEntityin interfaceModelEntity- Returns:
- the entity
-
getFileName
public java.lang.String getFileName()
Gets the filename.- Specified by:
getFileNamein interfaceModelEntity- Returns:
- the filename
-
getFile
public java.io.File getFile()
Gets the model file.- Returns:
- the file
-
hasChanged
public boolean hasChanged()
Returns whether the modelfile has changed.- Specified by:
hasChangedin interfaceModelEntity- Returns:
- true if changed
-
-