org.bimserver.models.log.AccessMethod Maven / Gradle / Ivy
Show all versions of pluginbase Show documentation
/**
* Copyright (C) 2009-2014 BIMserver.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
package org.bimserver.models.log;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
*
* A representation of the literals of the enumeration 'Access Method',
* and utility methods for working with them.
*
* @see org.bimserver.models.log.LogPackage#getAccessMethod()
* @model
* @generated
*/
public enum AccessMethod implements Enumerator {
/**
* The 'SOAP' literal object.
*
*
* @see #SOAP_VALUE
* @generated
* @ordered
*/
SOAP(0, "SOAP", "SOAP"),
/**
* The 'WEB INTERFACE' literal object.
*
*
* @see #WEB_INTERFACE_VALUE
* @generated
* @ordered
*/
WEB_INTERFACE(1, "WEB_INTERFACE", "WEB_INTERFACE"),
/**
* The 'INTERNAL' literal object.
*
*
* @see #INTERNAL_VALUE
* @generated
* @ordered
*/
INTERNAL(2, "INTERNAL", "INTERNAL"),
/**
* The 'REST' literal object.
*
*
* @see #REST_VALUE
* @generated
* @ordered
*/
REST(3, "REST", "REST"),
/**
* The 'SYNDICATION' literal object.
*
*
* @see #SYNDICATION_VALUE
* @generated
* @ordered
*/
SYNDICATION(4, "SYNDICATION", "SYNDICATION"),
/**
* The 'JSON' literal object.
*
*
* @see #JSON_VALUE
* @generated
* @ordered
*/
JSON(5, "JSON", "JSON"),
/**
* The 'PROTOCOL BUFFERS' literal object.
*
*
* @see #PROTOCOL_BUFFERS_VALUE
* @generated
* @ordered
*/
PROTOCOL_BUFFERS(6, "PROTOCOL_BUFFERS", "PROTOCOL_BUFFERS");
/**
* The 'SOAP' literal value.
*
*
* If the meaning of 'SOAP' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #SOAP
* @model
* @generated
* @ordered
*/
public static final int SOAP_VALUE = 0;
/**
* The 'WEB INTERFACE' literal value.
*
*
* If the meaning of 'WEB INTERFACE' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #WEB_INTERFACE
* @model
* @generated
* @ordered
*/
public static final int WEB_INTERFACE_VALUE = 1;
/**
* The 'INTERNAL' literal value.
*
*
* If the meaning of 'INTERNAL' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #INTERNAL
* @model
* @generated
* @ordered
*/
public static final int INTERNAL_VALUE = 2;
/**
* The 'REST' literal value.
*
*
* If the meaning of 'REST' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #REST
* @model
* @generated
* @ordered
*/
public static final int REST_VALUE = 3;
/**
* The 'SYNDICATION' literal value.
*
*
* If the meaning of 'SYNDICATION' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #SYNDICATION
* @model
* @generated
* @ordered
*/
public static final int SYNDICATION_VALUE = 4;
/**
* The 'JSON' literal value.
*
*
* If the meaning of 'JSON' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #JSON
* @model
* @generated
* @ordered
*/
public static final int JSON_VALUE = 5;
/**
* The 'PROTOCOL BUFFERS' literal value.
*
*
* If the meaning of 'PROTOCOL BUFFERS' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #PROTOCOL_BUFFERS
* @model
* @generated
* @ordered
*/
public static final int PROTOCOL_BUFFERS_VALUE = 6;
/**
* An array of all the 'Access Method' enumerators.
*
*
* @generated
*/
private static final AccessMethod[] VALUES_ARRAY = new AccessMethod[] { SOAP, WEB_INTERFACE, INTERNAL, REST,
SYNDICATION, JSON, PROTOCOL_BUFFERS, };
/**
* A public read-only list of all the 'Access Method' enumerators.
*
*
* @generated
*/
public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the 'Access Method' literal with the specified literal value.
*
*
* @param literal the literal.
* @return the matching enumerator or null
.
* @generated
*/
public static AccessMethod get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
AccessMethod result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the 'Access Method' literal with the specified name.
*
*
* @param name the name.
* @return the matching enumerator or null
.
* @generated
*/
public static AccessMethod getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
AccessMethod result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the 'Access Method' literal with the specified integer value.
*
*
* @param value the integer value.
* @return the matching enumerator or null
.
* @generated
*/
public static AccessMethod get(int value) {
switch (value) {
case SOAP_VALUE:
return SOAP;
case WEB_INTERFACE_VALUE:
return WEB_INTERFACE;
case INTERNAL_VALUE:
return INTERNAL;
case REST_VALUE:
return REST;
case SYNDICATION_VALUE:
return SYNDICATION;
case JSON_VALUE:
return JSON;
case PROTOCOL_BUFFERS_VALUE:
return PROTOCOL_BUFFERS;
}
return null;
}
/**
*
*
* @generated
*/
private final int value;
/**
*
*
* @generated
*/
private final String name;
/**
*
*
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
*
*
* @generated
*/
private AccessMethod(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
*
*
* @generated
*/
public int getValue() {
return value;
}
/**
*
*
* @generated
*/
public String getName() {
return name;
}
/**
*
*
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
*
*
* @generated
*/
@Override
public String toString() {
return literal;
}
} //AccessMethod