IBM Rational Software Modeler
Release 6.0

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

All Superinterfaces:
org.eclipse.emf.ecore.EObject, org.eclipse.emf.common.notify.Notifier
All Known Subinterfaces:
Diagram, Diagram, Model, Model, UseCase, UseCase

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

A representation of the model object ' Artifact'. xmi:ordered=true property order is (these are role names) 1. description 2. artifactContext 3. artifactDependency 4. variabilityPoint 5. artifactType 6. artifact An artifact is a work product that can be created, stored and manipulated by asset producers/consumers and by tools. An artifact is either an actual file located in the asset's package, or represents a logical entity that contains at least one child artifact that is an actual file. An element must specify minimally a name or a reference attribute. The name is required for artifacts that represent logical entities. The reference is required for artifacts that specify actual file or work products that are part of the asset's packaging. An artifact may specify child artifacts. A child artifact uses the same element. If the artifact is a logical artifact then it must specify a name and have at least one descendent artifact that is an actual file reference.

The following features are supported:

See Also:
DefaultprofilePackage.getArtifact()

Method Summary
 VisitorStatus accept(IArtifactVisitor visitor)
          Accepts the given visitor.
 boolean addArtifact(Artifact anArtifact)
          Helper method to add a nested Artifact to this Artifact.
 String computePathFromArtifact(Artifact anArtifact, String pathSeparator)
          Helper method to compute the path of th Artifact relative to its position from a parent/ancestor Artifact.
 String computePathInSolution(String pathSeparator)
          Helper method used to compute the path of the Artifact relative to it's position in the Solution.
 boolean containsArtifact(String theArtifactName)
          Helper method to determine if an Artifact contains a top level child Artifact with a particular name.
 Artifact createArtifact()
          Helper method used to create an Artifact element using the factory assigned to the Artifact.
 ArtifactContext createArtifactContext()
          Helper method used to create an ArtifactContext element using the factory assigned to the Artifact.
 ArtifactDependency createArtifactDependency()
          Helper method used to create an ArtifactDependency element using the factory assigned to the Artifact.
 ArtifactType createArtifactType()
          Helper method used to create an ArtifactType element using the factory assigned to the Artifact.
 Description createDescription()
          Helper method used to create a Description element using the factory assigned to the Artifact.
 VariabilityPoint createVariabilityPoint()
          Helper method used to create a VariabilityPoint element using the factory assigned to the Artifact.
 String getAccessRights()
          Returns the value of the 'Access Rights' attribute
 org.eclipse.emf.common.util.EList getArtifact()
          Returns the value of the 'Artifact' containment reference list.
 org.eclipse.emf.common.util.EList getArtifactContext()
          Returns the value of the 'Artifact Context' containment reference list.
 org.eclipse.emf.common.util.EList getArtifactDependency()
          Returns the value of the 'Artifact Dependency' containment reference list.
 org.eclipse.emf.common.util.EList getArtifactType()
          Returns the value of the 'Artifact Type' containment reference list.
 IAssetFactory getAssetFactory()
          Get the asset factory with which to create the elements in this Artifact.
 Description getDescription()
          Returns the value of the 'Description' containment reference.
 String getDigestName()
          Returns the value of the 'Digest Name' attribute
 String getDigestValue()
          Returns the value of the 'Digest Value' attribute
 String getName()
          Returns the value of the 'Name' attribute.
 String getReference()
          Returns the value of the 'Reference' attribute.
 String getType()
          Returns the value of the 'Type' attribute.
 org.eclipse.emf.common.util.EList getVariabilityPoint()
          Returns the value of the 'Variability Point' containment reference list.
 String getVersion()
          Returns the value of the 'Version' attribute.
 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 Artifact.
 void setDescription(Description value)
          Sets the value of the ' Description' containment reference.
 void setDigestName(String value)
          Sets the value of the ' Digest Name' attribute.
 void setDigestValue(String value)
          Sets the value of the ' Digest Value' attribute.
 void setName(String value)
          Sets the value of the ' Name' attribute.
 void setReference(String value)
          Sets the value of the ' Reference' attribute.
 void setType(String value)
          Sets the value of the ' Type' attribute.
 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, type, and reference attributes are optional. This was done to allow large numbers of artifacts to be added by tooling but for which each specific name may not be known. In this scenario the name may have become the filename, but that would be redundant with the reference attribute. The reference attribute remains optional to allow elements to contain other elements and not reference anything on the filesystem or elsewhere.

Returns:
the value of the 'Name' attribute.
See Also:
setName(String), DefaultprofilePackage.getArtifact_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()

getType

public String getType()
Returns the value of the 'Type' attribute. Artifacts that represent actual files can be of any type. That is they can be any type of file (binary, plain text, etc.). An artifact referenced in a manifest can optionally declare a primary type, which is captured in the type attribute. The primary type can affect how tools process the artifact. In addition to a primary type an artifact can specify any number of secondary types. Each secondary type is specified with a child element (see ). In practice the primary types tend to map to file extensions. For instance if we had a file with the name web.xml its primary type is XML and its secondary type may be J2EE Web Configuration. The primary type list maps file extensions to type names. There may be many file extensions to the same type name. It is also possible to have many type names to the same file extension. In this case the tooling should provide a way for the user to reconcile. For instance, you may have a file named usecases.doc. The .doc extension may map to a "Microsoft Word" type and it may map to a "WordPerfect" type.

Returns:
the value of the 'Type' attribute.
See Also:
setType(String), DefaultprofilePackage.getArtifact_Type()

setType

public void setType(String value)
Sets the value of the ' Type' attribute.

Parameters:
value - the new value of the 'Type' attribute.
See Also:
getType()

getReference

public String getReference()
Returns the value of the 'Reference' attribute. The reference attribute remains optional to allow elements to contain other elements and to reference anything on the filesystem or elsewhere.

Returns:
the value of the 'Reference' attribute.
See Also:
setReference(String), DefaultprofilePackage.getArtifact_Reference()

setReference

public void setReference(String value)
Sets the value of the ' Reference' attribute.

Parameters:
value - the new value of the 'Reference' attribute.
See Also:
getReference()

getVersion

public String getVersion()
Returns the value of the 'Version' attribute. This optional attribute is used to identify an artifact's version.

Returns:
the value of the 'Version' attribute.
See Also:
setVersion(String), DefaultprofilePackage.getArtifact_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()

getDigestName

public String getDigestName()
Returns the value of the 'Digest Name' attribute. With ever-increasing needs for security an artifact may be encrypted with a specific algorithm. The digest-name attribute contains the name from such encryption activities.

Returns:
the value of the 'Digest Name' attribute.
See Also:
setDigestName(String), DefaultprofilePackage.getArtifact_DigestName()

setDigestName

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

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

getDigestValue

public String getDigestValue()
Returns the value of the 'Digest Value' attribute. With ever-increasing needs for security an artifact may be encrypted with a specific algorithm. The digest-value attribute contains the value from such encryption activities.

Returns:
the value of the 'Digest Value' attribute.
See Also:
setDigestValue(String), DefaultprofilePackage.getArtifact_DigestValue()

setDigestValue

public void setDigestValue(String value)
Sets the value of the ' Digest Value' attribute.

Parameters:
value - the new value of the 'Digest Value' attribute.
See Also:
getDigestValue()

getAccessRights

public String getAccessRights()
Returns the value of the 'Access Rights' attribute. A specific artifact may have its own permission and usage rights associated with it. The access-rights attribute captures artifact-level permission information. RAS does not specify the format of this permission information.

Returns:
the value of the 'Access Rights' attribute.
See Also:
setAccessRights(String), DefaultprofilePackage.getArtifact_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()

getArtifactContext

public org.eclipse.emf.common.util.EList getArtifactContext()
Returns the value of the 'Artifact Context' containment reference list. The list contents are of type ArtifactContext.

Returns:
the value of the 'Artifact Context' containment reference list.
See Also:
DefaultprofilePackage.getArtifact_ArtifactContext()

getArtifactDependency

public org.eclipse.emf.common.util.EList getArtifactDependency()
Returns the value of the 'Artifact Dependency' containment reference list. The list contents are of type ArtifactDependency.

Returns:
the value of the 'Artifact Dependency' containment reference list.
See Also:
DefaultprofilePackage.getArtifact_ArtifactDependency()

getArtifact

public org.eclipse.emf.common.util.EList getArtifact()
Returns the value of the 'Artifact' containment reference list. The list contents are of type Artifact.

Returns:
the value of the 'Artifact' containment reference list.
See Also:
DefaultprofilePackage.getArtifact_Artifact()

getVariabilityPoint

public org.eclipse.emf.common.util.EList getVariabilityPoint()
Returns the value of the 'Variability Point' containment reference list. The list contents are of type VariabilityPoint.

Returns:
the value of the 'Variability Point' containment reference list.
See Also:
DefaultprofilePackage.getArtifact_VariabilityPoint()

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.getArtifact_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()

getArtifactType

public org.eclipse.emf.common.util.EList getArtifactType()
Returns the value of the 'Artifact Type' containment reference list. The list contents are of type ArtifactType.

Returns:
the value of the 'Artifact Type' containment reference list.
See Also:
DefaultprofilePackage.getArtifact_ArtifactType()

setAssetFactory

public void setAssetFactory(IAssetFactory theAssetFactory)
Set the asset factory with which to create the elements in this Artifact. This method is called by the AssetFactory's create method when the Artifact is created. It should never have to be set by the user.

Parameters:
theAssetFactory - with which to create elements

getAssetFactory

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

Returns:
the asset factory

createArtifactContext

public ArtifactContext createArtifactContext()
Helper method used to create an ArtifactContext element using the factory assigned to the Artifact.

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

createArtifactDependency

public ArtifactDependency createArtifactDependency()
Helper method used to create an ArtifactDependency element using the factory assigned to the Artifact.

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

createArtifact

public Artifact createArtifact()
Helper method used to create an Artifact element using the factory assigned to the Artifact.

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

createVariabilityPoint

public VariabilityPoint createVariabilityPoint()
Helper method used to create a VariabilityPoint element using the factory assigned to the Artifact.

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

createDescription

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

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

createArtifactType

public ArtifactType createArtifactType()
Helper method used to create an ArtifactType element using the factory assigned to the Artifact.

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

computePathInSolution

public String computePathInSolution(String pathSeparator)
Helper method used to compute the path of the Artifact relative to it's position in the Solution. The path is computed by concatenating the names of each Artifact from the Solution to this Artifact. The names are separated by a user supplied path separator. Since it is not required that the Artifact have a name, "ArtifactName" is used as the name if it doesn't have one.

Parameters:
pathSeparator - the separator to use between path segments
Returns:
a path to this Artifact relative to the Solution element in the Asset

computePathFromArtifact

public String computePathFromArtifact(Artifact anArtifact,
                                      String pathSeparator)
Helper method to compute the path of th Artifact relative to its position from a parent/ancestor Artifact. The path is computed by recursively concatenating a parent's artifact path. If the parent of an Artifact is the Solution while computing the path, null is returned. If an Artifact does not have a name, "ArtifactName" is used as the name.

Parameters:
anArtifact - compute the path relative to this parameter
pathSeparator - the separator to use between path segments
Returns:
a path from this Artifact relative to the artifact parameter.

addArtifact

public boolean addArtifact(Artifact anArtifact)
                    throws IllegalArgumentException
Helper method to add a nested Artifact to this Artifact.

Parameters:
anArtifact - to add as the nested Artifact
Returns:
true if successfully added
Throws:
IllegalArgumentException - if anArtifact is null

containsArtifact

public boolean containsArtifact(String theArtifactName)
Helper method to determine if an Artifact contains a top level child Artifact with a particular name. The comparison is case insensitive.

Parameters:
theArtifactName - to search the child artifacts for
Returns:
true if a top level child artifact exists with theArtifactName

accept

public VisitorStatus accept(IArtifactVisitor visitor)
Accepts the given visitor. The visitor's visit method is called with this artifact. If the visitor returns true, this method visits this artifact's children.

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)

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

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