donaldp 2002/06/08 00:32:03
Added: container/src/java/org/apache/myrmidon/interfaces/workspace
ProjectDescriptor.java
Log:
Add in a descriptor that contains all the information required to build a
project.
Revision Changes Path
1.1
jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/workspace/ProjectDescriptor.java
Index: ProjectDescriptor.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.myrmidon.interfaces.workspace;
/**
* A Descriptor describing a Projects location and type.
* (ie it contains all information required to build project).
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
* @version $Revision: 1.1 $ $Date: 2002/06/08 07:32:03 $
*/
public class ProjectDescriptor
{
private final String m_uri;
private final String m_type;
/**
* Create a ProjectDescriptor.
*
* @param uri the URI of project file.
* @param type the type of project.
*/
public ProjectDescriptor( final String uri,
final String type )
{
m_uri = uri;
m_type = type;
}
/**
* Return the type of the project.
* This is used to decide what ProjectBuilder
* will be used to load project.
*
* @return the type of the project.
*/
public String getType()
{
return m_type;
}
/**
* Return the URI of project file.
*
* @return the URI of project file.
*/
public String getUri()
{
return m_uri;
}
/**
* Return human readable string for Project reference.
*
* @return human readable string.
*/
public String toString()
{
final StringBuffer sb = new StringBuffer();
sb.append( "Project" );
if( null != m_type )
{
sb.append( '(' );
sb.append( m_type );
sb.append( ')' );
}
sb.append( m_uri );
return sb.toString();
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>