Package org.eclipse.uml2

Examples of org.eclipse.uml2.Model


     * this.setModel(model); </code>
     *
     *
     */
    public Model createAndSetModel() {
        Model newValue = new Model();
        this.setModel(newValue);
        return newValue;
    }
View Full Code Here


  public boolean acceptFeature(Feature feature) {
    return this.styleFilter.match(feature);
  }

  public Model getKmlModel(Feature feature, Point point) {
    Model kmlModel = KmlFactory.createModel()
        .withId(feature.getName().toString())
        .withAltitudeMode(getAltitudeMode(feature, point));
    kmlModel.createAndSetLocation().withLongitude(point.getCoordinate().x)
        .withLatitude(point.getCoordinate().y)
        .withAltitude(getAltitude(feature, point));
    kmlModel.createAndSetOrientation()
        .withHeading(
            getGenericRotationValue(feature, model.getHeading()))
        .withTilt(getGenericRotationValue(feature, model.getTilt()))
        .withRoll(getGenericRotationValue(feature, model.getRoll()));
    kmlModel.createAndSetLink()
        .withHref(
            styleFilter.getExpressionValue(model.getHref(), feature))
        .withRefreshMode(RefreshMode.ON_CHANGE);
    return kmlModel;
  }
View Full Code Here

  public Kml getKml() {
    return kml;
  }

  private void addPoint(Feature feature, Point point, List<KmlModel> kmlModels) {
    Model kmlModel = getKmlModel(feature, point, kmlModels);
    if (kmlModel != null) {
      Placemark placemark = new Placemark().withName(feature.getName()
          .toString());
      placemark.createAndSetLookAt()
          .withLongitude(point.getCoordinate().x)
View Full Code Here

                }
            };

            for (Iterator abstractionIterator = dependencies.iterator(); abstractionIterator.hasNext();)
            {
                final Abstraction abstraction = (Abstraction)abstractionIterator.next();
                final List suppliers = abstraction.getSuppliers();
                for (int i = 0; i < suppliers.size(); i++)
                {
                    final Object supplierObject = suppliers.get(i);
                    if (supplierObject instanceof Interface)
                    {
View Full Code Here

    protected Object handleGetEffect()
    {
        // Effect is mapped to action, not activity
        // We return the first action encountered in the activity
        Action effectAction = null;
        Activity effect = this.metaObject.getEffect();
        if (effect != null)
        {
            Collection nodes = effect.getNodes();
            for (Iterator nodesIt = nodes.iterator(); nodesIt.hasNext() && effectAction == null;)
View Full Code Here

    protected Object handleGetEffect()
    {
        // Effect is mapped to action, not activity
        // We return the first action encountered in the activity
        Action effectAction = null;
        Activity effect = this.metaObject.getEffect();
        if (effect != null)
        {
            Collection nodes = effect.getNodes();
            for (Iterator nodesIt = nodes.iterator(); nodesIt.hasNext() && effectAction == null;)
            {
                Object nextNode = nodesIt.next();
                if (nextNode instanceof Action)
                {
View Full Code Here

     *
     * @see org.andromda.metafacades.uml.ActionStateFacade#getEntry()
     */
    protected java.lang.Object handleGetEntry()
    {
        Activity activity = this.metaObject.getEntry();
        if (activity != null)
        {
            for (Iterator nodesIt = activity.getNodes().iterator(); nodesIt.hasNext();)
            {
                Object nextNode = nodesIt.next();
                if (nextNode instanceof Action)
                {
                    return nextNode;
View Full Code Here

    protected java.util.Collection handleGetDeferrableEvents()
    {
        // UML1.4 Evetns are mapped to UML2 Activity
        // We obtains them through entry, doactivity and exit
        Collection events = new ArrayList();
        Activity entry = this.metaObject.getEntry();
        Activity doActivity = this.metaObject.getDoActivity();
        Activity onExit = this.metaObject.getExit();

        if (entry != null)
        {
            events.add(entry);
        }
View Full Code Here

     */
    public List handleGetControllerCalls()
    {
        // - get every operation from each CallOperationAction instance.
        // - Note: this is the same implementation as CallEvent.getOperationCall()
        final Activity activity = (Activity)this.metaObject;
        final List operations = new ArrayList();
        Collection nodes = activity.getNodes();
        for (final Iterator iterator = nodes.iterator(); iterator.hasNext();)
        {
            final Object nextNode = iterator.next();
            if (nextNode instanceof CallOperationAction)
            {
View Full Code Here

    static AssociationEnd getOppositeAssociationEnd(final Property associationEnd)
    {
        Object opposite = associationEnd.getOpposite();
        if (opposite == null)
        {
            Association association = associationEnd.getAssociation();

            if (association != null)
            {
                Collection ends = association.getMemberEnds();
                for (final Iterator endIterator = ends.iterator(); endIterator.hasNext();)
                {
                    final Object end = endIterator.next();
                    if (end != null && !associationEnd.equals(end))
                    {
View Full Code Here

TOP

Related Classes of org.eclipse.uml2.Model

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.