Class CompositeArtifact

    • Field Detail

      • textRepresentation

        private Text textRepresentation
      • binaryRepresentation

        private Binary binaryRepresentation
      • representationChanged

        private boolean representationChanged
    • Constructor Detail

      • CompositeArtifact

        public CompositeArtifact()
    • Method Detail

      • selectAll

        public abstract Set<? extends FragmentArtifact> selectAll()
        Returns all artifacts this composite artifact is composed of.
        Returns:
        all fragments
      • getText

        public final Text getText()
                           throws VilException
        Description copied from interface: IArtifact
        Returns the textual representation of the contents of this artifact for manipulation. In case of binary artifacts, the returned object may be empty.
        Specified by:
        getText in interface IArtifact
        Returns:
        the textual representation of the contents
        Throws:
        VilException - in case of obtaining the representation causes serious problems
      • getBinary

        public final Binary getBinary()
                               throws VilException
        Description copied from interface: IArtifact
        Returns the binary representation of the contents of this artifact for manipulation.
        Specified by:
        getBinary in interface IArtifact
        Returns:
        the binary representation of the contents
        Throws:
        VilException - in case of obtaining the representation causes serious problems
      • artifactChanged

        public void artifactChanged​(java.lang.Object cause)
                             throws VilException
        Description copied from interface: IArtifactChangedListener
        Is called when the artifact was changed, e.g., to trigger a reanalysis of substructures.
        Specified by:
        artifactChanged in interface IArtifactChangedListener
        Parameters:
        cause - the cause for the change, e.g., an artifact representation
        Throws:
        VilException - in case that the required operations fail for some reason
      • getRepresentationChanged

        protected boolean getRepresentationChanged​(boolean reset)
        Returns whether the representation changed.
        Parameters:
        reset - reset the current status of the flag to not changed
        Returns:
        true if the representation (either binary or text) changed or not
      • getTextInstance

        protected Text getTextInstance()
        Returns the plain text representation instance.
        Returns:
        the plain instance (may be null)
      • getBinaryInstance

        protected Binary getBinaryInstance()
        Returns the plain binary representation instance.
        Returns:
        the plain instance (may be null)
      • createText

        protected abstract Text createText()
                                    throws VilException
        Actually creates the text representation. Please note that getText() calls this method and registers the listeners appropriately.
        Returns:
        the created text representation
        Throws:
        VilException - in case of serious problems creating the representation
      • createBinary

        protected abstract Binary createBinary()
                                        throws VilException
        Actually creates the binary representation. Please note that getBinary() calls this method and registers the listeners appropriately.
        Returns:
        the created binary representation
        Throws:
        VilException - in case of serious problems creating the representation
      • update

        public void update()
                    throws VilException
        Description copied from interface: IArtifact
        Called if the underlying real artifact may have been updated, e.g., by overriding it by another file.
        Specified by:
        update in interface IArtifact
        Throws:
        VilException - in case that updating fails