From 9fa5abf0ac65eb19fdd32aa367a312f4d2ecaba9 Mon Sep 17 00:00:00 2001 From: stefanp Date: Mon, 2 Dec 2002 12:17:45 +0000 Subject: [PATCH] added method to filter type.properties for mappings to other prototypes --- src/helma/doc/DocProperties.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/helma/doc/DocProperties.java b/src/helma/doc/DocProperties.java index e0def9a8..5eb640ab 100644 --- a/src/helma/doc/DocProperties.java +++ b/src/helma/doc/DocProperties.java @@ -45,5 +45,19 @@ public class DocProperties extends DocFileElement { return props; } + public Properties getMappings () { + Properties childProps = new Properties (); + for (Enumeration e = props.keys (); e.hasMoreElements (); ) { + String key = (String) e.nextElement (); + String value = props.getProperty (key); + if (value.startsWith ("collection") || value.startsWith ("object") || value.startsWith ("mountpoint")) { + String prototype = value.substring (value.indexOf("(")+1, value.indexOf(")")).trim (); + childProps.setProperty (key, prototype); + } + + } + return childProps; + } + }