4 package org.onap.vid.model;
10 public class ModelUtil {
12 * Gets the tags for the given element according to the configured namespace
13 * @param namespaces the namespace list from the configuration
14 * @param constantValue the constant portion of the tag name, i.e. resource.vf...
17 public static String[] getTags ( String[] namespaces, String constantValue ) {
19 if ( namespaces == null || namespaces.length == 0 ) {
22 int le = namespaces.length;
23 tags = new String[le];
24 for ( int i = 0; i < le; i++ ) {
25 tags[i] = namespaces[i] + constantValue;
30 * Determine if a note template type matches a set of configurable tags
31 * @param type the node template type
32 * @param tags the model configurable namespaces
33 * @return true if type starts with a tag in the array, false otherwise
35 public static boolean isType ( String type, String[] tags ) {
36 if ( (tags != null) && (tags.length > 0) ) {
37 for ( int i = 0; i < tags.length; i++ ) {
38 if ( type.startsWith (tags[i]) ) {