All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nasdanika.html.model.app.Link Maven / Gradle / Ivy

There is a newer version: 2024.10.0
Show newest version
/**
 */
package org.nasdanika.html.model.app;

import org.eclipse.emf.common.util.URI;
import org.nasdanika.common.Util;
import org.nasdanika.html.model.bootstrap.Modal;


/**
 * 
 * A representation of the model object 'Link'.
 * 
 *
 * 

* The following features are supported: *

*
    *
  • {@link org.nasdanika.html.model.app.Link#getLocation Location}
  • *
  • {@link org.nasdanika.html.model.app.Link#getScript Script}
  • *
  • {@link org.nasdanika.html.model.app.Link#getModal Modal}
  • *
  • {@link org.nasdanika.html.model.app.Link#getName Name}
  • *
  • {@link org.nasdanika.html.model.app.Link#getConfirmation Confirmation}
  • *
  • {@link org.nasdanika.html.model.app.Link#getTarget Target}
  • *
  • {@link org.nasdanika.html.model.app.Link#getAction Action}
  • *
* * @see org.nasdanika.html.model.app.AppPackage#getLink() * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='activator'" * @generated */ public interface Link extends Label { /** * Returns the value of the 'Location' attribute. * * * @return the value of the 'Location' attribute. * @see #setLocation(String) * @see org.nasdanika.html.model.app.AppPackage#getLink_Location() * @model * @generated */ String getLocation(); /** * Sets the value of the '{@link org.nasdanika.html.model.app.Link#getLocation Location}' attribute. * * * @param value the new value of the 'Location' attribute. * @see #getLocation() * @generated */ void setLocation(String value); /** * Returns the value of the 'Script' attribute. * * * @return the value of the 'Script' attribute. * @see #setScript(String) * @see org.nasdanika.html.model.app.AppPackage#getLink_Script() * @model annotation="urn:org.nasdanika exclusive-with='location'" * @generated */ String getScript(); /** * Sets the value of the '{@link org.nasdanika.html.model.app.Link#getScript Script}' attribute. * * * @param value the new value of the 'Script' attribute. * @see #getScript() * @generated */ void setScript(String value); /** * Returns the value of the 'Modal' containment reference. * * * @return the value of the 'Modal' containment reference. * @see #setModal(Modal) * @see org.nasdanika.html.model.app.AppPackage#getLink_Modal() * @model containment="true" * annotation="urn:org.nasdanika homogeneous='true' exclusive-with='location script'" * @generated */ Modal getModal(); /** * Sets the value of the '{@link org.nasdanika.html.model.app.Link#getModal Modal}' containment reference. * * * @param value the new value of the 'Modal' containment reference. * @see #getModal() * @generated */ void setModal(Modal value); /** * Returns the value of the 'Confirmation' attribute. * * * @return the value of the 'Confirmation' attribute. * @see #setConfirmation(String) * @see org.nasdanika.html.model.app.AppPackage#getLink_Confirmation() * @model * @generated */ String getConfirmation(); /** * Sets the value of the '{@link org.nasdanika.html.model.app.Link#getConfirmation Confirmation}' attribute. * * * @param value the new value of the 'Confirmation' attribute. * @see #getConfirmation() * @generated */ void setConfirmation(String value); /** * Returns the value of the 'Name' attribute. * * * @return the value of the 'Name' attribute. * @see #setName(String) * @see org.nasdanika.html.model.app.AppPackage#getLink_Name() * @model annotation="urn:org.nasdanika exclusive-with='script modal location'" * @generated */ String getName(); /** * Sets the value of the '{@link org.nasdanika.html.model.app.Link#getName Name}' attribute. * * * @param value the new value of the 'Name' attribute. * @see #getName() * @generated */ void setName(String value); /** * Returns the value of the 'Target' attribute. * * * @return the value of the 'Target' attribute. * @see #setTarget(String) * @see org.nasdanika.html.model.app.AppPackage#getLink_Target() * @model * @generated */ String getTarget(); /** * Sets the value of the '{@link org.nasdanika.html.model.app.Link#getTarget Target}' attribute. * * * @param value the new value of the 'Target' attribute. * @see #getTarget() * @generated */ void setTarget(String value); /** * Returns the value of the 'Action' reference. * * * @return the value of the 'Action' reference. * @see #setAction(Action) * @see org.nasdanika.html.model.app.AppPackage#getLink_Action() * @model annotation="urn:org.nasdanika exclusive-with='script modal location'" * @generated */ Action getAction(); /** * Sets the value of the '{@link org.nasdanika.html.model.app.Link#getAction Action}' reference. * * * @param value the new value of the 'Action' reference. * @see #getAction() * @generated */ void setAction(Action value); /** * If link has a relative location the location is rebased by resolving against from and then deresolving against to * @param from * @param to */ default void rebase(URI from, URI to) { String location = getLocation(); if (!Util.isBlank(location)) { URI locationURI = URI.createURI(location); if (from != null && !from.isRelative() && locationURI.isRelative()) { locationURI = locationURI.resolve(from); } if (to != null && !to.isRelative()) { locationURI = locationURI.deresolve(to, true, true, true); } setLocation(locationURI.toString()); } } } // Link




© 2015 - 2024 Weber Informatics LLC | Privacy Policy