Difference between revisions of "Artefact:Template/org/ooem/templates/wiml-1.0-ooem-alias-2.0"
From OOModels
< Artefact:Template | org | ooem | templates
Jump to navigationJump to search
AndreasLeue (talk | contribs) |
AndreasLeue (talk | contribs) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 16: | Line 16: | ||
import java.util.Vector; | import java.util.Vector; | ||
▼… | ▼… | ||
⊏ signature(String code, Map<String,String> predefined_arguments, | ⊏ signature(String code, Map<String,String> page_properties, | ||
Map<String,String> predefined_arguments, | |||
Map<String,String> conversion_arguments, | Map<String,String> conversion_arguments, | ||
Map<String,String> request_arguments) ⊐… | Map<String,String> request_arguments) ⊐… | ||
« boolean complete_xml = "true".equals(predefined_arguments.get("CompleteXMLDocument")); | |||
String xmlns = complete_xml ? " xmlns=\"http://xmlns.sphenon.com/org/ooem\"" : ""; | |||
String indent = complete_xml ? "" : " "; | |||
»… | |||
«if(complete_xml) {»… | |||
⋮<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |||
«}»… | |||
«¶(indent)»… | |||
<Alias> | |||
⋮« for (String key : page_properties.keySet()) { »… | |||
⋮« if (key.matches(".*Type")) { »… | |||
<ExternalImport>◂page_properties.get(key)▸</ExternalImport> | |||
⋮« } »… | |||
⋮« } »… | |||
<Name>◂conversion_arguments.get("page").replaceFirst("Artefact:Model/","").replace("/",".")▸</Name> | |||
⋮« for (String key : page_properties.keySet()) { »… | |||
⋮« if (key.matches(".*Type")) { »… | |||
<AliasMapping Language="◂key.substring(0, key.length()-4)▸" Type="◂page_properties.get(key)▸"/> | |||
⋮« } »… | |||
⋮« } »… | |||
</Alias> | |||
</OOMCode> | </OOMCode> |
Latest revision as of 11:15, 27 November 2012
Classification | |
---|---|
Type | Type:org/oogenerator/Template/2.0 |
Domain | Domain:it/development/formatting |
Category | Type:org/oomodels/wiki/Template |
Maturity | final |
More | |
Download Code | |
Namespace (more) | |
OOEM main package | |
create new pages |
Code[edit]
G-2.0-java_jppi-1.0 -*- coding: utf-8; -*- ▼… import org.oomodels.wiml.*; import java.util.Map; import java.util.Vector; ▼… ⊏ signature(String code, Map<String,String> page_properties, Map<String,String> predefined_arguments, Map<String,String> conversion_arguments, Map<String,String> request_arguments) ⊐… « boolean complete_xml = "true".equals(predefined_arguments.get("CompleteXMLDocument")); String xmlns = complete_xml ? " xmlns=\"http://xmlns.sphenon.com/org/ooem\"" : ""; String indent = complete_xml ? "" : " "; »… «if(complete_xml) {»… ⋮<?xml version="1.0" encoding="UTF-8" standalone="yes"?> «}»… «¶(indent)»… <Alias> ⋮« for (String key : page_properties.keySet()) { »… ⋮« if (key.matches(".*Type")) { »… <ExternalImport>◂page_properties.get(key)▸</ExternalImport> ⋮« } »… ⋮« } »… <Name>◂conversion_arguments.get("page").replaceFirst("Artefact:Model/","").replace("/",".")▸</Name> ⋮« for (String key : page_properties.keySet()) { »… ⋮« if (key.matches(".*Type")) { »… <AliasMapping Language="◂key.substring(0, key.length()-4)▸" Type="◂page_properties.get(key)▸"/> ⋮« } »… ⋮« } »… </Alias>