All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.reprezen.genflow.rapidml.wadl.xtend.ParamsHelper.xtend Maven / Gradle / Ivy

The newest version!
package com.reprezen.genflow.rapidml.wadl.xtend

import com.google.common.collect.Maps
import com.reprezen.genflow.api.trace.GenTemplateTrace
import java.util.Map

class ParamsHelper {
	val Map xsdParams
	
	new(GenTemplateTrace trace) {
		this.xsdParams = trace.traceItems.findFirst[it.type == "params"]?.properties ?: Maps.newHashMap
	}
	
	def isEltStyle() {
		return valueForm == "ELEMENT"
	}

	def isAttrStyle() {
		return valueForm == "ATTRIBUTE"
	}
	
	def private getValueForm() {
		return xsdParams.get("valueForm") ?: "ATTRIBUTE"
	}
	
	def getListItemElementName() {
		return xsdParams.get("listItemElementName") ?: "item"
	}

	def isAllowEmptyLists() {
		return Boolean.valueOf(xsdParams.get("allowEmptyLists") ?: "false")
	}
	
	def getTypeNamingMethod() {
		return xsdParams.get("typeNamingMethod") ?: "SIMPLE_NAME"
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy