krysalis-viprom/src/java/ant/org/krysalis/viprom/ant ViPrOMPropertyHelper.java,1.3,1.4 ViPrOMTask.java,1.2,1.3

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/krysalis-viprom/src/java/ant/org/krysalis/viprom/ant
In directory sc8-pr-cvs1:/tmp/cvs-serv26154/src/java/ant/org/krysalis/viprom/ant

Modified Files:
	ViPrOMPropertyHelper.java ViPrOMTask.java 
Log Message:
1) Load XSLT from resource (using ClassLoaderContext)
2) Added XSLT for gump (later for gump to viprom cooking)
3) 'Cook' raw metadata via XSLT (into ViPrOM form)
4) Query into cooked prior to raw
5) Allow metedata 'type' to define queries for raw
6) Standard queries into cooked.

Index: ViPrOMPropertyHelper.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-viprom/src/java/ant/org/krysalis/viprom/ant/ViPrOMPropertyHelper.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ViPrOMPropertyHelper.java	28 Oct 2003 13:53:03 -0000	1.3
--- ViPrOMPropertyHelper.java	28 Oct 2003 20:16:02 -0000	1.4
***************
*** 57,61 ****
  
  import java.util.Iterator;
- import java.util.Map;
  
  import org.apache.commons.jxpath.Variables;
--- 57,60 ----
***************
*** 64,67 ****
--- 63,67 ----
  import org.krysalis.version.log.Logger;
  import org.krysalis.viprom.VirtualProjectModel;
+ import org.krysalis.viprom.metadata.MetadataModel;
  import org.w3c.dom.Document;
  
***************
*** 78,89 ****
  		Project project,
  		Document docRoot,
! 		Map aliases,
! 		boolean usePrefix) {
  		//
  		// Create the property helper, around document root
  		//
  		PropertyHelper helper =
! 			new ViPrOMPropertyHelper(project, docRoot, aliases, usePrefix);
! 			
  		//
  		// Link PropertyHelper into chain
--- 78,89 ----
  		Project project,
  		Document docRoot,
! 		MetadataModel model,
! 		boolean usePrefix) throws Exception {
  		//
  		// Create the property helper, around document root
  		//
  		PropertyHelper helper =
! 			new ViPrOMPropertyHelper(project, docRoot, model, usePrefix);
! 
  		//
  		// Link PropertyHelper into chain
***************
*** 98,103 ****
  		Project project,
  		Document docRoot,
! 		Map aliases,
! 		boolean usePrefix) {
  		m_project = project;
  
--- 98,103 ----
  		Project project,
  		Document docRoot,
! 		MetadataModel model,
! 		boolean usePrefix) throws Exception {
  		m_project = project;
  
***************
*** 107,111 ****
  			new VirtualProjectModel(
  				docRoot,
! 				aliases,
  				new ViPrOMPropertyHelperAntVariables());
  	}
--- 107,111 ----
  			new VirtualProjectModel(
  				docRoot,
! 				model,
  				new ViPrOMPropertyHelperAntVariables());
  	}
***************
*** 142,148 ****
  
  		Logger.getLogger().verbose(
! 			"ViPrOM: Trying to resolve and deliver property '"
! 				+ name
! 				+ "'");
  
  		String result = null;
--- 142,146 ----
  
  		Logger.getLogger().verbose(
! 			"ViPrOM: Trying to resolve and deliver property '" + name + "'");
  
  		String result = null;

Index: ViPrOMTask.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-viprom/src/java/ant/org/krysalis/viprom/ant/ViPrOMTask.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ViPrOMTask.java	27 Oct 2003 22:39:48 -0000	1.2
--- ViPrOMTask.java	28 Oct 2003 20:16:02 -0000	1.3
***************
*** 7,11 ****
  import java.io.FileInputStream;
  import java.util.Iterator;
- import java.util.Map;
  
  import org.apache.tools.ant.BuildException;
--- 7,10 ----
***************
*** 15,20 ****
  import org.krysalis.version.log.Logger;
  import org.krysalis.version.util.dom.DOMUtils;
! import org.krysalis.viprom.Aliases;
! import org.krysalis.viprom.Properties;
  import org.w3c.dom.Document;
  
--- 14,20 ----
  import org.krysalis.version.log.Logger;
  import org.krysalis.version.util.dom.DOMUtils;
! import org.krysalis.viprom.NamedProperties;
! import org.krysalis.viprom.metadata.MetadataModel;
! import org.krysalis.viprom.metadata.MetadataModelFactory;
  import org.w3c.dom.Document;
  
***************
*** 25,29 ****
  
  	private File m_metadata = null;
! 	private String m_type = Aliases.GUMP;
  	private boolean m_usePrefix = false;
  	private boolean m_log = false;
--- 25,29 ----
  
  	private File m_metadata = null;
! 	private String m_type = MetadataModelFactory.GUMP;
  	private boolean m_usePrefix = false;
  	private boolean m_log = false;
***************
*** 40,44 ****
  
  		try {
! 			Logger.getLogger().info("Load [" + m_type + "] metadata from [" + m_metadata.getAbsolutePath() + "]");
  			//
  			// Read the XML into memory
--- 40,49 ----
  
  		try {
! 			Logger.getLogger().info(
! 				"Load ["
! 					+ m_type
! 					+ "] metadata from ["
! 					+ m_metadata.getAbsolutePath()
! 					+ "]");
  			//
  			// Read the XML into memory
***************
*** 50,54 ****
  			// Get type map
  			//
! 			Map aliases = Aliases.getAliasesFor(m_type);
  
  			// Register the property helper...
--- 55,59 ----
  			// Get type map
  			//
! 			MetadataModel model = MetadataModelFactory.getModelFor(m_type);
  
  			// Register the property helper...
***************
*** 56,64 ****
  				getProject(),
  				document,
! 				aliases,
  				m_usePrefix);
  
  			if (m_log) {
! 				for (Iterator i = Properties.getPropertyNames().iterator();
  					i.hasNext();
  					) {
--- 61,69 ----
  				getProject(),
  				document,
! 				model,
  				m_usePrefix);
  
  			if (m_log) {
! 				for (Iterator i = NamedProperties.getPropertyNames().iterator();
  					i.hasNext();
  					) {
***************
*** 68,85 ****
  
  					log(
! 						property + " -> " + ((null == value)
! 							? ("${" + property + "}")
! 							: value),
  						Project.MSG_INFO);
  				}
  			}
! 		}
! 		catch (Exception e) {
  			if (e instanceof BuildException)
  				throw (BuildException) e;
  			else
  				throw new BuildException(e);
! 		}
! 		finally {
  			Logger.popContext(logger);
  		}
--- 73,88 ----
  
  					log(
! 						property
! 							+ " -> "
! 							+ ((null == value) ? ("${" + property + "}") : value),
  						Project.MSG_INFO);
  				}
  			}
! 		} catch (Exception e) {
  			if (e instanceof BuildException)
  				throw (BuildException) e;
  			else
  				throw new BuildException(e);
! 		} finally {
  			Logger.popContext(logger);
  		}




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.