Interface AttributeClassManagement


  • public interface AttributeClassManagement
    Attribute class management API.
    Author:
    K. Benedyczak
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addAttributeClass​(pl.edu.icm.unity.types.basic.AttributesClass clazz)
      Defines a new attribute class
      pl.edu.icm.unity.types.basic.AttributesClass getAttributeClass​(java.lang.String name)  
      java.util.Map<java.lang.String,​pl.edu.icm.unity.types.basic.AttributesClass> getAttributeClasses()  
      java.util.Collection<pl.edu.icm.unity.types.basic.AttributesClass> getEntityAttributeClasses​(pl.edu.icm.unity.types.basic.EntityParam entity, java.lang.String group)
      Attribute classes of a given entity in a group
      void removeAttributeClass​(java.lang.String id)
      Removes attribute class
      void setEntityAttributeClasses​(pl.edu.icm.unity.types.basic.EntityParam entity, java.lang.String group, java.util.Collection<java.lang.String> classes)
      Updates the set of entity's attribute classes in a given group.
      void updateAttributeClass​(pl.edu.icm.unity.types.basic.AttributesClass updated)
      Updates an attribute class.
    • Method Detail

      • addAttributeClass

        void addAttributeClass​(pl.edu.icm.unity.types.basic.AttributesClass clazz)
                        throws pl.edu.icm.unity.exceptions.EngineException
        Defines a new attribute class
        Parameters:
        clazz -
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • removeAttributeClass

        void removeAttributeClass​(java.lang.String id)
                           throws pl.edu.icm.unity.exceptions.EngineException
        Removes attribute class
        Parameters:
        id -
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • updateAttributeClass

        void updateAttributeClass​(pl.edu.icm.unity.types.basic.AttributesClass updated)
                           throws pl.edu.icm.unity.exceptions.EngineException
        Updates an attribute class. The update operation will be successful only if all entities with this class fulfill the updated class rules.
        Parameters:
        updated - the updated class. Existing class to be updated is matched by name.
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • getAttributeClasses

        java.util.Map<java.lang.String,​pl.edu.icm.unity.types.basic.AttributesClass> getAttributeClasses()
                                                                                                        throws pl.edu.icm.unity.exceptions.EngineException
        Returns:
        all currently defined AttributesClasses, keys are ac names.
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • setEntityAttributeClasses

        void setEntityAttributeClasses​(pl.edu.icm.unity.types.basic.EntityParam entity,
                                       java.lang.String group,
                                       java.util.Collection<java.lang.String> classes)
                                throws pl.edu.icm.unity.exceptions.EngineException
        Updates the set of entity's attribute classes in a given group. The entity must have all the requires attributes set and must not have any disallowed attributes, otherwise the operation will fail.
        Parameters:
        entity -
        classes -
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • getEntityAttributeClasses

        java.util.Collection<pl.edu.icm.unity.types.basic.AttributesClass> getEntityAttributeClasses​(pl.edu.icm.unity.types.basic.EntityParam entity,
                                                                                                     java.lang.String group)
                                                                                              throws pl.edu.icm.unity.exceptions.EngineException
        Attribute classes of a given entity in a group
        Parameters:
        entity -
        group -
        Returns:
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • getAttributeClass

        pl.edu.icm.unity.types.basic.AttributesClass getAttributeClass​(java.lang.String name)
                                                                throws pl.edu.icm.unity.exceptions.EngineException
        Returns:
        attribute class with given name
        Throws:
        pl.edu.icm.unity.exceptions.EngineException