Dali Provisional API
Release 3.2

org.eclipse.jpt.common.core
Interface JptResourceType

All Superinterfaces:
Comparable<JptResourceType>, ContentTypeReference

public interface JptResourceType
extends ContentTypeReference, Comparable<JptResourceType>

Specifies the file content type and version for Dali resources.

Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Since:
2.3
See Also:
JptResourceTypeManager

Nested Class Summary
static class JptResourceType.IsKindOf
           
static class JptResourceType.VersionTransformer
           
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.ContentTypeReference
ContentTypeReference.ContentTypeIs, ContentTypeReference.ContentTypeIsKindOf, ContentTypeReference.ContentTypeTransformer
 
Field Summary
static String UNDETERMINED_VERSION
          Version used when version cannot be determined or when there is no sense of version relevant to JPA (e.g.
static org.eclipse.jpt.common.utility.transformer.Transformer<JptResourceType,String> VERSION_TRANSFORMER
           
 
Fields inherited from interface org.eclipse.jpt.common.core.ContentTypeReference
TRANSFORMER
 
Method Summary
 Iterable<JptResourceType> getBaseTypes()
          Return the resource type's base types.
 String getId()
          Return the resource type's extension-supplied ID.
 JptResourceTypeManager getManager()
          Return the resource type's manager.
 String getPluginId()
          Return the ID of the plug-in that contributed the resource type.
 String getVersion()
          Return the resource type's version.
 boolean isKindOf(JptResourceType resourceType)
          Return whether either of the following is true: Both of the following are true: the resource type's content type is a kind of the specified resource type's content type the resource type's version is compatible with the specified resource type's version (i.e. the resource type's version is greater than or equal to the specified resource type's version); if the resource type's version is indeterminate, it is compatible only if the specified resource type's version is also indeterminate Any one of the resource type's base types is a kind of the specified resource type
 
Methods inherited from interface org.eclipse.jpt.common.core.ContentTypeReference
getContentType
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

VERSION_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<JptResourceType,String> VERSION_TRANSFORMER

UNDETERMINED_VERSION

static final String UNDETERMINED_VERSION
Version used when version cannot be determined or when there is no sense of version relevant to JPA (e.g. Java). An indeterminate version is compatible only with another indeterminate version; while all specified versions are compatible with an indeterminate version.

See Also:
Constant Field Values
Method Detail

getManager

JptResourceTypeManager getManager()
Return the resource type's manager.


getId

String getId()
Return the resource type's extension-supplied ID. This is unique among all the resource types.


getVersion

String getVersion()
Return the resource type's version.

See Also:
VersionComparator

getBaseTypes

Iterable<JptResourceType> getBaseTypes()
Return the resource type's base types.

See Also:
isKindOf(JptResourceType)

isKindOf

boolean isKindOf(JptResourceType resourceType)
Return whether either of the following is true:
  • Both of the following are true:
    • the resource type's content type is a kind of the specified resource type's content type
    • the resource type's version is compatible with the specified resource type's version (i.e. the resource type's version is greater than or equal to the specified resource type's version); if the resource type's version is indeterminate, it is compatible only if the specified resource type's version is also indeterminate
  • Any one of the resource type's base types is a kind of the specified resource type


  • getPluginId

    String getPluginId()
    Return the ID of the plug-in that contributed the resource type.


    Dali Provisional API
    Release 3.2

    Copyright (c) 2012 Oracle. All rights reserved.