IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.ras.profile.defauld.defaultprofile
Interface Asset

All Superinterfaces:
org.eclipse.emf.ecore.EObject, org.eclipse.emf.common.notify.Notifier

public interface Asset
extends org.eclipse.emf.ecore.EObject

A representation of the model object ' Asset'. xmi:ordered=true association order is (these are role names) 1. profile 2. description 3. classification 4. solution 5. usage 6. relatedAsset This is a descriptive container for an asset's artifacts. The artifacts may include models, source code, requirements, test cases, documentation, and so on. Every RAS manifest document begins with a single Asset element. This element defines the identity of the reusable software asset. An asset package is always in RAS format. However, it may not be RAS-compliant, meaning it passes all integrity constraints as documented in RAS (e.g., required content supplied). An asset package contains or references the artifacts of the asset itself. The artifacts of the asset are the things that are actually reused. Some artifacts are descriptive content which helps the Asset Conumer understand the asset, and provide guidance on how to apply the asset. This guidance may be in the form of documentation, or may be executable install programs or scripts that automate the injection of an asset's artifacts into another project (such binaries can be included as part of the descriptive content of the asset's package). Assets vary in their size, complexity, and variability. The asset package, as a whole, should provide enough information to allow the Asset Consumer to decide if he/she wants to purchase/use the asset.

The following features are supported:

See Also:
DefaultprofilePackage.getAsset()

Method Summary
 VisitorStatus accept(com.ibm.xtools.ras.profile.defauld.navigation.internal.IActivityVisitor visitor)
          Accepts the given visitor.
 VisitorStatus accept(IArtifactVisitor visitor)
          Accepts the given visitor.
 Classification createClassification()
          Helper method used to create a Classification element using the factory assigned to the asset.
 Description createDescription()
          Helper method used to create a Description element using the factory assigned to the asset.
 Profile createProfile()
          Helper method used to create a Profile element using the factory assigned to the asset.
 RelatedAsset createRelatedAsset()
          Helper method used to create a RelatedAsset element using the factory assigned to the asset.
 Solution createSolution()
          Helper method used to create a Solution element using the factory assigned to the asset.
 Usage createUsage()
          Helper method used to create a Usage element using the factory assigned to the asset.
 String getAccessRights()
          Returns the value of the 'Access Rights' attribute
 IAssetFactory getAssetFactory()
          Get the asset factory with which to create the elements in this asset
 IRASAssetReader getAssetReader()
          Get the asset reader.
 Classification getClassification()
          Returns the value of the 'Classification' containment reference.
 String getDate()
          Returns the value of the 'Date' attribute.
 Description getDescription()
          Returns the value of the 'Description' containment reference.
 String getId()
          Returns the value of the 'Id' attribute.
 String getName()
          Returns the value of the 'Name' attribute.
 Profile getProfile()
          Returns the value of the 'Profile' containment reference.
 org.eclipse.emf.common.util.EList getRelatedAsset()
          Returns the value of the 'Related Asset' containment reference list.
 String getShortDescription()
          Returns the value of the 'Short Description' attribute.
 Solution getSolution()
          Returns the value of the 'Solution' containment reference.
 String getState()
          Returns the value of the 'State' attribute.
 Usage getUsage()
          Returns the value of the 'Usage' containment reference.
 String getVersion()
          Returns the value of the 'Version' attribute.
 void save(OutputStream theOutputStream, org.eclipse.emf.common.util.URI theURI)
          Save the asset to the given output stream
 void save(String theFilePath)
          Save the asset to the given file path
 void save(org.eclipse.emf.common.util.URI theURI)
          Save the asset to the given uri
 void setAccessRights(String value)
          Sets the value of the ' Access Rights' attribute.
 void setAssetFactory(IAssetFactory theAssetFactory)
          Set the asset factory with which to create the elements in this asset.
 void setAssetReader(IRASAssetReader theReader)
          Get the asset reader.
 void setClassification(Classification value)
          Sets the value of the ' Classification' containment reference.
 void setDate(Date value)
          Sets the value of the ' Date' attribute.
 void setDate(String value)
          Sets the value of the ' Date' attribute.
 void setDescription(Description value)
          Sets the value of the ' Description' containment reference.
 void setId(String value)
          Sets the value of the ' Id' attribute.
 void setName(String value)
          Sets the value of the ' Name' attribute.
 void setProfile(Profile value)
          Sets the value of the ' Profile' containment reference.
 void setShortDescription(String value)
          Sets the value of the ' Short Description' attribute.
 void setSolution(Solution value)
          Sets the value of the ' Solution' containment reference.
 void setState(String value)
          Sets the value of the ' State' attribute.
 void setUsage(Usage value)
          Sets the value of the ' Usage' containment reference.
 void setVersion(String value)
          Sets the value of the ' Version' attribute.
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

getName

public String getName()
Returns the value of the 'Name' attribute. The name identifies the asset in a few words and is intended for human consumption, whereas the id attribute is expected to contain a globally unique identifier and is used by tooling to distinguish assets. An asset's name and short description are typically the first pieces of information that potential consumers see when searching asset repositories. An asset's name should reflect the general solution strategy of the asset and optionally the problem that it addresses.

Returns:
the value of the 'Name' attribute.
See Also:
setName(String), DefaultprofilePackage.getAsset_Name()

setName

public void setName(String value)
Sets the value of the ' Name' attribute.

Parameters:
value - the new value of the 'Name' attribute.
See Also:
getName()

getId

public String getId()
Returns the value of the 'Id' attribute.

Returns:
the value of the 'Id' attribute.
See Also:
setId(String), DefaultprofilePackage.getAsset_Id()

setId

public void setId(String value)
Sets the value of the ' Id' attribute.

Parameters:
value - the new value of the 'Id' attribute.
See Also:
getId()

getDate

public String getDate()
Returns the value of the 'Date' attribute. The date attribute contains a valid date using the default XML format (YYYY-MM-DD). The date indicates the date that the asset is ready to be used by asset consumers.

Returns:
the value of the 'Date' attribute.
See Also:
setDate(String), DefaultprofilePackage.getAsset_Date()

setDate

public void setDate(String value)
Sets the value of the ' Date' attribute.

Parameters:
value - the new value of the 'Date' attribute.
See Also:
getDate()

setDate

public void setDate(Date value)
Sets the value of the ' Date' attribute.

Parameters:
value - the new value of the 'Date' attribute.
See Also:
getDate()

getState

public String getState()
Returns the value of the 'State' attribute. The state attribute indicates the state that the asset is currently in. This is intended primarily for asset certification workflows as an asset is undergoing reviews in preparation to be published in a repository.

Returns:
the value of the 'State' attribute.
See Also:
setState(String), DefaultprofilePackage.getAsset_State()

setState

public void setState(String value)
Sets the value of the ' State' attribute.

Parameters:
value - the new value of the 'State' attribute.
See Also:
getState()

getVersion

public String getVersion()
Returns the value of the 'Version' attribute. The asset's version attribute can be any string and is used to compare two assets with the same id attribute.

Returns:
the value of the 'Version' attribute.
See Also:
setVersion(String), DefaultprofilePackage.getAsset_Version()

setVersion

public void setVersion(String value)
Sets the value of the ' Version' attribute.

Parameters:
value - the new value of the 'Version' attribute.
See Also:
getVersion()

getAccessRights

public String getAccessRights()
Returns the value of the 'Access Rights' attribute. The asset's access rights attribute can be any string which describes the permissions of asset consumers for interacting with the asset such as viewing or using.

Returns:
the value of the 'Access Rights' attribute.
See Also:
setAccessRights(String), DefaultprofilePackage.getAsset_AccessRights()

setAccessRights

public void setAccessRights(String value)
Sets the value of the ' Access Rights' attribute.

Parameters:
value - the new value of the 'Access Rights' attribute.
See Also:
getAccessRights()

getShortDescription

public String getShortDescription()
Returns the value of the 'Short Description' attribute. The short description should be suitable for use in a line item where multiple asset names and short descriptions are displayed to a potential consumer.

Returns:
the value of the 'Short Description' attribute.
See Also:
setShortDescription(String), DefaultprofilePackage.getAsset_ShortDescription()

setShortDescription

public void setShortDescription(String value)
Sets the value of the ' Short Description' attribute.

Parameters:
value - the new value of the 'Short Description' attribute.
See Also:
getShortDescription()

getClassification

public Classification getClassification()
Returns the value of the 'Classification' containment reference.

Returns:
the value of the 'Classification' containment reference.
See Also:
setClassification(Classification), DefaultprofilePackage.getAsset_Classification()

setClassification

public void setClassification(Classification value)
Sets the value of the ' Classification' containment reference.

Parameters:
value - the new value of the 'Classification' containment reference.
See Also:
getClassification()

getSolution

public Solution getSolution()
Returns the value of the 'Solution' containment reference.

Returns:
the value of the 'Solution' containment reference.
See Also:
setSolution(Solution), DefaultprofilePackage.getAsset_Solution()

setSolution

public void setSolution(Solution value)
Sets the value of the ' Solution' containment reference.

Parameters:
value - the new value of the 'Solution' containment reference.
See Also:
getSolution()

getUsage

public Usage getUsage()
Returns the value of the 'Usage' containment reference.

Returns:
the value of the 'Usage' containment reference.
See Also:
setUsage(Usage), DefaultprofilePackage.getAsset_Usage()

setUsage

public void setUsage(Usage value)
Sets the value of the ' Usage' containment reference.

Parameters:
value - the new value of the 'Usage' containment reference.
See Also:
getUsage()

getRelatedAsset

public org.eclipse.emf.common.util.EList getRelatedAsset()
Returns the value of the 'Related Asset' containment reference list. The list contents are of type RelatedAsset.

Returns:
the value of the 'Related Asset' containment reference list.
See Also:
DefaultprofilePackage.getAsset_RelatedAsset()

getProfile

public Profile getProfile()
Returns the value of the 'Profile' containment reference.

Returns:
the value of the 'Profile' containment reference.
See Also:
setProfile(Profile), DefaultprofilePackage.getAsset_Profile()

setProfile

public void setProfile(Profile value)
Sets the value of the ' Profile' containment reference.

Parameters:
value - the new value of the 'Profile' containment reference.
See Also:
getProfile()

getDescription

public Description getDescription()
Returns the value of the 'Description' containment reference.

Returns:
the value of the 'Description' containment reference.
See Also:
setDescription(Description), DefaultprofilePackage.getAsset_Description()

setDescription

public void setDescription(Description value)
Sets the value of the ' Description' containment reference.

Parameters:
value - the new value of the 'Description' containment reference.
See Also:
getDescription()

setAssetFactory

public void setAssetFactory(IAssetFactory theAssetFactory)
Set the asset factory with which to create the elements in this asset. This method is called by the AssetFactory's create method when the asset gets created. Thus it should never have to be set by the user. For use by the asset's factory only!

Parameters:
theAssetFactory - with which to create elements

getAssetFactory

public IAssetFactory getAssetFactory()
Get the asset factory with which to create the elements in this asset

Returns:
IAssetFactory the asset factory

setAssetReader

public void setAssetReader(IRASAssetReader theReader)
Get the asset reader. This is used to resolve the references in the asset. This method is called when the asset is created. Thus it should never have to be set by the user. For use by the asset's factory only!

Parameters:
theReader - the asset's reader.

getAssetReader

public IRASAssetReader getAssetReader()
Get the asset reader. This is used to resolve the references in the asset.

Returns:
IRASAssetReader the asset's reader.

createClassification

public Classification createClassification()
Helper method used to create a Classification element using the factory assigned to the asset.

Returns:
a new instance of a Classification element or null if one could not be created.
See Also:
Classification

createSolution

public Solution createSolution()
Helper method used to create a Solution element using the factory assigned to the asset.

Returns:
a new instance of a Solution element or null if one could not be created.
See Also:
Solution

createUsage

public Usage createUsage()
Helper method used to create a Usage element using the factory assigned to the asset.

Returns:
a new instance of a Usage element or null if one could not be created.
See Also:
Usage

createRelatedAsset

public RelatedAsset createRelatedAsset()
Helper method used to create a RelatedAsset element using the factory assigned to the asset.

Returns:
a new instance of a RelatedAsset element or null if one could not be created.
See Also:
RelatedAsset

createProfile

public Profile createProfile()
Helper method used to create a Profile element using the factory assigned to the asset.

Returns:
a new instance of a Profile element or null if one could not be created.
See Also:
Profile

createDescription

public Description createDescription()
Helper method used to create a Description element using the factory assigned to the asset.

Returns:
a new instance of a Description element or null if one could not be created.
See Also:
Description

accept

public VisitorStatus accept(IArtifactVisitor visitor)
Accepts the given visitor. The visitor's visit method is called with this Asset. Each Artifact contained in the Asset will be visited. The visitor returns a VisitorStatus indicating how visition should proceed.

Parameters:
visitor - the visitor used to visit each Artifact
Returns:
a status indicating how visitation should proceed
Throws:
IllegalArgumentException - if visitor is null.
See Also:
IArtifactVisitor.visit(Artifact)

accept

public VisitorStatus accept(com.ibm.xtools.ras.profile.defauld.navigation.internal.IActivityVisitor visitor)
Accepts the given visitor. The visitor's visit method is called with this Asset. Each Activity contained in the Asset will be visited. The visitor returns a VisitorStatus indicating how visition should proceed.

Parameters:
visitor - the visitor used to visit each Activity
Returns:
a status indicating how visitation should proceed
Throws:
IllegalArgumentException - if visitor is null.
See Also:
IActivityVisitor.visit(Activity)

save

public void save(String theFilePath)
          throws NullPointerException,
                 IOException
Save the asset to the given file path

Parameters:
theFilePath - the file path to which to save
Throws:
NullPointerException - if the parameter is null
IOException - if an error occurs saving the file

save

public void save(OutputStream theOutputStream,
                 org.eclipse.emf.common.util.URI theURI)
          throws NullPointerException,
                 IOException
Save the asset to the given output stream

Parameters:
theOutputStream - the output stream to which to save
theURI - the URI used during saving. Setting this helps in seting the correct cross-file references.
Throws:
NullPointerException - if the parameter is null
IOException - if an error occurs saving the file

save

public void save(org.eclipse.emf.common.util.URI theURI)
          throws NullPointerException,
                 IOException
Save the asset to the given uri

Parameters:
theURI - the uri to which to save
Throws:
NullPointerException - if the parameter is null
IOException - if an error occurs saving the file

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.