blob: b9052b8bba8c053944ec54589bd6669895580b01 [file] [log] [blame]
/**
* Copyright (c) 2009-2010 Thales Corporate Services S.A.S.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Thales Corporate Services S.A.S - initial API and implementation
*
* $Id$
*/
package org.eclipse.egf.portfolio.eclipse.build.buildscm;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>SVN Protocol</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.egf.portfolio.eclipse.build.buildscm.BuildscmPackage#getSVNProtocol()
* @model
* @generated
*/
public enum SVNProtocol implements Enumerator {
/**
* The '<em><b>HTTP</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #HTTP_VALUE
* @generated
* @ordered
*/
HTTP(0, "HTTP", "http://"),
/**
* The '<em><b>HTTPS</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #HTTPS_VALUE
* @generated
* @ordered
*/
HTTPS(1, "HTTPS", "https://"),
/**
* The '<em><b>SVN</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #SVN_VALUE
* @generated
* @ordered
*/
SVN(2, "SVN", "svn://"),
/**
* The '<em><b>SVNSSH</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #SVNSSH_VALUE
* @generated
* @ordered
*/
SVNSSH(3, "SVNSSH", "svn+ssh://");
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final String copyright = " Copyright (c) 2009-2010 Thales Corporate Services S.A.S.\r\n All rights reserved. This program and the accompanying materials\r\n are made available under the terms of the Eclipse Public License v1.0\r\n which accompanies this distribution, and is available at\r\n http://www.eclipse.org/legal/epl-v10.html\r\n \r\n Contributors:\r\n Thales Corporate Services S.A.S - initial API and implementation";
/**
* The '<em><b>HTTP</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>HTTP</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #HTTP
* @model literal="http://"
* @generated
* @ordered
*/
public static final int HTTP_VALUE = 0;
/**
* The '<em><b>HTTPS</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>HTTPS</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #HTTPS
* @model literal="https://"
* @generated
* @ordered
*/
public static final int HTTPS_VALUE = 1;
/**
* The '<em><b>SVN</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>SVN</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #SVN
* @model literal="svn://"
* @generated
* @ordered
*/
public static final int SVN_VALUE = 2;
/**
* The '<em><b>SVNSSH</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>SVNSSH</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #SVNSSH
* @model literal="svn+ssh://"
* @generated
* @ordered
*/
public static final int SVNSSH_VALUE = 3;
/**
* An array of all the '<em><b>SVN Protocol</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final SVNProtocol[] VALUES_ARRAY =
new SVNProtocol[] {
HTTP,
HTTPS,
SVN,
SVNSSH,
};
/**
* A public read-only list of all the '<em><b>SVN Protocol</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<SVNProtocol> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>SVN Protocol</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static SVNProtocol get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
SVNProtocol result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>SVN Protocol</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static SVNProtocol getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
SVNProtocol result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>SVN Protocol</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static SVNProtocol get(int value) {
switch (value) {
case HTTP_VALUE: return HTTP;
case HTTPS_VALUE: return HTTPS;
case SVN_VALUE: return SVN;
case SVNSSH_VALUE: return SVNSSH;
}
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final int value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String name;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private SVNProtocol(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return literal;
}
} //SVNProtocol