public interface

IRuntimeProject

implements IUserDataSupport IEventSource
com.pnfsoftware.jeb.core.IRuntimeProject

Class Overview

A runtime project represents a loaded instance of a JEB project.

Summary

Constants
String AlwaysProcessDuplicateInputs Project property
String ArtifactProcessingDepth Project property
String CompressPersistedProject Project property
String PersistArtifactFiles Project property
String PersistenceStrategy Project property: 0=default (full); 1=full; 2=quick.
Public Methods
abstract void close()
Close this project.
abstract boolean destroyUnit(IUnit unit)
This method is used to destroy a unit living in this project.
abstract <T extends IUnit> T findUnit(Class<T> unitClazz)
Convenience method used to retrieve a unit of the project by its class type.
abstract <T extends IUnit> List<T> findUnits(Class<T> unitClazz)
Convenience method used to retrieve units of the project by their class type.
abstract void finishArtifactProcessing(ILiveArtifact a)
If the artifacts were processed with doNoProcessUnit set to true, this method may be called afterward to finish processing to process all top-level units yielded by the artifact.
abstract int getArtifactCount()
Retrieve the count of artifacts living in this project.
abstract BookmarkManager getBookmarkManager()
Get the bookmark manager.
abstract long getCreationTimestamp()
Retrieve the project creation timestamp.
abstract IEnginesContext getEnginesContext()
Retrieve the JEB Engines context that's managing this project.
abstract List<? extends IInputRecord> getInputRecords()
Retrieve the list of inputs processed into the project.
abstract String getKey()
Retrieve this project key, used to uniquely identify a project within an IEnginesContext.
abstract ILiveArtifact getLiveArtifact(int index)
Retrieve a live artifact by index.
abstract List<ILiveArtifact> getLiveArtifacts()
Retrieve the list of artifacts managed by this project.
abstract String getName()
Set this project name.
abstract String getNotes()
Retrieve the user notes.
abstract int getPersistenceStrategy()
This convenience routine is used to retrieve the JDB2 PersistenceStrategy currently used by this project.
abstract IUnitProcessor getProcessor()
Retrieve the processor (parser) used by this project to process input data and generate units.
abstract IPropertyDefinitionManager getPropertyDefinitionManager()
Get the PDM of this project.
abstract IPropertyManager getPropertyManager()
Get the PM of this project.
abstract long getRecordedTimestamp()
Retrieve the last time this project was saved to JDB2.
abstract long getUptime()
Retrieve the duration this project has been opened JEB since it's been last opened.
abstract boolean isReloaded()
Determine whether this project is new (it was created), or was reloaded from a JDB2 database.
abstract ILiveArtifact processArtifact(IArtifact artifact, String wantedType, boolean softDelegation, boolean doNotProcessUnit)
Process an artifact into this project.
abstract ILiveArtifact processArtifact(IArtifact artifact)
Process an artifact into this project.
abstract void setName(String name)
Retrieve this project name.
abstract void setNotes(String notes)
Set or update the user notes.
abstract void setPersistenceStrategy(int strategy)
This convenience routine is used to set the JDB2 PersistenceStrategy currently used by this project.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.IUserDataSupport
From interface com.pnfsoftware.jeb.util.events.IEventSource

Constants

public static final String AlwaysProcessDuplicateInputs

Project property

Constant Value: "AlwaysProcessDuplicateInputs"

public static final String ArtifactProcessingDepth

Project property

Constant Value: "ArtifactProcessingDepth"

public static final String CompressPersistedProject

Project property

Constant Value: "CompressPersistedProject"

public static final String PersistArtifactFiles

Project property

Constant Value: "PersistArtifactFiles"

public static final String PersistenceStrategy

Project property: 0=default (full); 1=full; 2=quick.

Constant Value: "PersistenceStrategy"

Public Methods

public abstract void close ()

Close this project. This method should not be called directly; to close a project, use the managing context's unload() method.

public abstract boolean destroyUnit (IUnit unit)

This method is used to destroy a unit living in this project. All sub-units will be destroyed as well.

Returns
  • success indicator

public abstract T findUnit (Class<T> unitClazz)

Convenience method used to retrieve a unit of the project by its class type. The first retrieved unit is returned.

Parameters
unitClazz unit type
Returns
  • a unit or null

public abstract List<T> findUnits (Class<T> unitClazz)

Convenience method used to retrieve units of the project by their class type.

Parameters
unitClazz unit type
Returns
  • a list of units, potentially empty

public abstract void finishArtifactProcessing (ILiveArtifact a)

If the artifacts were processed with doNoProcessUnit set to true, this method may be called afterward to finish processing to process all top-level units yielded by the artifact.

Parameters
a live artifact resulting from a call to process(...)

public abstract int getArtifactCount ()

Retrieve the count of artifacts living in this project.

public abstract BookmarkManager getBookmarkManager ()

Get the bookmark manager.

public abstract long getCreationTimestamp ()

Retrieve the project creation timestamp.

Returns
  • unix timestamp in milliseconds

public abstract IEnginesContext getEnginesContext ()

Retrieve the JEB Engines context that's managing this project.

public abstract List<? extends IInputRecord> getInputRecords ()

Retrieve the list of inputs processed into the project. Those inputs may or may no longer be present as artifacts.

public abstract String getKey ()

Retrieve this project key, used to uniquely identify a project within an IEnginesContext.

public abstract ILiveArtifact getLiveArtifact (int index)

Retrieve a live artifact by index.

public abstract List<ILiveArtifact> getLiveArtifacts ()

Retrieve the list of artifacts managed by this project.

public abstract String getName ()

Set this project name.

public abstract String getNotes ()

Retrieve the user notes.

public abstract int getPersistenceStrategy ()

This convenience routine is used to retrieve the JDB2 PersistenceStrategy currently used by this project.

public abstract IUnitProcessor getProcessor ()

Retrieve the processor (parser) used by this project to process input data and generate units.

public abstract IPropertyDefinitionManager getPropertyDefinitionManager ()

Get the PDM of this project. Each project has it own PDM.

public abstract IPropertyManager getPropertyManager ()

Get the PM of this project. Each project has its own PM.

public abstract long getRecordedTimestamp ()

Retrieve the last time this project was saved to JDB2.

Returns
  • unix timestamp in milliseconds; 0 if the project was never saved (isReloaded() would also return false)

public abstract long getUptime ()

Retrieve the duration this project has been opened JEB since it's been last opened.

Returns
  • duration in milliseconds

public abstract boolean isReloaded ()

Determine whether this project is new (it was created), or was reloaded from a JDB2 database.

public abstract ILiveArtifact processArtifact (IArtifact artifact, String wantedType, boolean softDelegation, boolean doNotProcessUnit)

Process an artifact into this project.

Parameters
artifact an Artifact, likely backed by a file
wantedType leave null to let the parser determine the type of artifact; see IUnitProcessor for details
softDelegation prefer soft delegation and avoid creating generic unit if the input type was undetermined; see IUnitProcessor for details
doNotProcessUnit set to true to skip unit processing (the yielded unit, if any, would simply be created)
Returns
  • an artifact living in the project, likely to hold one or more parent units

public abstract ILiveArtifact processArtifact (IArtifact artifact)

Process an artifact into this project.

Parameters
artifact an Artifact, likely backed by a file
Returns
  • an artifact living in the project, likely to hold one or more parent units

public abstract void setName (String name)

Retrieve this project name.

public abstract void setNotes (String notes)

Set or update the user notes.

public abstract void setPersistenceStrategy (int strategy)

This convenience routine is used to set the JDB2 PersistenceStrategy currently used by this project.