Interface CdsStructuredType

All Superinterfaces:
CdsAnnotatable, CdsDefinition, CdsNamed, CdsType
All Known Subinterfaces:
CdsEntity, CdsEvent

public interface CdsStructuredType extends CdsType
  • Method Details

    • getElement

      CdsElement getElement(String name)
      Get a CdsElement by name.
      Parameters:
      name - the name of the CdsElement
      Returns:
      the CdsElement with the given name
      Throws:
      CdsElementNotFoundException - if there is no CdsElement with the given name
    • findElement

      Optional<CdsElement> findElement(String name)
      Returns an Optional wrapping a CdsElement.
      Parameters:
      name - the name of the CdsElement
      Returns:
      an Optional describing the CdsElement with the given name, or an empty Optional if there is no CdsElement with this name
    • getAssociation

      CdsElement getAssociation(String name)
      Get a CdsElement of type CdsAssociationType by name.
      Parameters:
      name - the name of the CdsElement
      Returns:
      the CdsElement of type CdsAssociation with the given name
      Throws:
      CdsElementNotFoundException - if there is no CdsElement with the given name
    • findAssociation

      Optional<CdsElement> findAssociation(String name)
      Returns an Optional wrapping a CdsElement of type CdsAssociationType.
      Parameters:
      name - the name of the CdsElement
      Returns:
      an Optional describing the CdsElement of type CdsAssociation with the given name, or an empty Optional if there is no CdsElement with this name
    • getTargetOf

      <S extends CdsStructuredType> S getTargetOf(String path)
      Returns the target CdsStructuredType of the given navigation path.
      Parameters:
      path - the navigation path
      Returns:
      the target CdsStructuredType of the path
      Throws:
      CdsReflectiveOperationException - if the path is invalid
    • elements

      Stream<CdsElement> elements()
      Returns a sequential Stream over all CdsElement(s) in this structured type.
      Returns:
      a sequential Stream over the CdsElement(s)
    • keyElements

      default Stream<CdsElement> keyElements()
      Returns a sequential Stream over the key CdsElement(s) in this structured type.
      Returns:
      a sequential Stream over the key CdsElement(s)
    • virtualElements

      default Stream<CdsElement> virtualElements()
      Returns a sequential Stream over the virtual CdsElement(s) in this structured type.
      Returns:
      a sequential Stream over the virtual CdsElement(s)
    • concreteElements

      default Stream<CdsElement> concreteElements()
      Returns a sequential Stream over the non virtual CdsElement(s) in this structured type.
      Returns:
      a sequential Stream over the non virtual CdsElement(s)
    • nonAssociationElements

      default Stream<CdsElement> nonAssociationElements()
      Returns a sequential Stream over the CdsElement(s) in this structured type that are not of type CdsAssociationType.
      Returns:
      a sequential Stream over the CdsElement(s) that are not of type CdsAssociation
    • concreteNonAssociationElements

      default Stream<CdsElement> concreteNonAssociationElements()
      Returns a sequential Stream over the CdsElement(s) in this structured type that are not of type CdsAssociationType and not virtual.
      Returns:
      a sequential Stream over the CdsElement(s) that are not of type CdsAssociation
    • associations

      default Stream<CdsElement> associations()
      Returns a sequential Stream over the CdsElement(s) of type CdsAssociationType in this structured type.
      Returns:
      a sequential Stream over the CdsElement(s) of type CdsAssociation
    • compositions

      default Stream<CdsElement> compositions()
      Returns a sequential Stream over the CdsElement(s) of type composition in this structured type.
      Returns:
      a sequential Stream over the CdsElement(s) of type composition
    • elementsOfType

      default <T extends CdsType> Stream<CdsElement> elementsOfType(Class<T> type)
      Returns a sequential Stream over the CdsElement(s) of the given type in this structured type.
      Type Parameters:
      T - the type of the CdsElement(s)
      Parameters:
      type - the type class of the CdsElement(s)
      Returns:
      a sequential Stream over the CdsElement(s) of the given type <T>
    • isAnonymous

      default boolean isAnonymous()
      Returns true if this is an inline defined structured type without a name.
      Returns:
      true if this is a structured type without name, otherwise false
    • isStructured

      default boolean isStructured()
      Description copied from interface: CdsType
      Returns true if this is a structured type.
      Specified by:
      isStructured in interface CdsType
      Returns:
      true if this is a structured type, otherwise false
    • accept

      default void accept(CdsVisitor visitor)
      Description copied from interface: CdsDefinition
      Accepts a CdsVisitor visiting the elements of this definition (depth-first)
      Specified by:
      accept in interface CdsDefinition
      Parameters:
      visitor - the CdsVisitor