Interface DataSetMetadata

    • Method Detail

      • getComponents

        <R extends ComponentRoleSet<DataStructureComponent<R,​?,​?>> getComponents​(Class<R> role)
        Queries for components of this DataSetMetadata having a specified role. The returned set should not be altered in any way.
        Type Parameters:
        R - the role type
        Parameters:
        role - the role to query
        Returns:
        A set of the queried components.
      • getComponents

        default <R extends ComponentRole,​S extends ValueDomainSubset<S,​D>,​D extends ValueDomainSet<DataStructureComponent<R,​S,​D>> getComponents​(Class<R> role,
                                                                                                                                                                                S domain)
        Queries for components of this DataSetMetadata having a specified role and domain. The returned set should not be altered in any way.
        Type Parameters:
        R - the role type
        S - the domain subset type
        D - the domain type
        Parameters:
        role - the role to query
        domain - the domain to query
        Returns:
        A set of the queried components.
      • contains

        boolean contains​(String name)
        Checks if this DataSetMetadata contains a component with the specified name.
        Parameters:
        name - the name of the desired component
        Returns:
        true if this DataSetMetadata contains a component with the specified name.
      • getComponent

        default <S extends ValueDomainSubset<S,​D>,​D extends ValueDomainOptional<DataStructureComponent<?,​S,​D>> getComponent​(String name,
                                                                                                                                                      S domain)
        Queries this DataSetMetadata for a component with the specified name and value domain.
        Type Parameters:
        S - the domain subset type
        D - the domain type
        Parameters:
        name - the name of the desired component
        domain - the domain to query
        Returns:
        an Optional containing the component if one exists.
      • getComponent

        default <R extends ComponentRoleOptional<DataStructureComponent<R,​?,​?>> getComponent​(String name,
                                                                                                           Class<R> role)
        Queries this DataSetMetadata for a component with the specified name and role.
        Type Parameters:
        R - the role type
        Parameters:
        name - the name of the desired component
        role - the role to query
        Returns:
        an Optional containing the component if one exists.
      • getComponent

        default <R extends ComponentRole,​S extends ValueDomainSubset<S,​D>,​D extends ValueDomainOptional<DataStructureComponent<R,​S,​D>> getComponent​(String name,
                                                                                                                                                                                    Class<R> role,
                                                                                                                                                                                    S domain)
        Queries this DataSetMetadata for a component with the specified name, role and value domain.
        Type Parameters:
        R - the role type
        S - the domain subset type
        D - the domain type
        Parameters:
        name - the name of the desired component
        role - the role to query
        domain - the domain to query
        Returns:
        an Optional containing the component if one exists.
      • getComponents

        default Set<DataStructureComponent<?,​?,​?>> getComponents​(String... names)
        Queries this DataSetMetadata for components with the specified names. The returned set should not be altered in any way.
        Parameters:
        names - the names to query
        Returns:
        a set containing the existing components.
        Throws:
        VTLMissingComponentsException - if one of the names isn't found.
      • getComponents

        default <R extends ComponentRoleSet<DataStructureComponent<R,​?,​?>> getComponents​(Collection<String> names,
                                                                                                       Class<R> role)
        Queries this DataSetMetadata for components having the specified role and matching each of the specified names. The returned set should not be altered in any way.
        Type Parameters:
        R - the role type
        Parameters:
        names - the names to query
        role - the role to query
        Returns:
        a set containing the existing components.
        Throws:
        VTLMissingComponentsException - if one of the names isn't found.
      • keep

        DataSetMetadata keep​(String... names)
        Creates a new structure where only the named non-identifier components are kept.
        Parameters:
        names - names of the non-identifier components to keep
        Returns:
        The new structure.
      • drop

        DataSetMetadata drop​(Collection<String> names)
        Creates a new structure dropping all the named non-identifier components.
        Parameters:
        names - names of the non-identifier components to drop
        Returns:
        The new structure.
      • membership

        DataSetMetadata membership​(String name)
        Creates a new structure by performing a VTL membership operation on this structure.
        Parameters:
        name - the name of the component on which the membership operation is performed
        Returns:
        The new structure.
      • rename

        DataSetMetadata rename​(DataStructureComponent<?,​?,​?> component,
                               String newName)
        Creates a new structure by renaming a component of this DataSetMetadata. If a component with the new name already exists, the behaviour is undefined.
        Parameters:
        component - the component to rename
        newName - the new name for the component
        Returns:
        the new structure.