From 9253f81d14a5217479ca8e59efb198eaa32ec9f0 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Wed, 27 Nov 2019 13:32:45 +0000 Subject: Replace getCaononicalName() with getName() in code base Issue-ID: POLICY-1861 Change-Id: Iccbdcbc5b5978305c56ab74c01a52a562697bee1 Signed-off-by: liamfallon --- .../policy/apex/examples/aadm/model/AadmDomainModelSaver.java | 10 ++++++---- .../examples/adaptive/model/AdaptiveDomainModelSaver.java | 11 ++++++----- .../examples/myfirstpolicy/model/MfpDomainModelSaver.java | 10 ++++++---- .../policy/apex/examples/pcvs/model/PcvsDomainModelSaver.java | 4 ++-- 4 files changed, 20 insertions(+), 15 deletions(-) (limited to 'examples') diff --git a/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/model/AadmDomainModelSaver.java b/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/model/AadmDomainModelSaver.java index 60eee455c..492769dad 100644 --- a/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/model/AadmDomainModelSaver.java +++ b/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/model/AadmDomainModelSaver.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,7 +39,8 @@ public final class AadmDomainModelSaver { /** * Private default constructor to prevent subclassing. */ - private AadmDomainModelSaver() {} + private AadmDomainModelSaver() { + } /** * Write the AADM model to args[0]. @@ -48,14 +50,14 @@ public final class AadmDomainModelSaver { */ public static void main(final String[] args) throws ApexException { if (args.length != 1) { - LOGGER.error("usage: " + AadmDomainModelSaver.class.getCanonicalName() + " modelDirectory"); + LOGGER.error("usage: " + AadmDomainModelSaver.class.getName() + " modelDirectory"); return; } // Save Java model final AxPolicyModel aadmPolicyModel = new AadmDomainModelFactory().getAadmPolicyModel(); - final ApexModelSaver aadmModelSaver = - new ApexModelSaver<>(AxPolicyModel.class, aadmPolicyModel, args[0]); + final ApexModelSaver aadmModelSaver = new ApexModelSaver<>(AxPolicyModel.class, aadmPolicyModel, + args[0]); aadmModelSaver.apexModelWriteJson(); aadmModelSaver.apexModelWriteXml(); } diff --git a/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelSaver.java b/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelSaver.java index 4949edd30..83a42ac8d 100644 --- a/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelSaver.java +++ b/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelSaver.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,21 +51,21 @@ public final class AdaptiveDomainModelSaver { */ public static void main(final String[] args) throws ApexException { if (args.length != 1) { - LOGGER.error("usage: " + AdaptiveDomainModelSaver.class.getCanonicalName() + " modelDirectory"); + LOGGER.error("usage: " + AdaptiveDomainModelSaver.class.getName() + " modelDirectory"); return; } // Save Anomaly Detection model final AxPolicyModel adPolicyModel = new AdaptiveDomainModelFactory().getAnomalyDetectionPolicyModel(); - final ApexModelSaver adModelSaver = - new ApexModelSaver<>(AxPolicyModel.class, adPolicyModel, args[0]); + final ApexModelSaver adModelSaver = new ApexModelSaver<>(AxPolicyModel.class, adPolicyModel, + args[0]); adModelSaver.apexModelWriteJson(); adModelSaver.apexModelWriteXml(); // Save Auto Learn model final AxPolicyModel alPolicyModel = new AdaptiveDomainModelFactory().getAutoLearnPolicyModel(); - final ApexModelSaver alModelSaver = - new ApexModelSaver<>(AxPolicyModel.class, alPolicyModel, args[0]); + final ApexModelSaver alModelSaver = new ApexModelSaver<>(AxPolicyModel.class, alPolicyModel, + args[0]); alModelSaver.apexModelWriteJson(); alModelSaver.apexModelWriteXml(); } diff --git a/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MfpDomainModelSaver.java b/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MfpDomainModelSaver.java index 1a18a7e3a..d2469f209 100644 --- a/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MfpDomainModelSaver.java +++ b/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MfpDomainModelSaver.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,7 +37,8 @@ public final class MfpDomainModelSaver { private static final XLogger LOGGER = XLoggerFactory.getXLogger(MfpDomainModelSaver.class); /** Private constructor to prevent instantiation. */ - private MfpDomainModelSaver() {} + private MfpDomainModelSaver() { + } /** * Write the MyFirstPolicy model to args[0]. @@ -46,14 +48,14 @@ public final class MfpDomainModelSaver { */ public static void main(final String[] args) throws ApexException { if (args.length != 1) { - LOGGER.error("usage: " + MfpDomainModelSaver.class.getCanonicalName() + " modelDirectory"); + LOGGER.error("usage: " + MfpDomainModelSaver.class.getName() + " modelDirectory"); return; } // Save Java model AxPolicyModel mfpPolicyModel = new MfpDomainModelFactory().getMfp1PolicyModel(); - ApexModelSaver mfpModelSaver = - new ApexModelSaver<>(AxPolicyModel.class, mfpPolicyModel, args[0] + "/1/"); + ApexModelSaver mfpModelSaver = new ApexModelSaver<>(AxPolicyModel.class, mfpPolicyModel, + args[0] + "/1/"); mfpModelSaver.apexModelWriteJson(); mfpModelSaver.apexModelWriteXml(); diff --git a/examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PcvsDomainModelSaver.java b/examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PcvsDomainModelSaver.java index 1d8381acd..02b107767 100644 --- a/examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PcvsDomainModelSaver.java +++ b/examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PcvsDomainModelSaver.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,8 +48,7 @@ public final class PcvsDomainModelSaver { */ public static void main(final String[] args) throws ApexException { if (args.length != 2) { - LOGGER.error("usage: " + PcvsDomainModelSaver.class.getCanonicalName() - + " workingDirectory modelDirectory"); + LOGGER.error("usage: " + PcvsDomainModelSaver.class.getName() + " workingDirectory modelDirectory"); return; } -- cgit 1.2.3-korg