* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright © 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@Configuration
public class IntrospectionConfig {
- private Map<SchemaVersion, MoxyLoader> MOXYINSTANCEMAP = new ConcurrentHashMap<>();
- @Autowired
- NodeIngestor nodeIngestor;
+ private Map<SchemaVersion, MoxyLoader> moxyInstanceMap = new ConcurrentHashMap<>();
+ @Autowired
+ NodeIngestor nodeIngestor;
- @Bean
- public LoaderFactory loaderFactory(SchemaVersions schemaVersions) {
- LoaderFactory loaderFactory = new LoaderFactory(moxyLoaderInstance(schemaVersions));
- return loaderFactory;
- }
+ @Bean
+ public LoaderFactory loaderFactory(SchemaVersions schemaVersions) {
+ return new LoaderFactory(moxyLoaderInstance(schemaVersions));
+ }
- @Bean
- public Map<SchemaVersion, MoxyLoader> moxyLoaderInstance(SchemaVersions schemaVersions) {
- for(SchemaVersion version : schemaVersions.getVersions()){
- if (!MOXYINSTANCEMAP.containsKey(version)) {
- MOXYINSTANCEMAP.put(version, new MoxyLoader(version, nodeIngestor));
- }
- }
- return MOXYINSTANCEMAP;
- }
+ @Bean
+ public Map<SchemaVersion, MoxyLoader> moxyLoaderInstance(SchemaVersions schemaVersions) {
+ for(SchemaVersion version : schemaVersions.getVersions()){
+ if (!moxyInstanceMap.containsKey(version)) {
+ moxyInstanceMap.put(version, new MoxyLoader(version, nodeIngestor));
+ }
+ }
+ return moxyInstanceMap;
+ }
}
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright © 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@Configuration
public class RestBeanConfig {
- @Bean(name = "traversalUriHttpEntry")
- @Scope(scopeName = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
- public HttpEntry traversalUriHttpEntry() {
- HttpEntry httpEntry = new HttpEntry(ModelType.MOXY, QueryStyle.TRAVERSAL_URI);
- return httpEntry;
- }
-
- @Bean(name = "traversalHttpEntry")
- @Scope(scopeName = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
- public HttpEntry traversalHttpEntry() {
- HttpEntry httpEntry = new HttpEntry(ModelType.MOXY, QueryStyle.TRAVERSAL);
-
- return httpEntry;
- }
-
-
+ @Bean(name = "traversalUriHttpEntry")
+ @Scope(scopeName = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+ public HttpEntry traversalUriHttpEntry() {
+ return new HttpEntry(ModelType.MOXY, QueryStyle.TRAVERSAL_URI);
+ }
+
+ @Bean(name = "traversalHttpEntry")
+ @Scope(scopeName = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+ public HttpEntry traversalHttpEntry() {
+ return new HttpEntry(ModelType.MOXY, QueryStyle.TRAVERSAL);
+ }
+
+
}
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright © 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
return new EdgeSerializer(edgeIngestor);
}
- @Bean(name = "nodeIngestor")
- public NodeIngestor nodeIngestor(ConfigTranslator configTranslator) {
- NodeIngestor nodeIngestor = new NodeIngestor(configTranslator);
- return nodeIngestor;
- }
+ @Bean(name = "nodeIngestor")
+ public NodeIngestor nodeIngestor(ConfigTranslator configTranslator) {
+ return new NodeIngestor(configTranslator);
+ }
- @Bean(name = "configTranslator")
- public ConfigTranslator configTranslator(SchemaLocationsBean schemaLocationsBean, SchemaVersions schemaVersions) {
- ConfigTranslator aaiConfigTranslator = new AAIConfigTranslator(schemaLocationsBean, schemaVersions);
- return aaiConfigTranslator;
- }
+ @Bean(name = "configTranslator")
+ public ConfigTranslator configTranslator(SchemaLocationsBean schemaLocationsBean, SchemaVersions schemaVersions) {
+ return new AAIConfigTranslator(schemaLocationsBean, schemaVersions);
+ }
- @Bean
- public SchemaErrorStrategy schemaErrorStrategy(){
+ @Bean
+ public SchemaErrorStrategy schemaErrorStrategy(){
return new CheckEverythingStrategy();
- }
+ }
}
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright © 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@Configuration
public class SwaggerGenerationConfiguration {
- @Value("${schema.uri.base.path}")
- private String basePath;
+ @Value("${schema.uri.base.path}")
+ private String basePath;
- @Bean
- @Scope(scopeName = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
- public NodesYAMLfromOXM nodesYamlFromOXM(SchemaVersions schemaVersions, NodeIngestor nodeIngestor, EdgeIngestor edgeIngestor) {
- NodesYAMLfromOXM nodesYamlFromOXM = new NodesYAMLfromOXM(basePath, schemaVersions, nodeIngestor, edgeIngestor);
- return nodesYamlFromOXM;
- }
-
- @Bean
- @Scope(scopeName = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
- public HTMLfromOXM htmlFromOXM(SchemaVersions schemaVersions, NodeIngestor nodeIngestor, EdgeIngestor edgeIngestor) {
- HTMLfromOXM htmlFromOXM = new HTMLfromOXM(schemaVersions, nodeIngestor, edgeIngestor);
- return htmlFromOXM;
- }
-
- @Bean
- @Scope(scopeName = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
- public YAMLfromOXM yamlFromOXM(SchemaVersions schemaVersions, NodeIngestor nodeIngestor, EdgeIngestor edgeIngestor) {
- YAMLfromOXM yamlFromOXM = new YAMLfromOXM(basePath, schemaVersions, nodeIngestor, edgeIngestor);
- return yamlFromOXM;
- }
+ @Bean
+ @Scope(scopeName = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+ public NodesYAMLfromOXM nodesYamlFromOXM(SchemaVersions schemaVersions, NodeIngestor nodeIngestor, EdgeIngestor edgeIngestor) {
+ return new NodesYAMLfromOXM(basePath, schemaVersions, nodeIngestor, edgeIngestor);
+ }
+
+ @Bean
+ @Scope(scopeName = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+ public HTMLfromOXM htmlFromOXM(SchemaVersions schemaVersions, NodeIngestor nodeIngestor, EdgeIngestor edgeIngestor) {
+ return new HTMLfromOXM(schemaVersions, nodeIngestor, edgeIngestor);
+ }
+
+ @Bean
+ @Scope(scopeName = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+ public YAMLfromOXM yamlFromOXM(SchemaVersions schemaVersions, NodeIngestor nodeIngestor, EdgeIngestor edgeIngestor) {
+ return new YAMLfromOXM(basePath, schemaVersions, nodeIngestor, edgeIngestor);
+ }
}