Interface Entity

    • Method Detail

      • getBuilder

        static EntityBuilder getBuilder()
        The returned builder builds a SPINE entity which can be added to an existing SPINE device at runtime with EntityParent.addEntity(Entity).
        This method shall not be used to set up a device with an entity. For this purpose DeviceBuilder.addEntity() shall be used.
        Returns:
        a new EntityBuilder object to create a new SPINE entity
      • getStaticAddress

        org.openmuc.jeebus.spine.xsd.v1.EntityAddressType getStaticAddress()
        Returns the address of this entity relative to the parent device.
        The list returned by EntityAddressType.getEntity() contains the address parts of all entity parents in order
        Returns:
        the entity address
      • getAddress

        org.openmuc.jeebus.spine.xsd.v1.EntityAddressType getAddress()
        Returns the complete address of this entity, its parent entities and device.
        The list returned by EntityAddressType.getEntity() contains the address parts of all entity parents in order
        Returns:
        the entity address
      • getType

        org.openmuc.jeebus.spine.xsd.v1.EntityTypeEnumType getType()
        Returns:
        the type of this entity
      • hasDescription

        boolean hasDescription()
        Returns:
        true if this entity has a description set and false otherwise
      • hasLabel

        boolean hasLabel()
        Returns:
        true if this entity has a label set and false otherwise
      • getDescription

        java.lang.String getDescription()
        Returns:
        the description set or the empty string if no label was set
      • addFeature

        int addFeature​(Feature feature)
        Adds a feature to this entity at runtime. After the feature was added the NodeManagement instance notifies subscribers about the change.
        Parameters:
        feature - the feature built with Feature.getBuilder()
        Returns:
        the feature address part of the added feature
      • getFeature

        Feature getFeature​(int address)
                    throws SpineException
        Parameters:
        address - the feature address part of the feature address FeatureAddressType.getFeature(). Note that this implementation limits feature addresses to Integer.MAX_VALUE
        Returns:
        the feature with the given address
        Throws:
        SpineException - when no feature with the given address exists
      • deleteFeature

        void deleteFeature​(int address)
                    throws SpineException
        Parameters:
        address - the feature address part of the feature address FeatureAddressType.getFeature(). Note that this implementation limits feature addresses to Integer.MAX_VALUE
        Throws:
        SpineException - when no feature with the given address exists
      • getFeatures

        java.util.Collection<Feature> getFeatures()
        Returns:
        all features of this entity excluding features of sub-entities
      • getLabel

        java.lang.String getLabel()
        Returns:
        the label set or the empty string if no label was set