IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.ras.type.analyzer
Interface ITypeAnalyzer


public interface ITypeAnalyzer

The ITypeAnalyzer interface is used to associate the type of a physical resouce with an artifact type. This interface is not intended to be implemented by clients.


Field Summary
static String UNKNOWN_TYPE
          The type returned by the type analyzer when a known type can not be determined
 
Method Summary
 String getBuildableType()
          Retrieves the Artifact type representing a buildable artifact.
 String getDeployableArtifactType()
          Retrieves the Artifact type representing a deployable Eclipse artifact.
 String getDeployablePluginType()
          Deprecated. see getDeployableArtifactType()
 String getFolderType()
          Retrieves the default Artifact type representing a folder
 String getManifestType()
          Retrieves the Artifact type representing a RAS manifest.
 String getProjectType()
          Retrieves the default Artifact type representing a project
 ArtifactResourceTypeEnum getResourceType(String theType)
          Returns the physical resource type defined for an Artifact type
 String getType(File theFile)
          Determines the type of a File object.
 String getType(org.eclipse.core.resources.IFile theFileResource)
          Determines the type of an IFile resource.
 String getType(org.eclipse.core.resources.IFolder theFolderResource)
          Determines the type of an IFolder resource.
 String getType(org.eclipse.core.resources.IProject theProjectResource)
          Determines the type of an IProject resource.
 String getType(org.eclipse.core.resources.IResource theResource)
          Determines the type of an IResource.
 String getType(String theResourceIdentifier)
          Determines the type of a resource using a String to identify it.
 boolean isBuildable(String theType)
          Determines if a particular type is a buildable artifact
 boolean isDeployableArtifact(String theType)
          Determines if a particular type is a deployable Eclipse project artifact.
 boolean isDeployablePlugin(String theType)
          Deprecated. see isDeployableArtifact(String)
 boolean isFolder(String theType)
          Determines if a particular type is the default folder type defined by RAS.
 boolean isManifest(String theType)
          Determines if a particular type is the default RAS manifest type defined by RAS.
 boolean isProject(String theType)
          Determines if a particular type is the default project type defined by RAS.
 

Field Detail

UNKNOWN_TYPE

public static final String UNKNOWN_TYPE
The type returned by the type analyzer when a known type can not be determined

See Also:
Constant Field Values
Method Detail

getType

public String getType(String theResourceIdentifier)
Determines the type of a resource using a String to identify it. The identifier should represent one of the artifact descriptors being managed by the IArtifactDescriptorManager.

Parameters:
theResourceIdentifier - the String identifying the physical resource
Returns:
the type of the resource or UNKNOWN_TYPEif undefined
Throws:
IllegalArgumentException - if the theResourceIdentifier is null
See Also:
IArtifactDescriptorManager

getType

public String getType(org.eclipse.core.resources.IResource theResource)
Determines the type of an IResource. It's the responsibility of the ITypeAnalyzer to interrogate the IResource and return the appropriate type.

Parameters:
theResource - the IResource identifying the physical resource
Returns:
the type of the resource or UNKNOWN_TYPEif undefined
Throws:
IllegalArgumentException - if the theResource is null

getType

public String getType(org.eclipse.core.resources.IFile theFileResource)
Determines the type of an IFile resource. It's the responsibility of the ITypeAnalyzer to interrogate the IFile resource and return the appropriate type.

Parameters:
theFileResource - the IFile identifying the physical resource
Returns:
the type of the resource or UNKNOWN_TYPEif undefined
Throws:
IllegalArgumentException - if the theFileResource is null

getType

public String getType(File theFile)
Determines the type of a File object. It's the responsibility of the ITypeAnalyzer to interrogate the File resource and return the appropriate type. The File object can be a directory.

Parameters:
theFile - the File identifying the physical resource
Returns:
the type of the file or UNKNOWN_TYPEif undefined
Throws:
IllegalArgumentException - if the theFile is null

getType

public String getType(org.eclipse.core.resources.IFolder theFolderResource)
Determines the type of an IFolder resource. It's the responsibility of the ITypeAnalyzer to interrogate the IFolder resouce and return the appropriate type.

Parameters:
theFolderResource - the IFolder identifying the physical resouce
Returns:
the type of the resource
Throws:
IllegalArgumentException - if the theFolderResource is null

getType

public String getType(org.eclipse.core.resources.IProject theProjectResource)
Determines the type of an IProject resource. It's the responsibility of the ITypeAnalyzer to interrogate the IProject resouce and return the appropriate type.

Parameters:
theProjectResource - the IProject identifying the physical resouce
Returns:
the type of the resource
Throws:
IllegalArgumentException - if the theProjectResource is null

getFolderType

public String getFolderType()
Retrieves the default Artifact type representing a folder

Returns:
the type used to identify an Artifact as a folder

isFolder

public boolean isFolder(String theType)
Determines if a particular type is the default folder type defined by RAS.

Parameters:
theType - to determine if it's the default folder type.
Returns:
true if theType is a type recognized as the default folder type.
Throws:
IllegalArgumentException - if the theType is null

getProjectType

public String getProjectType()
Retrieves the default Artifact type representing a project

Returns:
the type used to identify an Artifact as a project

isProject

public boolean isProject(String theType)
Determines if a particular type is the default project type defined by RAS.

Parameters:
theType - to determine if it's the default project type.
Returns:
true if theType is a type recognized as the default project type.
Throws:
IllegalArgumentException - if the theType is null

getDeployableArtifactType

public String getDeployableArtifactType()
Retrieves the Artifact type representing a deployable Eclipse artifact. The artifact in it's deployed state will be one of the following:

Returns:
the type used to identify an Artifact as deployable in Eclipse.

isDeployableArtifact

public boolean isDeployableArtifact(String theType)
Determines if a particular type is a deployable Eclipse project artifact.

Parameters:
theType - to determine if it's a deployable artifact.
Returns:
true if theType is a type recognized as a deployable in Eclipse
Throws:
IllegalArgumentException - if the theType is null

getDeployablePluginType

public String getDeployablePluginType()
Deprecated. see getDeployableArtifactType()

Retrieves the Artifact type representing a deployable plugin

Returns:
the type used to identify an Artifact as a deployable plugin

isDeployablePlugin

public boolean isDeployablePlugin(String theType)
Deprecated. see isDeployableArtifact(String)

Determines if a particular type is a deployable plugin.

Parameters:
theType - to determine if it's a deployable plugin.
Returns:
true if theType is a type recognized as a deployable plugin
Throws:
IllegalArgumentException - if the theType is null

getBuildableType

public String getBuildableType()
Retrieves the Artifact type representing a buildable artifact.

Returns:
the type used to identify an Artifact as a buildable artifact

isBuildable

public boolean isBuildable(String theType)
Determines if a particular type is a buildable artifact

Parameters:
theType - to determine if it's a buildable artifact
Returns:
true if theType is a type recognized as a buildable artifact.
Throws:
IllegalArgumentException - if the theType is null

getManifestType

public String getManifestType()
Retrieves the Artifact type representing a RAS manifest.

Returns:
the type used to identify an Artifact as a RAS Manifest

isManifest

public boolean isManifest(String theType)
Determines if a particular type is the default RAS manifest type defined by RAS.

Parameters:
theType - to determine if it's the default RAS manifest type
Returns:
true if theType is a type recognized as a RAS manifest.
Throws:
IllegalArgumentException - if the theType is null

getResourceType

public ArtifactResourceTypeEnum getResourceType(String theType)
Returns the physical resource type defined for an Artifact type

Parameters:
theType - to get the resource type for
Returns:
the resource type or null if the theType is unknown
Throws:
IllegalArgumentException - if the theType is null

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

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