public class Profile
extends java.lang.Object
Part
)
and a list of configured AbstractModule
s to be used on these files.
Furthermore a Environment
instance is contained, to keep the results
of the profiles file-independent extraction modules.
Each profile has a final UUID to be identified and a changeable name which is
shown at the user interfaces.Constructor and Description |
---|
Profile(ProfileController profileController,
java.lang.String uuID)
Profile constructor, if no name is given.
|
Profile(ProfileController profileController,
java.lang.String name,
java.lang.String uuID)
Profile constructor to create a Profile with a specific name
|
Modifier and Type | Method and Description |
---|---|
void |
addAllModules(java.util.List<AbstractModule> modules)
Adds all
AbstractModule s of a list to this profile. |
void |
addAllPartsFromPaths(java.util.HashSet<java.nio.file.Path> paths,
boolean extract)
All all files defines by a Path set to the profile.
|
void |
addModule(AbstractModule module)
Adds an
AbstractModule to this profile. |
void |
addPart(Part part)
Add a
Part to this Profile. |
void |
addPart(Part part,
boolean async)
Add a
Part to this Profile. |
void |
cleanupParts()
Removes all
Part s from this Profile, that refer to non-existing
files. |
void |
deleteAllMetadata()
Deletes all extracted information.
|
void |
exportAsTemplate()
Exports the profile as
ProfileTemplate : The list of configured
AbstractModule s survives, and the name of the Profile. |
Environment |
getEnvironment()
Returns the
Environment of this Profile |
java.util.HashSet<AbstractModule> |
getModules()
Returns all
AbstractModule s contained in this Profile. |
java.lang.String |
getName()
Returns the current name of this Profile
|
java.lang.String |
getOutputDirectory()
Returns a string path to the output directory of this profile.
|
java.util.HashSet<Part> |
getParts()
Returns all
Part s belonging to this profile. |
protected java.util.HashSet<Part> |
getPartsFromDirectoryFiles(java.io.File directory)
Loads all saved
Part s from a specific directory. |
java.lang.String |
getUUID()
Returns the UUID of this Profile
|
boolean |
isEnabled()
Returns if the extraction will be started for this Profile.
|
protected void |
loadModules()
Loads the
AbstractModule s belonging to this Profile. |
protected void |
loadParts()
Loads the
Part s belonging to this Profile. |
protected void |
loadProperties()
Loads the Profiles settings
|
void |
removeAllModules()
Removes all
AbstractModule s from this profile. |
void |
removeAllParts()
Removes all
Part s from this profile. |
void |
removeModule(AbstractModule module)
Removes a specific
AbstractModule from this profile. |
void |
removePart(Part part)
Remove a specific
Part from this profile.s |
void |
save()
Saves the complete Profile during application shutdown.
|
void |
setEnabled(boolean enable)
Enables or disables the extraction of this Profile.
|
void |
setName(java.lang.String newName)
Changes the name of this Profile
|
void |
startAllDaemons()
Starts all daemon modules of this profile.
|
void |
stopAllDaemons()
Stops all daemon modules of this profile.
|
java.lang.String |
toString()
Overrides toString() and returns profiles name.
|
public Profile(ProfileController profileController, java.lang.String uuID)
profileController
- The applications ProfileController
uuID
- Has to be created by ProfileControllerpublic Profile(ProfileController profileController, java.lang.String name, java.lang.String uuID)
profileController
- The applications ProfileController
name
- The name of the Profile to be shown at the user interfacesuuID
- The identifier of the Profileprotected void loadProperties()
protected void loadModules()
AbstractModule
s belonging to this Profile.protected void loadParts()
Part
s belonging to this Profile.public void save()
public void setName(java.lang.String newName)
newName
- new name stringpublic java.lang.String getName()
public java.lang.String getUUID()
public Environment getEnvironment()
Environment
of this Profilepublic void cleanupParts()
Part
s from this Profile, that refer to non-existing
files.public java.util.HashSet<Part> getParts()
Part
s belonging to this profile.public java.lang.String getOutputDirectory()
public java.util.HashSet<AbstractModule> getModules()
AbstractModule
s contained in this Profile.public void addPart(Part part, boolean async)
Part
to this Profile. An initial extraction will be started
for this part, which can be asynchronous or synchronous.part
- Part to be addedasync
- Indicates whether the initial extraction run should be
asynchronous.public void removePart(Part part)
Part
from this profile.spart
- Part to be removed.public void removeAllParts()
Part
s from this profile.public void addAllModules(java.util.List<AbstractModule> modules)
AbstractModule
s of a list to this profile.modules
- public void addModule(AbstractModule module)
AbstractModule
to this profile.module
- AbstractModule to be added.public void removeAllModules()
AbstractModule
s from this profile.public void removeModule(AbstractModule module)
AbstractModule
from this profile.module
- public void stopAllDaemons()
public void startAllDaemons()
public java.lang.String toString()
toString
in class java.lang.Object
public void deleteAllMetadata()
public void addAllPartsFromPaths(java.util.HashSet<java.nio.file.Path> paths, boolean extract)
paths
- Paths to the files that should be added.protected java.util.HashSet<Part> getPartsFromDirectoryFiles(java.io.File directory)
Part
s from a specific directory.directory
- Path of the directory to load the Parts from.public boolean isEnabled()
public void setEnabled(boolean enable)
enable
- Enables the extraction if true.public void exportAsTemplate()
ProfileTemplate
: The list of configured
AbstractModule
s survives, and the name of the Profile.