Class FakeSubmodelElementCollection

  • All Implemented Interfaces:
    de.iip_ecosphere.platform.support.aas.Element, de.iip_ecosphere.platform.support.aas.ElementsAccess, de.iip_ecosphere.platform.support.aas.HasDataSpecification, de.iip_ecosphere.platform.support.aas.HasKind, de.iip_ecosphere.platform.support.aas.HasSemantics, de.iip_ecosphere.platform.support.aas.Qualifiable, de.iip_ecosphere.platform.support.aas.Referable, de.iip_ecosphere.platform.support.aas.SubmodelElement, de.iip_ecosphere.platform.support.aas.SubmodelElementCollection

    public class FakeSubmodelElementCollection
    extends FakeElement
    implements de.iip_ecosphere.platform.support.aas.SubmodelElementCollection
    Implements a fake sub-model element collection.
    Author:
    Holger Eichelberger, SSE
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static class  FakeSubmodelElementCollection.FakeSubmodelElementCollectionBuilder
      The builder.
      • Nested classes/interfaces inherited from interface de.iip_ecosphere.platform.support.aas.SubmodelElementCollection

        de.iip_ecosphere.platform.support.aas.SubmodelElementCollection.SubmodelElementCollectionBuilder
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map<java.lang.String,​de.iip_ecosphere.platform.support.Builder<?>> deferred  
      private java.util.Map<java.lang.String,​de.iip_ecosphere.platform.support.aas.SubmodelElement> elements  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected FakeSubmodelElementCollection​(java.lang.String idShort)
      Creates an instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void accept​(de.iip_ecosphere.platform.support.aas.AasVisitor visitor)  
      de.iip_ecosphere.platform.support.aas.Reference createReference()  
      void deleteElement​(java.lang.String idShort)  
      java.lang.Iterable<de.iip_ecosphere.platform.support.aas.SubmodelElement> elements()  
      protected java.util.Map<java.lang.String,​de.iip_ecosphere.platform.support.aas.SubmodelElement> elts()
      Returns the elements.
      private <T extends de.iip_ecosphere.platform.support.aas.SubmodelElement>
      T
      filter​(java.lang.String idShort, java.lang.Class<T> type)
      Filters #elements() for the given short id and type.
      de.iip_ecosphere.platform.support.aas.DataElement getDataElement​(java.lang.String idShort)  
      de.iip_ecosphere.platform.support.aas.SubmodelElement getElement​(java.lang.String idShort)  
      int getElementsCount()  
      de.iip_ecosphere.platform.support.aas.Operation getOperation​(java.lang.String idShort)  
      de.iip_ecosphere.platform.support.aas.Property getProperty​(java.lang.String idShort)  
      de.iip_ecosphere.platform.support.aas.ReferenceElement getReferenceElement​(java.lang.String idShort)  
      de.iip_ecosphere.platform.support.aas.SubmodelElementCollection getSubmodelElementCollection​(java.lang.String idShort)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface de.iip_ecosphere.platform.support.aas.Element

        getIdShort, update
    • Field Detail

      • elements

        private java.util.Map<java.lang.String,​de.iip_ecosphere.platform.support.aas.SubmodelElement> elements
      • deferred

        private java.util.Map<java.lang.String,​de.iip_ecosphere.platform.support.Builder<?>> deferred
    • Constructor Detail

      • FakeSubmodelElementCollection

        protected FakeSubmodelElementCollection​(java.lang.String idShort)
        Creates an instance.
        Parameters:
        idShort - the id
    • Method Detail

      • accept

        public void accept​(de.iip_ecosphere.platform.support.aas.AasVisitor visitor)
        Specified by:
        accept in interface de.iip_ecosphere.platform.support.aas.Element
      • elts

        protected java.util.Map<java.lang.String,​de.iip_ecosphere.platform.support.aas.SubmodelElement> elts()
        Returns the elements.
        Returns:
        the elements
      • elements

        public java.lang.Iterable<de.iip_ecosphere.platform.support.aas.SubmodelElement> elements()
        Specified by:
        elements in interface de.iip_ecosphere.platform.support.aas.SubmodelElementCollection
      • filter

        private <T extends de.iip_ecosphere.platform.support.aas.SubmodelElement> T filter​(java.lang.String idShort,
                                                                                           java.lang.Class<T> type)
        Filters #elements() for the given short id and type.
        Type Parameters:
        T - the element type to return
        Parameters:
        idShort - the short id
        type - the element type
        Returns:
        the found element or null
      • getDataElement

        public de.iip_ecosphere.platform.support.aas.DataElement getDataElement​(java.lang.String idShort)
        Specified by:
        getDataElement in interface de.iip_ecosphere.platform.support.aas.ElementsAccess
      • getProperty

        public de.iip_ecosphere.platform.support.aas.Property getProperty​(java.lang.String idShort)
        Specified by:
        getProperty in interface de.iip_ecosphere.platform.support.aas.ElementsAccess
      • getReferenceElement

        public de.iip_ecosphere.platform.support.aas.ReferenceElement getReferenceElement​(java.lang.String idShort)
        Specified by:
        getReferenceElement in interface de.iip_ecosphere.platform.support.aas.ElementsAccess
      • getElement

        public de.iip_ecosphere.platform.support.aas.SubmodelElement getElement​(java.lang.String idShort)
        Specified by:
        getElement in interface de.iip_ecosphere.platform.support.aas.SubmodelElementCollection
      • getSubmodelElementCollection

        public de.iip_ecosphere.platform.support.aas.SubmodelElementCollection getSubmodelElementCollection​(java.lang.String idShort)
        Specified by:
        getSubmodelElementCollection in interface de.iip_ecosphere.platform.support.aas.ElementsAccess
      • getElementsCount

        public int getElementsCount()
        Specified by:
        getElementsCount in interface de.iip_ecosphere.platform.support.aas.SubmodelElementCollection
      • createReference

        public de.iip_ecosphere.platform.support.aas.Reference createReference()
        Specified by:
        createReference in interface de.iip_ecosphere.platform.support.aas.SubmodelElementCollection
      • deleteElement

        public void deleteElement​(java.lang.String idShort)
        Specified by:
        deleteElement in interface de.iip_ecosphere.platform.support.aas.SubmodelElementCollection
      • getOperation

        public de.iip_ecosphere.platform.support.aas.Operation getOperation​(java.lang.String idShort)
        Specified by:
        getOperation in interface de.iip_ecosphere.platform.support.aas.ElementsAccess