Adding support for custom model registrator and supporting Java code
to be built and packaged along with the auto-generated artifacts that
represent the YANG model.

Change-Id: I62c121f22680d483df40662da6a73c1bae43826b
diff --git a/models/common/BUCK b/models/common/BUCK
index ee0d73a..a210b1e 100644
--- a/models/common/BUCK
+++ b/models/common/BUCK
@@ -2,4 +2,6 @@
 yang_model (
   app_name = 'org.onosproject.models.common',
   title = 'Common YANG Models',
+  custom_registrator = True,
+  deps = [ '//lib:CORE_DEPS' ]
 )
diff --git a/models/common/src/main/java/org/onosproject/models/common/YangModelRegistrator.java b/models/common/src/main/java/org/onosproject/models/common/YangModelRegistrator.java
new file mode 100644
index 0000000..d8f0964
--- /dev/null
+++ b/models/common/src/main/java/org/onosproject/models/common/YangModelRegistrator.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.models.common;
+
+import org.onosproject.yang.AbstractYangModelRegistrator;
+import org.apache.felix.scr.annotations.Component;
+
+@Component(immediate = true)
+public class YangModelRegistrator extends AbstractYangModelRegistrator {
+    public YangModelRegistrator() {
+        super(YangModelRegistrator.class);
+
+        // TODO: Do some other registration tasks...
+        log.info("Custom model registrator created");
+    }
+}
\ No newline at end of file