Searching for the The Capella Dev API documentation

Hello,
I found a documentation describing the different classes and constructors such as (Component part Factory Imp…etc) in my local installation,
I was wondering if there was any “online” version of that open source documentation?

Thanks

Hi,

The starting point for online documentation is the Capella wiki and also the Capella Studio tutorials. The Capella documentation embedded in your Capella install also has some technical information but the online documentation in the wiki is the most up to date.

Regards,
Arnaud

Yes I understand, the 2 links you mentioned indeed help a lot. In one of the pages we even find this:

Getting the Metamodel

Metamodel are defined in ecore files located under plugins ending by *.gen

and checking some .ecore files indeed help finding things like:

Functional Exchange
<eClassifiers xsi:type="ecore:EClass" name="ComponentExchange" eSuperTypes="../../org.polarsys.capella.common.data.behavior.gen/model/Behavior.ecore#//AbstractEvent Information.ecore#//AbstractEventOperation CapellaCore.ecore#//NamedElement #//ExchangeSpecification">
    <eAnnotations source="http://www.polarsys.org/kitalpha/ecore/documentation">
      <details key="description" value="a specialized version of an exchange specification, dedicated to characterize exchanges between components&#xD;&#xA;[source: Capella study]"/>
      <details key="usage guideline" value="n/a"/>
      <details key="used in levels" value="operational,system,logical,physical,epbs"/>
      <details key="usage examples" value="n/a"/>
      <details key="constraints" value="none"/>
      <details key="comment/notes" value="none"/>
      <details key="reference documentation" value="none"/>
      <details key="arcadia_description" value="An Exchange is an interaction between some entities such as actors, the system, functions or components, which is likely to influence their behaviour. Example: tuning frequency, radio selection command..."/>
    </eAnnotations>
    <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
      <details key="UML/SysML semantic equivalences" value=""/>
      <details key="base metaclass in UML/SysML profile " value="uml::InformationFlow"/>
      <details key="explanation" value="none"/>
      <details key="constraints" value="none"/>
    </eAnnotations>
    <eAnnotations source="http://www.polarsys.org/capella/semantic"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//ComponentExchangeKind">
      <eAnnotations source="http://www.polarsys.org/kitalpha/ecore/documentation">
        <details key="description" value="Kind of the connection"/>
        <details key="constraints" value="none"/>
        <details key="type" value="refer to ConnectionKind definition"/>
        <details key="comment/notes" value="none"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value=""/>
        <details key="explanation" value="none"/>
        <details key="constraints" value="none"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/semantic"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="oriented" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
        defaultValueLiteral="false">
      <eAnnotations source="http://www.polarsys.org/kitalpha/ecore/documentation">
        <details key="description" value="describes the orientation of the connection. The connection can be oriented or not"/>
        <details key="constraints" value="none"/>
        <details key="type" value="refer to OrientationConnectionKind definition"/>
        <details key="comment/notes" value="none"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value=""/>
        <details key="explanation" value="none"/>
        <details key="constraints" value="none"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/semantic"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="allocatedFunctionalExchanges"
        upperBound="-1" eType="#//FunctionalExchange" changeable="false" volatile="true"
        transient="true" derived="true" eOpposite="#//FunctionalExchange/allocatingComponentExchanges">
      <eAnnotations source="http://www.polarsys.org/capella/derived">
        <details key="viatra.variant" value="alias"/>
        <details key="viatra.expression" value="outgoingComponentExchangeFunctionalExchangeAllocations.allocatedFunctionalExchange"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/kitalpha/ecore/documentation">
        <details key="description" value="the functional exchanges associated with this component exchange (e.g. the functional exchanges that happen between functions allocated to the two components involved in this component exchange)&#xD;&#xA;[source: Capella study]"/>
        <details key="constraints" value="none"/>
        <details key="comment/notes" value="none"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value="keyword::none"/>
        <details key="explanation" value="Derived and transient"/>
        <details key="constraints" value="none"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/semantic"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="incomingComponentExchangeRealizations"
        upperBound="-1" eType="#//ComponentExchangeRealization" changeable="false"
        volatile="true" transient="true" derived="true" eOpposite="#//ComponentExchangeRealization/allocatedComponentExchange">
      <eAnnotations source="http://www.polarsys.org/capella/derived">
        <details key="viatra.variant" value="alias"/>
        <details key="viatra.expression" value="incomingTraces"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/kitalpha/ecore/documentation">
        <details key="description" value="the component exchange realization links that have this component exchange as their destination&#xD;&#xA;[source: Capella study]"/>
        <details key="constraints" value="none"/>
        <details key="comment/notes" value="none"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value="keyword::none"/>
        <details key="explanation" value="Derived and transient"/>
        <details key="constraints" value="none"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="outgoingComponentExchangeRealizations"
        upperBound="-1" eType="#//ComponentExchangeRealization" changeable="false"
        volatile="true" transient="true" derived="true" eOpposite="#//ComponentExchangeRealization/allocatingComponentExchange">
      <eAnnotations source="http://www.polarsys.org/capella/derived">
        <details key="viatra.variant" value="alias"/>
        <details key="viatra.expression" value="outgoingTraces"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/kitalpha/ecore/documentation">
        <details key="description" value="(automatically computed) the component exchange realization links that have this component exchange as their source&#xD;&#xA;[source: Capella study]"/>
        <details key="constraints" value="none"/>
        <details key="comment/notes" value="none"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value="keyword::none"/>
        <details key="explanation" value="Derived and transient"/>
        <details key="constraints" value="none"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="outgoingComponentExchangeFunctionalExchangeAllocations"
        upperBound="-1" eType="#//ComponentExchangeFunctionalExchangeAllocation" changeable="false"
        volatile="true" transient="true" derived="true" eOpposite="#//ComponentExchangeFunctionalExchangeAllocation/allocatingComponentExchange">
      <eAnnotations source="http://www.polarsys.org/capella/derived">
        <details key="viatra.variant" value="alias"/>
        <details key="viatra.expression" value="outgoingTraces"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/kitalpha/ecore/documentation">
        <details key="description" value="(automatically computed) the allocation links between functional exchanges and component exchanges, for which this component exchange is the source&#xD;&#xA;[source: Capella study]"/>
        <details key="constraints" value="none"/>
        <details key="comment/notes" value="none"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value="keyword::none"/>
        <details key="explanation" value="Derived and transient"/>
        <details key="constraints" value="none"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="ownedComponentExchangeFunctionalExchangeAllocations"
        upperBound="-1" eType="#//ComponentExchangeFunctionalExchangeAllocation" containment="true">
      <eAnnotations source="http://www.polarsys.org/kitalpha/ecore/documentation">
        <details key="description" value="the allocation links between functional exchanges and component exchanges, owned by this component exchange&#xD;&#xA;[source: Capella study]"/>
        <details key="constraints" value="none"/>
        <details key="comment/notes" value="none"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value="keyword::nearestpackage"/>
        <details key="explanation" value="Elements are contained in the nearest possible parent container."/>
        <details key="constraints" value="Some elements on which ComponentFunctionalExchangeAllocation stereotype or any stereotype that inherits from it is applied"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="ownedComponentExchangeRealizations"
        upperBound="-1" eType="#//ComponentExchangeRealization" containment="true">
      <eAnnotations source="http://www.polarsys.org/kitalpha/ecore/documentation">
        <details key="description" value="the component exchange realization links that are owned by this component exchange&#xD;&#xA;[source: Capella study]"/>
        <details key="constraints" value="none"/>
        <details key="comment/notes" value="none"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value="keyword::nearestpackage"/>
        <details key="explanation" value="Elements are contained in the nearest possible parent container."/>
        <details key="constraints" value="Some elements on which ComponentExchangeRealization stereotype or any stereotype that inherits from it is applied"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="ownedComponentExchangeEnds"
        upperBound="-1" eType="#//ComponentExchangeEnd" containment="true">
      <eAnnotations source="http://www.polarsys.org/capella/2007/UML2Mapping">
        <details key="featureName" value="end"/>
        <details key="featureOwner" value="Connector"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/2007/BusinessInformation">
        <details key="Label" value="ownedConnectionEnds"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/2007/ImpactAnalysis/Segment"/>
      <eAnnotations source="http://www.polarsys.org/kitalpha/ecore/documentation">
        <details key="description" value="the connection endpoints involved in this link (potentially, an arbitrary number of them can be present)&#xD;&#xA;[source: Capella study]&#xD;&#xA;&#xD;&#xA;A connector consists of at least two connector ends, each representing the participation of instances of the classifiers&#xD;&#xA;typing the connectable elements attached to this end. The set of connector ends is ordered.&#xD;&#xA;[source: UML superstructure v2.2]"/>
        <details key="constraints" value="none"/>
        <details key="comment/notes" value="none"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value="uml::Connector::end"/>
        <details key="explanation" value="none"/>
        <details key="constraints" value="none"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/semantic"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="sourcePort" eType="ecore:EClass Information.ecore#//Port"
        changeable="false" volatile="true" transient="true" derived="true">
      <eAnnotations source="http://www.polarsys.org/capella/derived">
        <details key="viatra.variant" value="patternbody"/>
        <details key="viatra.expression" value="ComponentExchange.source(self, target);&#xD;&#xA;} or {&#xD;&#xA;&#x9;ComponentExchange.source(self, cee);&#xD;&#xA;&#x9;ComponentExchangeEnd.port(cee, target);"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/semantic"/>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value="keyword::none"/>
        <details key="explanation" value="Derived and transient"/>
        <details key="constraints" value="none"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="sourcePart" eType="ecore:EClass CompositeStructure.ecore#//Part"
        changeable="false" volatile="true" transient="true" derived="true">
      <eAnnotations source="http://www.polarsys.org/capella/derived">
        <details key="viatra.variant" value="patternbody"/>
        <details key="viatra.expression" value="ComponentExchange.source(self, target);&#xD;&#xA;} or {&#xD;&#xA;&#x9;ComponentExchange.source(self, cee);&#xD;&#xA;&#x9;ComponentExchangeEnd.part(cee, target);"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/semantic"/>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value="keyword::none"/>
        <details key="explanation" value="Derived and transient"/>
        <details key="constraints" value="none"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="targetPort" eType="ecore:EClass Information.ecore#//Port"
        changeable="false" volatile="true" transient="true" derived="true">
      <eAnnotations source="http://www.polarsys.org/capella/derived">
        <details key="viatra.variant" value="patternbody"/>
        <details key="viatra.expression" value="ComponentExchange.target(self, target);&#xD;&#xA;} or {&#xD;&#xA;&#x9;ComponentExchange.target(self, cee);&#xD;&#xA;&#x9;ComponentExchangeEnd.port(cee, target);"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/semantic"/>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value="keyword::none"/>
        <details key="explanation" value="Derived and transient"/>
        <details key="constraints" value="none"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="targetPart" eType="ecore:EClass CompositeStructure.ecore#//Part"
        changeable="false" volatile="true" transient="true" derived="true">
      <eAnnotations source="http://www.polarsys.org/capella/derived">
        <details key="viatra.variant" value="patternbody"/>
        <details key="viatra.expression" value="ComponentExchange.target(self, target);&#xD;&#xA;} or {&#xD;&#xA;&#x9;ComponentExchange.target(self, cee);&#xD;&#xA;&#x9;ComponentExchangeEnd.part(cee, target);"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/semantic"/>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value="keyword::none"/>
        <details key="explanation" value="Derived and transient"/>
        <details key="constraints" value="none"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="categories" upperBound="-1"
        eType="#//ComponentExchangeCategory" changeable="false" volatile="true" transient="true"
        derived="true">
      <eAnnotations source="http://www.polarsys.org/capella/derived">
        <details key="viatra.variant" value="opposite"/>
        <details key="viatra.expression" value="exchanges"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/kitalpha/ecore/documentation">
        <details key="description" value="the exchange categories (families) to which this functional exchange belongs&#xD;&#xA;[source: Capella study]"/>
        <details key="constraints" value="none"/>
        <details key="comment/notes" value="none"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value=""/>
        <details key="explanation" value=""/>
        <details key="constraints" value="none"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/semantic"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="allocatorPhysicalLinks"
        upperBound="-1" eType="ecore:EClass CompositeStructure.ecore#//PhysicalLink"
        changeable="false" volatile="true" transient="true" derived="true">
      <eAnnotations source="http://www.polarsys.org/capella/derived">
        <details key="viatra.variant" value="patternbody"/>
        <details key="viatra.expression" value="ComponentExchange.incomingTraces(self, cea);&#xD;&#xA;ComponentExchangeAllocation.componentExchangeAllocator(cea, target);"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/semantic">
        <details key="excludefrom" value="xmlpivot"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value="keyword::none"/>
        <details key="explanation" value="Derived and transient"/>
        <details key="constraints" value="none"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="realizedComponentExchanges"
        upperBound="-1" eType="#//ComponentExchange" changeable="false" volatile="true"
        transient="true" derived="true" eOpposite="#//ComponentExchange/realizingComponentExchanges">
      <eAnnotations source="http://www.polarsys.org/capella/derived">
        <details key="viatra.variant" value="patternbody"/>
        <details key="viatra.expression" value="ComponentExchange.outgoingTraces(self, cer);&#xD;&#xA;ComponentExchangeRealization.allocatedComponentExchange(cer, target);"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/semantic"/>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value="keyword::none"/>
        <details key="explanation" value="Derived and transient"/>
        <details key="constraints" value="none"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="realizingComponentExchanges"
        upperBound="-1" eType="#//ComponentExchange" changeable="false" volatile="true"
        transient="true" derived="true" eOpposite="#//ComponentExchange/realizedComponentExchanges">
      <eAnnotations source="http://www.polarsys.org/capella/derived">
        <details key="viatra.variant" value="patternbody"/>
        <details key="viatra.expression" value="ComponentExchange.incomingTraces(self, cer);&#xD;&#xA;ComponentExchangeRealization.allocatingComponentExchange(cer, target);"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/semantic">
        <details key="excludefrom" value="xmlpivot"/>
      </eAnnotations>
      <eAnnotations source="http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping">
        <details key="UML/SysML semantic equivalences" value="keyword::none"/>
        <details key="explanation" value="Derived and transient"/>
        <details key="constraints" value="none"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>

Whereas the documentation I saw is like this:

It’s kinda more readable. We want to find instantly all he methods that a Capella Class posseses, and we want to find it inheritances easily.

I guess what I was looking for first, was the online version of these docs (with methods), but now I am looking for the “detailed metamodel description” document (100% java oriented) opposed to the “simplified metamodel api” document made for Python4Capella, which is python/java oriented but not 100% java oriented, and it also lacks everything that is outside Capella kind of (Kithalpha, sirius, GMF,…).

Generally speaking, I find that using the Interpreter window is the most efficient to write scripts using Java. By using the completion, you can see what methods/properties are available on a given object.
Stephane

1 Like

I feel like everyone keep using pre used codes and copy paste them (and modify few things using the intereter and/or ctrl+space), without having clear “global centralized and complete” documentations, same as for Document Generation where people keep RE-using older codes.

Some people have probably created some personal docs I wager.
Anyway, this is how It feels for me:

Now considering the competition, it is maybe better, some day in the future? To switch to something like this:

It could ensure the lifespan of Capella?
The balance is probably not for me to say/decide, I am no expert. I might be totally wrong.

Edit: Python4Capella is DEFINTELY helping, it’s a bypass that goes through the barrier.

1 Like