-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #440 from aml-org/publish-6.0.2
publish 6.0.2
Showing
11 changed files
with
79 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 0 additions & 54 deletions
54
...l/shared/src/main/scala/amf/aml/internal/namespace/AMLDialectNamespaceAliasesPlugin.scala
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
amf-aml/shared/src/main/scala/amf/aml/internal/namespace/DialectNamespaceAliases.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package amf.aml.internal.namespace | ||
|
||
import amf.aml.client.scala.model.document.Dialect | ||
import amf.core.client.scala.vocabulary.{Namespace, NamespaceAliases} | ||
import amf.core.internal.annotations.{Aliases, ReferencedInfo} | ||
import amf.core.internal.annotations.Aliases.Alias | ||
|
||
object DialectNamespaceAliases { | ||
def apply(dialect: Dialect): NamespaceAliases = { | ||
val externalAliases: Seq[(String, Namespace)] = dialect.externals.map { external => | ||
external.alias.value() -> Namespace(external.base.value()) | ||
} | ||
|
||
val annotAliases: Seq[(Alias, Namespace)] = dialect.annotations | ||
.find(classOf[Aliases]) | ||
.map { aliasesAnnotation => | ||
aliasesAnnotation.aliases.toList.map { | ||
case (alias, ReferencedInfo(_, url, _)) => alias -> Namespace(url) | ||
} | ||
} | ||
.getOrElse(Nil) | ||
|
||
NamespaceAliases((externalAliases ++ annotAliases).toMap) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters