Class BagOperation

    • Field Detail

      • LOG

        protected static final org.apache.log4j.Logger LOG
      • model

        protected final Model model
    • Constructor Detail

      • BagOperation

        public BagOperation​(Model model,
                            Profile profile,
                            java.util.Collection<InterMineBag> bags)
        Parameters:
        model - model
        profile - userprofile
        bags - lists
    • Method Detail

      • getClasses

        protected java.util.Collection<ClassDescriptor> getClasses()
        Returns:
        classes
      • getClassKeys

        public java.util.Map<java.lang.String,​java.util.List<FieldDescriptor>> getClassKeys()
        Returns:
        class keys
      • setClassKeys

        public void setClassKeys​(java.util.Map<java.lang.String,​java.util.List<FieldDescriptor>> classKeys)
        Parameters:
        classKeys - class keys
      • getProfile

        public Profile getProfile()
        Returns:
        profile
      • getBags

        public java.util.Collection<InterMineBag> getBags()
        Returns:
        lists
      • getOperationCode

        protected abstract int getOperationCode()
        Returns:
        op code
      • operate

        public InterMineBag operate()
                             throws BagOperationException
        Perform this bag operation. Yes I know that this is a "execution in the kingdom of nouns" method, and I apologise for the horror of it all. This operation will run at most once. Subsequent calls to operate will always return the same created list.
        Specified by:
        operate in interface BagProducer
        Returns:
        The new bag. Guaranteed to not be null.
        Throws:
        BagOperationException - somethings gone wrong
      • setNewBagName

        public void setNewBagName​(java.lang.String name)
        Parameters:
        name - bag name