Package jadex.bridge.modelinfo
Class ModelInfo
- java.lang.Object
-
- jadex.bridge.modelinfo.Startable
-
- jadex.bridge.modelinfo.ModelInfo
-
- All Implemented Interfaces:
IModelInfo
- Direct Known Subclasses:
BDIXModel
public class ModelInfo extends Startable implements IModelInfo
Public model information that is provided as result from component factories when a model is loaded.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String[]allimportsAll imports (cached for speed).protected java.util.List<IArgument>argumentsThe arguments.protected java.lang.String[]breakpointsThe breakpoints.protected java.lang.ClassLoaderclassloaderThe classloader.protected java.util.List<ConfigurationInfo>configurationsThe configurations.protected IComponentFeatureFactory[]featuresThe component features.protected java.lang.StringfilenameThe filename.protected java.lang.StringfullnameThe full name (cached for speed).protected java.util.List<java.lang.String>importsThe imports.protected java.lang.StringnameThe name.protected java.lang.StringnamehintThe name hint for instances of this model.protected java.util.List<NFPropertyInfo>nfpropertiesThe nf properties.protected java.lang.StringpackagenameThe package.protected java.lang.String[]predecessorsThe predecessors.protected java.util.Map<java.lang.String,java.lang.Object>propertiesThe properties.protected java.util.List<ProvidedServiceInfo>providedservicesThe provided services.protected java.lang.ObjectrawmodelThe raw model.protected IErrorReportreportThe report.protected java.util.Map<java.lang.String,RequiredServiceInfo>requiredservicesThe required services.protected java.util.List<IArgument>resultsThe results.protected IResourceIdentifierridThe resource identifier.protected booleanstartableFlag if startable.protected java.util.List<SubcomponentTypeInfo>subcomponentsThe subcomponent types.protected java.lang.String[]successorsThe predecessors.protected java.lang.StringtypeThe type.-
Fields inherited from class jadex.bridge.modelinfo.Startable
description
-
-
Constructor Summary
Constructors Constructor Description ModelInfo()Create a new model info.ModelInfo(java.lang.String name, java.lang.String packagename, java.lang.String description, IErrorReport report, IArgument[] arguments, IArgument[] results, boolean startable, java.lang.String filename, java.util.Map<java.lang.String,java.lang.Object> properties, java.lang.ClassLoader classloader, RequiredServiceInfo[] requiredservices, ProvidedServiceInfo[] providedservices, ConfigurationInfo[] configurations, SubcomponentTypeInfo[] subcomponents, java.lang.String[] imports, IResourceIdentifier rid, java.lang.Object rawmodel, IComponentFeatureFactory[] features)Create a new model info.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddArgument(IArgument argument)Add an argument.voidaddConfiguration(ConfigurationInfo configuration)Add a configuration.voidaddImport(java.lang.String imp)Add an import statement.voidaddNFProperty(NFPropertyInfo pi)Add a non functional property.voidaddPredecessors(java.lang.String[] predecessors)Adds required predecessors (dependencies).voidaddProperty(UnparsedExpression unexp)Add a property.voidaddProperty(java.lang.String name, java.lang.Object value)Add a property.voidaddProvidedService(ProvidedServiceInfo providedservice)Add a provided service.voidaddRequiredService(RequiredServiceInfo requiredservice)Add a required service.voidaddResult(IArgument result)Add a result.voidaddSubcomponentType(SubcomponentTypeInfo subcomponent)Add a subcomponent type.voidaddSuccessors(java.lang.String[] successors)Adds required predecessors (dependencies).booleancheckName()Check if the specified name matches the file name.booleancheckPackage()Check if the specified package matches the file name.java.lang.String[]getAllImports()Get the imports including the package.IArgumentgetArgument(java.lang.String name)Get an argument per name.IArgument[]getArguments()Get the arguments.java.lang.String[]getBreakpoints()Get the possible breakpoint places in that model.java.lang.ClassLoadergetClassLoader()Return the class loader corresponding to the model.ConfigurationInfogetConfiguration(java.lang.String name)Get a configuration.java.lang.String[]getConfigurationNames()Get the configurations.ConfigurationInfo[]getConfigurations()Get the configurations.IComponentFeatureFactory[]getFeatures()Get the features.java.lang.StringgetFilename()Get the filename.java.lang.StringgetFullName()Get the full model name (package.name)java.lang.String[]getImports()Get the imports.java.lang.BooleangetKeepalive(java.lang.String configname)Get the keepalive flag.IMonitoringService.PublishEventLevelgetMonitoring(java.lang.String configname)Get the monitoring flag.java.lang.StringgetName()Get the name.java.lang.StringgetNameHint()Get the namehint.java.util.List<NFPropertyInfo>getNFProperties()Get the nfproperties.java.lang.StringgetPackage()Get the package name.java.lang.String[]getPredecessors()Get required predecessors (dependencies).java.util.Map<java.lang.String,java.lang.Object>getProperties()Get the properties.java.lang.ObjectgetProperty(java.lang.String name, java.lang.ClassLoader cl)Get a parsed property.ProvidedServiceInfo[]getProvidedServices()Get the provided services.java.lang.ObjectgetRawModel()Get the kernel-specific model.IErrorReportgetReport()Get the report.IResourceIdentifiergetResourceIdentifier()Return the resource identifier.IArgumentgetResult(java.lang.String name)Get a result per name.IArgument[]getResults()Get the results.RequiredServiceInfogetService(java.lang.String name)Get the required service.RequiredServiceInfo[]getServices()Get the required services.SubcomponentTypeInfo[]getSubcomponentTypes()Get the subcomponent names.java.lang.String[]getSuccessors()Get declared successors (dependencies).java.lang.BooleangetSuspend(java.lang.String configname)Get the suspend flag.java.lang.BooleangetSynchronous(java.lang.String configname)Get the synchronous flag.java.lang.StringgetType()Get the model type.voidinternalSetRawModel(java.lang.Object rawmodel)Set the kernel-specific model.booleanisStartable()Is the model startable.voidremoveProvidedService(ProvidedServiceInfo providedservice)Remove a provided service.voidremoveRequiredService(RequiredServiceInfo requiredservice)Remove a required service.voidsetArguments(IArgument[] arguments)Set the arguments.voidsetBreakpoints(java.lang.String[] breakpoints)Set the breakpoints.voidsetClassloader(java.lang.ClassLoader classloader)Set the classloader.voidsetConfigurations(ConfigurationInfo[] configurations)Set the configurations.voidsetFeatures(IComponentFeatureFactory[] features)The features to set.voidsetFilename(java.lang.String filename)Set the filename.voidsetImports(java.lang.String[] imports)Set the imports.voidsetName(java.lang.String name)Set the name.voidsetNameHint(java.lang.String namehint)Set the namehint.voidsetNFProperties(java.util.List<NFPropertyInfo> nfproperties)Set the nfproperties.voidsetPackage(java.lang.String packagename)Set the packagename.voidsetPredecessors(java.lang.String[] predecessors)Set required predecessors (dependencies).voidsetProperties(java.util.Map<java.lang.String,java.lang.Object> properties)Set the properties.voidsetProvidedServices(ProvidedServiceInfo[] providedservices)Set the provided services.voidsetReport(IErrorReport report)Set the report.voidsetRequiredServices(RequiredServiceInfo[] requiredservices)Set the required services.voidsetResourceIdentifier(IResourceIdentifier rid)Set the resource identifier.voidsetResults(IArgument[] results)Set the results.voidsetStartable(boolean startable)Set the startable.voidsetSubcomponentTypes(SubcomponentTypeInfo[] subcomponents)Set the subcomponent types.voidsetSuccessors(java.lang.String[] successors)Set declared successors (dependencies).voidsetType(java.lang.String type)Set the component type.-
Methods inherited from class jadex.bridge.modelinfo.Startable
getDescription, getKeepalive, getMonitoring, getSuspend, getSynchronous, setDescription, setKeepalive, setMonitoring, setSuspend, setSynchronous
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jadex.bridge.modelinfo.IModelInfo
getDescription
-
-
-
-
Field Detail
-
name
protected java.lang.String name
The name.
-
packagename
protected java.lang.String packagename
The package.
-
predecessors
protected java.lang.String[] predecessors
The predecessors.
-
successors
protected java.lang.String[] successors
The predecessors.
-
imports
protected java.util.List<java.lang.String> imports
The imports.
-
allimports
protected java.lang.String[] allimports
All imports (cached for speed).
-
report
protected IErrorReport report
The report.
-
configurations
protected java.util.List<ConfigurationInfo> configurations
The configurations.
-
arguments
protected java.util.List<IArgument> arguments
The arguments.
-
results
protected java.util.List<IArgument> results
The results.
-
startable
protected boolean startable
Flag if startable.
-
filename
protected java.lang.String filename
The filename.
-
type
protected java.lang.String type
The type.
-
fullname
protected java.lang.String fullname
The full name (cached for speed).
-
properties
protected java.util.Map<java.lang.String,java.lang.Object> properties
The properties.
-
nfproperties
protected java.util.List<NFPropertyInfo> nfproperties
The nf properties.
-
classloader
protected java.lang.ClassLoader classloader
The classloader.
-
requiredservices
protected java.util.Map<java.lang.String,RequiredServiceInfo> requiredservices
The required services.
-
providedservices
protected java.util.List<ProvidedServiceInfo> providedservices
The provided services.
-
subcomponents
protected java.util.List<SubcomponentTypeInfo> subcomponents
The subcomponent types.
-
rid
protected IResourceIdentifier rid
The resource identifier.
-
breakpoints
protected java.lang.String[] breakpoints
The breakpoints.
-
rawmodel
protected java.lang.Object rawmodel
The raw model.
-
features
protected IComponentFeatureFactory[] features
The component features.
-
namehint
protected java.lang.String namehint
The name hint for instances of this model.
-
-
Constructor Detail
-
ModelInfo
public ModelInfo()
Create a new model info.
-
ModelInfo
public ModelInfo(java.lang.String name, java.lang.String packagename, java.lang.String description, IErrorReport report, IArgument[] arguments, IArgument[] results, boolean startable, java.lang.String filename, java.util.Map<java.lang.String,java.lang.Object> properties, java.lang.ClassLoader classloader, RequiredServiceInfo[] requiredservices, ProvidedServiceInfo[] providedservices, ConfigurationInfo[] configurations, SubcomponentTypeInfo[] subcomponents, java.lang.String[] imports, IResourceIdentifier rid, java.lang.Object rawmodel, IComponentFeatureFactory[] features)Create a new model info.
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the name.- Specified by:
getNamein interfaceIModelInfo- Returns:
- The name.
-
getPredecessors
public java.lang.String[] getPredecessors()
Get required predecessors (dependencies).- Specified by:
getPredecessorsin interfaceIModelInfo
-
getSuccessors
public java.lang.String[] getSuccessors()
Get declared successors (dependencies).- Specified by:
getSuccessorsin interfaceIModelInfo
-
getPackage
public java.lang.String getPackage()
Get the package name.- Specified by:
getPackagein interfaceIModelInfo- Returns:
- The package name.
-
getFullName
public java.lang.String getFullName()
Get the full model name (package.name)- Specified by:
getFullNamein interfaceIModelInfo- Returns:
- The full name.
-
getImports
public java.lang.String[] getImports()
Get the imports.- Specified by:
getImportsin interfaceIModelInfo- Returns:
- The imports.
-
getAllImports
public java.lang.String[] getAllImports()
Get the imports including the package.- Specified by:
getAllImportsin interfaceIModelInfo- Returns:
- The imports.
-
addImport
public void addImport(java.lang.String imp)
Add an import statement.
-
getReport
public IErrorReport getReport()
Get the report.- Specified by:
getReportin interfaceIModelInfo- Returns:
- The report.
-
getConfigurationNames
public java.lang.String[] getConfigurationNames()
Get the configurations.- Specified by:
getConfigurationNamesin interfaceIModelInfo- Returns:
- The configuration.
-
getConfigurations
public ConfigurationInfo[] getConfigurations()
Get the configurations.- Specified by:
getConfigurationsin interfaceIModelInfo- Returns:
- The configuration.
-
getConfiguration
public ConfigurationInfo getConfiguration(java.lang.String name)
Get a configuration.- Specified by:
getConfigurationin interfaceIModelInfo- Returns:
- The configuration.
-
getArguments
public IArgument[] getArguments()
Get the arguments.- Specified by:
getArgumentsin interfaceIModelInfo- Returns:
- The arguments.
-
getArgument
public IArgument getArgument(java.lang.String name)
Get an argument per name.- Specified by:
getArgumentin interfaceIModelInfo- Parameters:
name- The name.- Returns:
- The argument.
-
getResults
public IArgument[] getResults()
Get the results.- Specified by:
getResultsin interfaceIModelInfo- Returns:
- The results.
-
getResult
public IArgument getResult(java.lang.String name)
Get a result per name.- Specified by:
getResultin interfaceIModelInfo- Parameters:
name- The name.- Returns:
- The result.
-
isStartable
public boolean isStartable()
Is the model startable.- Specified by:
isStartablein interfaceIModelInfo- Returns:
- True, if startable.
-
getType
public java.lang.String getType()
Get the model type.- Specified by:
getTypein interfaceIModelInfo- Returns:
- The model type (kernel specific).
-
getFilename
public java.lang.String getFilename()
Get the filename.- Specified by:
getFilenamein interfaceIModelInfo- Returns:
- The filename.
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
Get the properties. Arbitrary properties that can e.g. be used to define model-specific settings to configure tools.- Specified by:
getPropertiesin interfaceIModelInfo- Returns:
- The properties.
-
getProperty
public java.lang.Object getProperty(java.lang.String name, java.lang.ClassLoader cl)Get a parsed property. Unlike raw properties, which may be parsed or unparsed, this method always returns parsed property values.- Specified by:
getPropertyin interfaceIModelInfo- Parameters:
name- The property name.- Returns:
- The property value or null if property not defined.
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
Return the class loader corresponding to the model.- Returns:
- The class loader corresponding to the model.
-
getNFProperties
public java.util.List<NFPropertyInfo> getNFProperties()
Get the nfproperties.- Specified by:
getNFPropertiesin interfaceIModelInfo- Returns:
- The nfproperties.
-
setNFProperties
public void setNFProperties(java.util.List<NFPropertyInfo> nfproperties)
Set the nfproperties.- Parameters:
nfproperties- The nfproperties to set.
-
addNFProperty
public void addNFProperty(NFPropertyInfo pi)
Add a non functional property.
-
getResourceIdentifier
public IResourceIdentifier getResourceIdentifier()
Return the resource identifier.- Specified by:
getResourceIdentifierin interfaceIModelInfo- Returns:
- The resource identifier.
-
setName
public void setName(java.lang.String name)
Set the name.- Parameters:
name- The name to set.
-
addPredecessors
public void addPredecessors(java.lang.String[] predecessors)
Adds required predecessors (dependencies).
-
setPredecessors
public void setPredecessors(java.lang.String[] predecessors)
Set required predecessors (dependencies).
-
addSuccessors
public void addSuccessors(java.lang.String[] successors)
Adds required predecessors (dependencies).
-
setSuccessors
public void setSuccessors(java.lang.String[] successors)
Set declared successors (dependencies).
-
setPackage
public void setPackage(java.lang.String packagename)
Set the packagename.- Parameters:
packagename- The packagename to set.
-
setReport
public void setReport(IErrorReport report)
Set the report.- Parameters:
report- The report to set.
-
setImports
public void setImports(java.lang.String[] imports)
Set the imports.- Parameters:
imports- The imports to set.
-
setConfigurations
public void setConfigurations(ConfigurationInfo[] configurations)
Set the configurations.- Parameters:
configurations- The configurations to set.
-
addConfiguration
public void addConfiguration(ConfigurationInfo configuration)
Add a configuration.- Parameters:
configuration- The configuration.
-
setArguments
public void setArguments(IArgument[] arguments)
Set the arguments.- Parameters:
arguments- The arguments to set.
-
addArgument
public void addArgument(IArgument argument)
Add an argument.- Parameters:
argument- The argument.
-
setResults
public void setResults(IArgument[] results)
Set the results.- Parameters:
results- The results to set.
-
addResult
public void addResult(IArgument result)
Add a result.- Parameters:
result- The result.
-
setStartable
public void setStartable(boolean startable)
Set the startable.- Parameters:
startable- The startable to set.
-
setFilename
public void setFilename(java.lang.String filename)
Set the filename.- Parameters:
filename- The filename to set.
-
setType
public void setType(java.lang.String type)
Set the component type.- Parameters:
type- The component type to set.
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
Set the properties.- Parameters:
properties- The properties to set.
-
addProperty
public void addProperty(java.lang.String name, java.lang.Object value)Add a property.
-
addProperty
public void addProperty(UnparsedExpression unexp)
Add a property.
-
setClassloader
public void setClassloader(java.lang.ClassLoader classloader)
Set the classloader.- Parameters:
classloader- The classloader to set.
-
getServices
public RequiredServiceInfo[] getServices()
Get the required services.- Specified by:
getServicesin interfaceIModelInfo- Returns:
- The required services.
-
setResourceIdentifier
public void setResourceIdentifier(IResourceIdentifier rid)
Set the resource identifier.- Parameters:
rid- The resource identifier to set.
-
setRequiredServices
public void setRequiredServices(RequiredServiceInfo[] requiredservices)
Set the required services.- Parameters:
required- services The required services to set.
-
getService
public RequiredServiceInfo getService(java.lang.String name)
Get the required service.- Specified by:
getServicein interfaceIModelInfo- Returns:
- The required service.
-
addRequiredService
public void addRequiredService(RequiredServiceInfo requiredservice)
Add a required service.- Parameters:
requiredservice- The required service.
-
removeRequiredService
public void removeRequiredService(RequiredServiceInfo requiredservice)
Remove a required service.- Parameters:
requiredservice- The required service.
-
getProvidedServices
public ProvidedServiceInfo[] getProvidedServices()
Get the provided services.- Specified by:
getProvidedServicesin interfaceIModelInfo- Returns:
- The provided services.
-
setProvidedServices
public void setProvidedServices(ProvidedServiceInfo[] providedservices)
Set the provided services.- Parameters:
provided- services The provided services to set.
-
addProvidedService
public void addProvidedService(ProvidedServiceInfo providedservice)
Add a provided service.- Parameters:
providedservice- The provided service.
-
removeProvidedService
public void removeProvidedService(ProvidedServiceInfo providedservice)
Remove a provided service.- Parameters:
providedservice- The provided service.
-
getSynchronous
public java.lang.Boolean getSynchronous(java.lang.String configname)
Get the synchronous flag.- Specified by:
getSynchronousin interfaceIModelInfo- Parameters:
synchronous- The synchronous.- Returns:
- The synchronous flag value.
-
getSuspend
public java.lang.Boolean getSuspend(java.lang.String configname)
Get the suspend flag.- Specified by:
getSuspendin interfaceIModelInfo- Parameters:
configname- The configname.- Returns:
- The suspend flag value.
-
getKeepalive
public java.lang.Boolean getKeepalive(java.lang.String configname)
Get the keepalive flag.- Specified by:
getKeepalivein interfaceIModelInfo- Parameters:
configname- The configname.- Returns:
- The keepalive flag value.
-
getMonitoring
public IMonitoringService.PublishEventLevel getMonitoring(java.lang.String configname)
Get the monitoring flag.- Specified by:
getMonitoringin interfaceIModelInfo- Parameters:
configname- The configname.- Returns:
- The monitoring flag value.
-
getSubcomponentTypes
public SubcomponentTypeInfo[] getSubcomponentTypes()
Get the subcomponent names.- Specified by:
getSubcomponentTypesin interfaceIModelInfo
-
setSubcomponentTypes
public void setSubcomponentTypes(SubcomponentTypeInfo[] subcomponents)
Set the subcomponent types.
-
addSubcomponentType
public void addSubcomponentType(SubcomponentTypeInfo subcomponent)
Add a subcomponent type.- Parameters:
subcomponent- The subcomponent type.
-
getBreakpoints
public java.lang.String[] getBreakpoints()
Get the possible breakpoint places in that model.- Specified by:
getBreakpointsin interfaceIModelInfo- Returns:
- The breakpoints.
-
setBreakpoints
public void setBreakpoints(java.lang.String[] breakpoints)
Set the breakpoints.- Parameters:
breakpoints- The breakpoints to set.
-
checkName
public boolean checkName()
Check if the specified name matches the file name.
-
checkPackage
public boolean checkPackage()
Check if the specified package matches the file name.
-
getRawModel
public java.lang.Object getRawModel()
Get the kernel-specific model.- Specified by:
getRawModelin interfaceIModelInfo- Returns:
- The kernel-specific model when loaded locally, null for remote models.
-
internalSetRawModel
public void internalSetRawModel(java.lang.Object rawmodel)
Set the kernel-specific model.- Parameters:
rawmodel- The kernel-specific model when loaded locally, null for remote models.
-
getFeatures
public IComponentFeatureFactory[] getFeatures()
Get the features.- Specified by:
getFeaturesin interfaceIModelInfo- Returns:
- The features
-
setFeatures
public void setFeatures(IComponentFeatureFactory[] features)
The features to set.- Parameters:
features- The features to set
-
getNameHint
public java.lang.String getNameHint()
Get the namehint.- Specified by:
getNameHintin interfaceIModelInfo- Returns:
- the namehint
-
setNameHint
public void setNameHint(java.lang.String namehint)
Set the namehint.- Parameters:
namehint- The namehint to set
-
-