Class ArtifactSetImpl

    • Constructor Detail

      • ArtifactSetImpl

        public ArtifactSetImpl()
    • Method Detail

      • getCoverage

        public ItemFilterSet getCoverage()
        Description copied from interface: ArtifactSet
        Returns the item filter set that defines the coverage of the items in this artifact set.
        Specified by:
        getCoverage in interface ArtifactSet
        Returns:
        the item filter set.
      • setCoverage

        public void setCoverage​(ItemFilterSet filter)
        Sets the item filter set that defines the coverage of the items in this artifact set.
        Parameters:
        filter - the item filter set.
      • addAll

        public void addAll​(Collection<? extends Artifact> artifacts)
        Description copied from interface: ArtifactSet
        Adds a collection of artifacts
        Specified by:
        addAll in interface ArtifactSet
        Parameters:
        artifacts - the artifacts collection
      • addAll

        public void addAll​(ArtifactSet artifacts)
        Description copied from interface: ArtifactSet
        Adds a set of artifacts
        Specified by:
        addAll in interface ArtifactSet
        Parameters:
        artifacts - the artifacts set
      • add

        public void add​(Artifact artifact)
        Description copied from interface: ArtifactSet
        Adds an artifacts
        Specified by:
        add in interface ArtifactSet
        Parameters:
        artifact - the artifact to add
      • add

        public SerializerArtifact add​(Artifact parent,
                                      String name,
                                      String ext,
                                      ArtifactType type,
                                      Serializer ser,
                                      long lastModified)
        Adds an SerializerArtifact with the given name, type and serializer.
        Parameters:
        parent - the parent artifact
        name - the name of the artifact
        ext - the extension of the artifact
        type - the type of the artifact
        ser - the serializer of the artifact
        lastModified - the last modified date
        Returns:
        the added artifact
      • getPrimaryData

        public Artifact getPrimaryData()
        Description copied from interface: ArtifactSet
        Returns the primary data artifact or null.
        Specified by:
        getPrimaryData in interface ArtifactSet
        Returns:
        the primary data artifact or null.
      • getDirectory

        public Artifact getDirectory()
        Description copied from interface: ArtifactSet
        Returns the directory artifact or null.
        Specified by:
        getDirectory in interface ArtifactSet
        Returns:
        the directory artifact or null.
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: ArtifactSet
        Checks if this set is empty.
        Specified by:
        isEmpty in interface ArtifactSet
        Returns:
        true if this set is empty.
      • size

        public int size()
        Description copied from interface: ArtifactSet
        Returns the number of artifacts in this set.
        Specified by:
        size in interface ArtifactSet
        Returns:
        the number of artifacts in this set.
      • remove

        public boolean remove​(Artifact a)
        Removes the artifact from this set.
        Parameters:
        a - the artifact to remove
        Returns:
        true if the artifact was removed.
      • put

        public Artifact put​(Artifact a)
        Puts the given artifact to this set. In comparison to the add operations, an already existing artifact is replaced. If the type of the newly artifact is ArtifactType.BINARY it equivalent with the same name is replaced.
        Parameters:
        a - the artifact to put
        Returns:
        the previous artifact or null
      • size

        public int size​(ArtifactType type)
        Returns the number of artifacts in this set that have the given type.
        Parameters:
        type - the artifact type
        Returns:
        the number of artifacts in this set that have the given type.
      • values

        public Collection<Artifact> values​(ArtifactType type)
        Returns a collection of all artifacts that have the given type.
        Specified by:
        values in interface ArtifactSet
        Parameters:
        type - the type of the artifacts to return
        Returns:
        the artifacts
      • getArtifact

        public Artifact getArtifact​(String path)
        Returns the artifact with the given path or null if it does not exist.
        Parameters:
        path - the name of the artifact.
        Returns:
        the desired artifact or null
      • dump

        public void dump​(DumpContext ctx,
                         boolean isLast)
        Dumps some human readable information using the given context.
        Specified by:
        dump in interface Dumpable
        Parameters:
        ctx - the dump context
        isLast - specifies if this is the last element to dump on this level