Difference between revisions of "Artefact:Template/org/ooem/templates/bundleentries-1.0-xmi-2.0"
From OOModels
< Artefact:Template | org | ooem | templates
Jump to navigationJump to search
AndreasLeue (talk | contribs) (Created page with " {{Metabox | Meta_Type = Type:org/oogenerator/Template/2.0 | Meta_Domain = Domain:it/development/formatting | Meta_Category = Type:org/oomodels/wiki/Template | Meta_Downloa...") |
AndreasLeue (talk | contribs) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Metabox | {{Metabox | ||
| Meta_Type = Type:org/oogenerator/Template/2.0 | | Meta_Type = Type:org/oogenerator/Template/2.0 | ||
Line 22: | Line 21: | ||
Map<String,String> request_arguments) ⊐… | Map<String,String> request_arguments) ⊐… | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
< | <ecore:EPackage xmi:version="2.0" | ||
xmlns:xmi="http://www.omg.org/XMI" | |||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" | |||
name="root"> | |||
<!-- nsURI="..." --> | |||
<!-- nsPrefix="..." --> | |||
« | « | ||
try { | try { | ||
Line 35: | Line 38: | ||
String data; | String data; | ||
if (pagename.matches("Artefact:Model/.*")) { | if (pagename.matches("Artefact:Model/.*")) { | ||
OOMResource oomr = oomp.getResource("raw--wiml-1.0- | OOMResource oomr = oomp.getResource("raw--wiml-1.0-xmi-fragment-2.0"); | ||
data = oomr.getData(); | data = oomr.getData(); | ||
} else if (pagename.matches("Artefact:Aggregate/.*")) { | } else if (pagename.matches("Artefact:Aggregate/.*")) { | ||
OOMResource oomr = oomp.getResource("raw--wiml-1.0-ooem-aggregate-2.0-fragment"); | OOMResource oomr = oomp.getResource("raw--wiml-1.0-ooem-aggregate-2.0-fragment"); | ||
data = oomr.getData(); | data = "<!-- " + oomr.getData() + " -->"; | ||
} else { | } else { | ||
data = "<!-- " + pagename + " -->"; | data = "<!-- " + pagename + " -->"; | ||
Line 46: | Line 49: | ||
◂data▸ | ◂data▸ | ||
⋮«}/∀»… | ⋮«}/∀»… | ||
</ | </ecore:EPackage> | ||
« | « | ||
} catch (Throwable t) { | } catch (Throwable t) { |
Latest revision as of 22:04, 17 May 2013
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_jpp-1.0 -*- coding: utf-8; -*- ▼… import org.oomodels.*; import java.util.Vector; import java.util.Map; ▼… ⊏ signature(String xml_code, Map<String,String> page_properties, Map<String,String> predefined_arguments, Map<String,String> conversion_arguments, Map<String,String> request_arguments) ⊐… <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="root"> <!-- nsURI="..." --> <!-- nsPrefix="..." --> « try { Vector<String[]> entries = XMLBundleEntriesReader.getEntries(xml_code.toString()); »… ⋮«∀(entries){»… ⋮« String pagename = ((String[])(⊙))[0]; OOMPage oomp = new OOMPage(pagename, null); String data; if (pagename.matches("Artefact:Model/.*")) { OOMResource oomr = oomp.getResource("raw--wiml-1.0-xmi-fragment-2.0"); data = oomr.getData(); } else if (pagename.matches("Artefact:Aggregate/.*")) { OOMResource oomr = oomp.getResource("raw--wiml-1.0-ooem-aggregate-2.0-fragment"); data = "<!-- " + oomr.getData() + " -->"; } else { data = "<!-- " + pagename + " -->"; } »… ◂data▸ ⋮«}/∀»… </ecore:EPackage> « } catch (Throwable t) { org.oomodels.OOMStatusCode osc = new org.oomodels.OOMStatusCode(204); //osc.setCause(t); throw osc; } »…