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 SummaryFields 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.StringinstancenameDefault instance name.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.Startabledescription
 
- 
 - 
Constructor SummaryConstructors 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 SummaryAll 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.StringgetInstanceName()Get the default instance name.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.voidsetInstanceName(java.lang.String instancename)Set the default instance name.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.StartablegetDescription, getKeepalive, getMonitoring, getScope, getSuspend, getSynchronous, setDescription, setKeepalive, setMonitoring, setScope, setSuspend, setSynchronous
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface jadex.bridge.modelinfo.IModelInfogetDescription
 
- 
 
- 
- 
- 
Field Detail- 
nameprotected java.lang.String name The name.
 - 
instancenameprotected java.lang.String instancename Default instance name.
 - 
packagenameprotected java.lang.String packagename The package.
 - 
predecessorsprotected java.lang.String[] predecessors The predecessors.
 - 
successorsprotected java.lang.String[] successors The predecessors.
 - 
importsprotected java.util.List<java.lang.String> imports The imports.
 - 
allimportsprotected java.lang.String[] allimports All imports (cached for speed).
 - 
reportprotected IErrorReport report The report.
 - 
configurationsprotected java.util.List<ConfigurationInfo> configurations The configurations.
 - 
argumentsprotected java.util.List<IArgument> arguments The arguments.
 - 
resultsprotected java.util.List<IArgument> results The results.
 - 
startableprotected boolean startable Flag if startable.
 - 
filenameprotected java.lang.String filename The filename.
 - 
typeprotected java.lang.String type The type.
 - 
fullnameprotected java.lang.String fullname The full name (cached for speed).
 - 
propertiesprotected java.util.Map<java.lang.String,java.lang.Object> properties The properties.
 - 
nfpropertiesprotected java.util.List<NFPropertyInfo> nfproperties The nf properties.
 - 
classloaderprotected java.lang.ClassLoader classloader The classloader.
 - 
requiredservicesprotected java.util.Map<java.lang.String,RequiredServiceInfo> requiredservices The required services.
 - 
providedservicesprotected java.util.List<ProvidedServiceInfo> providedservices The provided services.
 - 
subcomponentsprotected java.util.List<SubcomponentTypeInfo> subcomponents The subcomponent types.
 - 
ridprotected IResourceIdentifier rid The resource identifier.
 - 
breakpointsprotected java.lang.String[] breakpoints The breakpoints.
 - 
rawmodelprotected java.lang.Object rawmodel The raw model.
 - 
featuresprotected IComponentFeatureFactory[] features The component features.
 - 
namehintprotected java.lang.String namehint The name hint for instances of this model.
 
- 
 - 
Constructor Detail- 
ModelInfopublic ModelInfo() Create a new model info.
 - 
ModelInfopublic 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- 
getNamepublic java.lang.String getName() Get the name.- Specified by:
- getNamein interface- IModelInfo
- Returns:
- The name.
 
 - 
getInstanceNamepublic java.lang.String getInstanceName() Get the default instance name.- Specified by:
- getInstanceNamein interface- IModelInfo
- Returns:
- The instance name.
 
 - 
getPredecessorspublic java.lang.String[] getPredecessors() Get required predecessors (dependencies).- Specified by:
- getPredecessorsin interface- IModelInfo
 
 - 
getSuccessorspublic java.lang.String[] getSuccessors() Get declared successors (dependencies).- Specified by:
- getSuccessorsin interface- IModelInfo
 
 - 
getPackagepublic java.lang.String getPackage() Get the package name.- Specified by:
- getPackagein interface- IModelInfo
- Returns:
- The package name.
 
 - 
getFullNamepublic java.lang.String getFullName() Get the full model name (package.name)- Specified by:
- getFullNamein interface- IModelInfo
- Returns:
- The full name.
 
 - 
getImportspublic java.lang.String[] getImports() Get the imports.- Specified by:
- getImportsin interface- IModelInfo
- Returns:
- The imports.
 
 - 
getAllImportspublic java.lang.String[] getAllImports() Get the imports including the package.- Specified by:
- getAllImportsin interface- IModelInfo
- Returns:
- The imports.
 
 - 
addImportpublic void addImport(java.lang.String imp) Add an import statement.
 - 
getReportpublic IErrorReport getReport() Get the report.- Specified by:
- getReportin interface- IModelInfo
- Returns:
- The report.
 
 - 
getConfigurationNamespublic java.lang.String[] getConfigurationNames() Get the configurations.- Specified by:
- getConfigurationNamesin interface- IModelInfo
- Returns:
- The configuration.
 
 - 
getConfigurationspublic ConfigurationInfo[] getConfigurations() Get the configurations.- Specified by:
- getConfigurationsin interface- IModelInfo
- Returns:
- The configuration.
 
 - 
getConfigurationpublic ConfigurationInfo getConfiguration(java.lang.String name) Get a configuration.- Specified by:
- getConfigurationin interface- IModelInfo
- Returns:
- The configuration.
 
 - 
getArgumentspublic IArgument[] getArguments() Get the arguments.- Specified by:
- getArgumentsin interface- IModelInfo
- Returns:
- The arguments.
 
 - 
getArgumentpublic IArgument getArgument(java.lang.String name) Get an argument per name.- Specified by:
- getArgumentin interface- IModelInfo
- Parameters:
- name- The name.
- Returns:
- The argument.
 
 - 
getResultspublic IArgument[] getResults() Get the results.- Specified by:
- getResultsin interface- IModelInfo
- Returns:
- The results.
 
 - 
getResultpublic IArgument getResult(java.lang.String name) Get a result per name.- Specified by:
- getResultin interface- IModelInfo
- Parameters:
- name- The name.
- Returns:
- The result.
 
 - 
isStartablepublic boolean isStartable() Is the model startable.- Specified by:
- isStartablein interface- IModelInfo
- Returns:
- True, if startable.
 
 - 
getTypepublic java.lang.String getType() Get the model type.- Specified by:
- getTypein interface- IModelInfo
- Returns:
- The model type (kernel specific).
 
 - 
getFilenamepublic java.lang.String getFilename() Get the filename.- Specified by:
- getFilenamein interface- IModelInfo
- Returns:
- The filename.
 
 - 
getPropertiespublic 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 interface- IModelInfo
- Returns:
- The properties.
 
 - 
getPropertypublic 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 interface- IModelInfo
- Parameters:
- name- The property name.
- Returns:
- The property value or null if property not defined.
 
 - 
getClassLoaderpublic java.lang.ClassLoader getClassLoader() Return the class loader corresponding to the model.- Returns:
- The class loader corresponding to the model.
 
 - 
getNFPropertiespublic java.util.List<NFPropertyInfo> getNFProperties() Get the nfproperties.- Specified by:
- getNFPropertiesin interface- IModelInfo
- Returns:
- The nfproperties.
 
 - 
setNFPropertiespublic void setNFProperties(java.util.List<NFPropertyInfo> nfproperties) Set the nfproperties.- Parameters:
- nfproperties- The nfproperties to set.
 
 - 
addNFPropertypublic void addNFProperty(NFPropertyInfo pi) Add a non functional property.
 - 
getResourceIdentifierpublic IResourceIdentifier getResourceIdentifier() Return the resource identifier.- Specified by:
- getResourceIdentifierin interface- IModelInfo
- Returns:
- The resource identifier.
 
 - 
setNamepublic void setName(java.lang.String name) Set the name.- Parameters:
- name- The name to set.
 
 - 
setInstanceNamepublic void setInstanceName(java.lang.String instancename) Set the default instance name.- Parameters:
- instancename- The instance name.
 
 - 
addPredecessorspublic void addPredecessors(java.lang.String[] predecessors) Adds required predecessors (dependencies).
 - 
setPredecessorspublic void setPredecessors(java.lang.String[] predecessors) Set required predecessors (dependencies).
 - 
addSuccessorspublic void addSuccessors(java.lang.String[] successors) Adds required predecessors (dependencies).
 - 
setSuccessorspublic void setSuccessors(java.lang.String[] successors) Set declared successors (dependencies).
 - 
setPackagepublic void setPackage(java.lang.String packagename) Set the packagename.- Parameters:
- packagename- The packagename to set.
 
 - 
setReportpublic void setReport(IErrorReport report) Set the report.- Parameters:
- report- The report to set.
 
 - 
setImportspublic void setImports(java.lang.String[] imports) Set the imports.- Parameters:
- imports- The imports to set.
 
 - 
setConfigurationspublic void setConfigurations(ConfigurationInfo[] configurations) Set the configurations.- Parameters:
- configurations- The configurations to set.
 
 - 
addConfigurationpublic void addConfiguration(ConfigurationInfo configuration) Add a configuration.- Parameters:
- configuration- The configuration.
 
 - 
setArgumentspublic void setArguments(IArgument[] arguments) Set the arguments.- Parameters:
- arguments- The arguments to set.
 
 - 
addArgumentpublic void addArgument(IArgument argument) Add an argument.- Parameters:
- argument- The argument.
 
 - 
setResultspublic void setResults(IArgument[] results) Set the results.- Parameters:
- results- The results to set.
 
 - 
addResultpublic void addResult(IArgument result) Add a result.- Parameters:
- result- The result.
 
 - 
setStartablepublic void setStartable(boolean startable) Set the startable.- Parameters:
- startable- The startable to set.
 
 - 
setFilenamepublic void setFilename(java.lang.String filename) Set the filename.- Parameters:
- filename- The filename to set.
 
 - 
setTypepublic void setType(java.lang.String type) Set the component type.- Parameters:
- type- The component type to set.
 
 - 
setPropertiespublic void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties) Set the properties.- Parameters:
- properties- The properties to set.
 
 - 
addPropertypublic void addProperty(java.lang.String name, java.lang.Object value)Add a property.
 - 
addPropertypublic void addProperty(UnparsedExpression unexp) Add a property.
 - 
setClassloaderpublic void setClassloader(java.lang.ClassLoader classloader) Set the classloader.- Parameters:
- classloader- The classloader to set.
 
 - 
getServicespublic RequiredServiceInfo[] getServices() Get the required services.- Specified by:
- getServicesin interface- IModelInfo
- Returns:
- The required services.
 
 - 
setResourceIdentifierpublic void setResourceIdentifier(IResourceIdentifier rid) Set the resource identifier.- Parameters:
- rid- The resource identifier to set.
 
 - 
setRequiredServicespublic void setRequiredServices(RequiredServiceInfo[] requiredservices) Set the required services.- Parameters:
- required- services The required services to set.
 
 - 
getServicepublic RequiredServiceInfo getService(java.lang.String name) Get the required service.- Specified by:
- getServicein interface- IModelInfo
- Returns:
- The required service.
 
 - 
addRequiredServicepublic void addRequiredService(RequiredServiceInfo requiredservice) Add a required service.- Parameters:
- requiredservice- The required service.
 
 - 
removeRequiredServicepublic void removeRequiredService(RequiredServiceInfo requiredservice) Remove a required service.- Parameters:
- requiredservice- The required service.
 
 - 
getProvidedServicespublic ProvidedServiceInfo[] getProvidedServices() Get the provided services.- Specified by:
- getProvidedServicesin interface- IModelInfo
- Returns:
- The provided services.
 
 - 
setProvidedServicespublic void setProvidedServices(ProvidedServiceInfo[] providedservices) Set the provided services.- Parameters:
- provided- services The provided services to set.
 
 - 
addProvidedServicepublic void addProvidedService(ProvidedServiceInfo providedservice) Add a provided service.- Parameters:
- providedservice- The provided service.
 
 - 
removeProvidedServicepublic void removeProvidedService(ProvidedServiceInfo providedservice) Remove a provided service.- Parameters:
- providedservice- The provided service.
 
 - 
getSynchronouspublic java.lang.Boolean getSynchronous(java.lang.String configname) Get the synchronous flag.- Specified by:
- getSynchronousin interface- IModelInfo
- Parameters:
- synchronous- The synchronous.
- Returns:
- The synchronous flag value.
 
 - 
getSuspendpublic java.lang.Boolean getSuspend(java.lang.String configname) Get the suspend flag.- Specified by:
- getSuspendin interface- IModelInfo
- Parameters:
- configname- The configname.
- Returns:
- The suspend flag value.
 
 - 
getKeepalivepublic java.lang.Boolean getKeepalive(java.lang.String configname) Get the keepalive flag.- Specified by:
- getKeepalivein interface- IModelInfo
- Parameters:
- configname- The configname.
- Returns:
- The keepalive flag value.
 
 - 
getMonitoringpublic IMonitoringService.PublishEventLevel getMonitoring(java.lang.String configname) Get the monitoring flag.- Specified by:
- getMonitoringin interface- IModelInfo
- Parameters:
- configname- The configname.
- Returns:
- The monitoring flag value.
 
 - 
getSubcomponentTypespublic SubcomponentTypeInfo[] getSubcomponentTypes() Get the subcomponent names.- Specified by:
- getSubcomponentTypesin interface- IModelInfo
 
 - 
setSubcomponentTypespublic void setSubcomponentTypes(SubcomponentTypeInfo[] subcomponents) Set the subcomponent types.
 - 
addSubcomponentTypepublic void addSubcomponentType(SubcomponentTypeInfo subcomponent) Add a subcomponent type.- Parameters:
- subcomponent- The subcomponent type.
 
 - 
getBreakpointspublic java.lang.String[] getBreakpoints() Get the possible breakpoint places in that model.- Specified by:
- getBreakpointsin interface- IModelInfo
- Returns:
- The breakpoints.
 
 - 
setBreakpointspublic void setBreakpoints(java.lang.String[] breakpoints) Set the breakpoints.- Parameters:
- breakpoints- The breakpoints to set.
 
 - 
checkNamepublic boolean checkName() Check if the specified name matches the file name.
 - 
checkPackagepublic boolean checkPackage() Check if the specified package matches the file name.
 - 
getRawModelpublic java.lang.Object getRawModel() Get the kernel-specific model.- Specified by:
- getRawModelin interface- IModelInfo
- Returns:
- The kernel-specific model when loaded locally, null for remote models.
 
 - 
internalSetRawModelpublic void internalSetRawModel(java.lang.Object rawmodel) Set the kernel-specific model.- Parameters:
- rawmodel- The kernel-specific model when loaded locally, null for remote models.
 
 - 
getFeaturespublic IComponentFeatureFactory[] getFeatures() Get the features.- Specified by:
- getFeaturesin interface- IModelInfo
- Returns:
- The features
 
 - 
setFeaturespublic void setFeatures(IComponentFeatureFactory[] features) The features to set.- Parameters:
- features- The features to set
 
 - 
getNameHintpublic java.lang.String getNameHint() Get the namehint.- Specified by:
- getNameHintin interface- IModelInfo
- Returns:
- the namehint
 
 - 
setNameHintpublic void setNameHint(java.lang.String namehint) Set the namehint.- Parameters:
- namehint- The namehint to set
 
 
- 
 
-