Enum Class AccessType
- All Implemented Interfaces:
Serializable,Comparable<AccessType>,Constable
Enumerates the fundamental types of elements within the Information System model.
This enum serves as a central registry for all element types, mapping them to their corresponding interface, implementation, and (where applicable) dummy implementation classes. It provides utility methods for type lookup and classification.
- Author:
- Luca Frosini (ISTI - CNR)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents a composition relationship, where one resource is part of another.Represents a hierarchical context for organizing resources.Represents a generic entity instance.Represents an entity element, the base for all entity types.Represents the type of an entity, defining its structure and attributes.Represents a facet, which adds supplementary information to a resource.Represents a parent-child relationship between contexts.Represents a relationship between two resources.Represents a generic property instance.Represents the definition of a property, including constraints and metadata.Represents a property element, the base for all property types.Represents the type of a property, defining its data type and structure.Represents a template for constructing queries.Represents a generic relation instance.Represents a relation element, the base for all relation types.Represents the type of a relation, defining its semantics and constraints.Represents a primary resource in the system.Represents a variable used within a query template. -
Method Summary
Modifier and TypeMethodDescriptionstatic AccessTypegetAccessType(Class<?> clz) Determines the most specificAccessTypefor a given class.static AccessTypegetAccessType(String typeName) Retrieves anAccessTypeenum constant by its type name.Returns the dummy implementation class for this access type, if one exists.static AccessType[]Returns an array of access types representing entities and relations in the model.Returns the primary implementation class for this access type.static AccessType[]Returns an array of access types that are part of the core data model.getName()Returns the official name of the access type.Returns the interface class associated with this access type.Returns the name of the access type with its first character in lowercase.names()Returns a set of all defined access type names.toString()static AccessTypeReturns the enum constant of this class with the specified name.static AccessType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PROPERTY_ELEMENT
Represents a property element, the base for all property types. -
PROPERTY_DEFINITION
Represents the definition of a property, including constraints and metadata. -
PROPERTY_TYPE
Represents the type of a property, defining its data type and structure. -
TEMPLATE_VARIABLE
Represents a variable used within a query template. -
PROPERTY
Represents a generic property instance. -
ENTITY_ELEMENT
Represents an entity element, the base for all entity types. -
ENTITY_TYPE
Represents the type of an entity, defining its structure and attributes. -
QUERY_TEMPLATE
Represents a template for constructing queries. -
CONTEXT
Represents a hierarchical context for organizing resources. -
ENTITY
Represents a generic entity instance. -
RESOURCE
Represents a primary resource in the system. -
FACET
Represents a facet, which adds supplementary information to a resource. -
RELATION_ELEMENT
Represents a relation element, the base for all relation types. -
RELATION_TYPE
Represents the type of a relation, defining its semantics and constraints. -
IS_PARENT_OF
Represents a parent-child relationship between contexts. -
RELATION
Represents a generic relation instance. -
IS_RELATED_TO
Represents a relationship between two resources. -
CONSISTS_OF
Represents a composition relationship, where one resource is part of another.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getTypeClass
Returns the interface class associated with this access type.- Type Parameters:
ISM- The element type.- Returns:
- The
Classof the element's interface.
-
getImplementationClass
Returns the primary implementation class for this access type.- Type Parameters:
ISM- The element type.ISMC- The element's implementation type.- Returns:
- The
Classof the primary implementation.
-
getDummyImplementationClass
public <ISM extends Element,ISMC extends ISM, Class<ISMD> getDummyImplementationClass()ISMD extends ISMC> Returns the dummy implementation class for this access type, if one exists.Dummy implementations are used for lightweight representations or placeholders.
- Type Parameters:
ISM- The element type.ISMC- The element's implementation type.ISMD- The element's dummy implementation type.- Returns:
- The
Classof the dummy implementation, ornull.
-
getName
Returns the official name of the access type.- Returns:
- The type name.
-
lowerCaseFirstCharacter
Returns the name of the access type with its first character in lowercase.- Returns:
- The name with a lowercase first character.
-
toString
- Overrides:
toStringin classEnum<AccessType>
-
names
Returns a set of all defined access type names.- Returns:
- A
Setof type names.
-
getAccessType
Retrieves anAccessTypeenum constant by its type name.- Parameters:
typeName- The name of the type to find.- Returns:
- The corresponding
AccessType, ornullif no match is found.
-
getAccessType
Determines the most specificAccessTypefor a given class.This method traverses the class hierarchy to find the most derived matching access type.
- Parameters:
clz- The class to analyze.- Returns:
- The most specific
AccessTypefor the class. - Throws:
RuntimeException- if the class does not correspond to any defined access type.
-
getModelTypes
Returns an array of access types that are part of the core data model.These types include
Property,Resource,Facet,IsRelatedTo, andConsistsOf.- Returns:
- An array of core model
AccessTypes.
-
getERTypes
Returns an array of access types representing entities and relations in the model.These types include
Resource,Facet,IsRelatedTo, andConsistsOf.- Returns:
- An array of entity/relation
AccessTypes.
-