Interface CdsStructuredType

    • Method Detail

      • 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
      • 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
      • 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 CdsTypeStream<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