Skip to content

Commit

Permalink
Merge branch 'main' into 2.9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
atextor committed Oct 10, 2024
2 parents e4c1bd0 + 5de6c1b commit 6a13d86
Show file tree
Hide file tree
Showing 124 changed files with 3,471 additions and 1,016 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import org.eclipse.esmf.aspectmodel.AspectModelFile;
import org.eclipse.esmf.aspectmodel.VersionNumber;
import org.eclipse.esmf.aspectmodel.urn.AspectModelUrn;

/**
* Represents the namespace the model elements are contained in
Expand All @@ -29,14 +30,28 @@ public interface Namespace extends ModelElementGroup, HasDescription {

/**
* The package part of the model namespace is an identifier given in
* <a href="https://en.wikipedia.org/wiki/Reverse_domain_name_notation">reverse domain name notation</a>, e.g., com.example.myapp.
* <a href="https://en.wikipedia.org/wiki/Reverse_domain_name_notation">reverse domain name notation</a>, e.g.,
* {@code com.example.myapp}.
*
* @return the package part of the namespace
* @deprecated use {@link #namespaceMainPart()} instead
*/
String packagePart();
@Deprecated( forRemoval = true )
default String packagePart() {
return namespaceMainPart();
}

/**
* The package part of the model namespace is an identifier given in
* <a href="https://en.wikipedia.org/wiki/Reverse_domain_name_notation">reverse domain name notation</a>, e.g.,
* {@code com.example.myapp}.
*
* @return the package part of the namespace
*/
String namespaceMainPart();

/**
* The version part of the namespace. This is always a semantic version, e.g. 1.2.3.
* The version part of the namespace. This is always a semantic version, e.g. {@code 1.2.3}.
*
* @return the version part
*/
Expand All @@ -54,8 +69,8 @@ public interface Namespace extends ModelElementGroup, HasDescription {
*
* @return the identifier
*/
default String urn() {
return String.format( "urn:samm:%s:%s", packagePart(), version() );
default AspectModelUrn urn() {
return AspectModelUrn.fromUrn( String.format( "urn:samm:%s:%s", namespaceMainPart(), version() ) );
}

/**
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 6a13d86

Please sign in to comment.