repo_name stringlengths 5 108 | path stringlengths 6 333 | size stringlengths 1 6 | content stringlengths 4 977k | license stringclasses 15
values |
|---|---|---|---|---|
Weisses/Ebonheart-Mods | ViesCraft/Archived/1.11.2 - 2230/src/main/java/com/viesis/viescraft/common/items/modules/ItemSpeedModuleMinor.java | 1135 | package com.viesis.viescraft.common.items.modules;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import com.viesis.viescraft.ViesCraft;
import com.viesis.viescraft.common.items.ItemHelper;
public class ItemSpeedModuleMinor extends Item {
public ItemSpeedModuleMinor()
{
ItemHelper.setItemName(this, "module_speed_increase_minor");
this.setMaxStackSize(1);
this.setCreativeTab(ViesCraft.tabViesCraftItems);
}
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer playerIn, List toolTip, boolean advanced)
{
toolTip.add(TextFormatting.GOLD + "Effects while socketed:");
toolTip.add(" ");
toolTip.add(TextFormatting.GREEN + "Pro - Speed Modifier: +0.8");
toolTip.add(TextFormatting.RED + "Con - None.");
}
public EnumRarity getRarity(ItemStack stack)
{
return EnumRarity.RARE;
}
}
| mit |
alfredkzhong/ASProjectStructure | module2/src/androidTest/java/com/az/module2/ApplicationTest.java | 345 | package com.az.module2;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
} | mit |
wesleyegberto/javaee_projects | jaxrs-specification/src/main/java/com/github/wesleyegberto/jaxrsspecificationtest/aop/HeaderValidatorFilter.java | 1522 | package com.github.wesleyegberto.jaxrsspecificationtest.aop;
import java.io.IOException;
import javax.annotation.Priority;
import javax.ws.rs.Priorities;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerRequestFilter;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.ext.Provider;
import com.github.wesleyegberto.jaxrsspecificationtest.config.Audited;
/**
* Example of filter request which is executed BEFORE the endpoint when has @PreMatching annotation.
*
* Named binding: With a qualifier it becomes named binding (like interceptors).
*
* @author Wesley Egberto
*/
@Provider
//@PreMatching If we use PreMatching the NamedBinding will not be considered
// So instead we use @Priority
@Priority(Priorities.AUTHORIZATION)
@Audited
public class HeaderValidatorFilter implements ContainerRequestFilter {
@Override
public void filter(ContainerRequestContext reqCtx) throws IOException {
System.out.println("[HeaderValidatorFilter] Validating user: " + reqCtx.getHeaderString("Authorization"));
// check whether the Authorization header was sent
if(reqCtx.getHeaderString("Authorization") == null) {
// abort the chaining request
reqCtx.abortWith(Response.status(Status.FORBIDDEN).build());
} else if(!reqCtx.getHeaderString("Authorization").contains("Odair")) { // validate the authorization
reqCtx.abortWith(Response.status(Status.FORBIDDEN).entity("Invalid user").build());
}
}
}
| mit |
StoyanVitanov/SoftwareUniversity | Java Fundamentals/Java Advanced/StacksAndQueues/Exercise/TruckTour.java | 2733 | import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Scanner;
public class TruckTour {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = Integer.parseInt(scanner.nextLine());
Deque<Station> stations = new ArrayDeque<>();
int totalDistance = 0;
for (int i = 0; i < n; i++) {
String[] items = scanner.nextLine().split(" ");
Station station = new Station();
station.Index = i;
station.Liters = Integer.parseInt(items[0]);
station.Distance = Integer.parseInt(items[1]);
stations.add(station);
totalDistance += station.Distance;
}
for (int i = 0; i < stations.size(); i++) {
Station station = stations.peek();
boolean capable = true;
if (station.getLiters() >= station.getDistance()) {
station.FuelLeft = station.getLiters() - station.getDistance();
stations.pop();
for (Station other : stations) {
station.FuelLeft += other.getLiters() - other.getDistance();
if (station.FuelLeft < 0) {
capable = false;
break;
}
}
if (capable) {
System.out.println(station.getIndex());
return;
}
stations.addLast(station);
} else {
stations.pop();
station.isCapable = false;
stations.addLast(station);
}
}
}
public static class Station {
public Integer Index;
public Integer Liters;
public Integer Distance;
public boolean isCapable;
public Integer FuelLeft;
public Integer getFuelLeft() {
return FuelLeft;
}
public void setFuelLeft(Integer fuelLeft) {
FuelLeft = fuelLeft;
}
public boolean isCapable() {
return isCapable;
}
public void setCapable(boolean capable) {
isCapable = capable;
}
public Integer getIndex() {
return Index;
}
public void setIndex(Integer index) {
Index = index;
}
public Integer getLiters() {
return Liters;
}
public void setLiters(Integer liters) {
Liters = liters;
}
public Integer getDistance() {
return Distance;
}
public void setDistance(Integer distance) {
Distance = distance;
}
}
}
| mit |
Azure/azure-sdk-for-java | sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/models/SiteAuthSettingsProperties.java | 49928 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.appservice.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.appservice.models.BuiltInAuthenticationProvider;
import com.azure.resourcemanager.appservice.models.UnauthenticatedClientAction;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** SiteAuthSettings resource specific properties. */
@Fluent
public final class SiteAuthSettingsProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(SiteAuthSettingsProperties.class);
/*
* <code>true</code> if the Authentication / Authorization feature is
* enabled for the current app; otherwise, <code>false</code>.
*/
@JsonProperty(value = "enabled")
private Boolean enabled;
/*
* The RuntimeVersion of the Authentication / Authorization feature in use
* for the current app.
* The setting in this value can control the behavior of certain features
* in the Authentication / Authorization module.
*/
@JsonProperty(value = "runtimeVersion")
private String runtimeVersion;
/*
* The action to take when an unauthenticated client attempts to access the
* app.
*/
@JsonProperty(value = "unauthenticatedClientAction")
private UnauthenticatedClientAction unauthenticatedClientAction;
/*
* <code>true</code> to durably store platform-specific security tokens
* that are obtained during login flows; otherwise, <code>false</code>.
* The default is <code>false</code>.
*/
@JsonProperty(value = "tokenStoreEnabled")
private Boolean tokenStoreEnabled;
/*
* External URLs that can be redirected to as part of logging in or logging
* out of the app. Note that the query string part of the URL is ignored.
* This is an advanced setting typically only needed by Windows Store
* application backends.
* Note that URLs within the current domain are always implicitly allowed.
*/
@JsonProperty(value = "allowedExternalRedirectUrls")
private List<String> allowedExternalRedirectUrls;
/*
* The default authentication provider to use when multiple providers are
* configured.
* This setting is only needed if multiple providers are configured and the
* unauthenticated client
* action is set to "RedirectToLoginPage".
*/
@JsonProperty(value = "defaultProvider")
private BuiltInAuthenticationProvider defaultProvider;
/*
* The number of hours after session token expiration that a session token
* can be used to
* call the token refresh API. The default is 72 hours.
*/
@JsonProperty(value = "tokenRefreshExtensionHours")
private Double tokenRefreshExtensionHours;
/*
* The Client ID of this relying party application, known as the client_id.
* This setting is required for enabling OpenID Connection authentication
* with Azure Active Directory or
* other 3rd party OpenID Connect providers.
* More information on OpenID Connect:
* http://openid.net/specs/openid-connect-core-1_0.html
*/
@JsonProperty(value = "clientId")
private String clientId;
/*
* The Client Secret of this relying party application (in Azure Active
* Directory, this is also referred to as the Key).
* This setting is optional. If no client secret is configured, the OpenID
* Connect implicit auth flow is used to authenticate end users.
* Otherwise, the OpenID Connect Authorization Code Flow is used to
* authenticate end users.
* More information on OpenID Connect:
* http://openid.net/specs/openid-connect-core-1_0.html
*/
@JsonProperty(value = "clientSecret")
private String clientSecret;
/*
* The app setting name that contains the client secret of the relying
* party application.
*/
@JsonProperty(value = "clientSecretSettingName")
private String clientSecretSettingName;
/*
* An alternative to the client secret, that is the thumbprint of a
* certificate used for signing purposes. This property acts as
* a replacement for the Client Secret. It is also optional.
*/
@JsonProperty(value = "clientSecretCertificateThumbprint")
private String clientSecretCertificateThumbprint;
/*
* The OpenID Connect Issuer URI that represents the entity which issues
* access tokens for this application.
* When using Azure Active Directory, this value is the URI of the
* directory tenant, e.g. https://sts.windows.net/{tenant-guid}/.
* This URI is a case-sensitive identifier for the token issuer.
* More information on OpenID Connect Discovery:
* http://openid.net/specs/openid-connect-discovery-1_0.html
*/
@JsonProperty(value = "issuer")
private String issuer;
/*
* Gets a value indicating whether the issuer should be a valid HTTPS url
* and be validated as such.
*/
@JsonProperty(value = "validateIssuer")
private Boolean validateIssuer;
/*
* Allowed audience values to consider when validating JWTs issued by
* Azure Active Directory. Note that the <code>ClientID</code> value is
* always considered an
* allowed audience, regardless of this setting.
*/
@JsonProperty(value = "allowedAudiences")
private List<String> allowedAudiences;
/*
* Login parameters to send to the OpenID Connect authorization endpoint
* when
* a user logs in. Each parameter must be in the form "key=value".
*/
@JsonProperty(value = "additionalLoginParams")
private List<String> additionalLoginParams;
/*
* Gets a JSON string containing the Azure AD Acl settings.
*/
@JsonProperty(value = "aadClaimsAuthorization")
private String aadClaimsAuthorization;
/*
* The OpenID Connect Client ID for the Google web application.
* This setting is required for enabling Google Sign-In.
* Google Sign-In documentation:
* https://developers.google.com/identity/sign-in/web/
*/
@JsonProperty(value = "googleClientId")
private String googleClientId;
/*
* The client secret associated with the Google web application.
* This setting is required for enabling Google Sign-In.
* Google Sign-In documentation:
* https://developers.google.com/identity/sign-in/web/
*/
@JsonProperty(value = "googleClientSecret")
private String googleClientSecret;
/*
* The app setting name that contains the client secret associated with
* the Google web application.
*/
@JsonProperty(value = "googleClientSecretSettingName")
private String googleClientSecretSettingName;
/*
* The OAuth 2.0 scopes that will be requested as part of Google Sign-In
* authentication.
* This setting is optional. If not specified, "openid", "profile", and
* "email" are used as default scopes.
* Google Sign-In documentation:
* https://developers.google.com/identity/sign-in/web/
*/
@JsonProperty(value = "googleOAuthScopes")
private List<String> googleOAuthScopes;
/*
* The App ID of the Facebook app used for login.
* This setting is required for enabling Facebook Login.
* Facebook Login documentation:
* https://developers.facebook.com/docs/facebook-login
*/
@JsonProperty(value = "facebookAppId")
private String facebookAppId;
/*
* The App Secret of the Facebook app used for Facebook Login.
* This setting is required for enabling Facebook Login.
* Facebook Login documentation:
* https://developers.facebook.com/docs/facebook-login
*/
@JsonProperty(value = "facebookAppSecret")
private String facebookAppSecret;
/*
* The app setting name that contains the app secret used for Facebook
* Login.
*/
@JsonProperty(value = "facebookAppSecretSettingName")
private String facebookAppSecretSettingName;
/*
* The OAuth 2.0 scopes that will be requested as part of Facebook Login
* authentication.
* This setting is optional.
* Facebook Login documentation:
* https://developers.facebook.com/docs/facebook-login
*/
@JsonProperty(value = "facebookOAuthScopes")
private List<String> facebookOAuthScopes;
/*
* The Client Id of the GitHub app used for login.
* This setting is required for enabling Github login
*/
@JsonProperty(value = "gitHubClientId")
private String gitHubClientId;
/*
* The Client Secret of the GitHub app used for Github Login.
* This setting is required for enabling Github login.
*/
@JsonProperty(value = "gitHubClientSecret")
private String gitHubClientSecret;
/*
* The app setting name that contains the client secret of the Github
* app used for GitHub Login.
*/
@JsonProperty(value = "gitHubClientSecretSettingName")
private String gitHubClientSecretSettingName;
/*
* The OAuth 2.0 scopes that will be requested as part of GitHub Login
* authentication.
* This setting is optional
*/
@JsonProperty(value = "gitHubOAuthScopes")
private List<String> gitHubOAuthScopes;
/*
* The OAuth 1.0a consumer key of the Twitter application used for sign-in.
* This setting is required for enabling Twitter Sign-In.
* Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in
*/
@JsonProperty(value = "twitterConsumerKey")
private String twitterConsumerKey;
/*
* The OAuth 1.0a consumer secret of the Twitter application used for
* sign-in.
* This setting is required for enabling Twitter Sign-In.
* Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in
*/
@JsonProperty(value = "twitterConsumerSecret")
private String twitterConsumerSecret;
/*
* The app setting name that contains the OAuth 1.0a consumer secret of the
* Twitter
* application used for sign-in.
*/
@JsonProperty(value = "twitterConsumerSecretSettingName")
private String twitterConsumerSecretSettingName;
/*
* The OAuth 2.0 client ID that was created for the app used for
* authentication.
* This setting is required for enabling Microsoft Account authentication.
* Microsoft Account OAuth documentation:
* https://dev.onedrive.com/auth/msa_oauth.htm
*/
@JsonProperty(value = "microsoftAccountClientId")
private String microsoftAccountClientId;
/*
* The OAuth 2.0 client secret that was created for the app used for
* authentication.
* This setting is required for enabling Microsoft Account authentication.
* Microsoft Account OAuth documentation:
* https://dev.onedrive.com/auth/msa_oauth.htm
*/
@JsonProperty(value = "microsoftAccountClientSecret")
private String microsoftAccountClientSecret;
/*
* The app setting name containing the OAuth 2.0 client secret that was
* created for the
* app used for authentication.
*/
@JsonProperty(value = "microsoftAccountClientSecretSettingName")
private String microsoftAccountClientSecretSettingName;
/*
* The OAuth 2.0 scopes that will be requested as part of Microsoft Account
* authentication.
* This setting is optional. If not specified, "wl.basic" is used as the
* default scope.
* Microsoft Account Scopes and permissions documentation:
* https://msdn.microsoft.com/en-us/library/dn631845.aspx
*/
@JsonProperty(value = "microsoftAccountOAuthScopes")
private List<String> microsoftAccountOAuthScopes;
/*
* "true" if the auth config settings should be read from a file,
* "false" otherwise
*/
@JsonProperty(value = "isAuthFromFile")
private String isAuthFromFile;
/*
* The path of the config file containing auth settings.
* If the path is relative, base will the site's root directory.
*/
@JsonProperty(value = "authFilePath")
private String authFilePath;
/*
* The ConfigVersion of the Authentication / Authorization feature in use
* for the current app.
* The setting in this value can control the behavior of the control plane
* for Authentication / Authorization.
*/
@JsonProperty(value = "configVersion")
private String configVersion;
/**
* Get the enabled property: <code>true</code> if the Authentication / Authorization feature is enabled
* for the current app; otherwise, <code>false</code>.
*
* @return the enabled value.
*/
public Boolean enabled() {
return this.enabled;
}
/**
* Set the enabled property: <code>true</code> if the Authentication / Authorization feature is enabled
* for the current app; otherwise, <code>false</code>.
*
* @param enabled the enabled value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withEnabled(Boolean enabled) {
this.enabled = enabled;
return this;
}
/**
* Get the runtimeVersion property: The RuntimeVersion of the Authentication / Authorization feature in use for the
* current app. The setting in this value can control the behavior of certain features in the Authentication /
* Authorization module.
*
* @return the runtimeVersion value.
*/
public String runtimeVersion() {
return this.runtimeVersion;
}
/**
* Set the runtimeVersion property: The RuntimeVersion of the Authentication / Authorization feature in use for the
* current app. The setting in this value can control the behavior of certain features in the Authentication /
* Authorization module.
*
* @param runtimeVersion the runtimeVersion value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withRuntimeVersion(String runtimeVersion) {
this.runtimeVersion = runtimeVersion;
return this;
}
/**
* Get the unauthenticatedClientAction property: The action to take when an unauthenticated client attempts to
* access the app.
*
* @return the unauthenticatedClientAction value.
*/
public UnauthenticatedClientAction unauthenticatedClientAction() {
return this.unauthenticatedClientAction;
}
/**
* Set the unauthenticatedClientAction property: The action to take when an unauthenticated client attempts to
* access the app.
*
* @param unauthenticatedClientAction the unauthenticatedClientAction value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withUnauthenticatedClientAction(
UnauthenticatedClientAction unauthenticatedClientAction) {
this.unauthenticatedClientAction = unauthenticatedClientAction;
return this;
}
/**
* Get the tokenStoreEnabled property: <code>true</code> to durably store platform-specific security
* tokens that are obtained during login flows; otherwise, <code>false</code>. The default is
* <code>false</code>.
*
* @return the tokenStoreEnabled value.
*/
public Boolean tokenStoreEnabled() {
return this.tokenStoreEnabled;
}
/**
* Set the tokenStoreEnabled property: <code>true</code> to durably store platform-specific security
* tokens that are obtained during login flows; otherwise, <code>false</code>. The default is
* <code>false</code>.
*
* @param tokenStoreEnabled the tokenStoreEnabled value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withTokenStoreEnabled(Boolean tokenStoreEnabled) {
this.tokenStoreEnabled = tokenStoreEnabled;
return this;
}
/**
* Get the allowedExternalRedirectUrls property: External URLs that can be redirected to as part of logging in or
* logging out of the app. Note that the query string part of the URL is ignored. This is an advanced setting
* typically only needed by Windows Store application backends. Note that URLs within the current domain are always
* implicitly allowed.
*
* @return the allowedExternalRedirectUrls value.
*/
public List<String> allowedExternalRedirectUrls() {
return this.allowedExternalRedirectUrls;
}
/**
* Set the allowedExternalRedirectUrls property: External URLs that can be redirected to as part of logging in or
* logging out of the app. Note that the query string part of the URL is ignored. This is an advanced setting
* typically only needed by Windows Store application backends. Note that URLs within the current domain are always
* implicitly allowed.
*
* @param allowedExternalRedirectUrls the allowedExternalRedirectUrls value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withAllowedExternalRedirectUrls(List<String> allowedExternalRedirectUrls) {
this.allowedExternalRedirectUrls = allowedExternalRedirectUrls;
return this;
}
/**
* Get the defaultProvider property: The default authentication provider to use when multiple providers are
* configured. This setting is only needed if multiple providers are configured and the unauthenticated client
* action is set to "RedirectToLoginPage".
*
* @return the defaultProvider value.
*/
public BuiltInAuthenticationProvider defaultProvider() {
return this.defaultProvider;
}
/**
* Set the defaultProvider property: The default authentication provider to use when multiple providers are
* configured. This setting is only needed if multiple providers are configured and the unauthenticated client
* action is set to "RedirectToLoginPage".
*
* @param defaultProvider the defaultProvider value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withDefaultProvider(BuiltInAuthenticationProvider defaultProvider) {
this.defaultProvider = defaultProvider;
return this;
}
/**
* Get the tokenRefreshExtensionHours property: The number of hours after session token expiration that a session
* token can be used to call the token refresh API. The default is 72 hours.
*
* @return the tokenRefreshExtensionHours value.
*/
public Double tokenRefreshExtensionHours() {
return this.tokenRefreshExtensionHours;
}
/**
* Set the tokenRefreshExtensionHours property: The number of hours after session token expiration that a session
* token can be used to call the token refresh API. The default is 72 hours.
*
* @param tokenRefreshExtensionHours the tokenRefreshExtensionHours value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withTokenRefreshExtensionHours(Double tokenRefreshExtensionHours) {
this.tokenRefreshExtensionHours = tokenRefreshExtensionHours;
return this;
}
/**
* Get the clientId property: The Client ID of this relying party application, known as the client_id. This setting
* is required for enabling OpenID Connection authentication with Azure Active Directory or other 3rd party OpenID
* Connect providers. More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html.
*
* @return the clientId value.
*/
public String clientId() {
return this.clientId;
}
/**
* Set the clientId property: The Client ID of this relying party application, known as the client_id. This setting
* is required for enabling OpenID Connection authentication with Azure Active Directory or other 3rd party OpenID
* Connect providers. More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html.
*
* @param clientId the clientId value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withClientId(String clientId) {
this.clientId = clientId;
return this;
}
/**
* Get the clientSecret property: The Client Secret of this relying party application (in Azure Active Directory,
* this is also referred to as the Key). This setting is optional. If no client secret is configured, the OpenID
* Connect implicit auth flow is used to authenticate end users. Otherwise, the OpenID Connect Authorization Code
* Flow is used to authenticate end users. More information on OpenID Connect:
* http://openid.net/specs/openid-connect-core-1_0.html.
*
* @return the clientSecret value.
*/
public String clientSecret() {
return this.clientSecret;
}
/**
* Set the clientSecret property: The Client Secret of this relying party application (in Azure Active Directory,
* this is also referred to as the Key). This setting is optional. If no client secret is configured, the OpenID
* Connect implicit auth flow is used to authenticate end users. Otherwise, the OpenID Connect Authorization Code
* Flow is used to authenticate end users. More information on OpenID Connect:
* http://openid.net/specs/openid-connect-core-1_0.html.
*
* @param clientSecret the clientSecret value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withClientSecret(String clientSecret) {
this.clientSecret = clientSecret;
return this;
}
/**
* Get the clientSecretSettingName property: The app setting name that contains the client secret of the relying
* party application.
*
* @return the clientSecretSettingName value.
*/
public String clientSecretSettingName() {
return this.clientSecretSettingName;
}
/**
* Set the clientSecretSettingName property: The app setting name that contains the client secret of the relying
* party application.
*
* @param clientSecretSettingName the clientSecretSettingName value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withClientSecretSettingName(String clientSecretSettingName) {
this.clientSecretSettingName = clientSecretSettingName;
return this;
}
/**
* Get the clientSecretCertificateThumbprint property: An alternative to the client secret, that is the thumbprint
* of a certificate used for signing purposes. This property acts as a replacement for the Client Secret. It is also
* optional.
*
* @return the clientSecretCertificateThumbprint value.
*/
public String clientSecretCertificateThumbprint() {
return this.clientSecretCertificateThumbprint;
}
/**
* Set the clientSecretCertificateThumbprint property: An alternative to the client secret, that is the thumbprint
* of a certificate used for signing purposes. This property acts as a replacement for the Client Secret. It is also
* optional.
*
* @param clientSecretCertificateThumbprint the clientSecretCertificateThumbprint value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withClientSecretCertificateThumbprint(String clientSecretCertificateThumbprint) {
this.clientSecretCertificateThumbprint = clientSecretCertificateThumbprint;
return this;
}
/**
* Get the issuer property: The OpenID Connect Issuer URI that represents the entity which issues access tokens for
* this application. When using Azure Active Directory, this value is the URI of the directory tenant, e.g.
* https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. More
* information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html.
*
* @return the issuer value.
*/
public String issuer() {
return this.issuer;
}
/**
* Set the issuer property: The OpenID Connect Issuer URI that represents the entity which issues access tokens for
* this application. When using Azure Active Directory, this value is the URI of the directory tenant, e.g.
* https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. More
* information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html.
*
* @param issuer the issuer value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withIssuer(String issuer) {
this.issuer = issuer;
return this;
}
/**
* Get the validateIssuer property: Gets a value indicating whether the issuer should be a valid HTTPS url and be
* validated as such.
*
* @return the validateIssuer value.
*/
public Boolean validateIssuer() {
return this.validateIssuer;
}
/**
* Set the validateIssuer property: Gets a value indicating whether the issuer should be a valid HTTPS url and be
* validated as such.
*
* @param validateIssuer the validateIssuer value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withValidateIssuer(Boolean validateIssuer) {
this.validateIssuer = validateIssuer;
return this;
}
/**
* Get the allowedAudiences property: Allowed audience values to consider when validating JWTs issued by Azure
* Active Directory. Note that the <code>ClientID</code> value is always considered an allowed audience,
* regardless of this setting.
*
* @return the allowedAudiences value.
*/
public List<String> allowedAudiences() {
return this.allowedAudiences;
}
/**
* Set the allowedAudiences property: Allowed audience values to consider when validating JWTs issued by Azure
* Active Directory. Note that the <code>ClientID</code> value is always considered an allowed audience,
* regardless of this setting.
*
* @param allowedAudiences the allowedAudiences value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withAllowedAudiences(List<String> allowedAudiences) {
this.allowedAudiences = allowedAudiences;
return this;
}
/**
* Get the additionalLoginParams property: Login parameters to send to the OpenID Connect authorization endpoint
* when a user logs in. Each parameter must be in the form "key=value".
*
* @return the additionalLoginParams value.
*/
public List<String> additionalLoginParams() {
return this.additionalLoginParams;
}
/**
* Set the additionalLoginParams property: Login parameters to send to the OpenID Connect authorization endpoint
* when a user logs in. Each parameter must be in the form "key=value".
*
* @param additionalLoginParams the additionalLoginParams value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withAdditionalLoginParams(List<String> additionalLoginParams) {
this.additionalLoginParams = additionalLoginParams;
return this;
}
/**
* Get the aadClaimsAuthorization property: Gets a JSON string containing the Azure AD Acl settings.
*
* @return the aadClaimsAuthorization value.
*/
public String aadClaimsAuthorization() {
return this.aadClaimsAuthorization;
}
/**
* Set the aadClaimsAuthorization property: Gets a JSON string containing the Azure AD Acl settings.
*
* @param aadClaimsAuthorization the aadClaimsAuthorization value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withAadClaimsAuthorization(String aadClaimsAuthorization) {
this.aadClaimsAuthorization = aadClaimsAuthorization;
return this;
}
/**
* Get the googleClientId property: The OpenID Connect Client ID for the Google web application. This setting is
* required for enabling Google Sign-In. Google Sign-In documentation:
* https://developers.google.com/identity/sign-in/web/.
*
* @return the googleClientId value.
*/
public String googleClientId() {
return this.googleClientId;
}
/**
* Set the googleClientId property: The OpenID Connect Client ID for the Google web application. This setting is
* required for enabling Google Sign-In. Google Sign-In documentation:
* https://developers.google.com/identity/sign-in/web/.
*
* @param googleClientId the googleClientId value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withGoogleClientId(String googleClientId) {
this.googleClientId = googleClientId;
return this;
}
/**
* Get the googleClientSecret property: The client secret associated with the Google web application. This setting
* is required for enabling Google Sign-In. Google Sign-In documentation:
* https://developers.google.com/identity/sign-in/web/.
*
* @return the googleClientSecret value.
*/
public String googleClientSecret() {
return this.googleClientSecret;
}
/**
* Set the googleClientSecret property: The client secret associated with the Google web application. This setting
* is required for enabling Google Sign-In. Google Sign-In documentation:
* https://developers.google.com/identity/sign-in/web/.
*
* @param googleClientSecret the googleClientSecret value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withGoogleClientSecret(String googleClientSecret) {
this.googleClientSecret = googleClientSecret;
return this;
}
/**
* Get the googleClientSecretSettingName property: The app setting name that contains the client secret associated
* with the Google web application.
*
* @return the googleClientSecretSettingName value.
*/
public String googleClientSecretSettingName() {
return this.googleClientSecretSettingName;
}
/**
* Set the googleClientSecretSettingName property: The app setting name that contains the client secret associated
* with the Google web application.
*
* @param googleClientSecretSettingName the googleClientSecretSettingName value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withGoogleClientSecretSettingName(String googleClientSecretSettingName) {
this.googleClientSecretSettingName = googleClientSecretSettingName;
return this;
}
/**
* Get the googleOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Google Sign-In
* authentication. This setting is optional. If not specified, "openid", "profile", and "email" are used as default
* scopes. Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/.
*
* @return the googleOAuthScopes value.
*/
public List<String> googleOAuthScopes() {
return this.googleOAuthScopes;
}
/**
* Set the googleOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Google Sign-In
* authentication. This setting is optional. If not specified, "openid", "profile", and "email" are used as default
* scopes. Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/.
*
* @param googleOAuthScopes the googleOAuthScopes value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withGoogleOAuthScopes(List<String> googleOAuthScopes) {
this.googleOAuthScopes = googleOAuthScopes;
return this;
}
/**
* Get the facebookAppId property: The App ID of the Facebook app used for login. This setting is required for
* enabling Facebook Login. Facebook Login documentation: https://developers.facebook.com/docs/facebook-login.
*
* @return the facebookAppId value.
*/
public String facebookAppId() {
return this.facebookAppId;
}
/**
* Set the facebookAppId property: The App ID of the Facebook app used for login. This setting is required for
* enabling Facebook Login. Facebook Login documentation: https://developers.facebook.com/docs/facebook-login.
*
* @param facebookAppId the facebookAppId value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withFacebookAppId(String facebookAppId) {
this.facebookAppId = facebookAppId;
return this;
}
/**
* Get the facebookAppSecret property: The App Secret of the Facebook app used for Facebook Login. This setting is
* required for enabling Facebook Login. Facebook Login documentation:
* https://developers.facebook.com/docs/facebook-login.
*
* @return the facebookAppSecret value.
*/
public String facebookAppSecret() {
return this.facebookAppSecret;
}
/**
* Set the facebookAppSecret property: The App Secret of the Facebook app used for Facebook Login. This setting is
* required for enabling Facebook Login. Facebook Login documentation:
* https://developers.facebook.com/docs/facebook-login.
*
* @param facebookAppSecret the facebookAppSecret value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withFacebookAppSecret(String facebookAppSecret) {
this.facebookAppSecret = facebookAppSecret;
return this;
}
/**
* Get the facebookAppSecretSettingName property: The app setting name that contains the app secret used for
* Facebook Login.
*
* @return the facebookAppSecretSettingName value.
*/
public String facebookAppSecretSettingName() {
return this.facebookAppSecretSettingName;
}
/**
* Set the facebookAppSecretSettingName property: The app setting name that contains the app secret used for
* Facebook Login.
*
* @param facebookAppSecretSettingName the facebookAppSecretSettingName value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withFacebookAppSecretSettingName(String facebookAppSecretSettingName) {
this.facebookAppSecretSettingName = facebookAppSecretSettingName;
return this;
}
/**
* Get the facebookOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Facebook Login
* authentication. This setting is optional. Facebook Login documentation:
* https://developers.facebook.com/docs/facebook-login.
*
* @return the facebookOAuthScopes value.
*/
public List<String> facebookOAuthScopes() {
return this.facebookOAuthScopes;
}
/**
* Set the facebookOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Facebook Login
* authentication. This setting is optional. Facebook Login documentation:
* https://developers.facebook.com/docs/facebook-login.
*
* @param facebookOAuthScopes the facebookOAuthScopes value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withFacebookOAuthScopes(List<String> facebookOAuthScopes) {
this.facebookOAuthScopes = facebookOAuthScopes;
return this;
}
/**
* Get the gitHubClientId property: The Client Id of the GitHub app used for login. This setting is required for
* enabling Github login.
*
* @return the gitHubClientId value.
*/
public String gitHubClientId() {
return this.gitHubClientId;
}
/**
* Set the gitHubClientId property: The Client Id of the GitHub app used for login. This setting is required for
* enabling Github login.
*
* @param gitHubClientId the gitHubClientId value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withGitHubClientId(String gitHubClientId) {
this.gitHubClientId = gitHubClientId;
return this;
}
/**
* Get the gitHubClientSecret property: The Client Secret of the GitHub app used for Github Login. This setting is
* required for enabling Github login.
*
* @return the gitHubClientSecret value.
*/
public String gitHubClientSecret() {
return this.gitHubClientSecret;
}
/**
* Set the gitHubClientSecret property: The Client Secret of the GitHub app used for Github Login. This setting is
* required for enabling Github login.
*
* @param gitHubClientSecret the gitHubClientSecret value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withGitHubClientSecret(String gitHubClientSecret) {
this.gitHubClientSecret = gitHubClientSecret;
return this;
}
/**
* Get the gitHubClientSecretSettingName property: The app setting name that contains the client secret of the
* Github app used for GitHub Login.
*
* @return the gitHubClientSecretSettingName value.
*/
public String gitHubClientSecretSettingName() {
return this.gitHubClientSecretSettingName;
}
/**
* Set the gitHubClientSecretSettingName property: The app setting name that contains the client secret of the
* Github app used for GitHub Login.
*
* @param gitHubClientSecretSettingName the gitHubClientSecretSettingName value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withGitHubClientSecretSettingName(String gitHubClientSecretSettingName) {
this.gitHubClientSecretSettingName = gitHubClientSecretSettingName;
return this;
}
/**
* Get the gitHubOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of GitHub Login
* authentication. This setting is optional.
*
* @return the gitHubOAuthScopes value.
*/
public List<String> gitHubOAuthScopes() {
return this.gitHubOAuthScopes;
}
/**
* Set the gitHubOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of GitHub Login
* authentication. This setting is optional.
*
* @param gitHubOAuthScopes the gitHubOAuthScopes value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withGitHubOAuthScopes(List<String> gitHubOAuthScopes) {
this.gitHubOAuthScopes = gitHubOAuthScopes;
return this;
}
/**
* Get the twitterConsumerKey property: The OAuth 1.0a consumer key of the Twitter application used for sign-in.
* This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation:
* https://dev.twitter.com/web/sign-in.
*
* @return the twitterConsumerKey value.
*/
public String twitterConsumerKey() {
return this.twitterConsumerKey;
}
/**
* Set the twitterConsumerKey property: The OAuth 1.0a consumer key of the Twitter application used for sign-in.
* This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation:
* https://dev.twitter.com/web/sign-in.
*
* @param twitterConsumerKey the twitterConsumerKey value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withTwitterConsumerKey(String twitterConsumerKey) {
this.twitterConsumerKey = twitterConsumerKey;
return this;
}
/**
* Get the twitterConsumerSecret property: The OAuth 1.0a consumer secret of the Twitter application used for
* sign-in. This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation:
* https://dev.twitter.com/web/sign-in.
*
* @return the twitterConsumerSecret value.
*/
public String twitterConsumerSecret() {
return this.twitterConsumerSecret;
}
/**
* Set the twitterConsumerSecret property: The OAuth 1.0a consumer secret of the Twitter application used for
* sign-in. This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation:
* https://dev.twitter.com/web/sign-in.
*
* @param twitterConsumerSecret the twitterConsumerSecret value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withTwitterConsumerSecret(String twitterConsumerSecret) {
this.twitterConsumerSecret = twitterConsumerSecret;
return this;
}
/**
* Get the twitterConsumerSecretSettingName property: The app setting name that contains the OAuth 1.0a consumer
* secret of the Twitter application used for sign-in.
*
* @return the twitterConsumerSecretSettingName value.
*/
public String twitterConsumerSecretSettingName() {
return this.twitterConsumerSecretSettingName;
}
/**
* Set the twitterConsumerSecretSettingName property: The app setting name that contains the OAuth 1.0a consumer
* secret of the Twitter application used for sign-in.
*
* @param twitterConsumerSecretSettingName the twitterConsumerSecretSettingName value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withTwitterConsumerSecretSettingName(String twitterConsumerSecretSettingName) {
this.twitterConsumerSecretSettingName = twitterConsumerSecretSettingName;
return this;
}
/**
* Get the microsoftAccountClientId property: The OAuth 2.0 client ID that was created for the app used for
* authentication. This setting is required for enabling Microsoft Account authentication. Microsoft Account OAuth
* documentation: https://dev.onedrive.com/auth/msa_oauth.htm.
*
* @return the microsoftAccountClientId value.
*/
public String microsoftAccountClientId() {
return this.microsoftAccountClientId;
}
/**
* Set the microsoftAccountClientId property: The OAuth 2.0 client ID that was created for the app used for
* authentication. This setting is required for enabling Microsoft Account authentication. Microsoft Account OAuth
* documentation: https://dev.onedrive.com/auth/msa_oauth.htm.
*
* @param microsoftAccountClientId the microsoftAccountClientId value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withMicrosoftAccountClientId(String microsoftAccountClientId) {
this.microsoftAccountClientId = microsoftAccountClientId;
return this;
}
/**
* Get the microsoftAccountClientSecret property: The OAuth 2.0 client secret that was created for the app used for
* authentication. This setting is required for enabling Microsoft Account authentication. Microsoft Account OAuth
* documentation: https://dev.onedrive.com/auth/msa_oauth.htm.
*
* @return the microsoftAccountClientSecret value.
*/
public String microsoftAccountClientSecret() {
return this.microsoftAccountClientSecret;
}
/**
* Set the microsoftAccountClientSecret property: The OAuth 2.0 client secret that was created for the app used for
* authentication. This setting is required for enabling Microsoft Account authentication. Microsoft Account OAuth
* documentation: https://dev.onedrive.com/auth/msa_oauth.htm.
*
* @param microsoftAccountClientSecret the microsoftAccountClientSecret value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withMicrosoftAccountClientSecret(String microsoftAccountClientSecret) {
this.microsoftAccountClientSecret = microsoftAccountClientSecret;
return this;
}
/**
* Get the microsoftAccountClientSecretSettingName property: The app setting name containing the OAuth 2.0 client
* secret that was created for the app used for authentication.
*
* @return the microsoftAccountClientSecretSettingName value.
*/
public String microsoftAccountClientSecretSettingName() {
return this.microsoftAccountClientSecretSettingName;
}
/**
* Set the microsoftAccountClientSecretSettingName property: The app setting name containing the OAuth 2.0 client
* secret that was created for the app used for authentication.
*
* @param microsoftAccountClientSecretSettingName the microsoftAccountClientSecretSettingName value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withMicrosoftAccountClientSecretSettingName(
String microsoftAccountClientSecretSettingName) {
this.microsoftAccountClientSecretSettingName = microsoftAccountClientSecretSettingName;
return this;
}
/**
* Get the microsoftAccountOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Microsoft
* Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope.
* Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en-us/library/dn631845.aspx.
*
* @return the microsoftAccountOAuthScopes value.
*/
public List<String> microsoftAccountOAuthScopes() {
return this.microsoftAccountOAuthScopes;
}
/**
* Set the microsoftAccountOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Microsoft
* Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope.
* Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en-us/library/dn631845.aspx.
*
* @param microsoftAccountOAuthScopes the microsoftAccountOAuthScopes value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withMicrosoftAccountOAuthScopes(List<String> microsoftAccountOAuthScopes) {
this.microsoftAccountOAuthScopes = microsoftAccountOAuthScopes;
return this;
}
/**
* Get the isAuthFromFile property: "true" if the auth config settings should be read from a file, "false"
* otherwise.
*
* @return the isAuthFromFile value.
*/
public String isAuthFromFile() {
return this.isAuthFromFile;
}
/**
* Set the isAuthFromFile property: "true" if the auth config settings should be read from a file, "false"
* otherwise.
*
* @param isAuthFromFile the isAuthFromFile value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withIsAuthFromFile(String isAuthFromFile) {
this.isAuthFromFile = isAuthFromFile;
return this;
}
/**
* Get the authFilePath property: The path of the config file containing auth settings. If the path is relative,
* base will the site's root directory.
*
* @return the authFilePath value.
*/
public String authFilePath() {
return this.authFilePath;
}
/**
* Set the authFilePath property: The path of the config file containing auth settings. If the path is relative,
* base will the site's root directory.
*
* @param authFilePath the authFilePath value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withAuthFilePath(String authFilePath) {
this.authFilePath = authFilePath;
return this;
}
/**
* Get the configVersion property: The ConfigVersion of the Authentication / Authorization feature in use for the
* current app. The setting in this value can control the behavior of the control plane for Authentication /
* Authorization.
*
* @return the configVersion value.
*/
public String configVersion() {
return this.configVersion;
}
/**
* Set the configVersion property: The ConfigVersion of the Authentication / Authorization feature in use for the
* current app. The setting in this value can control the behavior of the control plane for Authentication /
* Authorization.
*
* @param configVersion the configVersion value to set.
* @return the SiteAuthSettingsProperties object itself.
*/
public SiteAuthSettingsProperties withConfigVersion(String configVersion) {
this.configVersion = configVersion;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
}
| mit |
code-disaster/libgdx-snippets | src/main/java/com/badlogic/gdx/scenes/scene2d/ui/ActorLayout.java | 1562 | package com.badlogic.gdx.scenes.scene2d.ui;
import com.badlogic.gdx.checksum.CRC32;
import com.badlogic.gdx.json.AnnotatedJsonObject;
import com.badlogic.gdx.json.annotations.JsonSerializable;
import com.badlogic.gdx.json.annotations.JsonSerialize;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.Touchable;
import com.badlogic.gdx.utils.GdxRuntimeException;
@JsonSerializable(dynamic = true)
public abstract class ActorLayout<T extends Actor> implements AnnotatedJsonObject {
@JsonSerialize
public String name;
@JsonSerialize
public String style = "default";
@JsonSerialize
public BaseLayout layout;
@JsonSerialize
public boolean visible = true;
ActorLayout(Class<T> actorClass) {
this.actorClass = actorClass;
}
@Override
public void onJsonWrite() {
/* not implemented */
}
public int nameId;
Class<T> actorClass;
@Override
public void onJsonRead() {
if (layout == null) {
layout = new BaseLayout();
}
if (name == null) {
throw new GdxRuntimeException("ActorLayout name is null. It needs a name field!");
}
nameId = CRC32.calculateString(name).hashCode();
}
protected Actor create(Skin skin, StageLayoutListener listener) {
// create actor, using layout data
T actor = createActor(skin, listener);
// set name for later lookups
actor.setName(name);
actor.setTouchable(layout.touchable ? Touchable.enabled : Touchable.disabled);
actor.setVisible(visible);
return actor;
}
protected abstract T createActor(Skin skin, StageLayoutListener listener);
} | mit |
exocute/exocute | ExocuteCommon/src/main/java/com/exocute/pipeline/CollectException.java | 269 | package com.exocute.pipeline;
@SuppressWarnings("serial")
public class CollectException extends Exception
{
public CollectException(String message)
{ super(message); }
public CollectException(String message, Throwable cause)
{ super (message, cause); }
}
| mit |
Dacaspex/Fractal | org/jcodec/common/ArrayUtil.java | 10952 | package org.jcodec.common;
import static java.lang.System.arraycopy;
import java.lang.StringBuilder;
import java.lang.System;
import java.lang.reflect.Array;
/**
* This class is part of JCodec ( www.jcodec.org ) This software is distributed
* under FreeBSD License
*
* @author Jay Codec
*
*/
public class ArrayUtil {
public static <T> void shiftRight1(T[] array) {
for (int i = 1; i < array.length; i++) {
array[i] = array[i - 1];
}
array[0] = null;
}
public static <T> void shiftLeft1(T[] array) {
for (int i = 0; i < array.length - 1; i++) {
array[i] = array[i + 1];
}
array[array.length - 1] = null;
}
public static <T> void shiftRight3(T[] array, int from, int to) {
for (int i = to - 1; i > from; i--) {
array[i] = array[i - 1];
}
array[from] = null;
}
public static <T> void shiftLeft3(T[] array, int from, int to) {
for (int i = from; i < to - 1; i++) {
array[i] = array[i + 1];
}
array[to - 1] = null;
}
public static <T> void shiftLeft2(T[] array, int from) {
shiftLeft3(array, from, array.length);
}
public static <T> void shiftRight2(T[] array, int to) {
shiftRight3(array, 0, to);
}
public static final void swap(int[] arr, int ind1, int ind2) {
if (ind1 == ind2)
return;
int tmp = arr[ind1];
arr[ind1] = arr[ind2];
arr[ind2] = tmp;
}
public static final int sumInt(int[] array) {
int result = 0;
for (int i = 0; i < array.length; i++) {
result += array[i];
}
return result;
}
public static final int sumByte(byte[] array) {
int result = 0;
for (int i = 0; i < array.length; i++) {
result += array[i];
}
return result;
}
public static int sumInt3(int[] array, int from, int count) {
int result = 0;
for (int i = from; i < from + count; i++) {
result += array[i];
}
return result;
}
public static int sumByte3(byte[] array, int from, int count) {
int result = 0;
for (int i = from; i < from + count; i++) {
result += array[i];
}
return result;
}
public static void addInt(int[] array, int val) {
for (int i = 0; i < array.length; i++)
array[i] += val;
}
public static int[] addAllInt(int[] array1, int[] array2) {
if (array1 == null) {
return cloneInt(array2);
} else if (array2 == null) {
return cloneInt(array1);
}
int[] joinedArray = new int[array1.length + array2.length];
arraycopy(array1, 0, joinedArray, 0, array1.length);
arraycopy(array2, 0, joinedArray, array1.length, array2.length);
return joinedArray;
}
public static long[] addAllLong(long[] array1, long[] array2) {
if (array1 == null) {
return cloneLong(array2);
} else if (array2 == null) {
return cloneLong(array1);
}
long[] joinedArray = new long[array1.length + array2.length];
arraycopy(array1, 0, joinedArray, 0, array1.length);
arraycopy(array2, 0, joinedArray, array1.length, array2.length);
return joinedArray;
}
public static Object[] addAllObj(Object[] array1, Object[] array2) {
if (array1 == null) {
return cloneObj(array2);
} else if (array2 == null) {
return cloneObj(array1);
}
Object[] joinedArray = (Object[]) Array.newInstance(array1.getClass().getComponentType(), array1.length
+ array2.length);
arraycopy(array1, 0, joinedArray, 0, array1.length);
arraycopy(array2, 0, joinedArray, array1.length, array2.length);
return joinedArray;
}
public static int[] cloneInt(int[] array) {
if (array == null) {
return null;
}
return (int[]) array.clone();
}
public static long[] cloneLong(long[] array) {
if (array == null) {
return null;
}
return (long[]) array.clone();
}
public static Object[] cloneObj(Object[] array) {
if (array == null) {
return null;
}
return (Object[]) array.clone();
}
public static byte[] toByteArrayShifted(int... arguments) {
byte[] result = new byte[arguments.length];
for (int i = 0; i < arguments.length; i++)
result[i] = (byte) (arguments[i] - 128);
return result;
}
public static byte[][] toByteArrayShifted2(int[][] intArray) {
byte[][] result = new byte[intArray.length][];
for (int i = 0; i < intArray.length; i++) {
result[i] = toByteArrayShifted(intArray[i]);
}
return result;
}
public static int[] toIntArrayUnshifted(byte... arguments) {
int[] result = new int[arguments.length];
for (int i = 0; i < result.length; i++)
result[i] = (byte) (arguments[i] + 128);
return result;
}
public static byte[] toByteArray(int... arguments) {
byte[] result = new byte[arguments.length];
for (int i = 0; i < arguments.length; i++)
result[i] = (byte) arguments[i];
return result;
}
public static int[] toIntArray(byte... arguments) {
int[] result = new int[arguments.length];
for (int i = 0; i < result.length; i++)
result[i] = arguments[i];
return result;
}
public static int[] toUnsignedIntArray(byte[] val) {
int[] result = new int[val.length];
for (int i = 0; i < val.length; i++)
result[i] = val[i] & 0xff;
return result;
}
public static <T> void reverse(T[] frames) {
for (int i = 0, j = frames.length - 1; i < frames.length >> 1; ++i, --j) {
T tmp = frames[i];
frames[i] = frames[j];
frames[j] = tmp;
}
}
public static int max(int[] array) {
int max = Integer.MIN_VALUE;
for (int i = 0; i < array.length; i++) {
if (array[i] > max) {
max = array[i];
}
}
return max;
}
public static int[][] rotate(int[][] src) {
int[][] dst = new int[src[0].length][src.length];
for (int i = 0; i < src.length; i++) {
for (int j = 0; j < src[0].length; j++) {
dst[j][i] = src[i][j];
}
}
return dst;
}
public static byte[][] create2D(int width, int height) {
byte[][] result = new byte[height][];
for (int i = 0; i < height; i++)
result[i] = new byte[width];
return result;
}
public static void printMatrix(byte[] array, String format, int width) {
String[] strings = new String[array.length];
int maxLen = 0;
for (int i = 0; i < array.length; i++) {
strings[i] = String.format(format, array[i]);
maxLen = Math.max(maxLen, strings[i].length());
}
for (int ind = 0; ind < strings.length;) {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < width && ind < strings.length; i++, ind++) {
for (int j = 0; j < maxLen - strings[ind].length() + 1; j++)
builder.append(' ');
builder.append(strings[ind]);
}
System.out.println(builder);
}
}
public static void printMatrix(int[] array, String format, int width) {
String[] strings = new String[array.length];
int maxLen = 0;
for (int i = 0; i < array.length; i++) {
strings[i] = String.format(format, array[i]);
maxLen = Math.max(maxLen, strings[i].length());
}
for (int ind = 0; ind < strings.length;) {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < width && ind < strings.length; i++, ind++) {
for (int j = 0; j < maxLen - strings[ind].length() + 1; j++)
builder.append(' ');
builder.append(strings[ind]);
}
System.out.println(builder);
}
}
public static byte[] padLeft(byte[] array, int padLength) {
byte[] result = new byte[array.length + padLength];
for (int i = padLength; i < result.length; i++)
result[i] = array[i - padLength];
return result;
}
public static int[] randomIntArray(int size, int from, int to) {
int width = to - from;
int[] result = new int[size];
for (int i = 0; i < size; i++)
result[i] = (int) ((Math.random() * width) % width) + from;
return result;
}
public static byte[] randomByteArray(int size, byte from, byte to) {
byte width = (byte) (to - from);
byte[] result = new byte[size];
for (int i = 0; i < size; i++)
result[i] = (byte) (((Math.random() * width) % width) + from);
return result;
}
/**
* Implements a quicksort algorithm
*/
public static void quickSort(int[] a, int start, int end, int[] p) {
int len = end - start;
if (len < 2) {
return;
} else {
int startPlus1 = start + 1;
if (len == 2) {
if (a[start] > a[startPlus1]) {
swap(a, start, startPlus1);
if (p != null)
swap(p, start, startPlus1);
}
return;
} else if (len == 3) {
if (a[start] > a[startPlus1]) {
swap(a, start, startPlus1);
if (p != null)
swap(p, start, startPlus1);
}
int startPlus2 = start + 2;
if (a[startPlus1] > a[startPlus2]) {
swap(a, startPlus1, startPlus2);
if (p != null)
swap(p, startPlus1, startPlus2);
}
if (a[start] > a[startPlus1]) {
swap(a, start, startPlus1);
if (p != null)
swap(p, start, startPlus1);
}
}
}
int pivot = a[0];
// partially sort
int p_large = end - 1;
for (int i = end - 1; i >= start; i--) {
if (a[i] > pivot) {
swap(a, i, p_large);
if (p != null)
swap(p, i, p_large);
p_large--;
}
}
swap(a, start, p_large);
if (p != null)
swap(p, start, p_large);
quickSort(a, start, p_large, p);
quickSort(a, p_large + 1, end, p);
}
}
| mit |
openfact/openfact-temp | server-spi/src/main/java/org/openfact/models/dblock/DBLockManager.java | 2653 | /*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openfact.models.dblock;
import org.jboss.logging.Logger;
import org.openfact.models.OpenfactSession;
import org.openfact.models.OrganizationProvider;
import org.openfact.models.OrganizationProviderFactory;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public class DBLockManager {
protected static final Logger logger = Logger.getLogger(DBLockManager.class);
private final OpenfactSession session;
public DBLockManager(OpenfactSession session) {
this.session = session;
}
public void checkForcedUnlock() {
if (Boolean.getBoolean("openfact.dblock.forceUnlock")) {
DBLockProvider lock = getDBLock();
if (lock.supportsForcedUnlock()) {
logger.warn("Forced release of DB lock at startup requested by System property. Make sure to not use this in production environment! And especially when more cluster nodes are started concurrently.");
lock.releaseLock();
} else {
throw new IllegalStateException("Forced unlock requested, but provider " + lock + " doesn't support it");
}
}
}
// Try to detect ID from organizationProvider
public DBLockProvider getDBLock() {
String organizationProviderId = getOrganizationProviderId();
return session.getProvider(DBLockProvider.class, organizationProviderId);
}
public DBLockProviderFactory getDBLockFactory() {
String organizationProviderId = getOrganizationProviderId();
return (DBLockProviderFactory) session.getOpenfactSessionFactory().getProviderFactory(DBLockProvider.class, organizationProviderId);
}
private String getOrganizationProviderId() {
OrganizationProviderFactory organizationProviderFactory = (OrganizationProviderFactory) session.getOpenfactSessionFactory().getProviderFactory(OrganizationProvider.class);
return organizationProviderFactory.getId();
}
}
| mit |
yangra/SoftUni | Java-DB-Fundamentals/DatabasesFrameworks-Hibernate&SpringData/04.JavaFundamentals/src/P06/FilterStudentsByPhone.java | 846 | package P06;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.LinkedHashMap;
import java.util.Map;
public class FilterStudentsByPhone {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String line = reader.readLine();
Map<String, String> students = new LinkedHashMap<>();
while (!"END".equals(line)) {
String[] data = line.split("\\s");
students.put(data[0] + " " + data[1], data[2]);
line = reader.readLine();
}
students.entrySet().stream()
.filter(s->s.getValue().startsWith("02")||s.getValue().startsWith("+3592"))
.forEach(s-> System.out.println(s.getKey()));
}
}
| mit |
akoerner/cashier.java | src/cashier/net/Resource.java | 19050 | package cashier.net;
import java.io.IOException;
import java.util.ArrayList;
import cashier.exceptions.connection.ConnectionDisabledException;
import cashier.exceptions.request.InvalidRequestException;
import cashier.resource.*;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.annotations.Expose;
/**
*
* This class is the base class for all Cashier database resources. Methods to save, load objects from/to the Cashier database convert to/from JSON.
* This class works side by side with the Cashier Connection class, Request class and Response class.
*
* @author <a href="mailto:andrewkoerner.b@gmail.com"> Andrew Koerner</a>
* @version 1.0
*
*/
public abstract class Resource{
@Expose(serialize = false, deserialize = false) protected String table;
@Expose(serialize = false, deserialize = false) protected String resource;
/* -- Constructors -- */
/**
* default, Creates a new <code>Resource</code> instance.
**/
public Resource(){}
/**
* <p>
* Submits/saves persistent resource data to the Cashier API
* </p>
* <p><br />
* Precondition: The connection must be enabled otherwise a
* ConnectionDisabledExcepiton will be thrown.<br />
* Postcondition: Data present in the resource at the time of calling save
* will be persisted within the Cashier system.
* </p>
* @param resource the resource to be saved e.g., a Cashier Customer
* @throws ConnectionDisabled
* The connection must be enabled by calling
* Connection.setConnectionConstants.
*/
public static <T> Response save(T resource) throws ConnectionDisabledException{
Request request = new Request(((Resource)resource).getResource(), ((Resource)resource).getTable());
request.setBody(Resource.toJSON(resource));
//this needs to be refactored
String id;
if(request.getBody().contains("\"id\":")){
String[] tmpStr = (request.getBody().split("\"id\":"));
id = (tmpStr[1].split(",")[0]);
}else{
id = "0";
}
/////////////////////////////
try{
if(id.equals("0")){
request.setResourceAddress(request.getTable());
request.setMethod(Request.POST);
}else{
request.setResourceAddress(request.getTable()+"/"+id);
request.setMethod(Request.PUT);
}
try {
return request.submit();
} catch (InvalidRequestException invalidRequest) {
System.out.println(invalidRequest.getMessage());
}
}catch(java.net.ProtocolException e) {}
return new Response();
}
/**
* <p>
* Finds persistent resource data within the Cashier system.
* </p>
* <p>
* Precondition: The connection must be enabled otherwise a
* ConnectionDisabledExcepiton will be thrown.<br />
* Postcondition: If a resource is found matching the unique id
* provided then a singular resource will be returned else null
* will be returned.
* </p>
* @param id the unique id of the item to be found.
* @param resource the cashier resource being utilized in the search.
* @param table the cashier table being utilized in the search.
*
* @return Resource singular Cashier resource that matches the id provided,
* a resource or if nothing is found will be null.
*
* @throws ConnectionDisabledException
*
*/
public static ArrayList<Resource> find(int id, String resource, String table) throws ConnectionDisabledException {
Request request = new Request(resource, table);
try{
request.setMethod(Request.GET);
request.setResourceAddress(request.getTable()+"/"+id);
ArrayList<Resource> tempResource = Resource.fromJSON(request.submit().getBody());
if(tempResource != null){
if(tempResource.size() == 1){
return tempResource;
}
}
return null;
}catch(InvalidRequestException invalidRequest){
System.out.println(invalidRequest.getMessage());
} catch (java.net.ProtocolException e) {}
return null;
}
/**
* <p>
* Finds all persistent resource data within the Cashier system matching
* limit and offset criteria provided as parameters.
* </p>
* <p>
* Precondition: The connection must be enabled otherwise a
* ConnectionDisabledExcepiton will be thrown. <br />
* Postcondition: If a resource is found matching the unique id
* provided then a singular resource will be returned else null
* will be returned.
* </p>
* @param limit the number of resources to return.
* @param offset the starting resource to return
* @param resource the cashier resource being utilized in the search.
* @param table the cashier table being utilized in the search.
*
* @return ArrayList<Resource> an array list containing all resources persistent
* within the Cashier system will be returned matching the provided criteria of
* limit and offset.
*
* @throws ConnectionDisabledException
*
*/
public static ArrayList<Resource> all(int limit, int offset, String resource, String table) throws ConnectionDisabledException {
Request request = new Request(resource, table);
try {
request.setMethod(Request.GET);
request.setResourceAddress(request.getTable()+"/?limit="+limit+"&offset="+offset);
return Resource.fromJSON(request.submit().getBody());
}catch(InvalidRequestException invalidRequest){
System.out.println(invalidRequest.getMessage());
} catch (java.net.ProtocolException e) {}
return null;
}
/**
* <p>
* Finds all persistent resource data within the Cashier system.
* </p>
* <p>
* Precondition: The connection must be enabled otherwise a
* ConnectionDisabledExcepiton will be thrown. <br />
* Postcondition: all persistent data matching the request resource will be
* provided in the form of an ArrayList containing all resources of the specified type.
* If none exist then null will be returned.
* </p>
* @param resource the cashier resource being utilized in the search.
* @param table the cashier table being utilized in the search.
*
* @return ArrayList<Resource> an array list containing all resources persistent
* within the Cashier or if none exist then null will be returned.
*
* @throws ConnectionDisabledException -
*
*/
public static ArrayList<Resource> all(String resource, String table) throws ConnectionDisabledException {
Request request = new Request(resource, table);
try {
request.setMethod(Request.GET);
request.setResourceAddress(request.getTable());
return Resource.fromJSON(request.submit().getBody());
}catch(InvalidRequestException invalidRequest){
System.out.println(invalidRequest.getMessage());
} catch (java.net.ProtocolException e) {
e.printStackTrace();
}
return null;
}
/**
* Finds all persistent resource data within the Cashier system fitting the provided Cashier Query.
*
* Precondition: The connection must be enabled otherwise a
* ConnectionDisabledExcepiton will be thrown and the query must be a valid query.
* Postcondition: all persistent data matching the request resource will be
* provided in the form of an ArrayList containing all resources of the specified type.
* If none exist then null will be returned.
*
* @param query
* @param resource the cashier resource being utilized in the search.
* @param table the cashier table being utilized in the search.
*
* @return ArrayList<Resource> an array list containing all resources persistent
* within the Cashier or if none exist then null will be returned.
*
* @throws ConnectionDisabledException
*
*/
public static ArrayList<Resource> query(Query query , String resource, String table) throws ConnectionDisabledException {
Request request = new Request(resource, table);
StringBuilder stringBuilder = new StringBuilder("{\"query\":{\"statement\":\""+query.getSqlPreparedStatement()+"\",\"params\":[");
if(query.hasNextPreparedValue()){
stringBuilder.append("\""+query.getNextPreparedValue().getValue()+"\"");
}
while(query.hasNextPreparedValue()){
stringBuilder.append(", \""+query.getNextPreparedValue().getValue()+"\"");
}
stringBuilder.append("],\"limit\":"+query.getLimit()+", \"offset\":"+query.getOffset()+"}}");
try {
request.setBody(stringBuilder.toString());
request.setMethod(Request.POST);
request.setResourceAddress(request.getTable()+"/query");
return Resource.fromJSON(request.submit().getBody());
}catch(InvalidRequestException invalidRequest){
System.out.println(invalidRequest.getMessage());
} catch(IOException ioe) {}
return null;
}
/**
* <p>
* Destroys or deletes the persistent resource within the Cashier system
* matching the provided resource type and unique id.
* </p>
* <p>
* Precondition: The connection must be enabled otherwise a
* ConnectionDisabledExcepiton will be thrown.<br />
* Postcondition: If a resource is found matching the unique id
* provided then it will be deleted or destroyed and will no longer
* persist within the Cashier system.
* </p>
* @param id the unique id of the item to deleted or destroyed.
* @param resource the cashier resource being utilized in the search.
* @param table the cashier table being utilized in the search.
*
* @return Resource singular Cashier resource that matches the id provided,
* a resource or if nothing is found will be null.
*
* @throws ConnectionDisabledException
*
*/
public static Response destroy(Integer id, String resource, String table) throws ConnectionDisabledException {
Request request = new Request(resource, table);
try {
request.setMethod(Request.DELETE);
request.setResourceAddress(request.getTable()+"/"+id);
return request.submit();
}catch(InvalidRequestException invalidRequest){
System.out.println(invalidRequest.getMessage());
} catch (java.net.ProtocolException e) {
}
return null;
}
/**
* <p>
* Takes a JSON string in the Cashier API format and maps it to
* its java equivalent Cashier API Resource data access objects.
* </p>
* <p>
* Precondition: The JSON string must be a singular or an array of
* Javascript objects in a valid Cashier API resource format.<br />
* Postcondition: An ArrayList containing one or multiple Cashier Resource
* objects will be returned.
* </p>
* @param json A valid JSON, Cashier API Resource formatted string.
*
* @return ArrayList<Resource> An ArrayList of java Cashier API Resource
* data access objects equivalent to the provided parameter JSON string.
*
*/
public static ArrayList<Resource> fromJSON(String json){
if(json == null || json.equals("")){
return new ArrayList<Resource>();
}
Gson gson = new Gson();
ArrayList<Resource> resources = new ArrayList<Resource>();
Resource[] resourceArray = null;
String resource = "";
if(json.contains(":")){
resource = json.split(":")[0];
}
if(!((json.indexOf("[") == 0))){
json = "[" + json + "]";
}
if(resource.contains(Customer.RESOURCE)){
resourceArray = gson.fromJson(json, Customer[].class);
}else if(resource.contains(Entry.RESOURCE)){
resourceArray = gson.fromJson(json, Entry[].class);
}else if(resource.contains(Invoice.RESOURCE)){
resourceArray = gson.fromJson(json, Invoice[].class);
}else if(resource.contains(Item.RESOURCE)){
resourceArray = gson.fromJson(json, Item[].class);
}else if(resource.contains(Line.RESOURCE)){
resourceArray = gson.fromJson(json, Line[].class);
}else if(resource.contains(Location.RESOURCE)){
resourceArray = gson.fromJson(json, Location[].class);
}else if(resource.contains(Person.RESOURCE)){
resourceArray = gson.fromJson(json, Person[].class);
}else if(resource.contains(Shift.RESOURCE)){
resourceArray = gson.fromJson(json, Shift[].class);
}else if(resource.contains(Store.RESOURCE)){
resourceArray = gson.fromJson(json, Store[].class);
}else if(resource.contains(Ticket.RESOURCE)){
resourceArray = gson.fromJson(json, Ticket[].class);
}else if(resource.contains(Till.RESOURCE)){
resourceArray = gson.fromJson(json, Till[].class);
}else if(resource.contains(Timecard.RESOURCE)){
resourceArray = gson.fromJson(json, Timecard[].class);
}else if(resource.contains(Transaction.RESOURCE)){
resourceArray = gson.fromJson(json, Transaction[].class);
}else if(resource.contains(Unit.RESOURCE)){
resourceArray = gson.fromJson(json, Unit[].class);
}else if(resource.contains(User.RESOURCE)){
resourceArray = gson.fromJson(json, User[].class);
}
if(resourceArray != null){
for(int resourceIndex = 0; resourceIndex< resourceArray.length; resourceIndex++){
resources.add(resourceArray[resourceIndex]);
}
}
return resources;
}
/**
* <p>
* Takes a singular java Cashier API Resource data access object and maps it to
* an equivalent JSON valid string.
* </p>
* <p>
* Precondition: None<br />
* Postcondition: A singular JSON valid string will be returned equivalent
* to the parameter provided Cashier API Resource data access object.
* </p>
* @param resource Cashier API Resource data access object.
*
* @return resource the resource to be converted to JSON.
*
*/
public static <T> String toJSON(T resource){
GsonBuilder gsonBuilder = new GsonBuilder();
String res = ((Resource)resource).getResource();
if(res.contains(Customer.RESOURCE)){
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create().toJson((Customer)resource);
}else if(res.contains(Entry.RESOURCE)){
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create().toJson((Entry)resource);
}else if(res.contains(Invoice.RESOURCE)){
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create().toJson((Invoice)resource);
}else if(res.contains(Item.RESOURCE)){
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create().toJson((Item)resource);
}else if(res.contains(Line.RESOURCE)){
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create().toJson((Line)resource);
}else if(res.contains(Location.RESOURCE)){
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create().toJson((Location)resource);
}else if(res.contains(Person.RESOURCE)){
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create().toJson((Person)resource);
}else if(res.contains(Shift.RESOURCE)){
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create().toJson((Shift)resource);
}else if(res.contains(Store.RESOURCE)){
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create().toJson((Store)resource);
}else if(res.contains(Ticket.RESOURCE)){
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create().toJson((Ticket)resource);
}else if(res.contains(Till.RESOURCE)){
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create().toJson((Till)resource);
}else if(res.contains(Timecard.RESOURCE)){
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create().toJson((Timecard)resource);
}else if(res.contains(Transaction.RESOURCE)){
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create().toJson((Transaction)resource);
}else if(res.contains(Unit.RESOURCE)){
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create().toJson((Unit)resource);
}else if(res.contains(User.RESOURCE)){
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create().toJson((User)resource);
}
return "";
}
public static ArrayList<Resource> fromXML(String xml){
// TODO implement
return null;
}
public static String toXML(Resource resource){
// TODO implement
return null;
}
/**
* <p>
* Returns the last insert or create id . If an object was created and the HTTP response status
* code was "201" then a nonzero number representing the id of the object will be returned.
* If an object was not created or the most recent request was not a insert or create then
* 0 will be returned. This must be called immediately following a creation request in order
* to obtain the insert id.
* </p>
* <p>
* Precondition: none<br />
* Postcondition: The unique id representing the newly created object will be returned if the
* most recent request was a creation or insertion request.
*</p>
* @return int id number of the most recently created object.
*
*/
public static int getLastInsertId(){
if(Connection.lastResponse.getStatusCode().equals("201")){
String json = Connection.lastResponse.getBody();
Resource resource = Resource.fromJSON(json).get(0);
String resourceClass = resource.getClass().toString();
if(resourceClass.contains("Customer")){
return ((Customer) resource).getId();
}else if(resourceClass.contains("Entry")){
return ((Entry) resource).getId();
}else if(resourceClass.contains("Invoice")){
return ((Invoice) resource).getId();
}else if(resourceClass.contains("Item")){
return ((Item) resource).getId();
}else if(resourceClass.contains("Line")){
return ((Line) resource).getId();
}else if(resourceClass.contains("Location")){
return ((Location) resource).getId();
}else if(resourceClass.contains("Person")){
return ((Person) resource).getId();
}else if(resourceClass.contains("Shift")){
return ((Shift) resource).getId();
}else if(resourceClass.contains("Store")){
return ((Store) resource).getId();
}else if(resourceClass.contains("Ticket")){
return ((Ticket) resource).getId();
}else if(resourceClass.contains("Till")){
return ((Till) resource).getId();
}else if(resourceClass.contains("Timecard")){
return ((Timecard) resource).getId();
}else if(resourceClass.contains("Transaction")){
return ((Transaction) resource).getId();
}else if(resourceClass.contains("Unit")){
return ((Unit) resource).getId();
}else if(resourceClass.contains("User")){
return ((User) resource).getId();
}
return 0;
}else{
return 0;
}
}
///////////////////////
//Getters and Setters//
///////////////////////
/**
* <p>
* accessor/getter returns resource table as a String.
* </p>
* <p>
* Precondition: none<br />
* Postcondition: none
*</p>
* @return String the resource table.
*
*/
protected String getTable() {
return this.table;
}
/**
* <p>
* accessor/getter returns resource database resource name as a String.
* </p>
* <p>
* Precondition: none<br />
* Postcondition: none
*</p>
* @return String the resource table.
*
*/
protected String getResource() {
return this.resource;
}
/**
* <p>
* setter/mutator for the the resource table.
* </p>
* <p>
* Precondition: none<br />
* Postcondition: table is set to the argument value provided
*</p>
* @param table table name of the resource.
*
*/
public void setTable(String table) {
this.table = table;
}
/**
* <p>
* setter/mutator for the the resource database resource name.
* </p>
* <p>
* Precondition: none<br />
* Postcondition: resource is set to the argument value provided
*</p>
* @param resource database resource name.
*
*/
public void setResource(String resource) {
this.resource = resource;
}
}
| mit |
islas27/proyecto1-draw | almacenesHwrace/src/main/java/mx/uach/fing/almaceneshwrace/handlers/Answer.java | 1095 | package mx.uach.fing.almaceneshwrace.handlers;
/**
* This class is the envelope to compose the response, using an HTTP code
* and the body for the response
* Created Sept 12 2015 @ 09:17 AM
* @author Jonathan
*/
public class Answer {
private int code;
private String body;
public Answer(int code, String body){
this.code = code;
this.body = body;
}
public Answer(int code){
this.code = code;
}
/**
* Method to get the body of the response to output
* @return String
*/
public String getBody() {
return body;
}
/**
* Method to get the HTTP Response code for the processed request
* @return Integer
*/
public int getCode() {
return code;
}
/**
* Method to make the response and output it
* @param body
* @return Answer
*/
public static Answer ok(String body) {
return new Answer(200, body);
}
@Override
public String toString() {
return "Answer(code=" + code + ", body=" + body + ")";
}
}
| mit |
manudravid/videoplayer | src/NewActivity.java | 2236 | /*
* PhoneGap is available under *either* the terms of the modified BSD license *or* the
* MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
*
*/
package com.manu.videoplayer;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import org.json.JSONArray;
import org.json.JSONException;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.PluginResult;
public class NewActivity extends CordovaPlugin {
private static final String YOU_TUBE = "youtube.com";
private static final String ASSETS = "file:///android_asset/";
@Override
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) {
PluginResult.Status status = PluginResult.Status.OK;
String result = "";
try {
if (action.equals("playVideo")) {
playVideo(args.getString(0),args.getInt(1),args.getInt(2));
}
else {
status = PluginResult.Status.INVALID_ACTION;
}
callbackContext.sendPluginResult(new PluginResult(status, result));
} catch (JSONException e) {
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION));
} catch (IOException e) {
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION));
}
return true;
}
private void playVideo(String url,int width, int height) throws IOException {
//Context context = cordova.getActivity().getApplicationContext();
//Intent intent = new Intent(this.cordova.getActivity(),VideoActivity.class);
//context.startActivity(intent);
Intent intent = new Intent(cordova.getActivity(),VideoActivity.class);
intent.putExtra("WIDTH", width);
intent.putExtra("HEIGHT", height);
if (this.cordova != null) {
this.cordova.startActivityForResult((CordovaPlugin) this, intent, 0);
}
}
}
| mit |
meerajahmed/MakeYourAppMaterial | XYZReader/app/src/main/java/com/example/android/xyzreader/ui/ArticleDetailFragment.java | 10395 | package com.example.android.xyzreader.ui;
import android.app.Fragment;
import android.app.LoaderManager;
import android.content.Intent;
import android.content.Loader;
import android.content.res.ColorStateList;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.graphics.drawable.ColorDrawable;
import android.os.Build;
import android.os.Bundle;
import android.support.design.widget.CollapsingToolbarLayout;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.ShareCompat;
import android.support.v4.widget.NestedScrollView;
import android.support.v7.graphics.Palette;
import android.text.Html;
import android.text.format.DateUtils;
import android.text.method.LinkMovementMethod;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.ImageLoader;
import com.example.android.xyzreader.R;
import com.example.android.xyzreader.data.ArticleLoader;
/**
* A fragment representing a single Article detail screen. This fragment is
* either contained in a {@link ArticleListActivity} in two-pane mode (on
* tablets) or a {@link ArticleDetailActivity} on handsets.
*/
public class ArticleDetailFragment extends Fragment implements
LoaderManager.LoaderCallbacks<Cursor> {
private static final String TAG = "ArticleDetailFragment";
public static final String ARG_ITEM_ID = "item_id";
private static final float PARALLAX_FACTOR = 1.25f;
private Cursor mCursor;
private long mItemId;
private View mRootView;
private NestedScrollView mScrollView;
private int mScrollY;
private int mDarkVibrantColor = 0xFF333333;
private int mVibrantColor = 0xFF333333;
private DrawInsetsFrameLayout mDrawInsetsFrameLayout;
private CollapsingToolbarLayout mCollapsingToolbarLayout;
private View mPhotoContainerView;
private ImageView mPhotoView;
private boolean mIsCard = false;
private FloatingActionButton fab;
private int id = 0;
private int mTopInset;
private int mStatusBarFullOpacityBottom;
private ColorDrawable mStatusBarColorDrawable;
/**
* Mandatory empty constructor for the fragment manager to instantiate the
* fragment (e.g. upon screen orientation changes).
*/
public ArticleDetailFragment() {
}
public static ArticleDetailFragment newInstance(long itemId) {
Bundle arguments = new Bundle();
arguments.putLong(ARG_ITEM_ID, itemId);
ArticleDetailFragment fragment = new ArticleDetailFragment();
fragment.setArguments(arguments);
return fragment;
}
static float progress(float v, float min, float max) {
return constrain((v - min) / (max - min), 0, 1);
}
static float constrain(float val, float min, float max) {
if (val < min) {
return min;
} else if (val > max) {
return max;
} else {
return val;
}
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments().containsKey(ARG_ITEM_ID)) {
mItemId = getArguments().getLong(ARG_ITEM_ID);
}
mIsCard = getResources().getBoolean(R.bool.detail_is_card);
mStatusBarFullOpacityBottom = getResources().getDimensionPixelSize(
R.dimen.detail_card_top_margin);
setHasOptionsMenu(true);
}
public ArticleDetailActivity getActivityCast() {
return (ArticleDetailActivity) getActivity();
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
// In support library r8, calling initLoader for a fragment in a FragmentPagerAdapter in
// the fragment's onCreate may cause the same LoaderManager to be dealt to multiple
// fragments because their mIndex is -1 (haven't been added to the activity yet). Thus,
// we do this in onActivityCreated.
getLoaderManager().initLoader(0, null, this);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
mRootView = inflater.inflate(R.layout.fragment_article_detail, container, false);
mCollapsingToolbarLayout = (CollapsingToolbarLayout) mRootView.findViewById(R.id.collapsing_toolbar);
mDrawInsetsFrameLayout = (DrawInsetsFrameLayout)
mRootView.findViewById(R.id.draw_insets_frame_layout);
mDrawInsetsFrameLayout.setOnInsetsCallback(new DrawInsetsFrameLayout.OnInsetsCallback() {
@Override
public void onInsetsChanged(Rect insets) {
mTopInset = insets.top;
}
});
mScrollView = (NestedScrollView) mRootView.findViewById(R.id.scrollview);
mPhotoView = (ImageView) mRootView.findViewById(R.id.photo);
mPhotoContainerView = mRootView.findViewById(R.id.photo_container);
mStatusBarColorDrawable = new ColorDrawable(0);
fab = (FloatingActionButton) mRootView.findViewById(R.id.share_fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(Intent.createChooser(ShareCompat.IntentBuilder.from(getActivity())
.setType("text/plain")
.setText("Some sample text")
.getIntent(), getString(R.string.action_share)));
}
});
updateStatusBar();
bindViews();
return mRootView;
}
private void updateStatusBar() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && getActivity() != null && getActivity().getWindow() != null) {
getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
getActivity().getWindow().setStatusBarColor(mDarkVibrantColor);
}
}
private void bindViews() {
if (mRootView == null) {
return;
}
TextView titleView = (TextView) mRootView.findViewById(R.id.article_title);
TextView bylineView = (TextView) mRootView.findViewById(R.id.article_byline);
bylineView.setMovementMethod(new LinkMovementMethod());
TextView bodyView = (TextView) mRootView.findViewById(R.id.article_body);
bodyView.setTypeface(Typeface.createFromAsset(getResources().getAssets(), "Rosario-Regular.ttf"));
if (mCursor != null) {
mRootView.setAlpha(0);
mRootView.setVisibility(View.VISIBLE);
mRootView.animate().alpha(1);
titleView.setText(mCursor.getString(ArticleLoader.Query.TITLE));
bylineView.setText(Html.fromHtml(
DateUtils.getRelativeTimeSpanString(
mCursor.getLong(ArticleLoader.Query.PUBLISHED_DATE),
System.currentTimeMillis(), DateUtils.HOUR_IN_MILLIS,
DateUtils.FORMAT_ABBREV_ALL).toString()
+ " by <font color='#ffffff'>"
+ mCursor.getString(ArticleLoader.Query.AUTHOR)
+ "</font>"));
bodyView.setText(Html.fromHtml(mCursor.getString(ArticleLoader.Query.BODY)));
ImageLoaderHelper.getInstance(getActivity()).getImageLoader()
.get(mCursor.getString(ArticleLoader.Query.PHOTO_URL), new ImageLoader.ImageListener() {
@Override
public void onResponse(ImageLoader.ImageContainer imageContainer, boolean b) {
Bitmap bitmap = imageContainer.getBitmap();
if (bitmap != null) {
Palette p = Palette.generate(bitmap, 12);
mDarkVibrantColor = p.getDarkVibrantColor(p.getDarkMutedColor(0xFF333333));
mVibrantColor = p.getVibrantColor(p.getMutedColor(0xFF888888));
mPhotoView.setImageBitmap(imageContainer.getBitmap());
mRootView.findViewById(R.id.meta_bar)
.setBackgroundColor(mDarkVibrantColor);
updateStatusBar();
fab.setBackgroundTintList(ColorStateList.valueOf(mVibrantColor));
mCollapsingToolbarLayout.setContentScrimColor(mVibrantColor);
}
}
@Override
public void onErrorResponse(VolleyError volleyError) {
}
});
} else {
mRootView.setVisibility(View.GONE);
titleView.setText("N/A");
bylineView.setText("N/A" );
bodyView.setText("N/A");
}
}
@Override
public Loader<Cursor> onCreateLoader(int i, Bundle bundle) {
return ArticleLoader.newInstanceForItemId(getActivity(), mItemId);
}
@Override
public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) {
if (!isAdded()) {
if (cursor != null) {
cursor.close();
}
return;
}
mCursor = cursor;
if (mCursor != null && !mCursor.moveToFirst()) {
Log.e(TAG, "Error reading item detail cursor");
mCursor.close();
mCursor = null;
}
bindViews();
}
@Override
public void onLoaderReset(Loader<Cursor> cursorLoader) {
mCursor = null;
bindViews();
}
public int getUpButtonFloor() {
if (mPhotoContainerView == null || mPhotoView.getHeight() == 0) {
return Integer.MAX_VALUE;
}
// account for parallax
return mIsCard
? (int) mPhotoContainerView.getTranslationY() + mPhotoView.getHeight() - mScrollY
: mPhotoView.getHeight() - mScrollY;
}
}
| mit |
cfontes/DropWizard-Guice-Redis | src/main/java/com/example/resources/ByeByeWorldResource.java | 1051 | package com.example.resources;
import java.util.concurrent.atomic.AtomicLong;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import com.codahale.metrics.annotation.Timed;
import com.example.core.Saying;
import com.google.common.base.Optional;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.google.inject.name.Named;
@Path("/ByeBye-World")
@Produces(MediaType.APPLICATION_JSON)
@Singleton
public class ByeByeWorldResource {
private final String defaultName;
private final AtomicLong counter;
@Inject
public ByeByeWorldResource(@Named("defaultName")String defaultName) {
this.defaultName = defaultName;
this.counter = new AtomicLong();
}
@GET
@Timed
public Saying sayByeBye(@QueryParam("name") Optional<String> names) {
final String value = String.format("Bye bye %s", names.or(defaultName));
return new Saying(counter.incrementAndGet(), value);
}
} | mit |
halex2005/diadocsdk-java | src/main/java/Diadoc/Api/DiadocCredentials.java | 2156 | package Diadoc.Api;
import org.apache.http.annotation.Contract;
import org.apache.http.annotation.ThreadingBehavior;
import org.apache.http.auth.BasicUserPrincipal;
import org.apache.http.auth.Credentials;
import org.apache.http.util.LangUtils;
import java.security.Principal;
@Contract(threading = ThreadingBehavior.IMMUTABLE)
public class DiadocCredentials implements Credentials {
private final BasicUserPrincipal principal;
private final String authToken;
/**
* The constructor with the Diadoc API client ID.
*
* @param apiClientId the Diadoc API client ID
*/
public DiadocCredentials(String apiClientId)
{
this(apiClientId, null);
}
/**
* The constructor with the Diadoc API client ID and auth token arguments.
*
* @param apiClientId the Diadoc API client ID
* @param authToken the Diadoc authorization token
*/
public DiadocCredentials(String apiClientId, String authToken) {
super();
if (apiClientId == null) {
throw new IllegalArgumentException("ApiClientId may not be null");
}
this.principal = new BasicUserPrincipal(apiClientId);
this.authToken = authToken;
}
public Principal getUserPrincipal() {
return this.principal;
}
public String getApiClientId() {
return this.principal.getName();
}
public String getAuthToken() {
return this.authToken;
}
public String getPassword() {
throw new RuntimeException();
}
@Override
public int hashCode() {
return this.principal.hashCode();
}
@Override
public boolean equals(Object o) {
if (o == null) return false;
if (this == o) return true;
if (o instanceof DiadocCredentials) {
DiadocCredentials that = (DiadocCredentials) o;
if (LangUtils.equals(this.principal, that.principal) && LangUtils.equals(this.authToken, that.authToken)) {
return true;
}
}
return false;
}
@Override
public String toString() {
return this.principal.toString();
}
}
| mit |
Azure/azure-sdk-for-java | sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DataDisksGroups.java | 2310 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.hdinsight.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The data disks groups for the role. */
@Fluent
public final class DataDisksGroups {
@JsonIgnore private final ClientLogger logger = new ClientLogger(DataDisksGroups.class);
/*
* The number of disks per node.
*/
@JsonProperty(value = "disksPerNode")
private Integer disksPerNode;
/*
* ReadOnly. The storage account type. Do not set this value.
*/
@JsonProperty(value = "storageAccountType", access = JsonProperty.Access.WRITE_ONLY)
private String storageAccountType;
/*
* ReadOnly. The DiskSize in GB. Do not set this value.
*/
@JsonProperty(value = "diskSizeGB", access = JsonProperty.Access.WRITE_ONLY)
private Integer diskSizeGB;
/**
* Get the disksPerNode property: The number of disks per node.
*
* @return the disksPerNode value.
*/
public Integer disksPerNode() {
return this.disksPerNode;
}
/**
* Set the disksPerNode property: The number of disks per node.
*
* @param disksPerNode the disksPerNode value to set.
* @return the DataDisksGroups object itself.
*/
public DataDisksGroups withDisksPerNode(Integer disksPerNode) {
this.disksPerNode = disksPerNode;
return this;
}
/**
* Get the storageAccountType property: ReadOnly. The storage account type. Do not set this value.
*
* @return the storageAccountType value.
*/
public String storageAccountType() {
return this.storageAccountType;
}
/**
* Get the diskSizeGB property: ReadOnly. The DiskSize in GB. Do not set this value.
*
* @return the diskSizeGB value.
*/
public Integer diskSizeGB() {
return this.diskSizeGB;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
}
| mit |
TeamworkGuy2/JFunc | src/twg2/functions/PropertyAccessor.java | 744 | package twg2.functions;
import java.util.function.Consumer;
import java.util.function.Supplier;
/**
* @author TeamworkGuy2
* @since 2015-7-25
* @param <E> this property's element type
*/
public interface PropertyAccessor<E> {
/**
* @return the {@link Consumer} that sets this property's value
*/
public Consumer<E> getSetter();
/**
* @return the {@link Supplier} that returns this property's value
*/
public Supplier<E> getGetter();
public default E getValue() {
return getGetter().get();
}
public default void setValue(E value) {
getSetter().accept(value);
}
public static <E1> PropertyAccessor<E1> of(Supplier<E1> getter, Consumer<E1> setter) {
return new SimplePropertyAccessor<>(getter, setter);
}
}
| mit |
femoio/http | src/main/java/io/femo/http/auth/DefaultDigestStrategy.java | 5024 | package io.femo.http.auth;
import io.femo.http.Authentication;
import io.femo.http.HttpException;
import io.femo.http.HttpRequest;
import io.femo.http.HttpResponse;
import org.jetbrains.annotations.NotNull;
import javax.xml.bind.DatatypeConverter;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Properties;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Supplier;
/**
* Created by felix on 6/21/16.
*/
public class DefaultDigestStrategy implements Authentication {
private Supplier<String> username;
private Supplier<String> password;
public DefaultDigestStrategy(Supplier<String> username, Supplier<String> password) {
this.username = username;
this.password = password;
this.nc = new AtomicInteger(1);
}
public DefaultDigestStrategy(String username, String password) {
this(() -> username, () -> password);
}
private ThreadLocal<MessageDigest> digest = new ThreadLocal<MessageDigest>() {
@Override
protected MessageDigest initialValue() {
try {
return MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e);
}
}
};
private String nonce;
private AtomicInteger nc;
private String realm;
private String opaque;
private String basePath;
private String host;
@Override
public boolean isInitialized() {
return nonce != null && realm != null && opaque != null && nc != null;
}
@Override
public boolean matches(HttpRequest request) {
return host.equalsIgnoreCase(request.header("Host").value()) && request.path().startsWith(basePath);
}
@Override
public boolean supportsMulti() {
return false;
}
@Override
public boolean supportsDirect() {
return false;
}
@Override
public void init(HttpResponse response) {
Properties data = readData(response.header("WWW-Authenticate").value().substring("Digest".length()));
if(!data.containsKey("nonce") && !data.containsKey("opaque") && !data.containsKey("realm")) {
throw new HttpException(response.request(), "Not all required fields for HTTP Digest Authentication are present.");
}
this.nonce = removeQuotes(data.getProperty("nonce"));
this.realm = removeQuotes(data.getProperty("realm"));
this.opaque = removeQuotes(data.getProperty("opaque"));
this.host = response.request().header("Host").value();
this.basePath = response.request().path();
}
@Override
public String strategy() {
return "Digest";
}
@Override
public void authenticate(HttpRequest request) {
StringBuilder stringBuilder = new StringBuilder();
int nc = this.nc.getAndIncrement();
String cnonce = "0a4f113b"; //UUID.randomUUID().toString();
stringBuilder.append("Digest username=\"")
.append(username.get())
.append("\", realm=\"")
.append(realm)
.append("\", nonce=\"")
.append(nonce)
.append("\", uri=\"")
.append(request.path())
.append("\", qop=auth, nc=")
.append(String.format("%08x", nc))
.append(", cnonce=\"")
.append(cnonce)
.append("\", response=\"");
String ha1 = md5(username.get() + ":" + realm + ":" + password.get());
String ha2 = md5(request.method() + ":" + request.path());
String response = md5(ha1 + ":" + nonce
+ ":" + String.format("%08x", nc) + ":" + cnonce +
":auth:" + ha2);
stringBuilder.append(response)
.append("\", opaque=\"")
.append(opaque)
.append("\"");
request.header("Authorization", stringBuilder.toString());
}
private Properties readData(String authData) {
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(authData.replace(",", "\n").getBytes());
Properties properties = new Properties();
try {
properties.load(byteArrayInputStream);
} catch (IOException ignored) {
}
return properties;
}
@NotNull
private String md5(String data) {
MessageDigest digest = this.digest.get();
digest.reset();
byte[] res = digest.digest(data.getBytes());
return DatatypeConverter.printHexBinary(res).toLowerCase();
}
private String removeQuotes(String string) {
while (string.startsWith("\"")) {
string = string.substring(1);
}
while (string.endsWith("\"")) {
string = string.substring(0, string.length() - 1);
}
return string;
}
}
| mit |
ljtfreitas/java-restify | java-restify-contract/src/main/java/com/github/ljtfreitas/restify/http/contract/metadata/EndpointHeader.java | 2420 | /*******************************************************************************
*
* MIT License
*
* Copyright (c) 2016 Tiago de Freitas Lima
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
package com.github.ljtfreitas.restify.http.contract.metadata;
import static com.github.ljtfreitas.restify.util.Preconditions.nonNull;
import java.util.Objects;
public class EndpointHeader {
private final String name;
private final String value;
public EndpointHeader(String name, String value) {
this.name = nonNull(name, "EndpointHeader need a name.");
this.value = nonNull(value, "EndpointHeader need a value.");
}
public String name() {
return name;
}
public String value() {
return value;
}
@Override
public boolean equals(Object obj) {
if (obj instanceof EndpointHeader) {
EndpointHeader that = (EndpointHeader) obj;
return this.name.equals(that.name)
&& this.value.equals(that.value);
} else return false;
}
@Override
public int hashCode() {
return Objects.hash(name, value);
}
@Override
public String toString() {
StringBuilder report = new StringBuilder();
report
.append("EndpointHeader: [")
.append("Name: ")
.append(name)
.append(", ")
.append("Value: ")
.append(value)
.append("]");
return report.toString();
}
}
| mit |
jumpinjackie/mapguide4j | app/util/BoxedInteger.java | 674 | package util;
//Java ints are primitive yet the Integer box class doesn't support manipulation???
//
//And of java has no overloaded operators! No implicit assignment operators! Ugh!
public class BoxedInteger
{
private int _value;
public BoxedInteger(int value) {
_value = value;
}
public int increment() { _value++; return _value; }
public int decrement() { _value--; return _value; }
public int add(int value) { _value += value; return _value; }
public int subtract(int value) { _value -= value; return _value; }
public int multiply(int value) { _value *= value; return _value; }
public int value() { return _value; }
} | mit |
JornC/bitcoin-transaction-explorer | bitcoin-transactions-core/src/main/java/nl/yogh/gwt/wui/widget/NotificationPanel.java | 833 | package nl.yogh.gwt.wui.widget;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.web.bindery.event.shared.EventBus;
import com.google.web.bindery.event.shared.binder.EventBinder;
import com.google.web.bindery.event.shared.binder.EventHandler;
import nl.yogh.gwt.wui.event.NotificationEvent;
public class NotificationPanel extends FlowPanel {
private final NotificationPanelEventBinder EVENT_BINDER = GWT.create(NotificationPanelEventBinder.class);
interface NotificationPanelEventBinder extends EventBinder<NotificationPanel> {}
public void setEventBus(EventBus eventBus) {
EVENT_BINDER.bindEventHandlers(this, eventBus);
}
@EventHandler
public void onNotification(final NotificationEvent event) {
add(new NotificationWidget(event.getValue()));
}
}
| mit |
preipke/petrisim | GraphEditor/src/test/java/io/ImportExportTests.java | 721 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package io;
import edu.unibi.agbi.editor.core.data.entity.graph.IGraphNode;
import java.util.List;
import main.TestFXBase;
import org.junit.Test;
/**
*
* @author PR
*/
public class ImportExportTests extends TestFXBase
{
int placeCount = 5;
int transitionCount = 3;
@Test
public void XmlExportImport() {
List<IGraphNode> places = CreatePlaces(placeCount);
List<IGraphNode> transitions = CreateTransitions(transitionCount);
// ConnectNodes(places, transitions);
}
}
| mit |
JCThePants/NucleusFramework | tests/src/com/jcwhatever/nucleus/providers/economy/IBankTest.java | 1928 | package com.jcwhatever.nucleus.providers.economy;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import java.util.UUID;
@Ignore
public class IBankTest {
private IBank _bank;
private UUID _bankOwnerId;
private UUID _accountOwnerId;
public IBankTest(IBank bank, UUID testOwnerId) {
_bank = bank;
_bankOwnerId = testOwnerId;
_accountOwnerId = UUID.randomUUID();
}
public void run() throws Exception {
testGetOwnerId();
testGetBalance();
testHasAccount();
testGetAccount();
testCreateAccount();
}
@Test
public void testGetOwnerId() throws Exception {
UUID id = _bank.getOwnerId();
Assert.assertEquals(_bankOwnerId, id);
}
@Test
public void testGetBalance() throws Exception {
double balance = _bank.getBalance();
ICurrency currency = ICurrencyTest.createDummyCurrency(1.0D);
// should return as economy providers currency
Assert.assertEquals(balance, _bank.getBalance(currency), 0.0D);
currency = ICurrencyTest.createDummyCurrency(2.0D);
double convertedBalance = _bank.getBalance(currency);
Assert.assertEquals(balance * 2.0D, convertedBalance, 0.0D);
}
@Test
public void testHasAccount() throws Exception {
boolean hasAccount = _bank.hasAccount(new UUID(0L, 0L));
Assert.assertEquals(false, hasAccount);
}
@Test
public void testGetAccount() throws Exception {
// should not throw error
_bank.getAccount(new UUID(0L, 0L));
}
@Test
public void testCreateAccount() throws Exception {
IAccount account = _bank.createAccount(_accountOwnerId);
Assert.assertNotNull(account);
Assert.assertEquals(_accountOwnerId, account.getPlayerId());
new IAccountTest(account, _bank, _accountOwnerId).run();
}
} | mit |
Griell/JMines | src/main/java/ch/marc/jmines/views/StartView.java | 2915 | package ch.marc.jmines.views;
import ch.marc.jmines.MainWindow;
import ch.marc.jmines.util.Util;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
public class StartView extends AbstractView {
/**
* The Buttons for starting the game
*/
private JButton[] gameButtons = new JButton[]{
Util.newJButtonWithName("8x8", "easy"),
Util.newJButtonWithName("16x16", "normal"),
Util.newJButtonWithName("32x32", "hard"),
Util.newJButtonWithName("User-defined", "custom")
};
private JButton[] extraButtons = new JButton[]{
Util.newJButtonWithName("Settings", "settings"),
Util.newJButtonWithName("Leaderboard", "score")
};
public StartView(MainWindow window) {
super(window);
this.setLayout(new BorderLayout());
JPanel gameButtonsPanel = new JPanel(new GridLayout(2, 2));
int margin = this.window.getHeight() / 4;
this.gameButtons[0].setBorder(BorderFactory.createMatteBorder(margin, margin, 2, 2, Color.WHITE));
this.gameButtons[1].setBorder(BorderFactory.createMatteBorder(margin, 2, 2, margin, Color.WHITE));
this.gameButtons[2].setBorder(BorderFactory.createMatteBorder(2, margin, margin, 2, Color.WHITE));
this.gameButtons[3].setBorder(BorderFactory.createMatteBorder(2, 2, margin, margin, Color.WHITE));
// Add the Buttons to the grid and attach an actionListener to them
for (JButton button : gameButtons) {
button.addActionListener(this);
gameButtonsPanel.add(button);
}
this.add(gameButtonsPanel, BorderLayout.CENTER);
JPanel extraButtonsPanel = new JPanel(new GridLayout(2, 1));
for (JButton button : extraButtons) {
button.addActionListener(this);
extraButtonsPanel.add(button);
}
this.add(extraButtonsPanel, BorderLayout.EAST);
}
@Override
public void actionPerformed(ActionEvent actionEvent) {
// Check what Button was pressed
switch (((JButton) actionEvent.getSource()).getName()) {
case "easy":
this.window.setCurrentView(new GameView(this.window, 8, 8, 10));
break;
case "normal":
this.window.setCurrentView(new GameView(this.window, 16, 16, 40));
break;
case "hard":
this.window.setCurrentView(new GameView(this.window, 32, 32, 150));
break;
case "settings":
this.window.setCurrentView(new SettingsView(this.window));
break;
case "score":
this.window.setCurrentView(new ScoreView(this.window));
break;
default:
this.window.setCurrentView(new UserdefView(this.window));
break;
}
}
}
| mit |
Thibault92/Care4oldLocal | app/src/main/java/isep.project.care4old/model/Lawton.java | 1868 | package isep.project.care4old.model;
import java.util.Date;
public class Lawton {
private int id ;
private Date date ;
private int phone ;
private int growshop ;
private int cook ;
private int clean ;
private int laundry ;
private int transport ;
private int drugs ;
private int money ;
private int total ;
public Lawton(int id){
this.id = id;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public int getPhone() {
return phone;
}
public void setPhone(int phone) {
this.phone = phone;
}
public int getGrowshop() {
return growshop;
}
public void setGrowshop(int growshop) {
this.growshop = growshop;
}
public int getCook() {
return cook;
}
public void setCook(int cook) {
this.cook = cook;
}
public int getClean() {
return clean;
}
public void setClean(int clean) {
this.clean = clean;
}
public int getLaundry() {
return laundry;
}
public void setLaundry(int laundry) {
this.laundry = laundry;
}
public int getTransport() {
return transport;
}
public void setTransport(int transport) {
this.transport = transport;
}
public int getDrugs() {
return drugs;
}
public void setDrugs(int drugs) {
this.drugs = drugs;
}
public int getMoney() {
return money;
}
public void setMoney(int money) {
this.money = money;
}
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
}
| mit |
evilbinary/eqq | src/org/evilbinary/web/MyTrustManager.java | 672 | package org.evilbinary.web;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.X509TrustManager;
public class MyTrustManager implements X509TrustManager {
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
}
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
System.out.println("cert: " + chain[0].toString() + ", 认证方式: " + authType);
}
public X509Certificate[] getAcceptedIssuers() {
return new X509Certificate[]{};
}
}
| mit |
PetrF0X/podio-java | src/main/java/com/podio/filter/NumberInterval.java | 489 | package com.podio.filter;
import org.codehaus.jackson.map.annotate.JsonSerialize;
public final class NumberInterval {
@JsonSerialize(include = JsonSerialize.Inclusion.ALWAYS)
private final Float from;
@JsonSerialize(include = JsonSerialize.Inclusion.ALWAYS)
private final Float to;
public NumberInterval(Float from, Float to) {
super();
this.from = from;
this.to = to;
}
public Float getFrom() {
return from;
}
public Float getTo() {
return to;
}
}
| mit |
Nocket/nocket | src/java/org/nocket/component/table/columns/ActionColumn.java | 3501 | package org.nocket.component.table.columns;
import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.IModel;
import org.nocket.component.table.GenericDataTablePanel;
// TODO: Auto-generated Javadoc
/**
* Column with link.
*
* @param <T>
* Model object type representing one line in
* {@link GenericDataTablePanel} .
*/
@SuppressWarnings("serial")
public abstract class ActionColumn<T> extends DMDAbstractColumn<T> {
/**
* Instantiates a new action column.
*
* @param headerLabel the header label
*/
public ActionColumn(IModel<String> headerLabel) {
super(headerLabel);
}
/* (non-Javadoc)
* @see org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator#populateItem(org.apache.wicket.markup.repeater.Item, java.lang.String, org.apache.wicket.model.IModel)
*/
public void populateItem(Item<ICellPopulator<T>> cellItem, String componentId, IModel<T> rowModel) {
cellItem.add(new LinkPanel<T>(componentId, this, rowModel));
}
/**
* Defines whether link is enabled. You may decide to implement special
* behavior for each line, depending on the model object.
*
* @param model
* Model of the line.
*
* @return Whether link is enabled. Default is true.
*/
protected boolean isEnabled(IModel<T> model) {
return true;
}
/**
* Defines whether link is visible. You may decide to implement special
* behavior for each line, depending on the model object.
*
* @param model
* Model of the line.
*
* @return Whether link is visible. Default is true.
*/
protected boolean isVisible(IModel<T> model) {
return true;
}
/**
* Returns label for the link.
*
* @param model
* Model of the line.
*
* @return Label for the string.
*/
protected abstract IModel<String> getCellLabel(IModel<T> model);
/**
* Called when a link is clicked.
*
* @param model
* Model of the line.
*/
protected abstract void onClick(IModel<T> model);
/**
* The Class LinkPanel.
*
* @param <T> the generic type
*/
@SuppressWarnings("hiding")
private class LinkPanel<T> extends Panel {
/**
* Instantiates a new link panel.
*
* @param id the id
* @param column the column
* @param rowModel the row model
*/
public LinkPanel(String id, final ActionColumn<T> column, IModel<T> rowModel) {
super(id);
Link<T> link = new Link<T>("link", rowModel) {
@Override
public void onClick() {
column.onClick(getModel());
}
@Override
public boolean isEnabled() {
return column.isEnabled(getModel());
}
@Override
public boolean isVisible() {
return column.isVisible(getModel());
}
};
add(link);
link.add(new Label("label", column.getCellLabel(rowModel)));
}
}
}
| mit |
chen-android/guoliao | CallKit/src/main/java/io/rong/callkit/SingleCallActivity.java | 30796 | package io.rong.callkit;
import android.annotation.TargetApi;
import android.content.Intent;
import android.media.AudioManager;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import io.rong.calllib.CallUserProfile;
import io.rong.calllib.RongCallClient;
import io.rong.calllib.RongCallCommon;
import io.rong.calllib.RongCallSession;
import io.rong.calllib.message.CallSTerminateMessage;
import io.rong.common.RLog;
import io.rong.imkit.RongContext;
import io.rong.imkit.RongIM;
import io.rong.imkit.utilities.PermissionCheckUtil;
import io.rong.imkit.widget.AsyncImageView;
import io.rong.imlib.RongIMClient;
import io.rong.imlib.model.Conversation;
import io.rong.imlib.model.UserInfo;
public class SingleCallActivity extends BaseCallActivity implements Handler.Callback {
private static final String TAG = "VoIPSingleActivity";
private LayoutInflater inflater;
private RongCallSession callSession;
private FrameLayout mLPreviewContainer;
private FrameLayout mSPreviewContainer;
private FrameLayout mButtonContainer;
private LinearLayout mUserInfoContainer;
private Boolean isInformationShow = false;
private SurfaceView mLocalVideo = null;
private boolean muted = false;
private boolean handFree = false;
private boolean startForCheckPermissions = false;
private int EVENT_FULL_SCREEN = 1;
private String targetId = null;
private RongCallCommon.CallMediaType mediaType;
@Override
final public boolean handleMessage(Message msg) {
if (msg.what == EVENT_FULL_SCREEN) {
hideVideoCallInformation();
return true;
}
return false;
}
@Override
@TargetApi(23)
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.rc_voip_activity_single_call);
Intent intent = getIntent();
mLPreviewContainer = (FrameLayout) findViewById(R.id.rc_voip_call_large_preview);
mSPreviewContainer = (FrameLayout) findViewById(R.id.rc_voip_call_small_preview);
mButtonContainer = (FrameLayout) findViewById(R.id.rc_voip_btn);
mUserInfoContainer = (LinearLayout) findViewById(R.id.rc_voip_user_info);
startForCheckPermissions = intent.getBooleanExtra("checkPermissions", false);
RongCallAction callAction = RongCallAction.valueOf(intent.getStringExtra("callAction"));
if (callAction.equals(RongCallAction.ACTION_OUTGOING_CALL)) {
if (intent.getAction().equals(RongVoIPIntent.RONG_INTENT_ACTION_VOIP_SINGLEAUDIO)) {
mediaType = RongCallCommon.CallMediaType.AUDIO;
} else {
mediaType = RongCallCommon.CallMediaType.VIDEO;
}
} else if (callAction.equals(RongCallAction.ACTION_INCOMING_CALL)) {
callSession = intent.getParcelableExtra("callSession");
mediaType = callSession.getMediaType();
} else {
callSession = RongCallClient.getInstance().getCallSession();
if (callSession != null) {
mediaType = callSession.getMediaType();
}
}
if (mediaType != null) {
inflater = LayoutInflater.from(this);
initView(mediaType, callAction);
if (!requestCallPermissions(mediaType, REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS)) {
return;
}
setupIntent();
} else {
RLog.w(TAG, "恢复的瞬间,对方已挂断");
setShouldShowFloat(false);
CallFloatBoxView.hideFloatBox();
finish();
}
}
@Override
protected void onNewIntent(Intent intent) {
startForCheckPermissions = intent.getBooleanExtra("checkPermissions", false);
RongCallAction callAction = RongCallAction.valueOf(intent.getStringExtra("callAction"));
if (callAction == null) {
return;
}
if (callAction.equals(RongCallAction.ACTION_OUTGOING_CALL)) {
if (intent.getAction().equals(RongVoIPIntent.RONG_INTENT_ACTION_VOIP_SINGLEAUDIO)) {
mediaType = RongCallCommon.CallMediaType.AUDIO;
} else {
mediaType = RongCallCommon.CallMediaType.VIDEO;
}
} else if (callAction.equals(RongCallAction.ACTION_INCOMING_CALL)) {
callSession = intent.getParcelableExtra("callSession");
mediaType = callSession.getMediaType();
} else {
callSession = RongCallClient.getInstance().getCallSession();
mediaType = callSession.getMediaType();
}
if (!requestCallPermissions(mediaType, REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS)) {
return;
}
if (callSession != null) {
setupIntent();
}
super.onNewIntent(intent);
}
@TargetApi(23)
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
switch (requestCode) {
case REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS:
boolean permissionGranted;
if (mediaType == RongCallCommon.CallMediaType.AUDIO) {
permissionGranted = PermissionCheckUtil.checkPermissions(this, AUDIO_CALL_PERMISSIONS);
} else {
permissionGranted = PermissionCheckUtil.checkPermissions(this, VIDEO_CALL_PERMISSIONS);
}
if (permissionGranted) {
if (startForCheckPermissions) {
startForCheckPermissions = false;
RongCallClient.getInstance().onPermissionGranted();
} else {
setupIntent();
}
} else {
if (startForCheckPermissions) {
startForCheckPermissions = false;
RongCallClient.getInstance().onPermissionDenied();
} else {
finish();
}
}
break;
default:
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS) {
String[] permissions;
if (mediaType == RongCallCommon.CallMediaType.AUDIO) {
permissions = AUDIO_CALL_PERMISSIONS;
} else {
permissions = VIDEO_CALL_PERMISSIONS;
}
if (PermissionCheckUtil.checkPermissions(this, permissions)) {
if (startForCheckPermissions) {
RongCallClient.getInstance().onPermissionGranted();
} else {
setupIntent();
}
} else {
if (startForCheckPermissions) {
RongCallClient.getInstance().onPermissionDenied();
} else {
finish();
}
}
} else {
super.onActivityResult(requestCode, resultCode, data);
}
}
private void setupIntent() {
RongCallCommon.CallMediaType mediaType;
Intent intent = getIntent();
RongCallAction callAction = RongCallAction.valueOf(intent.getStringExtra("callAction"));
// if (callAction.equals(RongCallAction.ACTION_RESUME_CALL)) {
// return;
// }
if (callAction.equals(RongCallAction.ACTION_INCOMING_CALL)) {
callSession = intent.getParcelableExtra("callSession");
mediaType = callSession.getMediaType();
targetId = callSession.getInviterUserId();
} else if (callAction.equals(RongCallAction.ACTION_OUTGOING_CALL)) {
if (intent.getAction().equals(RongVoIPIntent.RONG_INTENT_ACTION_VOIP_SINGLEAUDIO)) {
mediaType = RongCallCommon.CallMediaType.AUDIO;
} else {
mediaType = RongCallCommon.CallMediaType.VIDEO;
}
Conversation.ConversationType conversationType = Conversation.ConversationType.valueOf(intent.getStringExtra("conversationType").toUpperCase(Locale.US));
targetId = intent.getStringExtra("targetId");
List<String> userIds = new ArrayList<>();
userIds.add(targetId);
RongCallClient.getInstance().startCall(conversationType, targetId, userIds, mediaType, null);
} else { // resume call
callSession = RongCallClient.getInstance().getCallSession();
mediaType = callSession.getMediaType();
}
if (mediaType.equals(RongCallCommon.CallMediaType.AUDIO)) {
handFree = false;
} else if (mediaType.equals(RongCallCommon.CallMediaType.VIDEO)) {
handFree = true;
}
UserInfo userInfo = RongContext.getInstance().getUserInfoFromCache(targetId);
if (userInfo != null) {
TextView userName = (TextView) mUserInfoContainer.findViewById(R.id.rc_voip_user_name);
userName.setText(userInfo.getName());
if (mediaType.equals(RongCallCommon.CallMediaType.AUDIO)) {
AsyncImageView userPortrait = (AsyncImageView) mUserInfoContainer.findViewById(R.id.rc_voip_user_portrait);
if (userPortrait != null && userInfo.getPortraitUri() != null) {
userPortrait.setResource(userInfo.getPortraitUri().toString(), R.drawable.rc_default_portrait);
}
}
}
createPowerManager();
createPickupDetector();
}
@Override
protected void onResume() {
super.onResume();
if (pickupDetector != null && mediaType.equals(RongCallCommon.CallMediaType.AUDIO)) {
pickupDetector.register(this);
}
}
@Override
protected void onPause() {
super.onPause();
if (pickupDetector != null) {
pickupDetector.unRegister();
}
}
private void initView(RongCallCommon.CallMediaType mediaType, RongCallAction callAction) {
FrameLayout buttonLayout = (FrameLayout) inflater.inflate(R.layout.rc_voip_call_bottom_connected_button_layout, null);
RelativeLayout userInfoLayout = (RelativeLayout) inflater.inflate(R.layout.rc_voip_audio_call_user_info, null);
userInfoLayout.findViewById(R.id.rc_voip_call_minimize).setVisibility(View.GONE);
if (callAction.equals(RongCallAction.ACTION_OUTGOING_CALL)) {
buttonLayout.findViewById(R.id.rc_voip_call_mute).setVisibility(View.GONE);
buttonLayout.findViewById(R.id.rc_voip_handfree).setVisibility(View.GONE);
}
if (mediaType.equals(RongCallCommon.CallMediaType.AUDIO)) {
findViewById(R.id.rc_voip_call_information).setBackgroundColor(getResources().getColor(R.color.rc_voip_background_color));
mLPreviewContainer.setVisibility(View.GONE);
mSPreviewContainer.setVisibility(View.GONE);
if (callAction.equals(RongCallAction.ACTION_INCOMING_CALL)) {
buttonLayout = (FrameLayout) inflater.inflate(R.layout.rc_voip_call_bottom_incoming_button_layout, null);
TextView callInfo = (TextView) userInfoLayout.findViewById(R.id.rc_voip_call_remind_info);
callInfo.setText(R.string.rc_voip_audio_call_inviting);
onIncomingCallRinging();
}
} else {
userInfoLayout = (RelativeLayout) inflater.inflate(R.layout.rc_voip_video_call_user_info, null);
if (callAction.equals(RongCallAction.ACTION_INCOMING_CALL)) {
findViewById(R.id.rc_voip_call_information).setBackgroundColor(getResources().getColor(R.color.rc_voip_background_color));
buttonLayout = (FrameLayout) inflater.inflate(R.layout.rc_voip_call_bottom_incoming_button_layout, null);
TextView callInfo = (TextView) userInfoLayout.findViewById(R.id.rc_voip_call_remind_info);
callInfo.setText(R.string.rc_voip_video_call_inviting);
onIncomingCallRinging();
ImageView answerV = (ImageView) buttonLayout.findViewById(R.id.rc_voip_call_answer_btn);
answerV.setImageResource(R.drawable.rc_voip_vedio_answer_selector);
}
}
mButtonContainer.removeAllViews();
mButtonContainer.addView(buttonLayout);
mUserInfoContainer.removeAllViews();
mUserInfoContainer.addView(userInfoLayout);
}
@Override
public void onCallOutgoing(RongCallSession callSession, SurfaceView localVideo) {
super.onCallOutgoing(callSession, localVideo);
this.callSession = callSession;
if (callSession.getMediaType().equals(RongCallCommon.CallMediaType.VIDEO)) {
mLPreviewContainer.setVisibility(View.VISIBLE);
localVideo.setTag(callSession.getSelfUserId());
mLPreviewContainer.addView(localVideo);
}
onOutgoingCallRinging();
}
@Override
public void onCallConnected(RongCallSession callSession, SurfaceView localVideo) {
super.onCallConnected(callSession, localVideo);
this.callSession = callSession;
TextView remindInfo = (TextView) mUserInfoContainer.findViewById(R.id.rc_voip_call_remind_info);
setupTime(remindInfo);
if (callSession.getMediaType().equals(RongCallCommon.CallMediaType.AUDIO)) {
findViewById(R.id.rc_voip_call_minimize).setVisibility(View.VISIBLE);
FrameLayout btnLayout = (FrameLayout) inflater.inflate(R.layout.rc_voip_call_bottom_connected_button_layout, null);
mButtonContainer.removeAllViews();
mButtonContainer.addView(btnLayout);
} else {
mLocalVideo = localVideo;
mLocalVideo.setTag(callSession.getSelfUserId());
}
RongCallClient.getInstance().setEnableLocalAudio(!muted);
View muteV = mButtonContainer.findViewById(R.id.rc_voip_call_mute);
if (muteV != null) {
muteV.setSelected(muted);
}
AudioManager audioManager = (AudioManager) getSystemService(AUDIO_SERVICE);
if (audioManager.isWiredHeadsetOn()) {
RongCallClient.getInstance().setEnableSpeakerphone(false);
} else {
RongCallClient.getInstance().setEnableSpeakerphone(handFree);
}
View handFreeV = mButtonContainer.findViewById(R.id.rc_voip_handfree);
if (handFreeV != null) {
handFreeV.setSelected(handFree);
}
stopRing();
}
@Override
protected void onDestroy() {
stopRing();
if (wakeLock != null && wakeLock.isHeld()) {
wakeLock.setReferenceCounted(false);
wakeLock.release();
}
RLog.d(TAG, "SingleCallActivity onDestroy");
super.onDestroy();
}
@Override
public void onRemoteUserJoined(final String userId, RongCallCommon.CallMediaType mediaType, SurfaceView remoteVideo) {
super.onRemoteUserJoined(userId, mediaType, remoteVideo);
if (mediaType.equals(RongCallCommon.CallMediaType.VIDEO)) {
findViewById(R.id.rc_voip_call_information).setBackgroundColor(getResources().getColor(android.R.color.transparent));
mLPreviewContainer.setVisibility(View.VISIBLE);
mLPreviewContainer.removeAllViews();
remoteVideo.setTag(userId);
mLPreviewContainer.addView(remoteVideo);
mLPreviewContainer.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (isInformationShow) {
hideVideoCallInformation();
} else {
showVideoCallInformation();
handler.sendEmptyMessageDelayed(EVENT_FULL_SCREEN, 5 * 1000);
}
}
});
mSPreviewContainer.setVisibility(View.VISIBLE);
mSPreviewContainer.removeAllViews();
if (mLocalVideo != null) {
mLocalVideo.setZOrderMediaOverlay(true);
mLocalVideo.setZOrderOnTop(true);
mSPreviewContainer.addView(mLocalVideo);
}
mSPreviewContainer.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SurfaceView fromView = (SurfaceView) mSPreviewContainer.getChildAt(0);
SurfaceView toView = (SurfaceView) mLPreviewContainer.getChildAt(0);
mLPreviewContainer.removeAllViews();
mSPreviewContainer.removeAllViews();
fromView.setZOrderOnTop(false);
fromView.setZOrderMediaOverlay(false);
mLPreviewContainer.addView(fromView);
toView.setZOrderOnTop(true);
toView.setZOrderMediaOverlay(true);
mSPreviewContainer.addView(toView);
}
});
mButtonContainer.setVisibility(View.GONE);
mUserInfoContainer.setVisibility(View.GONE);
}
}
@Override
public void onMediaTypeChanged(String userId, RongCallCommon.CallMediaType mediaType, SurfaceView video) {
if (callSession.getSelfUserId().equals(userId)) {
showShortToast(getString(R.string.rc_voip_switched_to_audio));
} else {
if (callSession.getMediaType() != RongCallCommon.CallMediaType.AUDIO) {
RongCallClient.getInstance().changeCallMediaType(RongCallCommon.CallMediaType.AUDIO);
callSession.setMediaType(RongCallCommon.CallMediaType.AUDIO);
showShortToast(getString(R.string.rc_voip_remote_switched_to_audio));
}
}
initAudioCallView();
handler.removeMessages(EVENT_FULL_SCREEN);
mButtonContainer.findViewById(R.id.rc_voip_call_mute).setSelected(muted);
}
private void initAudioCallView() {
mLPreviewContainer.removeAllViews();
mLPreviewContainer.setVisibility(View.GONE);
mSPreviewContainer.removeAllViews();
mSPreviewContainer.setVisibility(View.GONE);
findViewById(R.id.rc_voip_call_information).setBackgroundColor(getResources().getColor(R.color.rc_voip_background_color));
findViewById(R.id.rc_voip_audio_chat).setVisibility(View.GONE);
View userInfoView = inflater.inflate(R.layout.rc_voip_audio_call_user_info, null);
TextView timeView = (TextView) userInfoView.findViewById(R.id.rc_voip_call_remind_info);
setupTime(timeView);
mUserInfoContainer.removeAllViews();
mUserInfoContainer.addView(userInfoView);
UserInfo userInfo = RongContext.getInstance().getUserInfoFromCache(targetId);
if (userInfo != null) {
TextView userName = (TextView) mUserInfoContainer.findViewById(R.id.rc_voip_user_name);
userName.setText(userInfo.getName());
if (callSession.getMediaType().equals(RongCallCommon.CallMediaType.AUDIO)) {
AsyncImageView userPortrait = (AsyncImageView) mUserInfoContainer.findViewById(R.id.rc_voip_user_portrait);
if (userPortrait != null) {
userPortrait.setAvatar(userInfo.getPortraitUri().toString(), R.drawable.rc_default_portrait);
}
}
}
mUserInfoContainer.setVisibility(View.VISIBLE);
mUserInfoContainer.findViewById(R.id.rc_voip_call_minimize).setVisibility(View.VISIBLE);
View button = inflater.inflate(R.layout.rc_voip_call_bottom_connected_button_layout, null);
mButtonContainer.removeAllViews();
mButtonContainer.addView(button);
mButtonContainer.setVisibility(View.VISIBLE);
View handFreeV = mButtonContainer.findViewById(R.id.rc_voip_handfree);
handFreeV.setSelected(handFree);
if (pickupDetector != null) {
pickupDetector.register(this);
}
}
public void onHangupBtnClick(View view) {
RongCallSession session = RongCallClient.getInstance().getCallSession();
if (session == null || isFinishing) {
finish();
return;
}
RongCallClient.getInstance().hangUpCall(session.getCallId());
stopRing();
}
public void onReceiveBtnClick(View view) {
RongCallSession session = RongCallClient.getInstance().getCallSession();
if (session == null || isFinishing) {
finish();
return;
}
RongCallClient.getInstance().acceptCall(session.getCallId());
}
public void hideVideoCallInformation() {
isInformationShow = false;
mUserInfoContainer.setVisibility(View.GONE);
mButtonContainer.setVisibility(View.GONE);
findViewById(R.id.rc_voip_audio_chat).setVisibility(View.GONE);
}
public void showVideoCallInformation() {
isInformationShow = true;
mUserInfoContainer.setVisibility(View.VISIBLE);
mUserInfoContainer.findViewById(R.id.rc_voip_call_minimize).setVisibility(View.VISIBLE);
mButtonContainer.setVisibility(View.VISIBLE);
FrameLayout btnLayout = (FrameLayout) inflater.inflate(R.layout.rc_voip_call_bottom_connected_button_layout, null);
btnLayout.findViewById(R.id.rc_voip_call_mute).setSelected(muted);
btnLayout.findViewById(R.id.rc_voip_handfree).setVisibility(View.GONE);
btnLayout.findViewById(R.id.rc_voip_camera).setVisibility(View.VISIBLE);
mButtonContainer.removeAllViews();
mButtonContainer.addView(btnLayout);
View view = findViewById(R.id.rc_voip_audio_chat);
view.setVisibility(View.VISIBLE);
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
RongCallClient.getInstance().changeCallMediaType(RongCallCommon.CallMediaType.AUDIO);
callSession.setMediaType(RongCallCommon.CallMediaType.AUDIO);
initAudioCallView();
}
});
}
public void onHandFreeButtonClick(View view) {
RongCallClient.getInstance().setEnableSpeakerphone(!view.isSelected());
view.setSelected(!view.isSelected());
handFree = view.isSelected();
}
public void onMuteButtonClick(View view) {
RongCallClient.getInstance().setEnableLocalAudio(view.isSelected());
view.setSelected(!view.isSelected());
muted = view.isSelected();
}
@Override
public void onCallDisconnected(RongCallSession callSession, RongCallCommon.CallDisconnectedReason reason) {
super.onCallDisconnected(callSession, reason);
String senderId;
String extra = "";
isFinishing = true;
if (callSession == null) {
RLog.e(TAG, "onCallDisconnected. callSession is null!");
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
return;
}
senderId = callSession.getInviterUserId();
switch (reason) {
case HANGUP:
case REMOTE_HANGUP:
long time = getTime();
if (time >= 3600) {
extra = String.format("%d:%02d:%02d", time / 3600, (time % 3600) / 60, (time % 60));
} else {
extra = String.format("%02d:%02d", (time % 3600) / 60, (time % 60));
}
break;
case OTHER_DEVICE_HAD_ACCEPTED:
showShortToast(getString(R.string.rc_voip_call_other));
break;
}
if (!TextUtils.isEmpty(senderId)) {
CallSTerminateMessage message = new CallSTerminateMessage();
message.setReason(reason);
message.setMediaType(callSession.getMediaType());
message.setExtra(extra);
if (senderId.equals(callSession.getSelfUserId())) {
message.setDirection("MO");
RongIM.getInstance().insertOutgoingMessage(Conversation.ConversationType.PRIVATE, callSession.getTargetId(), io.rong.imlib.model.Message.SentStatus.SENT, message, null);
} else {
message.setDirection("MT");
io.rong.imlib.model.Message.ReceivedStatus receivedStatus = new io.rong.imlib.model.Message.ReceivedStatus(0);
receivedStatus.setRead();
RongIM.getInstance().insertIncomingMessage(Conversation.ConversationType.PRIVATE, callSession.getTargetId(), senderId, receivedStatus, message, null);
}
}
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
}
@Override
public void onRestoreFloatBox(Bundle bundle) {
super.onRestoreFloatBox(bundle);
if (bundle == null)
return;
muted = bundle.getBoolean("muted");
handFree = bundle.getBoolean("handFree");
setShouldShowFloat(true);
callSession = RongCallClient.getInstance().getCallSession();
RongCallCommon.CallMediaType mediaType = callSession.getMediaType();
RongCallAction callAction = RongCallAction.valueOf(getIntent().getStringExtra("callAction"));
inflater = LayoutInflater.from(this);
initView(mediaType, callAction);
targetId = callSession.getTargetId();
UserInfo userInfo = RongContext.getInstance().getUserInfoFromCache(targetId);
if (userInfo != null) {
TextView userName = (TextView) mUserInfoContainer.findViewById(R.id.rc_voip_user_name);
userName.setText(userInfo.getName());
if (mediaType.equals(RongCallCommon.CallMediaType.AUDIO)) {
AsyncImageView userPortrait = (AsyncImageView) mUserInfoContainer.findViewById(R.id.rc_voip_user_portrait);
if (userPortrait != null) {
userPortrait.setAvatar(userInfo.getPortraitUri().toString(), R.drawable.rc_default_portrait);
}
}
}
SurfaceView localVideo = null;
SurfaceView remoteVideo = null;
String remoteUserId = null;
for (CallUserProfile profile : callSession.getParticipantProfileList()) {
if (profile.getUserId().equals(RongIMClient.getInstance().getCurrentUserId())) {
localVideo = profile.getVideoView();
} else {
remoteVideo = profile.getVideoView();
remoteUserId = profile.getUserId();
}
}
if (localVideo != null && localVideo.getParent() != null) {
((ViewGroup) localVideo.getParent()).removeView(localVideo);
}
onCallOutgoing(callSession, localVideo);
onCallConnected(callSession, localVideo);
if (remoteVideo != null && remoteVideo.getParent() != null) {
((ViewGroup) remoteVideo.getParent()).removeView(remoteVideo);
onRemoteUserJoined(remoteUserId, mediaType, remoteVideo);
}
}
@Override
public String onSaveFloatBoxState(Bundle bundle) {
super.onSaveFloatBoxState(bundle);
callSession = RongCallClient.getInstance().getCallSession();
bundle.putBoolean("muted", muted);
bundle.putBoolean("handFree", handFree);
bundle.putInt("mediaType", callSession.getMediaType().getValue());
return getIntent().getAction();
}
public void onMinimizeClick(View view) {
super.onMinimizeClick(view);
}
public void onSwitchCameraClick(View view) {
RongCallClient.getInstance().switchCamera();
}
@Override
public void onBackPressed() {
return;
// List<CallUserProfile> participantProfiles = callSession.getParticipantProfileList();
// RongCallCommon.CallStatus callStatus = null;
// for (CallUserProfile item : participantProfiles) {
// if (item.getUserId().equals(callSession.getSelfUserId())) {
// callStatus = item.getCallStatus();
// break;
// }
// }
// if (callStatus != null && callStatus.equals(RongCallCommon.CallStatus.CONNECTED)) {
// super.onBackPressed();
// } else {
// RongCallClient.getInstance().hangUpCall(callSession.getCallId());
// }
}
public void onEventMainThread(UserInfo userInfo) {
if (targetId != null && targetId.equals(userInfo.getUserId())) {
TextView userName = (TextView) mUserInfoContainer.findViewById(R.id.rc_voip_user_name);
if (userInfo.getName() != null)
userName.setText(userInfo.getName());
AsyncImageView userPortrait = (AsyncImageView) mUserInfoContainer.findViewById(R.id.rc_voip_user_portrait);
if (userPortrait != null && userInfo.getPortraitUri() != null) {
userPortrait.setResource(userInfo.getPortraitUri().toString(), R.drawable.rc_default_portrait);
}
}
}
// @Override
// public void showOnGoingNotification() {
// Intent intent = new Intent(getIntent().getAction());
// Bundle bundle = new Bundle();
// onSaveFloatBoxState(bundle);
// intent.putExtra("floatbox", bundle);
// intent.putExtra("callAction", RongCallAction.ACTION_RESUME_CALL.getName());
// PendingIntent pendingIntent = PendingIntent.getActivity(this, 1000, intent, PendingIntent.FLAG_UPDATE_CURRENT);
// NotificationUtil.showNotification(this, "todo", "coontent", pendingIntent, CALL_NOTIFICATION_ID);
// }
}
| mit |
mdomlad85/foirun | FOIRun/ANT-Android-SDKs/ANT+_Android_SDK/Sample/ANT+ Plugin Sampler/source/src/com/dsi/ant/antplus/pluginsampler/bloodpressure/LayoutController_BloodPressure.java | 6224 | /*
This software is subject to the license described in the License.txt file
included with this software distribution. You may not use this file except in compliance
with this license.
Copyright (c) Dynastream Innovations Inc. 2013
All rights reserved.
*/
package com.dsi.ant.antplus.pluginsampler.bloodpressure;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.dsi.ant.antplus.pluginsampler.R;
import com.garmin.fit.BloodPressureMesg;
import com.garmin.fit.DateTime;
import com.garmin.fit.Fit;
import com.garmin.fit.HrType;
import java.io.Closeable;
import java.io.IOException;
/**
* Controls the blood pressure display
*/
public class LayoutController_BloodPressure implements Closeable
{
private ViewGroup viewGroup_Parent;
private View view_layout;
/**
* Constructor
* @param inflator Parent view inflator.
* @param viewGroup_Parent Parent view.
* @param fitBpmMesg The blood pressure data.
*/
public LayoutController_BloodPressure(LayoutInflater inflator, ViewGroup viewGroup_Parent, BloodPressureMesg fitBpmMesg)
{
this.viewGroup_Parent = viewGroup_Parent;
this.view_layout = inflator.inflate(R.layout.layout_bloodpressure, null);
TextView textView_Timestamp = (TextView)view_layout.findViewById(R.id.textView_Timestamp);
TextView textView_UserProfileIndex = (TextView)view_layout.findViewById(R.id.textView_UserProfileIndex);
TextView textView_SystolicPressure = (TextView)view_layout.findViewById(R.id.textView_SystolicPressure);
TextView textView_DiastolicPressure = (TextView)view_layout.findViewById(R.id.textView_DiastolicPressure);
TextView textView_MeanArterialPressure = (TextView)view_layout.findViewById(R.id.textView_MeanArterialPressure);
TextView textView_HeartRate = (TextView)view_layout.findViewById(R.id.textView_HeartRate);
TextView textView_MapThreeSampleMean = (TextView)view_layout.findViewById(R.id.textView_MapThreeSampleMean);
TextView textView_MapMorningValues = (TextView)view_layout.findViewById(R.id.textView_MapMorningValues);
TextView textView_MapEveningValues = (TextView)view_layout.findViewById(R.id.textView_MapEveningValues);
TextView textView_HeartRateType = (TextView)view_layout.findViewById(R.id.textView_HeartRateType);
TextView textView_Status = (TextView)view_layout.findViewById(R.id.textView_Status);
//NOTE: All linked data messages must have the SAME timestamp
if((fitBpmMesg.getTimestamp() != null) && (!fitBpmMesg.getTimestamp().getTimestamp().equals(DateTime.INVALID)))
textView_Timestamp.setText(fitBpmMesg.getTimestamp().toString());
else
textView_Timestamp.setText("N/A");
if((fitBpmMesg.getUserProfileIndex() != null) && (!fitBpmMesg.getUserProfileIndex().equals(Fit.UINT16_INVALID)))
textView_UserProfileIndex.setText(fitBpmMesg.getUserProfileIndex().toString());
else
textView_UserProfileIndex.setText("N/A");
if((fitBpmMesg.getSystolicPressure() != null) && (!fitBpmMesg.getSystolicPressure().equals(Fit.UINT16_INVALID)))
textView_SystolicPressure.setText(fitBpmMesg.getSystolicPressure().toString() + "mmHg");
else
textView_SystolicPressure.setText("N/A");
if((fitBpmMesg.getDiastolicPressure() != null) && (!fitBpmMesg.getDiastolicPressure().equals(Fit.UINT16_INVALID)))
textView_DiastolicPressure.setText(fitBpmMesg.getDiastolicPressure().toString() + "mmHg");
else
textView_DiastolicPressure.setText("N/A");
if((fitBpmMesg.getMeanArterialPressure() != null) && (!fitBpmMesg.getMeanArterialPressure().equals(Fit.UINT16_INVALID)))
textView_MeanArterialPressure.setText(fitBpmMesg.getMeanArterialPressure().toString() + "mmHg");
else
textView_MeanArterialPressure.setText("N/A");
if((fitBpmMesg.getHeartRate() != null) && (!fitBpmMesg.getHeartRate().equals(Fit.UINT8_INVALID)))
textView_HeartRate.setText(fitBpmMesg.getHeartRate().toString() + "bpm");
else
textView_HeartRate.setText("N/A");
if((fitBpmMesg.getMap3SampleMean() != null) && (!fitBpmMesg.getMap3SampleMean().equals(Fit.UINT16_INVALID)))
textView_MapThreeSampleMean.setText(fitBpmMesg.getMap3SampleMean().toString() + "mmHg");
else
textView_MapThreeSampleMean.setText("N/A");
if((fitBpmMesg.getMap3SampleMean() != null) && (!fitBpmMesg.getMap3SampleMean().equals(Fit.UINT16_INVALID)))
textView_MapThreeSampleMean.setText(fitBpmMesg.getMap3SampleMean().toString() + "mmHg");
else
textView_MapThreeSampleMean.setText("N/A");
if((fitBpmMesg.getMapMorningValues() != null) && (!fitBpmMesg.getMapMorningValues().equals(Fit.UINT16_INVALID)))
textView_MapMorningValues.setText(fitBpmMesg.getMapMorningValues().toString() + "mmHg");
else
textView_MapMorningValues.setText("N/A");
if((fitBpmMesg.getMapEveningValues() != null) && (!fitBpmMesg.getMapEveningValues().equals(Fit.UINT16_INVALID)))
textView_MapEveningValues.setText(fitBpmMesg.getMapEveningValues().toString() + "mmHg");
else
textView_MapEveningValues.setText("N/A");
if((fitBpmMesg.getHeartRateType() != null) && (!fitBpmMesg.getHeartRateType().equals(HrType.INVALID)))
textView_HeartRateType.setText(fitBpmMesg.getHeartRateType().toString());
else
textView_HeartRateType.setText("N/A");
if((fitBpmMesg.getStatus() != null))
textView_Status.setText(fitBpmMesg.getStatus().toString());
else
textView_Status.setText("N/A");
this.viewGroup_Parent.addView(view_layout, 0);
}
@Override
public void close() throws IOException
{
viewGroup_Parent.removeView(view_layout);
viewGroup_Parent = null;
view_layout = null;
}
}
| mit |
williancorrea/transport-api | src/main/java/br/com/wcorrea/transport/api/modulos/financeiro/bancoConta/BancoContaService.java | 1802 | package br.com.wcorrea.transport.api.modulos.financeiro.bancoConta;
import br.com.wcorrea.transport.api.modulos.financeiro.bancoAgencia.BancoAgenciaService;
import br.com.wcorrea.transport.api.utils.Criptografia;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Optional;
@Service
public class BancoContaService {
@Autowired
private BancoContaRepository bancoContaRepository;
@Autowired
private BancoAgenciaService bancoAgenciaService;
public BancoConta salvar(BancoConta bancoConta) {
bancoConta = prepararObj(bancoConta);
return bancoContaRepository.saveAndFlush(bancoConta);
}
public BancoConta atualizar(Long id, BancoConta bancoConta) {
BancoConta updateFound = buscarPorId(id);
bancoConta.setId(updateFound.getId());
bancoConta = prepararObj(bancoConta);
return bancoContaRepository.save(bancoConta);
}
private BancoConta prepararObj(BancoConta bancoConta) {
bancoConta.setBancoAgencia(bancoAgenciaService.buscarPorId(bancoConta.getBancoAgencia().getId()));
return bancoConta;
}
public BancoConta buscarPorObj(BancoConta obj) {
return buscarPorId(obj.getId());
}
public BancoConta buscarPorId(Long id) {
if (id != null && id > 0) {
Optional<BancoConta> obj = bancoContaRepository.findById(id);
if (obj.isPresent()) {
return obj.get();
}
}
throw new BancoContaExceptionNaoEncontrado();
}
public Long buscarPorKey(String key) {
try {
return new Criptografia().getKey(key);
} catch (Exception e) {
throw new BancoContaExceptionNaoEncontrado();
}
}
}
| mit |
nilsschmidt1337/ldparteditor | src/org/nschmidt/ldparteditor/dialog/isecalc/IsecalcDesign.java | 3649 | /* MIT - License
Copyright (c) 2012 - this year, Nils Schmidt
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
package org.nschmidt.ldparteditor.dialog.isecalc;
import static org.nschmidt.ldparteditor.helper.WidgetUtility.widgetUtil;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.nschmidt.ldparteditor.helper.composite3d.IsecalcSettings;
import org.nschmidt.ldparteditor.i18n.I18n;
/**
* The rounding precision dialog
* <p>
* Note: This class should not be instantiated, it defines the gui layout and no
* business logic.
*
* @author nils
*
*/
class IsecalcDesign extends Dialog {
final IsecalcSettings is;
final Combo[] cmbScopePtr = new Combo[1];
// Use final only for subclass/listener references!
IsecalcDesign(Shell parentShell, IsecalcSettings is) {
super(parentShell);
this.is = is;
}
/**
* Create contents of the dialog.
*
* @param parent
*/
@Override
protected Control createDialogArea(Composite parent) {
Composite cmpContainer = (Composite) super.createDialogArea(parent);
GridLayout gridLayout = (GridLayout) cmpContainer.getLayout();
gridLayout.verticalSpacing = 10;
gridLayout.horizontalSpacing = 10;
Label lblSpecify = new Label(cmpContainer, SWT.NONE);
lblSpecify.setText(I18n.ISECALC_TITLE);
Label lblSeparator = new Label(cmpContainer, SWT.SEPARATOR | SWT.HORIZONTAL);
lblSeparator.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
Combo cmbScope = new Combo(cmpContainer, SWT.READ_ONLY);
this.cmbScopePtr[0] = cmbScope;
widgetUtil(cmbScope).setItems(I18n.ISECALC_SCOPE_FILE, I18n.ISECALC_SCOPE_SELECTION);
cmbScope.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
cmbScope.setText(cmbScope.getItem(is.getScope()));
cmbScope.select(is.getScope());
cmpContainer.pack();
return cmpContainer;
}
/**
* Create contents of the button bar.
*
* @param parent
*/
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.OK_ID, I18n.DIALOG_OK, true);
createButton(parent, IDialogConstants.CANCEL_ID, I18n.DIALOG_CANCEL, false);
}
}
| mit |
cc12703/robolectric | robolectric/src/test/java/org/robolectric/shadows/ShadowNotificationBuilderTest.java | 4968 | package org.robolectric.shadows;
import android.app.Notification;
import android.app.Notification.Style;
import android.app.PendingIntent;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.TestRunners;
import org.robolectric.shadows.ShadowNotification.Progress;
import static org.assertj.core.api.Assertions.assertThat;
import static org.robolectric.Shadows.shadowOf;
@RunWith(TestRunners.WithDefaults.class)
public class ShadowNotificationBuilderTest {
private Notification notification;
private ShadowNotification s;
private final Notification.Builder builder = new Notification.Builder(RuntimeEnvironment.application);
@Test
public void build_setsContentTitleOnNotification() throws Exception {
builder.setContentTitle("Hello");
build();
assertThat(s.getContentTitle().toString()).isEqualTo("Hello");
}
@Test
public void build_whenSetOngoingNotSet_leavesSetOngoingAsFalse() {
build();
assertThat(s.isOngoing()).isFalse();
}
@Test
public void build_whenSetOngoing_setsOngoingToTrue() {
builder.setOngoing(true);
build();
assertThat(s.isOngoing()).isTrue();
}
@Test
public void build_whenShowWhenNotSet_setsShowWhenOnNotificationToTrue() {
build();
assertThat(s.isWhenShown()).isTrue();
}
@Test
public void build_setShowWhenOnNotification() {
builder.setShowWhen(false);
build();
assertThat(s.isWhenShown()).isFalse();
}
@Test
public void build_setsContentTextOnNotification() throws Exception {
builder.setContentText("Hello Text");
build();
assertThat(s.getContentText().toString()).isEqualTo("Hello Text");
}
@Test
public void build_setsTickerOnNotification() throws Exception {
builder.setTicker("My ticker");
build();
assertThat(s.getTicker().toString()).isEqualTo("My ticker");
}
@Test
public void build_setsContentInfoOnNotification() throws Exception {
builder.setContentInfo("11");
build();
assertThat(s.getContentInfo().toString()).isEqualTo("11");
}
@Test
public void build_setsIconOnNotification() throws Exception {
builder.setSmallIcon(9001);
build();
assertThat(s.getSmallIcon()).isEqualTo(9001);
}
@Test
public void build_setsWhenOnNotification() throws Exception {
builder.setWhen(11L);
build();
assertThat(s.getWhen()).isEqualTo(11L);
}
@Test
public void build_setsProgressOnNotification_true() throws Exception {
builder.setProgress(36, 57, true);
build();
Progress p = s.getProgress();
assertThat(p.max).isEqualTo(36);
assertThat(p.progress).isEqualTo(57);
assertThat(p.indeterminate).isTrue();
}
@Test
public void build_setsProgressOnNotification_false() throws Exception {
builder.setProgress(34, 56, false);
build();
Progress p = s.getProgress();
assertThat(p.max).isEqualTo(34);
assertThat(p.progress).isEqualTo(56);
assertThat(p.indeterminate).isFalse();
}
@Test
public void build_setsStyleOnNotification() throws Exception {
Style style = new Style() {
@Override
public Notification buildStyled(Notification notification) {
return notification;
}
@Override
public Notification build() {
return new Notification();
}
};
builder.setStyle(style);
build();
assertThat(s.getStyle()).isSameAs(style);
}
@Test
public void build_setsUsesChronometerOnNotification_true() throws Exception {
builder.setUsesChronometer(true);
build();
assertThat(s.usesChronometer()).isTrue();
}
@Test
public void build_setsUsesChronometerOnNotification_false() throws Exception {
builder.setUsesChronometer(false);
build();
assertThat(s.usesChronometer()).isFalse();
}
@Test
public void build_handlesNullContentTitle() {
builder.setContentTitle(null);
build();
assertThat(s.getContentTitle()).isNull();
}
@Test
public void build_handlesNullContentText() {
builder.setContentText(null);
build();
assertThat(s.getContentText()).isNull();
}
@Test
public void build_handlesNullTicker() {
builder.setTicker(null);
build();
assertThat(s.getTicker()).isNull();
}
@Test
public void build_handlesNullContentInfo() {
builder.setContentInfo(null);
build();
assertThat(s.getContentInfo()).isNull();
}
@Test
public void build_handlesNullStyle() {
builder.setStyle(null);
build();
assertThat(s.getStyle()).isNull();
}
@Test
public void build_addsActionToNotification() throws Exception {
PendingIntent action = PendingIntent.getBroadcast(RuntimeEnvironment.application, 0, null, 0);
builder.addAction(0, "Action", action);
build();
assertThat(s.getActions().get(0).actionIntent).isEqualToComparingFieldByField(action);
}
private void build() {
notification = builder.build();
s = shadowOf(notification);
}
}
| mit |
TGX-ZQ/Z-Queen | src/main/java/com/tgx/zq/z/queen/biz/inf/IConsistentRead.java | 1924 | /*
* MIT License
*
* Copyright (c) 2016~2017 Z-Chess
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
package com.tgx.zq.z.queen.biz.inf;
import com.tgx.zq.z.queen.base.util.Pair;
import com.tgx.zq.z.queen.base.util.Triple;
import com.tgx.zq.z.queen.biz.template.BizNode;
import com.tgx.zq.z.queen.db.bdb.inf.IBizDao;
import com.tgx.zq.z.queen.db.bdb.inf.IDbStorageProtocol;
import com.tgx.zq.z.queen.io.inf.ICommand;
import com.tgx.zq.z.queen.io.inf.IDestine;
import com.tgx.zq.z.queen.io.inf.ISession;
/**
* @author William.d.zk
*/
public interface IConsistentRead<E extends IDbStorageProtocol, D extends IBizDao<E>, N extends BizNode<E, D>>
extends
IDestine
{
Triple<RESULT, ICommand, Throwable> localRead(final ICommand _inCommand, final D bizDao);
Pair<ICommand, ISession> consistentRead(final long transactionKey, final N bizNode);
}
| mit |
typescript-exercise/rusk | src/main/java/rusk/domain/task/Task.java | 9641 | package rusk.domain.task;
import static java.util.stream.Collectors.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import rusk.common.util.Now;
import rusk.domain.task.exception.DuplicateWorkTimeException;
import rusk.domain.task.exception.UnexpectedSwitchStatusException;
import rusk.domain.task.exception.WorkTimeNotFoundException;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
@JsonIgnoreProperties(ignoreUnknown=true)
@JsonTypeInfo(use=Id.CLASS)
public abstract class Task {
private Long id;
private String title;
private String detail;
private Date registeredDate;
private Priority priority;
private List<WorkTime> workTimes = new ArrayList<>();
private Date updateDate;
protected Task(Date registeredDate) {
this.setRegisteredDate(registeredDate);
}
private void setRegisteredDate(Date registeredDate) {
Validate.notNull(registeredDate, "登録日は必須です。");
this.registeredDate = new Date(registeredDate.getTime());
}
protected Task(long id, Date registeredDate) {
this.setId(id);
this.setRegisteredDate(registeredDate);
}
public void setId(long id) {
Validate.isTrue(0 < id, "ID は 1 以上の値のみ受け付けます。");
this.id = id;
}
/**
* 作業時間を追加する。
* @param time 作業時間
* @throws DuplicateWorkTimeException 追加した作業時間が、既にこのタスクに登録されている作業時間と重複する場合
*/
public void addWorkTime(WorkTime time) throws DuplicateWorkTimeException {
Validate.notNull(time, "作業時間は必須です。");
this.workTimes.forEach(workTime -> {
if (workTime.isDuplicate(time)) {
throw new DuplicateWorkTimeException(workTime, time);
}
});
this.workTimes.add(time);
}
/**
* このタスクの作業時間のリストのコピーを取得する。
* @return 作業時間のリストのコピー。作業時間が存在しない場合、空のリストを返す。
*/
public List<WorkTime> getWorkTimes() {
return new ArrayList<>(this.workTimes);
}
/**
* 作業時間を設定します。
* <p>
* null を渡した場合、空のリストで作業時間が上書きされます。
*
* @param workTimes 作業時間
* @throws DuplicateWorkTimeException リストの中に作業時間が重複する要素が存在する場合
*/
public void setWorkTimes(List<WorkTime> workTimes) throws DuplicateWorkTimeException {
if (workTimes == null) {
this.workTimes = new ArrayList<>();
} else {
workTimes.forEach(one -> {
workTimes
.stream()
.filter(other -> one != other)
.forEach(other -> {
if (one.isDuplicate(other)) {
throw new DuplicateWorkTimeException(one, other);
}
});
});
this.workTimes = new ArrayList<>(workTimes);
}
}
/**
* このタスクの作業時間の合計をミリ秒で取得する。
*
* @return 作業時間の合計(ミリ秒)
*/
public long getTotalWorkTime() {
return this.workTimes.stream().collect(summingLong(workTime -> workTime.getDuration()));
}
/**
* 作業中の作業時間を取得します。
* <p>
* 作業中の作業時間とは、終了時間が設定されていない作業時間のことを表します。
* <p>
* このクラスでは、このメソッドは常に Null オブジェクトが返します。<br>
* Null オブジェクトは、全てのメソッドが何も処理を行わず、値を返すメソッドは null, 0, false のいずれかを返します。
*
* @return 作業中の作業時間。
*/
public WorkTime getWorkTimeInWorking() {
return new NullObjectWorkTime();
}
protected void overwriteBy(Task src) {
this.id = src.id;
this.title = src.title;
this.detail = src.detail;
this.registeredDate = src.getRegisteredDate();
this.setPriority(src.getPriority());
this.workTimes = src.getWorkTimes();
this.updateDate = src.getUpdateDate();
}
public void setTitle(String title) {
Validate.notEmpty(title, "タイトルは必須です。");
this.title = title;
}
public void setDetail(String detail) {
this.detail = detail;
}
public void setPriority(Priority priority) {
Validate.notNull(priority, "優先度は必須です。");
this.priority = priority;
}
public Long getId() {
return id;
}
public String getTitle() {
return title;
}
public String getDetail() {
return detail;
}
public Date getRegisteredDate() {
return new Date(registeredDate.getTime());
}
public Priority getPriority() {
return priority;
}
public Date getUpdateDate() {
if (this.updateDate == null) {
return null;
} else {
return new Date(this.updateDate.getTime());
}
}
void setUpdateDate(Date updateDate) {
Validate.notNull(updateDate, "更新日は必須です。");
this.updateDate = new Date(updateDate.getTime());
}
public boolean isRankS() {
return this.priority.is(Rank.S);
}
public boolean isRankA() {
return this.priority.is(Rank.A);
}
public boolean isRankB() {
return this.priority.is(Rank.B);
}
public boolean isRankC() {
return this.priority.is(Rank.C);
}
public boolean isCompleted() {
return false;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
}
public Date getCompletedDate() {
return null;
}
abstract public Status getStatus();
abstract public List<Status> getEnableToSwitchStatusList();
public Task switchToCompletedTask() {
throw new UnexpectedSwitchStatusException();
}
public Task switchToInWorkingTask() {
throw new UnexpectedSwitchStatusException();
}
public Task switchToStoppedTask() {
throw new UnexpectedSwitchStatusException();
}
/**
* 指定した作業時間を更新する。
* <p>
* ID が一致する作業時間が更新されます。
*
* @param modifiedWorkTime 更新する作業時間。
* @throws WorkTimeNotFoundException 指定した作業時間が存在しない場合
* @throws DuplicateWorkTimeException 作業時間が重複する場合
*/
public void modifyWorkTime(WorkTime modifiedWorkTime) {
Validate.notNull(modifiedWorkTime, "作業時間に null は渡せません。");
boolean removed = this.workTimes.removeIf(workTime -> workTime.getId() == modifiedWorkTime.getId());
if (removed) {
modifiedWorkTime.setUpdateDate(Now.getForWorkTimeUpdateDate());
this.addWorkTime(modifiedWorkTime);
} else {
throw new WorkTimeNotFoundException("作業時間が存在しません。 id=" + modifiedWorkTime.getId());
}
}
/**
* 指定した ID の作業時間のコピーを取得する。
*
* @param workTimeId 作業時間ID
* @return 作業時間
* @throws WorkTimeNotFoundException 指定した作業時間が存在しない場合
*/
public WorkTime getWorkTime(long workTimeId) {
Optional<WorkTime> found = this.workTimes.stream().filter(w -> w.getId() == workTimeId).findFirst();
if (found.isPresent()) {
return new WorkTime(found.get());
} else {
throw new WorkTimeNotFoundException("作業時間が存在しません。 id=" + workTimeId);
}
}
/**
* 指定した ID の作業時間を削除する。
*
* @param workTimeId 作業時間ID
* @throws WorkTimeNotFoundException 指定した作業時間が存在しない場合
*/
public void removeWorkTime(long workTimeId) {
boolean removed = this.workTimes.removeIf(w -> w.getId() == workTimeId);
if (!removed) {
throw new WorkTimeNotFoundException("作業時間が存在しません。 id=" + workTimeId);
}
}
/**
* このタスクが持つ全作業時間の ID をリストにして取得する。
*
* @return 全作業時間の ID
*/
public List<Long> getWorkTimeIds() {
return this.workTimes.stream().map(w -> w.getId()).collect(toList());
}
}
| mit |
frmst/v-leaflet | frameset-vaadin/src/main/java/pl/exsio/frameset/vaadin/bootstrap/vaadin/ui/provider/FramesetUIProvider.java | 2732 | /*
* The MIT License
*
* Copyright 2014 exsio.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package pl.exsio.frameset.vaadin.bootstrap.vaadin.ui.provider;
import com.vaadin.server.*;
import com.vaadin.ui.UI;
import pl.exsio.frameset.vaadin.bootstrap.spring.FramesetApplicationContext;
/**
*
* @author exsio
*/
public class FramesetUIProvider extends UIProvider {
protected static final String BEAN_NAME_PARAMETER = "beanName";
public FramesetUIProvider() {
}
@Override
public UI createInstance(UICreateEvent event) {
return (UI) FramesetApplicationContext.getApplicationContext().getBean(getUIBeanName(event.getRequest()));
}
@Override
public Class<? extends UI> getUIClass(UIClassSelectionEvent event) {
return (Class<? extends UI>) FramesetApplicationContext.getApplicationContext().getType(getUIBeanName(event.getRequest()));
}
@Override
public boolean isPreservedOnRefresh(UICreateEvent event) {
if (isSessionScopedUI(event.getRequest())) {
return true;
}
return super.isPreservedOnRefresh(event);
}
public boolean isSessionScopedUI(VaadinRequest request) {
return !FramesetApplicationContext.getApplicationContext().isPrototype(getUIBeanName(request));
}
protected String getUIBeanName(VaadinRequest request) {
String vaadinBeanName = "ui";
Object uiBeanName = request.getService().getDeploymentConfiguration().getApplicationOrSystemProperty(BEAN_NAME_PARAMETER, null);
if (uiBeanName != null && uiBeanName instanceof String) {
vaadinBeanName = uiBeanName.toString();
}
return vaadinBeanName;
}
}
| mit |
ivelin1936/Studing-SoftUni- | Java Fundamentals/Java OOP Advanced/Exercises - Generics/src/p10_tuple/Main.java | 1339 | package p10_tuple;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
List<Truple> truples = new ArrayList<>();
String[] tokens = reader.readLine().split("\\s+");
String fullName = String.format("%s %s", tokens[0], tokens[1]);
String address = tokens[2];
// Truple<Truple<String, String>, String> fullNameAddress =
// new Truple<>(new Truple<>(tokens[0], tokens[1]), tokens[2]);
truples.add(createTruple(fullName, address));
tokens = reader.readLine().split("\\s+");
String name = tokens[0];
int litersOfBeer = Integer.parseInt(tokens[1]);
truples.add(createTruple(name, litersOfBeer));
tokens = reader.readLine().split("\\s+");
int intNum = Integer.parseInt(tokens[0]);
double doubleNum = Double.parseDouble(tokens[1]);
truples.add(createTruple(intNum, doubleNum));
truples.forEach(System.out::println);
}
private static <T, E> Truple<T, E> createTruple(T item1, E item2) {
return new Truple<>(item1, item2);
}
}
| mit |
selvasingh/azure-sdk-for-java | sdk/network/mgmt-v2020_05_01/src/main/java/com/microsoft/azure/management/network/v2020_05_01/implementation/ExpressRouteCircuitsArpTableListResultInner.java | 1939 | /**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.network.v2020_05_01.implementation;
import java.util.List;
import com.microsoft.azure.management.network.v2020_05_01.ExpressRouteCircuitArpTable;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Response for ListArpTable associated with the Express Route Circuits API.
*/
public class ExpressRouteCircuitsArpTableListResultInner {
/**
* A list of the ARP tables.
*/
@JsonProperty(value = "value")
private List<ExpressRouteCircuitArpTable> value;
/**
* The URL to get the next set of results.
*/
@JsonProperty(value = "nextLink")
private String nextLink;
/**
* Get a list of the ARP tables.
*
* @return the value value
*/
public List<ExpressRouteCircuitArpTable> value() {
return this.value;
}
/**
* Set a list of the ARP tables.
*
* @param value the value value to set
* @return the ExpressRouteCircuitsArpTableListResultInner object itself.
*/
public ExpressRouteCircuitsArpTableListResultInner withValue(List<ExpressRouteCircuitArpTable> value) {
this.value = value;
return this;
}
/**
* Get the URL to get the next set of results.
*
* @return the nextLink value
*/
public String nextLink() {
return this.nextLink;
}
/**
* Set the URL to get the next set of results.
*
* @param nextLink the nextLink value to set
* @return the ExpressRouteCircuitsArpTableListResultInner object itself.
*/
public ExpressRouteCircuitsArpTableListResultInner withNextLink(String nextLink) {
this.nextLink = nextLink;
return this;
}
}
| mit |
chechiachang/booking-manager-maven | src/main/java/com/ccc/mavenbmcp/service/ObjectClassService.java | 692 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.ccc.mavenbmcp.service;
import com.ccc.mavenbmcp.biz.ObjectClassBiz;
import com.ccc.mavenbmcp.entity.ObjectClass;
import java.util.List;
/**
*
* @author davidchang
*/
public class ObjectClassService {
private ObjectClass[] objectClasses;
public ObjectClassService() {
ObjectClassBiz objectClassBiz = new ObjectClassBiz();
objectClasses = objectClassBiz.getObjectClasses();
}
public ObjectClass[] getObjectClasses() {
return objectClasses;
}
}
| mit |
turbo-xav/hello-world | jaxrs_examples/HelloWorldRestWebService/src/test/java/fr/ensma/lisi/helloworldrestwebservice/HelloWorldResourceIntegrationTest.java | 1018 | package fr.ensma.lisi.helloworldrestwebservice;
import java.net.URI;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriBuilder;
import junit.framework.Assert;
import org.junit.Test;
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.client.config.ClientConfig;
import com.sun.jersey.api.client.config.DefaultClientConfig;
/**
* @author Mickael BARON (baron.mickael@gmail.com)
*
* Date : January 2011
*/
public class HelloWorldResourceIntegrationTest {
@Test
public void testGetHello() {
ClientConfig config = new DefaultClientConfig();
Client client = Client.create(config);
WebResource service = client.resource(getBaseURI());
// Get TEXT for application
Assert.assertEquals(
"Hello World from text/plain",
service.path("hello").accept(MediaType.TEXT_PLAIN).get(String.class));
}
private static URI getBaseURI() {
return UriBuilder.fromUri("http://localhost:8088/helloworldrestwebservice/").build();
}
}
| mit |
RemonSinnema/blog | scmlog/src/main/java/remonsinnema/blog/scmlog/util/Traversal.java | 652 | package remonsinnema.blog.scmlog.util;
import java.util.Iterator;
import java.util.List;
public class Traversal<T> implements Iterator<T> {
private final List<T> items;
private int index;
public Traversal(List<T> items) {
this.items = items;
this.index = 0;
}
@Override
public boolean hasNext() {
return index < items.size();
}
@Override
public T next() {
return items.get(index++);
}
public void previous() {
if (index == 0) {
throw new UnsupportedOperationException("Cannot move beyond beginning");
}
index--;
}
public void replace(T value) {
items.set(--index, value);
}
}
| mit |
AndreasKl/spring-playground | spring-boot-hornetmq-ipc/src/main/java/net/andreaskluth/InternalSomeGateway.java | 507 | package net.andreaskluth;
import java.io.Serializable;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
@Component
@Profile("production")
public class InternalSomeGateway implements SomeGateway {
@Override
public <TRes extends Serializable, TReq extends Serializable> Response<TRes> execute(Message<TReq> request, Class<TRes> clazz)
throws Exception {
return Response.of(clazz.newInstance());
}
}
| mit |
Jacob-Swanson/poe4j | poe4j/src/main/java/com/swandiggy/poe4j/ggpkg/record/FileRecord.java | 681 | package com.swandiggy.poe4j.ggpkg.record;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Arrays;
/**
* Represents a file in the GGPKG.
*
* @author Jacob Swanson
* @since 8/31/2015
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class FileRecord extends DataRecord {
private final String name;
private final byte[] sha256Digest;
public FileRecord(long recordOffset, int recordLength, long dataOffset, int dataLength, String name, byte[] sha256Digest) {
super(recordOffset, recordLength, dataOffset, dataLength);
this.name = name;
this.sha256Digest = Arrays.copyOf(sha256Digest, sha256Digest.length);
}
}
| mit |
sdl/Testy | src/main/java/com/sdl/selenium/extjs6/form/HtmlEditor.java | 1694 | package com.sdl.selenium.extjs6.form;
import com.sdl.selenium.utils.config.WebDriverConfig;
import com.sdl.selenium.web.SearchType;
import com.sdl.selenium.web.WebLocator;
import java.util.Arrays;
import java.util.List;
public class HtmlEditor extends TextField {
private WebLocator iframe = new WebLocator().setTag("iframe").setClasses("x-htmleditor-iframe");
private WebLocator body = new WebLocator().setTag("body");
public HtmlEditor() {
setClassName("HtmlEditor");
setTag("*");
setBaseCls("x-html-editor-input");
}
public HtmlEditor(WebLocator container) {
this();
this.setContainer(container);
}
public HtmlEditor(WebLocator container, String label, SearchType... searchTypes) {
this(container);
if (searchTypes.length == 0) {
searchTypes = new SearchType[]{SearchType.DEEP_CHILD_NODE_OR_SELF};
} else {
List<SearchType> types = Arrays.asList(searchTypes);
types.add(SearchType.DEEP_CHILD_NODE_OR_SELF);
searchTypes = types.toArray(new SearchType[0]);
}
this.setLabel(label, searchTypes);
}
public boolean setValue(String value) {
WebDriverConfig.getDriver().switchTo().frame(iframe.getWebElement());
body.clear();
boolean set = body.sendKeys(value) != null;
WebDriverConfig.getDriver().switchTo().defaultContent();
return set;
}
public String getValue() {
WebDriverConfig.getDriver().switchTo().frame(iframe.getWebElement());
String text = body.getText();
WebDriverConfig.getDriver().switchTo().defaultContent();
return text;
}
}
| mit |
AmanGupta-2210/com.example.designpatterns | com.example.designpatterns/src/main/java/com/example/pattern/filter/SingleCriteria.java | 666 | /**
* Author : Aman Gupta
* Email Id : aman.tit10@gmail.com
* Design Pattern : Filter
*/
package com.example.pattern.filter;
import java.util.ArrayList;
import java.util.List;
/**
* Filters persons who are single.
*
* @author Aman Gupta (aman.tit10@gmail.com)
* @version 1.0
*/
public class SingleCriteria implements Criteria {
@Override
public List<Person> meetCriteria(List<Person> persons) {
List<Person> singlePersons = new ArrayList<>();
for (Person person : persons) {
if (person.getMaritalStatus().equalsIgnoreCase("Single")) {
singlePersons.add(person);
}
}
return singlePersons;
}
}
| mit |
AlternatiOne/HomeWork | Stepik/src/main/java/ru/alttiri/stepik/adaptive_java/step02/Main.java | 723 | package ru.alttiri.stepik.adaptive_java.step02;
import java.util.Scanner;
/**
Squirrels and nuts - 2
N squirrels found K nuts and decided to divide them equally.
Find how many nuts will be left after each of the squirrels takes the equal amount of nuts.
Input data format
There are two positive integers N and K, each of them is not greater than 10000.
______________________________________________________
Sample Input:
3
14
Sample Output:
2
*/
//import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int squirrels = sc.nextInt();
int nuts = sc.nextInt();
System.out.println(nuts%squirrels);
}
} | mit |
BCGDV/robolectric | src/main/java/com/xtremelabs/robolectric/shadows/ShadowColor.java | 1243 | package com.xtremelabs.robolectric.shadows;
import android.graphics.Color;
import com.xtremelabs.robolectric.internal.Implementation;
import com.xtremelabs.robolectric.internal.Implements;
@Implements(Color.class)
public class ShadowColor {
@Implementation
public static int rgb(int red, int green, int blue) {
return argb(0xff, red, green, blue);
}
@Implementation
public static int argb(int alpha, int red, int green, int blue) {
return (alpha << 24) | (red << 16) | (green << 8) | blue;
}
@Implementation // copied from Android
public static int parseColor(String colorString) {
if (colorString.charAt(0) == '#') {
// Use a long to avoid rollovers on #ffXXXXXX
long color = Long.parseLong(colorString.substring(1), 16);
if (colorString.length() == 7) {
// Set the alpha value
color |= 0x00000000ff000000;
} else if (colorString.length() != 9) {
throw new IllegalArgumentException("Unknown color");
}
return (int) color;
} else {
// we didn't copy this else case
}
throw new IllegalArgumentException("Unknown color");
}
} | mit |
matrix65537/lab | WorkSpace01/M01/src/main/java/org/laoguo/chapter1/TestDriverManager.java | 1223 | package org.laoguo.chapter1;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
public class TestDriverManager {
public static void main(String[] args) throws ClassNotFoundException,
SQLException {
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://127.0.0.1:3306";
String user = "laoguo";
String password = "laoguo";
Map<Connection, Connection> h = new HashMap();
Connection con = null;
int i = 0;
while (true) {
try {
con = DriverManager.getConnection(url, user, password);
//con = pool.getConnection();
} catch (Exception e) {
System.out.println(e);
try {
TimeUnit.SECONDS.sleep(1);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
if (h.containsKey(con)) {
// System.out.println("connection in map");
} else {
h.put(con, con);
// con.close();
// System.out.println("connection not in map");
}
i += 1;
System.out.println(i);
System.out.println(con.toString());
}
}
}
| mit |
souravzzz/lispint | lispint/src/lispint/Builtins.java | 3118 | package lispint;
import static lispint.Helper.*;
import static lispint.Validator.*;
public class Builtins {
public static SExpression CAR(SExpression exp) throws Exception {
validate("CAR", exp);
return caar(exp);
}
public static SExpression CDR(SExpression exp) throws Exception {
validate("CDR", exp);
return cdar(exp);
}
public static SExpression CONS(SExpression exp) throws Exception {
return new SExpression(car(exp), cadr(exp));
}
public static SExpression ATOM(SExpression exp) throws Exception {
validate("NPARAM", exp, 1);
return isAtom(car(exp)) ? SExpression.T : SExpression.NIL;
}
public static SExpression NULL(SExpression exp) throws Exception {
validate("NPARAM", exp, 1);
return isNull(car(exp)) ? SExpression.T : SExpression.NIL;
}
public static SExpression INT(SExpression exp) throws Exception {
validate("NPARAM", exp, 1);
try {
Integer.parseInt(car(exp).get_val());
return SExpression.T;
} catch (NumberFormatException ne) {
return SExpression.NIL;
}
}
public static SExpression EQ(SExpression exp) throws Exception {
validate("NPARAM", exp, 2);
validate("EQ", exp);
return isEqual(car(exp), cadr(exp)) ? SExpression.T : SExpression.NIL;
}
public static SExpression LESS(SExpression exp) throws Exception {
validate("NPARAM", exp, 2);
int a = Integer.parseInt(car(exp).get_val());
int b = Integer.parseInt(cadr(exp).get_val());
return a < b ? SExpression.T : SExpression.NIL;
}
public static SExpression GREATER(SExpression exp) throws Exception {
validate("NPARAM", exp, 2);
int a = Integer.parseInt(car(exp).get_val());
int b = Integer.parseInt(cadr(exp).get_val());
return a > b ? SExpression.T : SExpression.NIL;
}
public static SExpression PLUS(SExpression exp) throws Exception {
validate("NPARAM", exp, 2);
int a = Integer.parseInt(car(exp).get_val());
int b = Integer.parseInt(cadr(exp).get_val());
return new SExpression(new Integer(a + b).toString());
}
public static SExpression MINUS(SExpression exp) throws Exception {
validate("NPARAM", exp, 2);
int a = Integer.parseInt(car(exp).get_val());
int b = Integer.parseInt(cadr(exp).get_val());
return new SExpression(new Integer(a - b).toString());
}
public static SExpression TIMES(SExpression exp) throws Exception {
validate("NPARAM", exp, 2);
int a = Integer.parseInt(car(exp).get_val());
int b = Integer.parseInt(cadr(exp).get_val());
return new SExpression(new Integer(a * b).toString());
}
public static SExpression QUOTIENT(SExpression exp) throws Exception {
validate("NPARAM", exp, 2);
int a = Integer.parseInt(car(exp).get_val());
int b = Integer.parseInt(cadr(exp).get_val());
return new SExpression(new Integer(a / b).toString());
}
public static SExpression REMAINDER(SExpression exp) throws Exception {
validate("NPARAM", exp, 2);
int a = Integer.parseInt(car(exp).get_val());
int b = Integer.parseInt(cadr(exp).get_val());
return new SExpression(new Integer(a % b).toString());
}
}
| mit |
hamalaiv/weathermeter | app/src/main/java/fi/frs/weathermeter/openweathermap/Forecast.java | 414 | package fi.frs.weathermeter.openweathermap;
/**
* Created by hamalaiv on 01-Apr-17.
*/
public class Forecast {
private City city;
private int cnt; // Number of lines returned by this API call
private ForecastData[] list;
public City getCity() {
return city;
}
public int getCnt() {
return cnt;
}
public ForecastData[] getList() {
return list;
}
}
| mit |
zaoying/EChartsAnnotation | src/cn/edu/gdut/zaoying/Option/series/graph/markLine/data/p0/SymbolSizeArray.java | 328 | package cn.edu.gdut.zaoying.Option.series.graph.markLine.data.p0;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface SymbolSizeArray {
} | mit |
srsudar/MamasDelRioAndroid | app/src/main/java/org/mamasdelrio/android/listeners/FormListDownloaderListener.java | 906 | /*
* Copyright (C) 2009 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.mamasdelrio.android.listeners;
import org.mamasdelrio.android.logic.FormDetails;
import java.util.HashMap;
/**
* @author Carl Hartung (carlhartung@gmail.com)
*/
public interface FormListDownloaderListener {
void formListDownloadingComplete(HashMap<String, FormDetails> value);
}
| mit |
bvpelt/reservation | reservation-server/src/test/java/nl/bsoft/ReservationApplicationTests.java | 330 | package nl.bsoft;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class ReservationApplicationTests {
@Test
public void contextLoads() {
}
}
| mit |
UNINETT/daas-apps | genomics/sparkcaller/src/main/java/com/github/sparkcaller/preprocessing/BAMIndexer.java | 1170 | package com.github.sparkcaller.preprocessing;
import com.github.sparkcaller.utils.MiscUtils;
import htsjdk.samtools.SamReader;
import htsjdk.samtools.SamReaderFactory;
import org.apache.spark.api.java.function.Function;
import scala.Tuple2;
import java.io.File;
public class BAMIndexer implements Function<Tuple2<File, File>, Tuple2<File, File>> {
// Create an index (.bai) file for the given BAM file.
public static File indexBAM(File bamFile) throws Exception {
final SamReader bamReader = SamReaderFactory.makeDefault()
.enable(SamReaderFactory.Option.INCLUDE_SOURCE_IN_RECORDS)
.open(bamFile);
File bamIndexFile = new File(MiscUtils.removeExtenstion(bamFile.getPath(), "bam") + ".bai");
if (bamIndexFile.exists()) {
bamIndexFile.delete();
}
htsjdk.samtools.BAMIndexer.createIndex(bamReader, bamIndexFile);
return bamFile;
}
@Override
public Tuple2<File, File> call(Tuple2<File, File> inputOutputTuple) throws Exception {
File inputBAM = inputOutputTuple._2;
BAMIndexer.indexBAM(inputBAM);
return inputOutputTuple;
}
}
| mit |
jonas-l/gradle-capsule-plugin | src/test/java/com/jonaslasauskas/gradle/plugin/specs/capsule/DeclaredJarMainClassManifestEntry.java | 2514 | package com.jonaslasauskas.gradle.plugin.specs.capsule;
import static com.jonaslasauskas.gradle.plugin.specs.ExecutionSubject.assertThat;
import java.io.File;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.theories.DataPoint;
import org.junit.experimental.theories.Theories;
import org.junit.runner.RunWith;
import com.google.common.truth.StringSubject;
import com.jonaslasauskas.gradle.plugin.specs.CapsuleJar;
import com.jonaslasauskas.gradle.plugin.specs.ExecutableJar;
import com.jonaslasauskas.gradle.plugin.specs.GradleProject;
import com.jonaslasauskas.gradle.plugin.specs.GradleVersion;
import com.jonaslasauskas.gradle.plugin.specs.ExecutableJar.Execution;
@RunWith(Theories.class) public class DeclaredJarMainClassManifestEntry {
@DataPoint public static final String gradleVersion = GradleVersion.underTest();
@Rule public final GradleProject project = GradleProject
.forTestingPluginAt(new File("build/libs/gradle-capsule-plugin.jar"))
.withBuildScript(
"plugins { id 'com.jonaslasauskas.capsule' }",
"repositories { jcenter() }",
"jar.manifest.attributes 'Main-Class': 'test.JarMain'",
"capsule.capsuleManifest.applicationId = 'test'")
.withEntryPointClassAt("test", "JarMain", "Hello from Jar!");
public DeclaredJarMainClassManifestEntry(String version) {
project.usingGradleVersion(version);
}
@Test public void is_used_as_default_applicationClass() throws Exception {
project.named("test").buildWithArguments("assemble");
Execution original = ExecutableJar.at(project.file("build/libs/test.jar")).run();
Execution capsule = CapsuleJar.at(project.file("build/libs/test-capsule.jar")).run();
assertThat(original).succeeded();
StringSubject capsuleOutput = assertThat(capsule).succeededAnd().standardOutput();
capsuleOutput.isNotEmpty();
capsuleOutput.isEqualTo(original.output);
}
@Test public void has_no_effect_when_applicationClass_entry_in_capsuleManifest_exists() throws Exception {
project
.withAdditionalBuildScript("capsule.capsuleManifest.applicationClass = 'test.CapsuleMain'")
.withEntryPointClassAt("test", "CapsuleMain", "Hello from Capsule!")
.named("test").buildWithArguments("assemble");
Execution capsule = CapsuleJar.at(project.file("build/libs/test-capsule.jar")).run();
assertThat(capsule).succeededAnd().standardOutput().startsWith("Hello from Capsule!");
}
}
| mit |
Jgilhuly/CellSociety | src/cellsociety_team01/rules/ThresholdStatusRule.java | 833 | package cellsociety_team01.rules;
import java.util.ArrayList;
import cellsociety_team01.CellState.Cell;
public class ThresholdStatusRule extends Rule{
protected int myStatusIndex;
protected int myChangeAmtIndex;
protected int myThresholdIndex;
public ThresholdStatusRule(int statusIndex, int changeAmtIndex, int thresholdIndex){
myStatusIndex = statusIndex;
myChangeAmtIndex = changeAmtIndex;
myThresholdIndex = thresholdIndex;
}
public void apply(Cell cur, ArrayList<Cell> myNeighbors){
cur.getCurState().setInt(myStatusIndex, cur.getCurState().getInt(myStatusIndex) + cur.getCurState().getInt(myChangeAmtIndex));
if(cur.getCurState().getInt(myStatusIndex) > cur.getCurState().getInt(myThresholdIndex))
cur.getCurState().setInt(myStatusIndex, cur.getCurState().getInt(myThresholdIndex));
}
}
| mit |
yuweijun/learning-programming | design-patterns/src/main/java/headfirst/designpatterns/command/remoteWL/Hottub.java | 881 | package headfirst.designpatterns.command.remoteWL;
public class Hottub {
boolean on;
int temperature;
public Hottub() {
}
public void on() {
on = true;
}
public void off() {
on = false;
}
public void bubblesOn() {
if (on) {
System.out.println("Hottub is bubbling!");
}
}
public void bubblesOff() {
if (on) {
System.out.println("Hottub is not bubbling");
}
}
public void jetsOn() {
if (on) {
System.out.println("Hottub jets are on");
}
}
public void jetsOff() {
if (on) {
System.out.println("Hottub jets are off");
}
}
public void setTemperature(int temperature) {
this.temperature = temperature;
}
public void heat() {
temperature = 105;
System.out.println("Hottub is heating to a steaming 105 degrees");
}
public void cool() {
temperature = 98;
System.out.println("Hottub is cooling to 98 degrees");
}
}
| mit |
nico01f/z-pec | ZimbraSoap/src/java/com/zimbra/soap/mail/message/SyncResponse.java | 5718 | /*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2011 Zimbra, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.zimbra.com/license.
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
* ***** END LICENSE BLOCK *****
*/
package com.zimbra.soap.mail.message;
import com.google.common.base.Objects;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import java.util.Collections;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import com.zimbra.common.soap.MailConstants;
import com.zimbra.soap.mail.type.CalendarItemInfo;
import com.zimbra.soap.mail.type.ChatSummary;
import com.zimbra.soap.mail.type.CommonDocumentInfo;
import com.zimbra.soap.mail.type.ContactInfo;
import com.zimbra.soap.mail.type.ConversationSummary;
import com.zimbra.soap.mail.type.DocumentInfo;
import com.zimbra.soap.mail.type.Folder;
import com.zimbra.soap.mail.type.MessageSummary;
import com.zimbra.soap.mail.type.NoteInfo;
import com.zimbra.soap.mail.type.SyncDeletedInfo;
import com.zimbra.soap.mail.type.TagInfo;
import com.zimbra.soap.mail.type.TaskItemInfo;
import com.zimbra.soap.type.ZmBoolean;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement(name=MailConstants.E_SYNC_RESPONSE)
@XmlType(propOrder = {"deleted", "items"})
public class SyncResponse {
/**
* @zm-api-field-tag change-date
* @zm-api-field-description Change date
*/
@XmlAttribute(name=MailConstants.A_CHANGE_DATE /* md */, required=true)
private long changeDate;
/**
* @zm-api-field-tag new-sync-token
* @zm-api-field-description New sync token
*/
@XmlAttribute(name=MailConstants.A_TOKEN /* token */, required=false)
private String token;
/**
* @zm-api-field-tag size
* @zm-api-field-description Size
*/
@XmlAttribute(name=MailConstants.A_SIZE /* s */, required=false)
private Long size;
/**
* @zm-api-field-tag more-flag
* @zm-api-field-description If set, the response does <b>not</b> bring the client completely up to date.
* <br />
* More changes are still queued, and another SyncRequest (using the new returned token) is necessary.
*/
@XmlAttribute(name=MailConstants.A_QUERY_MORE /* more */, required=false)
private ZmBoolean more;
/**
* @zm-api-field-description Information on deletes
*/
@XmlElement(name=MailConstants.E_DELETED /* deleted */, required=false)
private SyncDeletedInfo deleted;
/**
* @zm-api-field-description Item information
*/
@XmlElements({
@XmlElement(name=MailConstants.E_FOLDER /* folder */, type=Folder.class),
@XmlElement(name=MailConstants.E_TAG /* tag */, type=TagInfo.class),
@XmlElement(name=MailConstants.E_NOTE /* note */, type=NoteInfo.class),
@XmlElement(name=MailConstants.E_CONTACT /* cn */, type=ContactInfo.class),
@XmlElement(name=MailConstants.E_APPOINTMENT /* appt */, type=CalendarItemInfo.class),
@XmlElement(name=MailConstants.E_TASK /* task */, type=TaskItemInfo.class),
@XmlElement(name=MailConstants.E_CONV /* c */, type=ConversationSummary.class),
@XmlElement(name=MailConstants.E_WIKIWORD /* w */, type=CommonDocumentInfo.class),
@XmlElement(name=MailConstants.E_DOC /* doc */, type=DocumentInfo.class),
@XmlElement(name=MailConstants.E_MSG /* m */, type=MessageSummary.class),
@XmlElement(name=MailConstants.E_CHAT /* chat */, type=ChatSummary.class)
})
private List<Object> items = Lists.newArrayList();
/**
* no-argument constructor wanted by JAXB
*/
@SuppressWarnings("unused")
private SyncResponse() {
}
public SyncResponse(long changeDate) {
this.changeDate = changeDate;
}
public void setToken(String token) { this.token = token; }
public void setSize(Long size) { this.size = size; }
public void setMore(Boolean more) { this.more = ZmBoolean.fromBool(more); }
public void setDeleted(SyncDeletedInfo deleted) { this.deleted = deleted; }
public void setItems(Iterable <Object> items) {
this.items.clear();
if (items != null) {
Iterables.addAll(this.items,items);
}
}
public SyncResponse addItem(Object item) {
this.items.add(item);
return this;
}
public long getChangeDate() { return changeDate; }
public String getToken() { return token; }
public Long getSize() { return size; }
public Boolean getMore() { return ZmBoolean.toBool(more); }
public SyncDeletedInfo getDeleted() { return deleted; }
public List<Object> getItems() {
return Collections.unmodifiableList(items);
}
public Objects.ToStringHelper addToStringInfo(Objects.ToStringHelper helper) {
return helper
.add("changeDate", changeDate)
.add("token", token)
.add("size", size)
.add("more", more)
.add("deleted", deleted)
.add("items", items);
}
@Override
public String toString() {
return addToStringInfo(Objects.toStringHelper(this)).toString();
}
}
| mit |
MatthewRos/Springies | src/environment/CenterOfMassForce.java | 1628 | package environment;
import java.util.List;
import model.Mass;
import org.jbox2d.common.Vec2;
//TODO this needs to be cleaned up, should the Model instead calculate the centerOfMass? also it needs to WORK
public class CenterOfMassForce extends Force {
private List<Mass> myMasses;
private double myExp, myMag;
public CenterOfMassForce(List<Mass> masses, double exponent, double magnitude) {
myMasses = masses;
myExp = exponent;
myMag = magnitude;
}
@Override
protected Vec2 getForce(Mass m) {
Vec2 center = calculateCenterOfMass();
//System.out.println("center " + center);
Vec2 distance = center.add(m.getBody().getPosition().mul(-1.0f));
double xForce, yForce;
if(Math.abs(distance.x) < 0.1) {
xForce = 0;
} else {
xForce = 1 / distance.x;
}
//System.out.println("dist " + distance);
if(Math.abs(distance.y) < 0.1) {
yForce = 0;
} else {
yForce = 1 / distance.y;
}
Vec2 force = new Vec2((float) Math.pow(xForce , myExp),
(float) Math.pow(yForce, myExp));
//System.out.println("pos " + m.getBody().getPosition());
//System.out.println("forc " + force);
return force.mul((float) myMag);
}
private Vec2 calculateCenterOfMass() {
double totalMass = 0.0;
double weightedSumX = 0.0;
double weightedSumY = 0.0;
for(Mass m : myMasses) {
totalMass += m.getBody().getMass();
weightedSumX += (m.getBody().getMass() * m.getBody().getPosition().x);
weightedSumY += (m.getBody().getMass() * m.getBody().getPosition().y);
}
return new Vec2((float) (weightedSumX / totalMass), (float) (weightedSumY / totalMass));
}
}
| mit |
j-hoppe/BlinkenBone | projects/3rdparty/jsap/src/java/com/martiansoftware/jsap/ant/JSAPAntTask.java | 19301 | /*
* Copyright (c) 2002-2004, Martian Software, Inc.
* This file is made available under the LGPL as described in the accompanying
* LICENSE.TXT file.
*/
package com.martiansoftware.jsap.ant;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Enumeration;
import java.util.Vector;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
import com.martiansoftware.jsap.JSAP;
import com.martiansoftware.jsap.JSAPException;
/**
* <p>An ANT task that generates a custom subclass of JSAP to simplify its use
* in
* a program. Rather than create all of the Switches, FlaggedOptions, and
* UnflaggedOptions and registering each with the JSAP, the developer does not
* need to do anything but instantiate the custom JSAP produced by this task.
* </p>
*
* <p>To use this task, you must first declare it in your ANT build file with a
* <taskdef> tag, as follows:</p>
*
* <p><code>
* <taskdef name="jsap" classname="com.martiansoftware.jsap.ant.JSAPAntTask"
* classpath="${lib}/[jsap jarfile]"/>
* </code></p>
*
* <p>Note that this <code>taskdef</code> must be placed in your build file
* BEFORE your jsap task. The
* <code>classpath</code> attribute in the above example assumes that
* [jsap jarfile] is the name of the JSAP jarfile you're using, and
* is in the directory referenced by the ANT "lib" property.</p>
*
* <p>Once declared, the jsap task can be used as many times as you wish. The
* jsap
* task supports the following attributes:</p>
* <ul>
* <li><b>srcdir</b> (required): the source directory below which the generated
* JSAP source code should be placed.</li>
* <li><b>classname</b> (required): the fully-qualified classname of the JSAP to
* generate.</li>
* <li><b>public</b> (optional): "true" or "false" (default false). If true,
* the
* generated class will be declared public.</li>
* </ul>
*
* <p>The jsap task supports the following nested elements:</p>
*
* <ul>
* <li><b>switch</b> - declares a Switch (com.martiansoftware.jsap.Switch).</li>
* <li><b>flaggedoption</b> - declares a FlaggedOption
* (com.martiansoftware.jsap.FlaggedOption).</li>
* <li><b>unflaggedoption</b> - declares an UnflaggedOption
* (com.martiansoftware.jsap.UnflaggedOption).</li>
* </ul>
*
* <p>These nested elements support the following attributes:</p>
*
* <center>
* <table width="95%" border="1" cellpadding="0" cellspacing="0">
* <tr>
* <td align="center"><b>Attribute</b></td>
* <td align="center"><b>Description</b></td>
* <td align="center"><b>switch</b></td>
* <td align="center"><b>flaggedoption</b></td>
* <td align="center"><b>unflaggedoption</b></td>
* <td align="center"><b>qualifiedswitch</b></td>
* </tr>
* <tr>
* <td align="center"><b>id</b></td>
* <td align="left">Unique id for this parameter. This must be unique among
* all parameters defined in this ANT task.</td>
* <td align="center">Required</td>
* <td align="center">Required</td>
* <td align="center">Required</td>
* <td align="center">Required</td>
* </tr>
* <tr>
* <td align="center"><b>shortflag</b></td>
* <td align="left">Short flag for this parameter. Only the first character
* of this attribute is read by the jsap task. This must be unique among all
* short
* flags defined in this ANT task.</td>
* <td align="left">Either <b>shortflag</b> or <b>longflag</b> is required.
* Both may be specified.</td>
* <td align="left">Either <b>shortflag</b> or <b>longflag</b> is required.
* Both may be specified.</td>
* <td align="center">N/A</td>
* <td align="left">Either <b>shortflag</b> or <b>longflag</b> is required.
* Both may be specified.</td>
* </tr>
* <tr>
* <td align="center"><b>longflag</b></td>
* <td align="left">Long flag for this parameter. This must be unique among
* all long flags defined in this ANT task.</td>
* <td align="left">Either <b>shortflag</b> or <b>longflag</b> is required.
* Both may be specified.</td>
* <td align="left">Either <b>shortflag</b> or <b>longflag</b> is required.
* Both may be specified.</td>
* <td align="center">N/A</td>
* <td align="left">Either <b>shortflag</b> or <b>longflag</b> is required.
* Both may be specified.</td>
* </tr>
* <tr>
* <td align="center"><b>required</b></td>
* <td align="left">"true" or "false" (default false). Indicates whether the
* specified parameter is required.</td>
* <td align="center">N/A</td>
* <td align="center">Optional</td>
* <td align="center">Optional</td>
* <td align="center">Optional</td>
* </tr>
* <tr>
* <td align="center"><b>islist</b></td>
* <td align="left">"true" or "false" (default false). Indicates whether the
* specified parameter can be supplied as a list of values separated by a
* delimiter
* character.</td>
* <td align="center">N/A</td>
* <td align="center">Optional</td>
* <td align="center">Optional</td>
* <td align="center">Optional</td>
* </tr>
* <tr>
* <td align="center"><b>listseparator</b></td>
* <td align="left">Specifies the delimiter character to use for list
* parameters.
* Default is JSAP.DEFAULT_LISTSEPARATOR</td>
* <td align="center">N/A</td>
* <td align="center">Optional</td>
* <td align="center">Optional</td>
* <td align="center">Optional</td>
* </tr>
* <tr>
* <td align="center"><b>stringparser</b></td>
* <td align="left">Specifies the subclass of
* com.martiansoftware.jsap.StringParser
* to be used in parsing this parameter's values. If the specified class name
* contains
* no "dot" characters, it is assumed to be in the package
* com.martiansoftware.jsap.stringparsers.
* Default value is
* com.martiansoftware.jsap.stringparsers.StringStringParser.</td>
* <td align="center">N/A</td>
* <td align="center">Optional</td>
* <td align="center">Optional</td>
* <td align="center">Optional</td>
* </tr>
* <tr>
* <td align="center"><b>greedy</b></td>
* <td align="left">"true" or "false" (default false). Specifies whether the
* unflaggedoption should be "greedy"; that is, should consume all remaining
* unflagged arguments from the command line.</td>
* <td align="center">N/A</td>
* <td align="center">N/A</td>
* <td align="center">Optional</td>
* <td align="center">N/A</td>
* </tr>
* </table>
* </center>
*
* <p>All of these nested elements support multiple nested
* <code><default></code>
* elements. The text content of these tags is used as a default value for the
* parameter containing the tag.<p>
*
* <p>Finally, the <flaggedoption> and <unflaggedoption> support
* multiple
* nested <property> elements, with similar syntax to ANT's
* <property>
* elements. These properties are set within the parameter's StringParser,
* assuming
* it is a subclass of com.martiansoftware.jsap.PropertyStringParser.</p>
*
* <h2>Example</h2>
*
* <pre>
* & lt;taskdef name = "jsap" classname = "com.martiansoftware.jsap.ant.JSAPAntTask"
* classpath="${build}"/>
*
* <target name="createExampleAntJSAP">
*
* <jsap srcdir="${src}"
* classname="com.martiansoftware.jsap.examples.ExampleAntJSAP">
*
* <!-- create a switch flagged by "v" or "verbose" -->
* <switch id="verbose" shortflag="v" longflag="verbose"/>
*
* <!-- create a required flaggedoption looking for an integer,
* flagged by "n" (e.g. "-n 5") -->
* <flaggedoption id="num" required="true" shortflag="n"
* stringparser="IntegerStringParser">
* <default>5</default>
* </flaggedoption>
*
* <!-- create an unflaggedoption that reads all of the unflagged
* arguments from the
* command line -->
* <unflaggedoption id="files" greedy="true" />
*
* <!-- create a flaggedoption looking for a Date in "MM/DD/YY"
* format, flagged by "d"
* or "date", defaulting to Christmas, 2002. -->
* <flaggedoption id="date" shortflag="d" longflag="date"
* stringparser="DateStringParser">
* <property name="format" value="MM/DD/YYYY"/>
* <default>12/25/2002</default>
* </flaggedoption>
*
* </jsap>
*
* </target>
*</pre>
*
* @author <a href="http://www.martiansoftware.com/contact.html">Marty Lamb</a>
* @see com.martiansoftware.jsap.JSAP
* @see com.martiansoftware.jsap.Parameter
* @see com.martiansoftware.jsap.Switch
* @see com.martiansoftware.jsap.FlaggedOption
* @see com.martiansoftware.jsap.UnflaggedOption
* @see com.martiansoftware.jsap.StringParser
* @see com.martiansoftware.jsap.PropertyStringParser
*/
public class JSAPAntTask extends Task {
/**
* if true, the generated JSAP class should be declared public.
*/
private boolean isPublic = false;
/**
* the top-level directory holding the source code (probably has a "com"
* subdirectory, etc.)
*/
private File srcDir = null;
/**
* the FULL class name of the JSAP subclass to create (i.e.,
* "fullpackage.Class").
*/
private String className = null;
/**
* A Vector containing all of the nested parameter configurations, in
* declaration order.
*/
private Vector parameterConfigs = null;
/**
* A "Test JSAP" that is instantiated to validate the configuration before
* the class file is
* generated.
*/
private JSAP jsap = null;
/**
* If true, this JSAP uses FlaggedOptions (used for import statements).
*/
private boolean containsFlaggedOptions = false;
/**
* If true, this JSAP uses UnflaggedOptions (used for import statements).
*/
private boolean containsUnflaggedOptions = false;
/**
* If true, this JSAP uses Switches (used for import statements).
*/
private boolean containsSwitches = false;
/**
* If true, this JSAP's StringParser has properties.
*/
private boolean hasProperties = false;
/**
* Creates a new JSAPAntTask. One JSAPAntTask is created for each
* <jsap> section in an
* ant built file.
*/
public JSAPAntTask() {
parameterConfigs = new Vector();
}
/**
* Sets whether the generated JSAP should be declared public. Default is
* false.
* @param isPublic if true, the generated JSAP will be declared public.
*/
public void setPublic(boolean isPublic) {
this.isPublic = isPublic;
}
/**
* Sets the top-level source directory under which the generated JSAP class
* file should be written.
* @param srcDir the top-level source directory under which the generated
* JSAP class file should be written.
*/
public void setSrcdir(File srcDir) {
this.srcDir = srcDir;
}
/**
* Sets the full classname for the generated JSAP.
* @param className the full classname for the generated JSAP.
*/
public void setClassname(String className) {
this.className = className.trim();
}
/**
* Adds a nested FlaggedOptionConfiguration to the generated JSAP.
* @param flaggedOptionConfig the nested FlaggedOptionConfiguration to add
* to the generated JSAP.
*/
public void addConfiguredFlaggedoption(FlaggedOptionConfiguration flaggedOptionConfig) {
containsFlaggedOptions = true;
parameterConfigs.add(flaggedOptionConfig);
}
/**
* Adds a nested UnflaggedOptionConfiguration to the generated JSAP.
* @param unflaggedOptionConfig the nested UnflaggedOptionConfiguration to
* add to the generated JSAP.
*/
public void addConfiguredUnflaggedoption(UnflaggedOptionConfiguration unflaggedOptionConfig) {
containsUnflaggedOptions = true;
parameterConfigs.add(unflaggedOptionConfig);
}
/**
* Adds a nested SwitchConfiguration to the generated JSAP.
* @param switchConfig the nested SwitchConfiguration to add to the
* generated JSAP.
*/
public void addConfiguredSwitch(SwitchConfiguration switchConfig) {
containsSwitches = true;
parameterConfigs.add(switchConfig);
}
/**
* Builds a JSAP that conforms to the configuration in the build file. If
* all of the specified
* parameters can successfully be registered with the JSAP, the java file
* will be written.
* @throws JSAPException if there are any problems with the specified
* configuration.
*/
private void buildJSAP() throws JSAPException {
JSAP jsap = new JSAP();
for (Enumeration e = parameterConfigs.elements();
e.hasMoreElements();
) {
ParameterConfiguration pc =
(ParameterConfiguration) e.nextElement();
if (pc.hasProperties()) {
hasProperties = true;
}
jsap.registerParameter(pc.getParameter());
}
}
/**
* Generates a JSAP java file that implements the specified configuration.
* @throws IOException if an I/O error occurs.
*/
private void writeJSAP() throws IOException {
int lastDotPos = className.lastIndexOf(".");
String packageName = "";
String shortClassName = className;
if (lastDotPos > -1) {
packageName = className.substring(0, lastDotPos);
shortClassName = className.substring(lastDotPos + 1);
}
System.out.println("package name: [" + packageName + "]");
System.out.println("shortClassName: [" + shortClassName + "]");
File classFileDir =
new File(
srcDir.getCanonicalPath()
+ File.separatorChar
+ packageName.replace('.', File.separatorChar));
File classFile = new File(classFileDir, shortClassName + ".java");
System.out.println(
"Creating directory \"" + classFileDir.toString() + "\"");
classFileDir.mkdirs();
System.out.println("Creating JSAP class file \"" + classFile + "\"");
classFile.createNewFile();
System.out.println("Created");
PrintStream out =
new PrintStream(
new BufferedOutputStream(new FileOutputStream(classFile)));
createJavaFile(shortClassName, packageName, out);
out.close();
}
/**
* Simple utility to capitalize the first letter of the specified String.
* @param s the String to represent in proper case.
* @return the specified String with the first letter capitalized.
*/
private String properCase(String s) {
String result = null;
if (s != null) {
if (s.length() < 2) {
result = s.toUpperCase();
} else {
result = s.toUpperCase().charAt(0) + s.substring(1);
}
}
return (result);
}
/**
* Writes java source code for a JSAP subclass that implements the
* configuration specified in the
* ant build file.
* @param shortClassName the name of the JSAP subclass, sans package name.
* @param packageName the name of the package to contain the generated JSAP
* subclass.
* @param out the PrintStream to which the java source should be written.
* @throws IOException if an I/O error occurs.
*/
private void createJavaFile(
String shortClassName,
String packageName,
PrintStream out)
throws IOException {
if (packageName.length() > 0) {
out.println("package " + packageName + ";");
out.println();
}
out.println(" /*");
out.println(" * THIS FILE IS AUTOMATICALLY GENERATED - DO NOT EDIT");
out.println(" */");
out.println();
out.println("import com.martiansoftware.jsap.JSAP;");
out.println("import com.martiansoftware.jsap.JSAPException;");
if (containsSwitches) {
out.println("import com.martiansoftware.jsap.Switch;");
}
if (containsFlaggedOptions) {
out.println("import com.martiansoftware.jsap.FlaggedOption;");
}
if (containsUnflaggedOptions) {
out.println("import com.martiansoftware.jsap.UnflaggedOption;");
}
if (hasProperties) {
out.println(
"import com.martiansoftware.jsap.PropertyStringParser;");
}
out.println();
if (isPublic) {
out.print("public ");
}
out.println("class " + shortClassName + " extends JSAP {");
out.println();
out.println(" public " + shortClassName + "() {");
out.println(" super();");
out.println(" try {");
out.println(" init();");
out.println(" } catch (JSAPException e) {");
out.println(
" throw(new IllegalStateException(e.getMessage()));");
out.println(" }");
out.println(" }");
out.println();
out.println(" private void init() throws JSAPException {");
for (Enumeration e1 = parameterConfigs.elements();
e1.hasMoreElements();
) {
ParameterConfiguration pc =
(ParameterConfiguration) e1.nextElement();
out.println(
" this.registerParameter( create"
+ properCase(pc.getId())
+ "() );");
}
out.println(" }");
out.println();
for (Enumeration e1 = parameterConfigs.elements();
e1.hasMoreElements();
) {
ParameterConfiguration pc =
(ParameterConfiguration) e1.nextElement();
pc.createMethod("create" + properCase(pc.getId()), out);
out.println();
}
out.println("}");
}
/**
* Validates the JSAP configuration and, if successful, writes the java
* source code for a JSAP subclass
* that implements the configuration specified in the ant build file.
* @throws BuildException if unsuccessful for any reason.
*/
public void execute() throws BuildException {
if (srcDir == null) {
throw (new BuildException("srcdir is required."));
}
if ((className == null) || (className.length() == 0)) {
throw (new BuildException("classname is required."));
}
if (!srcDir.isDirectory()) {
throw (new BuildException("srcdir must be a directory."));
}
System.out.println("srcDir=[" + srcDir + "]");
System.out.println("className=[" + className + "]");
System.out.println("public=" + isPublic);
try {
buildJSAP();
writeJSAP();
} catch (Exception e) {
throw (new BuildException(e.getMessage()));
}
}
}
| mit |
mwcaisse/AndroidFT | aft-servlet/src/test/java/com/ricex/aft/servlet/mapper/MockDeviceMapper.java | 1526 | /**
*
*/
package com.ricex.aft.servlet.mapper;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.ricex.aft.common.entity.Device;
/** Test implementation of the Device Mapper
*
* @author Mitchell Caisse
*
*/
public class MockDeviceMapper implements DeviceMapper {
/** The listing of devices */
private Map<Long, Device> devices;
/** The last device id */
private long lastDeviceId;
/** Creates a new Test Device Mapper
*
*/
public MockDeviceMapper() {
devices = new HashMap<Long, Device>();
lastDeviceId = 0 ;
}
@Override
public List<Device> getAllDevices() {
return new ArrayList<Device>(devices.values());
}
@Override
public List<Device> getAllDevicesByUser(long userId) {
//TODO: Implement
return new ArrayList<Device>();
}
@Override
public Device getDeviceId(long deviceId) {
return devices.get(deviceId);
}
@Override
public Device getDeviceUid(String deviceUid) {
Device withUid = null;
for (Device device : getAllDevices()) {
if (device.getDeviceUid().equals(deviceUid)) {
withUid = device;
break;
}
}
return withUid;
}
@Override
public void updateDevice(Device device) {
devices.put(device.getId(), device);
}
@Override
public void createDevice(Device device) {
device.setId(getNextDeviceId());
updateDevice(device);
}
/** Returns the next device id
*
* @return the next device id
*/
private long getNextDeviceId() {
return lastDeviceId ++;
}
}
| mit |
qiyuangong/leetcode | java/002_Add_Two_Numbers.java | 799 | /**
* Definition for singly-linked list.
* public class ListNode {
* int val;
* ListNode next;
* ListNode(int x) { val = x; }
* }
*/
public class Solution {
// example in leetcode book
public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
ListNode dummyHead = new ListNode(0);
ListNode p = l1, q= l2, curr = dummyHead;
int carry = 0;
while (p != null || q!= null) {
int x = (p != null) ? p.val : 0;
int y = (q != null) ? q.val : 0;
int digit = carry + x + y;
carry = digit / 10;
curr.next = new ListNode(digit % 10);
curr = curr.next;
if (p != null) p = p.next;
if (q != null) q = q.next;
}
if (carry > 0) {
curr.next = new ListNode(carry);
}
return dummyHead.next;
}
}
| mit |
aldian/sjptrader | PositionHandler.java | 1395 | package sjptrader;
import com.ib.controller.ApiController;
import com.ib.controller.NewContract;
/**
* Created by AldianFazrihady on 8/13/14.
*/
public class PositionHandler implements ApiController.IPositionHandler {
public enum Context {
POSITIONS,
SELL
}
private Context context;
private SJPTrader trader;
private String symbol;
PositionHandler(SJPTrader trader) {
this.context = Context.POSITIONS;
this.trader = trader;
}
PositionHandler(SJPTrader trader, String symbol) {
this.context = Context.SELL;
this.trader = trader;
this.symbol = symbol;
}
@Override
public void position(String account, NewContract contract, int position, double avgCost) {
if (context == Context.POSITIONS) {
if (position > 0) {
System.out.printf("%s %s %s %.2f. position: %d, avgCost: %.2f, conid: %d\n",
contract.symbol(), contract.right().toString(), contract.expiry(), contract.strike(), position, avgCost, contract.conid());
}
} else if (context == Context.SELL) {
if (symbol.equals(contract.symbol()) && position > 0) {
}
}
}
@Override
public void positionEnd() {
if (context == Context.POSITIONS) {
System.out.printf("POSITIONS END\n");
}
}
}
| mit |
t-kgd/library-water | water-java-core/src/main/java/jp/gr/java_conf/kgd/library/water/java/core/value/MutableObjectVector3.java | 7114 | /*
* The MIT License
*
* Copyright 2015 misakura.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package jp.gr.java_conf.kgd.library.water.java.core.value;
import java.util.function.BinaryOperator;
import java.util.function.Function;
import java.util.function.UnaryOperator;
/**
* 3次元のベクトルを表すインターフェース。
*
* ミューテータが存在しますが、実際に値を変更可能かどうかは実装依存です。
*
* @author misakura
* @param <T> 任意の型。
*/
public interface MutableObjectVector3<T> extends ObjectVector3<T> {
/**
* このベクトルのx成分にあたる値を設定する。
*
* 設定値を防御的にコピーするかどうかは実装依存です。
*
* @param x x成分の値。
*/
void setX(T x);
/**
* このベクトルのy成分にあたる値を設定する。
*
* 設定値を防御的にコピーするかどうかは実装依存です。
*
* @param y y成分の値。
*/
void setY(T y);
/**
* このベクトルのz成分にあたる値を設定する。
*
* 設定値を防御的にコピーするかどうかは実装依存です。
*
* @param z z成分の値。
*/
void setZ(T z);
/**
* このベクトルの現在のx成分を用いて新たな値を設定する。
*
* 関数から導出する設定値を防御的にコピーするかどうかは実装依存です。<br>
* デフォルトの実装では、関数から得られた設定値を用いて{@link #setX}に委譲します。その設定値は防御的コピーを行わずに渡します。
*
* @param newValueFunction 現在の設定値を受け取り、新しい設定値を返す関数。
*/
default void updateX(Function<? super T, ? extends T> newValueFunction) {
setX(newValueFunction.apply(getX()));
}
/**
* このベクトルの現在のy成分を用いて新たな値を設定する。
*
* 関数から導出する設定値を防御的にコピーするかどうかは実装依存です。<br>
* デフォルトの実装では、関数から得られた設定値を用いて{@link #setY}に委譲します。その設定値は防御的コピーを行わずに渡します。
*
* @param newValueFunction 現在の設定値を受け取り、新しい設定値を返す関数。
*/
default void updateY(Function<? super T, ? extends T> newValueFunction) {
setY(newValueFunction.apply(getY()));
}
/**
* このベクトルの現在のz成分を用いて新たな値を設定する。
*
* 関数から導出する設定値を防御的にコピーするかどうかは実装依存です。<br>
* デフォルトの実装では、関数から得られた設定値を用いて{@link #setZ}に委譲します。その設定値は防御的コピーを行わずに渡します。
*
* @param newValueFunction 現在の設定値を受け取り、新しい設定値を返す関数。
*/
default void updateZ(Function<? super T, ? extends T> newValueFunction) {
setZ(newValueFunction.apply(getZ()));
}
/**
* このベクトルの全ての次元に値を設定する。
*
* 設定値を防御的にコピーするかどうかは実装依存です。<br>
* デフォルトの実装では、それぞれの次元のミューテータに委譲します。
*
* @param x x成分の値。
* @param y y成分の値。
* @param z z成分の値。
*/
default void set(T x, T y, T z) {
setX(x);
setY(y);
setZ(z);
}
/**
* {@code T}にアップキャスト可能な型が指定された他のベクトルインスタンスから全ての次元の値を取得し、このベクトルへ設定する。
*
* 他のベクトルインスタンスから取得する設定値を防御的にコピーするかどうかは実装依存です。<br>
* デフォルトの実装では、{@link #set(Object, Object, Object)}に委譲します。
*
* @param vector 設定値を取得するベクトル。
*/
default void set(ObjectVector3<? extends T> vector) {
set(vector.getX(), vector.getY(), vector.getZ());
}
/**
* このベクトルに対して単項演算を行う。
*
* デフォルトの実装では、渡された演算をそれぞれの次元に適用し、得られた値を{@link #set(Object, Object, Object)}に委譲します。
*
* @param operator 現在の設定値を受け取り、新しい設定値を返す関数。
*/
default void calculate(UnaryOperator<T> operator) {
set(operator.apply(getX()), operator.apply(getY()), operator.apply(getZ()));
}
/**
* このベクトルに対して二項演算を行う。
*
* デフォルトの実装では、渡された演算をそれぞれの次元に適用し、得られた値を{@link #set(Object, Object, Object)}に委譲します。
*
* @param operator 現在の設定値を受け取り、新しい設定値を返す関数。
* @param x 右辺となるx成分の値。
* @param y 右辺となるy成分の値。
* @param z 右辺となるz成分の値。
*/
default void calculate(BinaryOperator<T> operator, T x, T y, T z) {
set(operator.apply(getX(), x), operator.apply(getY(), y), operator.apply(getZ(), z));
}
/**
* このベクトルに対して二項演算を行う。
*
* デフォルトの実装では、{@link #calculate(BinaryOperator, Object, Object, Object)}に委譲します。
*
* @param operator 現在の設定値を受け取り、新しい設定値を返す関数。
* @param vector 右辺となるベクトル。
*/
default void calculate(BinaryOperator<T> operator, ObjectVector3<? extends T> vector) {
calculate(operator, vector.getX(), vector.getY(), vector.getZ());
}
}
| mit |
ilves/finance | src/main/java/ee/golive/finants/chart/NormalSeries.java | 694 | package ee.golive.finants.chart;
import java.util.List;
/**
* Created by taavi.ilves on 14.10.2014.
*/
public class NormalSeries extends Series {
private List<Float> data;
public NormalSeries(List<Float> data) {
this.data = data;
}
public NormalSeries(String name, List<Float> data) {
this.name = name;
this.data = data;
}
public NormalSeries(String name, List<Float> data, String type) {
this.name = name;
this.data = data;
this.type = type;
}
public NormalSeries setType(String type) {
this.type = type;
return this;
}
public List<Float> getData() {
return data;
}
}
| mit |
KiiPlatform/thing-if-AndroidSDK | thingif/src/test/java/com/kii/thing_if/thingifapi/GetThingTypeTest.java | 10592 | package com.kii.thing_if.thingifapi;
import android.content.Context;
import com.kii.thing_if.StandaloneThing;
import com.kii.thing_if.Target;
import com.kii.thing_if.ThingIFAPI;
import com.kii.thing_if.ThingIFAPITestBase;
import com.kii.thing_if.TypedID;
import com.kii.thing_if.exception.ForbiddenException;
import com.kii.thing_if.exception.NotFoundException;
import com.kii.thing_if.exception.ServiceUnavailableException;
import com.kii.thing_if.exception.UnauthorizedException;
import com.squareup.okhttp.mockwebserver.MockResponse;
import com.squareup.okhttp.mockwebserver.MockWebServer;
import com.squareup.okhttp.mockwebserver.RecordedRequest;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@RunWith(RobolectricTestRunner.class)
public class GetThingTypeTest extends ThingIFAPITestBase {
private Context context;
@Before
public void before() throws Exception {
context = RuntimeEnvironment.application.getApplicationContext();
this.server = new MockWebServer();
this.server.start();
}
@After
public void after() throws Exception {
this.server.shutdown();
}
@Test
public void successTest() throws Exception {
TypedID thingID = new TypedID(TypedID.Types.THING, "th.1234567890");
String accessToken = "thing-access-token-1234";
String triggerID = "trigger-1234";
Target target = new StandaloneThing(thingID.getID(), "vendor-thing-id", accessToken);
String responseBody = "{\"thingType\" : \"dummyThingType\"}";
MockResponse response = new MockResponse().setResponseCode(200);
response.setBody(responseBody);
this.server.enqueue(response);
ThingIFAPI api = createDefaultThingIFAPIBuilder(this.context, APP_ID, APP_KEY)
.setTarget(target)
.build();
String type = api.getThingType();
Assert.assertEquals("dummyThingType", type);
// verify the request
RecordedRequest request = this.server.takeRequest(1, TimeUnit.SECONDS);
Assert.assertEquals(BASE_PATH + "/things/" + thingID.getID() + "/thing-type",
request.getPath());
Assert.assertEquals("GET", request.getMethod());
Map<String, String> expectedRequestHeaders = new HashMap<>();
expectedRequestHeaders.put("X-Kii-AppID", APP_ID);
expectedRequestHeaders.put("X-Kii-AppKey", APP_KEY);
expectedRequestHeaders.put("Authorization", "Bearer " + api.getOwner().getAccessToken());
this.assertRequestHeader(expectedRequestHeaders, request);
}
@Test
public void successNullTest() throws Exception {
TypedID thingID = new TypedID(TypedID.Types.THING, "th.1234567890");
String accessToken = "thing-access-token-1234";
String triggerID = "trigger-1234";
Target target = new StandaloneThing(thingID.getID(), "vendor-thing-id", accessToken);
String responseBody = "{ \"errorCode\": \"THING_WITHOUT_THING_TYPE\" }";
MockResponse response = new MockResponse().setResponseCode(404);
response.setBody(responseBody);
this.server.enqueue(response);
ThingIFAPI api = createDefaultThingIFAPIBuilder(this.context, APP_ID, APP_KEY)
.setTarget(target)
.build();
String type = api.getThingType();
Assert.assertNull(type);
// verify the request
RecordedRequest request = this.server.takeRequest(1, TimeUnit.SECONDS);
Assert.assertEquals(BASE_PATH + "/things/" + thingID.getID() + "/thing-type",
request.getPath());
Assert.assertEquals("GET", request.getMethod());
Map<String, String> expectedRequestHeaders = new HashMap<>();
expectedRequestHeaders.put("X-Kii-AppID", APP_ID);
expectedRequestHeaders.put("X-Kii-AppKey", APP_KEY);
expectedRequestHeaders.put("Authorization", "Bearer " + api.getOwner().getAccessToken());
this.assertRequestHeader(expectedRequestHeaders, request);
}
@Test
public void error401Test() throws Exception {
TypedID thingID = new TypedID(TypedID.Types.THING, "th.1234567890");
String accessToken = "thing-access-token-1234";
String triggerID = "trigger-1234";
Target target = new StandaloneThing(thingID.getID(), "vendor-thing-id", accessToken);
this.addEmptyMockResponse(401);
ThingIFAPI api = createDefaultThingIFAPIBuilder(this.context, APP_ID, APP_KEY)
.setTarget(target)
.build();
try {
api.getThingType();
Assert.fail("UnauthorizedException should be thrown");
} catch (UnauthorizedException e) {
// Expected.
} catch (Exception e) {
Assert.fail("Unexpected exception: " + e.getMessage());
}
// verify the request
RecordedRequest request = this.server.takeRequest(1, TimeUnit.SECONDS);
Assert.assertEquals(BASE_PATH + "/things/" + thingID.getID() + "/thing-type",
request.getPath());
Assert.assertEquals("GET", request.getMethod());
Map<String, String> expectedRequestHeaders = new HashMap<>();
expectedRequestHeaders.put("X-Kii-AppID", APP_ID);
expectedRequestHeaders.put("X-Kii-AppKey", APP_KEY);
expectedRequestHeaders.put("Authorization", "Bearer " + api.getOwner().getAccessToken());
this.assertRequestHeader(expectedRequestHeaders, request);
}
@Test
public void error403Test() throws Exception {
TypedID thingID = new TypedID(TypedID.Types.THING, "th.1234567890");
String accessToken = "thing-access-token-1234";
String triggerID = "trigger-1234";
Target target = new StandaloneThing(thingID.getID(), "vendor-thing-id", accessToken);
this.addEmptyMockResponse(403);
ThingIFAPI api = createDefaultThingIFAPIBuilder(this.context, APP_ID, APP_KEY)
.setTarget(target)
.build();
try {
api.getThingType();
Assert.fail("ForbiddenException should be thrown");
} catch (ForbiddenException e) {
// Expected.
} catch (Exception e) {
Assert.fail("Unexpected exception: " + e.getMessage());
}
// verify the request
RecordedRequest request = this.server.takeRequest(1, TimeUnit.SECONDS);
Assert.assertEquals(BASE_PATH + "/things/" + thingID.getID() + "/thing-type",
request.getPath());
Assert.assertEquals("GET", request.getMethod());
Map<String, String> expectedRequestHeaders = new HashMap<>();
expectedRequestHeaders.put("X-Kii-AppID", APP_ID);
expectedRequestHeaders.put("X-Kii-AppKey", APP_KEY);
expectedRequestHeaders.put("Authorization", "Bearer " + api.getOwner().getAccessToken());
this.assertRequestHeader(expectedRequestHeaders, request);
}
@Test
public void error404Test() throws Exception {
TypedID thingID = new TypedID(TypedID.Types.THING, "th.1234567890");
String accessToken = "thing-access-token-1234";
String triggerID = "trigger-1234";
Target target = new StandaloneThing(thingID.getID(), "vendor-thing-id", accessToken);
String responseBody = "{ \"errorCode\": \"THING_NOT_FOUND\" }";
MockResponse response = new MockResponse().setResponseCode(404);
response.setBody(responseBody);
this.server.enqueue(response);
ThingIFAPI api = createDefaultThingIFAPIBuilder(this.context, APP_ID, APP_KEY)
.setTarget(target)
.build();
try {
api.getThingType();
Assert.fail("NotFoundException should be thrown");
} catch (NotFoundException e) {
// Expected.
} catch (Exception e) {
Assert.fail("Unexpected exception: " + e.getMessage());
}
// verify the request
RecordedRequest request = this.server.takeRequest(1, TimeUnit.SECONDS);
Assert.assertEquals(BASE_PATH + "/things/" + thingID.getID() + "/thing-type",
request.getPath());
Assert.assertEquals("GET", request.getMethod());
Map<String, String> expectedRequestHeaders = new HashMap<>();
expectedRequestHeaders.put("X-Kii-AppID", APP_ID);
expectedRequestHeaders.put("X-Kii-AppKey", APP_KEY);
expectedRequestHeaders.put("Authorization", "Bearer " + api.getOwner().getAccessToken());
this.assertRequestHeader(expectedRequestHeaders, request);
}
@Test
public void error503Test() throws Exception {
TypedID thingID = new TypedID(TypedID.Types.THING, "th.1234567890");
String accessToken = "thing-access-token-1234";
String triggerID = "trigger-1234";
Target target = new StandaloneThing(thingID.getID(), "vendor-thing-id", accessToken);
this.addEmptyMockResponse(503);
ThingIFAPI api = createDefaultThingIFAPIBuilder(this.context, APP_ID, APP_KEY)
.setTarget(target)
.build();
try {
api.getThingType();
Assert.fail("ServiceUnavailableException should be thrown");
} catch (ServiceUnavailableException e) {
// Expected.
} catch (Exception e) {
Assert.fail("Unexpected exception: " + e.getMessage());
}
// verify the request
RecordedRequest request = this.server.takeRequest(1, TimeUnit.SECONDS);
Assert.assertEquals(BASE_PATH + "/things/" + thingID.getID() + "/thing-type",
request.getPath());
Assert.assertEquals("GET", request.getMethod());
Map<String, String> expectedRequestHeaders = new HashMap<>();
expectedRequestHeaders.put("X-Kii-AppID", APP_ID);
expectedRequestHeaders.put("X-Kii-AppKey", APP_KEY);
expectedRequestHeaders.put("Authorization", "Bearer " + api.getOwner().getAccessToken());
this.assertRequestHeader(expectedRequestHeaders, request);
}
}
| mit |
feross/oculus-drone | drone-sdk/Examples/Android/ardrone/project/src/com/parrot/ARDrone/DemoRenderer.java | 718 | package com.parrot.ARDrone;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
import android.opengl.GLSurfaceView;
public class DemoRenderer implements GLSurfaceView.Renderer {
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
nativeInit();
}
public void onSurfaceChanged(GL10 gl, int w, int h) {
//gl.glViewport(0, 0, w, h);
nativeResize(w, h);
}
public void onDrawFrame(GL10 gl) {
nativeRender();
}
private static native void nativeInit();
private static native void nativeResize(int w, int h);
private static native void nativeRender();
//private static native void nativeDone();
} | mit |
aditosoftware/jloadr | jloadr/src/main/java/de/adito/jloadr/api/ILoader.java | 548 | package de.adito.jloadr.api;
/**
* An ILoader is responsible for loading a resource pack to the local store. After loading has completed a copy of the
* source can be fetched from the store with the source's id.
*
* @author j.boesl, 05.09.16
*/
public interface ILoader
{
IStoreResourcePack load(IStore pStore, IResourcePack pSource, IStateCallback pStateCallback);
interface IStateCallback
{
void setSplashResource(IResource pSplashResource);
void setProgress(int pAbsolute, double pRelative);
void finished();
}
}
| mit |
yangdd1205/data-structures | src/main/java/array/_20170724/RotateMatrixByKEle.java | 3642 | package array._20170724;
import annotation.TimeComplexity;
import java.util.Arrays;
/**
* http://www.geeksforgeeks.org/rotate-ring-matrix-anticlockwise-k-elements/
* <p>
* Given a matrix of order M*N and a value K,
* the task is to rotate each ring of the matrix anticlockwise by K elements.
* If in any ring elements are less than and equal K then don’t rotate it.
*/
public class RotateMatrixByKEle {
/**
* @param m end row index
* @param n end column index
* @param arr
* @param k
* @author yangdd1205
*/
@TimeComplexity("O(mn)")
public static void solution1(int m, int n, int[][] arr, int k) {
int m1 = m;
int n2 = n;
int[] temp = new int[m * n];
int tIx = 0;//temp current index
int r = 0;//starting row index
int c = 0;//staring column index
while (r < m && c < n) {
int tstart = tIx;
//Move elements of first row to temp
for (int i = c; i < n; i++) {
temp[tIx++] = arr[r][i];
}
r++;
//Move elements of last column to temp
for (int i = r; i < m; i++) {
temp[tIx++] = arr[i][n - 1];
}
n--;
if (r < m) {
//Move elements of last row to temp
for (int i = n - 1; i >= c; i--) {
temp[tIx++] = arr[m - 1][i];
}
m--;
}
if (c < n) {
//Move elements of first column to temp
for (int i = m - 1; i >= r; i--) {
temp[tIx++] = arr[i][c];
}
c++;
}
if (tIx - tstart > k) {
moveToEnd(temp, tstart, tIx - tstart, k);
}
}
fillSpiral(m1, n2, arr, temp);
print(arr);
}
private static void fillSpiral(int m, int n, int[][] arr, int[] temp) {
int tIx = 0;//temp current index
int r = 0;//starting row index
int c = 0;//staring column index
while (r < m && c < n) {
int tstart = tIx;
for (int i = c; i < n; i++) {
arr[r][i] = temp[tIx++];
}
r++;
for (int i = r; i < m; i++) {
arr[i][n - 1] = temp[tIx++];
}
n--;
if (r < m) {
for (int i = n - 1; i >= c; i--) {
arr[m - 1][i] = temp[tIx++];
}
m--;
}
if (c < n) {
for (int i = m - 1; i >= r; i--) {
arr[i][c] = temp[tIx++];
}
c++;
}
}
}
private static void moveToEnd(int[] arr, int start, int len, int k) {
int[] temp = new int[k];
System.arraycopy(arr, start, temp, 0, k);
System.arraycopy(arr, start + k, arr, start, len - k);
for (int i = 0; i < k; i++) {
arr[start + len - k + i] = temp[i];
}
}
private static void print(int[][] arr) {
for (int[] ints : arr) {
for (int i : ints) {
System.out.print(i + " ");
}
System.out.println();
}
}
public static void main(String[] args) {
{
int[][] arr = {
{1, 2, 3, 4},
{5, 6, 7, 8},
{9, 10, 11, 12},
{13, 14, 15, 16}
};
System.out.println("solution 1");
solution1(4, 4, arr, 5);
}
}
}
| mit |
Magicnation/Magicnation-Mod | magicblood/bloodutils/api/classes/guide/GuiCategories.java | 2304 | package bloodutils.api.classes.guide;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import bloodutils.api.classes.guide.elements.ElementCategory;
import bloodutils.api.compact.Category;
import bloodutils.api.registries.EntryRegistry;
public class GuiCategories extends GuiScreen{
public GuiCategories(EntityPlayer player){
this.player = player;
}
private static final ResourceLocation gui = new ResourceLocation("bloodutils:textures/gui/front.png");
int gwidth = 192;
int gheight = 192;
int x, y;
ElementCategory[] categories = new ElementCategory[EntryRegistry.categories.size()];
EntityPlayer player;
@Override
public void initGui(){
super.initGui();
x = (this.width/2) - (gwidth/2);
y = (this.height/2) - (gheight/2);
this.buttonList.clear();
int pX = x - 1;
int pY = y + 12;
int iWidth = 20;
int iHeight = 20;
for(int i = 0; i < EntryRegistry.categories.size(); i++){
Category category = EntryRegistry.categories.get(i);
this.categories[i] = new ElementCategory(category, pX, pY + (i*iHeight) - 2, iWidth, iHeight, this.player);
}
}
@Override
public void drawScreen(int mX, int mY, float f1){
super.drawScreen(mX, mY, f1);
int fHeight = Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT;
GL11.glColor4f(1F, 1F, 1F, 1F);
this.mc.renderEngine.bindTexture(gui);
drawTexturedModalRect(x, y, 0, 0, gwidth, gheight);
/** Title */
String str = "Categories";
this.drawCenteredString(fontRendererObj, str, this.x + gwidth / 2, y - 15, 0x336666);
for(int i = 0; i < EntryRegistry.categories.size(); i++){
ElementCategory category = this.categories[i];
category.drawElement();
if(category.isMouseInElement(mX, mY)){
category.onMouseEnter(mX, mY);
}
}
}
@Override
public void mouseClicked(int mX, int mY, int type){
super.mouseClicked(mX, mY, type);
for(int i = 0; i < EntryRegistry.categories.size(); i++){
ElementCategory category = this.categories[i];
if(category.isMouseInElement(mX, mY)){
category.onMouseClick(mX, mY, type);
}
}
}
@Override
public boolean doesGuiPauseGame(){
return false;
}
} | mit |
repat/AntennaPod | src/de/danoeh/antennapod/activity/MiroGuideMainActivity.java | 4105 | package de.danoeh.antennapod.activity;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockListActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import de.danoeh.antennapod.AppConfig;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.miroguide.conn.MiroGuideException;
import de.danoeh.antennapod.miroguide.conn.MiroGuideService;
import de.danoeh.antennapod.preferences.UserPreferences;
/**
* Shows a list of available categories and offers a search button. If the user
* selects a category, the MiroGuideCategoryActivity is started.
*/
public class MiroGuideMainActivity extends SherlockListActivity {
private static final String TAG = "MiroGuideMainActivity";
private static String[] categories;
private ArrayAdapter<String> listAdapter;
private TextView txtvStatus;
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(UserPreferences.getTheme());
super.onCreate(savedInstanceState);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setContentView(R.layout.miroguide_categorylist);
txtvStatus = (TextView) findViewById(android.R.id.empty);
}
@Override
protected void onPause() {
super.onPause();
}
@Override
protected void onResume() {
super.onResume();
if (categories != null) {
createAdapter();
} else {
loadCategories();
}
}
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
String selection = listAdapter.getItem(position);
Intent launchIntent = new Intent(this, MiroGuideCategoryActivity.class);
launchIntent.putExtra(MiroGuideCategoryActivity.EXTRA_CATEGORY,
selection);
startActivity(launchIntent);
}
private void createAdapter() {
if (categories != null) {
listAdapter = new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, categories);
txtvStatus.setText(R.string.no_items_label);
setListAdapter(listAdapter);
}
}
/**
* Launches an AsyncTask to load the available categories in the background.
*/
@SuppressLint("NewApi")
private void loadCategories() {
AsyncTask<Void, Void, Void> listLoader = new AsyncTask<Void, Void, Void>() {
private String[] c;
private MiroGuideException exception;
@Override
protected void onPostExecute(Void result) {
if (exception == null) {
if (AppConfig.DEBUG)
Log.d(TAG, "Successfully loaded categories");
categories = c;
createAdapter();
} else {
Log.e(TAG, "Error happened while trying to load categories");
txtvStatus.setText(exception.getMessage());
}
}
@Override
protected void onPreExecute() {
txtvStatus.setText(R.string.loading_categories_label);
}
@Override
protected Void doInBackground(Void... params) {
MiroGuideService service = new MiroGuideService();
try {
c = service.getCategories();
} catch (MiroGuideException e) {
e.printStackTrace();
exception = e;
} finally {
service.close();
}
return null;
}
};
if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.GINGERBREAD_MR1) {
listLoader.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} else {
listLoader.execute();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
menu.add(Menu.NONE, R.id.search_item, Menu.NONE, R.string.search_label)
.setIcon(
obtainStyledAttributes(
new int[] { R.attr.action_search })
.getDrawable(0))
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
finish();
return true;
case R.id.search_item:
onSearchRequested();
return true;
default:
return false;
}
}
}
| mit |
focusnet/focus-app-android | focus-mobile/src/main/java/eu/focusnet/app/controller/ApplicationStatusObserver.java | 1644 | /*
* The MIT License (MIT)
* Copyright (c) 2015 Berner Fachhochschule (BFH) - www.bfh.ch
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package eu.focusnet.app.controller;
/**
* Interface defining behaviour of classes that must be informed of a change in the application
* status.
*/
public interface ApplicationStatusObserver
{
/**
* Actions to be performed when the application status changes.
*
* @param appStatus {@code true} if the application is now ready, {@code false} otherwise.
*/
void onChangeStatus(boolean appStatus);
/**
* Actions to perform on logout.
*/
void handleLogout();
}
| mit |
karim/adila | database/src/main/java/adila/db/p650a30_zte20bv0720.java | 214 | // This file is automatically generated.
package adila.db;
/*
* ZTE BV0720
*
* DEVICE: P650A30
* MODEL: ZTE BV0720
*/
final class p650a30_zte20bv0720 {
public static final String DATA = "ZTE|BV0720|";
}
| mit |
karim/adila | database/src/main/java/adila/db/msm8974_502zt.java | 203 | // This file is automatically generated.
package adila.db;
/*
* ZTE Spro 2
*
* DEVICE: msm8974
* MODEL: 502ZT
*/
final class msm8974_502zt {
public static final String DATA = "ZTE|Spro 2|";
}
| mit |
UO-CIS/CIS399AndroidDemos | MyApplication2/app/src/main/java/com/gmail/profbird/myapplication2/AppCompatPreferenceActivity.java | 3007 | package com.gmail.profbird.myapplication2;
import android.content.res.Configuration;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatDelegate;
import android.support.v7.widget.Toolbar;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* A {@link android.preference.PreferenceActivity} which implements and proxies the necessary calls
* to be used with AppCompat.
*/
public abstract class AppCompatPreferenceActivity extends PreferenceActivity {
private AppCompatDelegate mDelegate;
@Override
protected void onCreate(Bundle savedInstanceState) {
getDelegate().installViewFactory();
getDelegate().onCreate(savedInstanceState);
super.onCreate(savedInstanceState);
}
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
getDelegate().onPostCreate(savedInstanceState);
}
public ActionBar getSupportActionBar() {
return getDelegate().getSupportActionBar();
}
public void setSupportActionBar(@Nullable Toolbar toolbar) {
getDelegate().setSupportActionBar(toolbar);
}
@Override
public MenuInflater getMenuInflater() {
return getDelegate().getMenuInflater();
}
@Override
public void setContentView(@LayoutRes int layoutResID) {
getDelegate().setContentView(layoutResID);
}
@Override
public void setContentView(View view) {
getDelegate().setContentView(view);
}
@Override
public void setContentView(View view, ViewGroup.LayoutParams params) {
getDelegate().setContentView(view, params);
}
@Override
public void addContentView(View view, ViewGroup.LayoutParams params) {
getDelegate().addContentView(view, params);
}
@Override
protected void onPostResume() {
super.onPostResume();
getDelegate().onPostResume();
}
@Override
protected void onTitleChanged(CharSequence title, int color) {
super.onTitleChanged(title, color);
getDelegate().setTitle(title);
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
getDelegate().onConfigurationChanged(newConfig);
}
@Override
protected void onStop() {
super.onStop();
getDelegate().onStop();
}
@Override
protected void onDestroy() {
super.onDestroy();
getDelegate().onDestroy();
}
public void invalidateOptionsMenu() {
getDelegate().invalidateOptionsMenu();
}
private AppCompatDelegate getDelegate() {
if (mDelegate == null) {
mDelegate = AppCompatDelegate.create(this, null);
}
return mDelegate;
}
}
| mit |
allancalderon/checkapp_android_respira | app/src/main/java/mobi/checkapp/epoc/ExerciseListTabFragment4.java | 13256 | package mobi.checkapp.epoc;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import java.util.ArrayList;
import java.util.List;
import mobi.checkapp.epoc.adapter.OnUpdateFragment;
import mobi.checkapp.epoc.component.YearComponent;
import mobi.checkapp.epoc.db.DbFunctions;
import mobi.checkapp.epoc.entities.Activity;
import mobi.checkapp.epoc.entities.Day;
import mobi.checkapp.epoc.entities.Month;
import mobi.checkapp.epoc.entities.TimelineAssign;
import mobi.checkapp.epoc.entities.Year;
import mobi.checkapp.epoc.utils.CacheMainActivity;
import mobi.checkapp.epoc.utils.Constants;
public class ExerciseListTabFragment4 extends Fragment {
private final String TAG = this.getClass().getName();
/**
* The {@link ViewPager} that will host the section contents.
*/
public LinearLayout lnYears;
private DbFunctions dbFunctions;
//activitiesDB definitions
private Context context;
OnUpdateFragment mUpdateFragments;
View rootView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.new_timeline_layout, container, false);
context = getActivity().getApplicationContext();
mUpdateFragments = (OnUpdateFragment) getActivity();
lnYears = (LinearLayout) rootView.findViewById(R.id.lnYears);
return rootView;
}
@Override
public void onResume() {
super.onResume();
//TODO leer de base de datos y llenar CachemainActivity.listTimeline
dbFunctions = new DbFunctions(getContext());
List<TimelineAssign> tmpExerciseList = dbFunctions.queryTimelineAssignList(
null,
null,
null,
null
);
CacheMainActivity.listTimeline = null;
Year newyear;
int valYear = 0;
int valmonth = 0;
int valday = 0;
ArrayList<Month> listMonths;
ArrayList<Day> lisDays;
ArrayList<Activity> listActivities;
for(TimelineAssign tla : tmpExerciseList){
if(CacheMainActivity.listTimeline != null){
if(tla.getYear() == valYear){
if(tla.getMonth() == valmonth){
if(tla.getDay() == valday){
Activity activity = new Activity();
activity.cuerpo_actividad = tla.getDescription();
activity.idActivity = String.valueOf(tla.getIdAssignedTimeline());
activity.idExcersice = String.valueOf(tla.getIdExerciseFK());
activity.titulo_actividad = tla.getDescription();
activity.nombre_grabacion =tla.getAudioFile();
activity.tiempo_actividad = String.valueOf(tla.getTimeDuration());
activity.ubicacion = String.valueOf(tla.getLatitude())+","+String.valueOf(tla.getLongitude());
activity.day = String.valueOf(valday);
activity.month = String.valueOf(valmonth);
activity.year = String.valueOf(valYear);
int i = 0;
int j = 0;
int z = 0;
for ( Year dy : CacheMainActivity.listTimeline){
if(dy.year == valYear){
for(Month m : dy.listMonths){
if(m.month == valmonth){
for(Day d : m.listDays){
if(d.day == valday){
CacheMainActivity.listTimeline.get(i).listMonths.get(j).listDays.get(z).listActivities.add(activity);
}
z++;
}
}
j++;
}
}
i++;
}
}else{
valday = tla.getDay();
Day day = new Day();
day.day = valday;
listActivities = new ArrayList<>();
Activity activity = new Activity();
activity.cuerpo_actividad = tla.getDescription();
activity.idActivity = String.valueOf(tla.getIdAssignedTimeline());
activity.idExcersice = String.valueOf(tla.getIdExerciseFK());
activity.titulo_actividad = tla.getDescription();
activity.nombre_grabacion =tla.getAudioFile();
activity.tiempo_actividad = String.valueOf(tla.getTimeDuration());
activity.ubicacion = String.valueOf(tla.getLatitude())+","+String.valueOf(tla.getLongitude());
activity.day = String.valueOf(valday);
activity.month = String.valueOf(valmonth);
activity.year = String.valueOf(valYear);
listActivities.add(activity);
day.listActivities = listActivities;
int i = 0;
int j = 0;
for ( Year dy : CacheMainActivity.listTimeline){
if(dy.year == valYear){
for(Month m : dy.listMonths){
if(m.month == valmonth){
CacheMainActivity.listTimeline.get(i).listMonths.get(j).listDays.add(day);
}
j++;
}
}
i++;
}
}
}else{
valmonth = tla.getMonth();
Month month = new Month();
month.month = valmonth;
lisDays = new ArrayList<>();
valday = tla.getDay();
Day day = new Day();
day.day = valday;
listActivities = new ArrayList<>();
Activity activity = new Activity();
activity.cuerpo_actividad = tla.getDescription();
activity.idActivity = String.valueOf(tla.getIdAssignedTimeline());
activity.idExcersice = String.valueOf(tla.getIdExerciseFK());
activity.titulo_actividad = tla.getDescription();
activity.nombre_grabacion =tla.getAudioFile();
activity.tiempo_actividad = String.valueOf(tla.getTimeDuration());
activity.ubicacion = String.valueOf(tla.getLatitude())+","+String.valueOf(tla.getLongitude());
activity.day = String.valueOf(valday);
activity.month = String.valueOf(valmonth);
activity.year = String.valueOf(valYear);
listActivities.add(activity);
day.listActivities = listActivities;
lisDays.add(day);
month.listDays = lisDays;
int i = 0;
for ( Year dy : CacheMainActivity.listTimeline){
if(dy.year == valYear){
CacheMainActivity.listTimeline.get(i).listMonths.add(month);
}
i++;
}
}
}else{
valYear = tla.getYear();
newyear = new Year();
newyear.year = valYear;
listMonths = new ArrayList<>();
valmonth = tla.getMonth();
Month month = new Month();
month.month = valmonth;
lisDays = new ArrayList<>();
valday = tla.getDay();
Day day = new Day();
day.day = valday;
listActivities = new ArrayList<>();
Activity activity = new Activity();
activity.cuerpo_actividad = tla.getDescription();
activity.idActivity = String.valueOf(tla.getIdAssignedTimeline());
activity.idExcersice = String.valueOf(tla.getIdExerciseFK());
activity.titulo_actividad = tla.getDescription();
activity.nombre_grabacion =tla.getAudioFile();
activity.tiempo_actividad = String.valueOf(tla.getTimeDuration());
activity.ubicacion = String.valueOf(tla.getLatitude())+","+String.valueOf(tla.getLongitude());
activity.day = String.valueOf(valday);
activity.month = String.valueOf(valmonth);
activity.year = String.valueOf(valYear);
listActivities.add(activity);
day.listActivities = listActivities;
lisDays.add(day);
month.listDays = lisDays;
listMonths.add(month);
newyear.listMonths = listMonths;
CacheMainActivity.listTimeline.add(newyear);
}
}else{
CacheMainActivity.listTimeline = new ArrayList<>();
valYear = tla.getYear();
newyear = new Year();
newyear.year = valYear;
listMonths = new ArrayList<>();
valmonth = tla.getMonth();
Month month = new Month();
month.month = valmonth;
lisDays = new ArrayList<>();
valday = tla.getDay();
Day day = new Day();
day.day = valday;
listActivities = new ArrayList<>();
Activity activity = new Activity();
activity.cuerpo_actividad = tla.getDescription();
activity.idActivity = String.valueOf(tla.getIdAssignedTimeline());
activity.idExcersice = String.valueOf(tla.getIdExerciseFK());
activity.titulo_actividad = tla.getDescription();
activity.nombre_grabacion =tla.getAudioFile();
activity.tiempo_actividad = String.valueOf(tla.getTimeDuration());
activity.ubicacion = String.valueOf(tla.getLatitude())+","+String.valueOf(tla.getLongitude());
activity.day = String.valueOf(valday);
activity.month = String.valueOf(valmonth);
activity.year = String.valueOf(valYear);
listActivities.add(activity);
day.listActivities = listActivities;
lisDays.add(day);
month.listDays = lisDays;
listMonths.add(month);
newyear.listMonths = listMonths;
CacheMainActivity.listTimeline.add(newyear);
}
}
lnYears.removeAllViews();
try {
for (Year year : CacheMainActivity.listTimeline) {
YearComponent component = new YearComponent(getContext(), year);
lnYears.addView(component);
}
}catch (Exception e){
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
// Check which request we're responding to
if (requestCode == Constants.EXERCISEREQCODE) {
// Make sure the request was successful
if (resultCode == getActivity().RESULT_OK) {
// The user picked a contact.
// The Intent's data Uri identifies which contact was selected.
Activity activity;
Bundle activityInfo = data.getExtras();
if(activityInfo != null) {
activity = (Activity) activityInfo.getSerializable(Constants.EXERCISEDATA);
if (activity != null) {
//TODO: when the list is updated, need to save the current view state (before update) and restore (after update)
mUpdateFragments.updateFragments();
}
}
}
}
}
}
| mit |
ictrobot/Cubes | core/src/ethanjones/cubes/core/event/entity/living/player/PlayerBreakBlockEvent.java | 1103 | package ethanjones.cubes.core.event.entity.living.player;
import ethanjones.cubes.block.Block;
import ethanjones.cubes.entity.living.player.Player;
import ethanjones.cubes.world.collision.BlockIntersection;
import ethanjones.cubes.world.reference.BlockReference;
public class PlayerBreakBlockEvent extends PlayerEvent {
private final Block block;
private int meta;
private final BlockIntersection blockIntersection;
private final BlockReference blockReference;
public PlayerBreakBlockEvent(Player player, Block block, int meta, BlockIntersection blockIntersection, BlockReference blockReference) {
super(player, true);
this.block = block;
this.meta = meta;
this.blockIntersection = blockIntersection;
this.blockReference = blockReference;
}
public Block getBlock() {
return block;
}
public BlockIntersection getBlockIntersection() {
return blockIntersection;
}
public BlockReference getBlockReference() {
return blockReference;
}
public int getMeta() {
return meta;
}
public void setMeta(int meta) {
this.meta = meta;
}
}
| mit |
InnovateUKGitHub/innovation-funding-service | ifs-data-layer/ifs-data-service/src/main/java/org/innovateuk/ifs/interview/controller/InterviewAllocationController.java | 4403 | package org.innovateuk.ifs.interview.controller;
import org.innovateuk.ifs.commons.rest.RestResult;
import org.innovateuk.ifs.interview.resource.*;
import org.innovateuk.ifs.interview.transactional.InterviewAllocationService;
import org.innovateuk.ifs.invite.resource.AssessorInvitesToSendResource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.web.PageableDefault;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Controller for allocating applications to assessors in Interview Panels.
*/
@RestController
@RequestMapping("/interview-panel")
public class InterviewAllocationController {
private static final int DEFAULT_PAGE_SIZE = 20;
@Autowired
private InterviewAllocationService interviewAllocationService;
@GetMapping("/allocate-assessors/{competitionId}")
public RestResult<InterviewAcceptedAssessorsPageResource> getInterviewAcceptedAssessors(
@PathVariable long competitionId,
@PageableDefault(size = DEFAULT_PAGE_SIZE, sort = "invite.name", direction = Sort.Direction.ASC) Pageable pageable) {
return interviewAllocationService.getInterviewAcceptedAssessors(competitionId, pageable).toGetResponse();
}
@GetMapping("/{competitionId}/allocated-applications/{assessorId}")
public RestResult<InterviewApplicationPageResource> getAllocatedApplications(
@PathVariable long competitionId,
@PathVariable long assessorId,
@PageableDefault(size = DEFAULT_PAGE_SIZE, sort = "target.id", direction = Sort.Direction.ASC) Pageable pageable) {
return interviewAllocationService.getAllocatedApplications(competitionId, assessorId, pageable).toGetResponse();
}
@GetMapping("/{competitionId}/allocated-applications-assessor-id/{assessorId}")
public RestResult<List<InterviewResource>> getAllocatedApplicationsByAssessorId(
@PathVariable long competitionId,
@PathVariable long assessorId
) {
return interviewAllocationService.getAllocatedApplicationsByAssessorId(competitionId, assessorId).toGetResponse();
}
@GetMapping("/{competitionId}/unallocated-applications/all/{applicationIds}")
public RestResult<List<InterviewApplicationResource>> getAllocatedApplications(@PathVariable List<Long> applicationIds) {
return interviewAllocationService.getUnallocatedApplicationsById(applicationIds).toGetResponse();
}
@GetMapping("/{competitionId}/allocated-applications/{assessorId}/invite-to-send")
public RestResult<AssessorInvitesToSendResource> getInviteToSend(@PathVariable long competitionId, @PathVariable long assessorId) {
return interviewAllocationService.getInviteToSend(competitionId, assessorId).toGetResponse();
}
@PostMapping("/{competitionId}/allocated-applications/{assessorId}/send-invite")
public RestResult<Void> sendInvite(@RequestBody InterviewNotifyAllocationResource interviewNotifyAllocationResource) {
return interviewAllocationService.notifyAllocation(interviewNotifyAllocationResource).toPostResponse();
}
@PostMapping("/allocated-applications/{assessorId}/unallocate/{applicationId}")
public RestResult<Void> unallocateApplication(@PathVariable long assessorId, @PathVariable long applicationId) {
return interviewAllocationService.unallocateApplication(assessorId, applicationId).toPostResponse();
}
@GetMapping("/{competitionId}/unallocated-applications/{assessorId}")
public RestResult<InterviewApplicationPageResource> getUnallocatedApplications(
@PathVariable long competitionId,
@PathVariable long assessorId,
@PageableDefault(size = DEFAULT_PAGE_SIZE, sort = "target.id", direction = Sort.Direction.ASC) Pageable pageable) {
return interviewAllocationService.getUnallocatedApplications(competitionId, assessorId, pageable).toGetResponse();
}
@GetMapping("/{competitionId}/unallocated-application-ids/{assessorId}")
public RestResult<List<Long>> getUnallocatedApplicationIds(
@PathVariable long competitionId,
@PathVariable long assessorId) {
return interviewAllocationService.getUnallocatedApplicationIds(competitionId, assessorId).toGetResponse();
}
} | mit |
georghinkel/ttc2017smartGrids | solutions/ModelJoin/src/main/java/CIM/IEC61970/Core/CorePackage.java | 253784 | /**
*/
package CIM.IEC61970.Core;
import CIM.CIMPackage;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
/**
* <!-- begin-user-doc -->
* The <b>Package</b> for the model.
* It contains accessors for the meta objects to represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each operation of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.CoreFactory
* @model kind="package"
* annotation="http://iec.ch/TC57/2009/CIM-schema-cim14 Documentation='Contains the core PowerSystemResource and ConductingEquipment entities shared by all applications plus common collections of those entities. Not all applications require all the Core entities. This package does not depend on any other package except the Domain package, but most of the other packages have associations and generalizations that depend on it.'"
* annotation="http://www.eclipse.org/emf/2002/GenModel Documentation='Contains the core PowerSystemResource and ConductingEquipment entities shared by all applications plus common collections of those entities. Not all applications require all the Core entities. This package does not depend on any other package except the Domain package, but most of the other packages have associations and generalizations that depend on it.'"
* @generated
*/
public interface CorePackage extends EPackage {
/**
* The package name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNAME = "Core";
/**
* The package namespace URI.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_URI = "http://iec.ch/TC57/2009/CIM-schema-cim14#Core";
/**
* The package namespace name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_PREFIX = "cimCore";
/**
* The singleton instance of the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
CorePackage eINSTANCE = CIM.IEC61970.Core.impl.CorePackageImpl.init();
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.IdentifiedObjectImpl <em>Identified Object</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.IdentifiedObjectImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getIdentifiedObject()
* @generated
*/
int IDENTIFIED_OBJECT = 25;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IDENTIFIED_OBJECT__UUID = CIMPackage.ELEMENT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IDENTIFIED_OBJECT__MRID = CIMPackage.ELEMENT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IDENTIFIED_OBJECT__NAME = CIMPackage.ELEMENT_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IDENTIFIED_OBJECT__DESCRIPTION = CIMPackage.ELEMENT_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IDENTIFIED_OBJECT__PATH_NAME = CIMPackage.ELEMENT_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET = CIMPackage.ELEMENT_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IDENTIFIED_OBJECT__LOCAL_NAME = CIMPackage.ELEMENT_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IDENTIFIED_OBJECT__ALIAS_NAME = CIMPackage.ELEMENT_FEATURE_COUNT + 6;
/**
* The number of structural features of the '<em>Identified Object</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IDENTIFIED_OBJECT_FEATURE_COUNT = CIMPackage.ELEMENT_FEATURE_COUNT + 7;
/**
* The number of operations of the '<em>Identified Object</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IDENTIFIED_OBJECT_OPERATION_COUNT = CIMPackage.ELEMENT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.PowerSystemResourceImpl <em>Power System Resource</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.PowerSystemResourceImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getPowerSystemResource()
* @generated
*/
int POWER_SYSTEM_RESOURCE = 22;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__UUID = IDENTIFIED_OBJECT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__MRID = IDENTIFIED_OBJECT__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__NAME = IDENTIFIED_OBJECT__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__DESCRIPTION = IDENTIFIED_OBJECT__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__PATH_NAME = IDENTIFIED_OBJECT__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__MODELING_AUTHORITY_SET = IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__LOCAL_NAME = IDENTIFIED_OBJECT__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__ALIAS_NAME = IDENTIFIED_OBJECT__ALIAS_NAME;
/**
* The feature id for the '<em><b>Reporting Group</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__REPORTING_GROUP = IDENTIFIED_OBJECT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Network Data Sets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__NETWORK_DATA_SETS = IDENTIFIED_OBJECT_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Location</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__LOCATION = IDENTIFIED_OBJECT_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Outage Schedule</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__OUTAGE_SCHEDULE = IDENTIFIED_OBJECT_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>PSR Event</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__PSR_EVENT = IDENTIFIED_OBJECT_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Safety Documents</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__SAFETY_DOCUMENTS = IDENTIFIED_OBJECT_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>Erp Organisation Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__ERP_ORGANISATION_ROLES = IDENTIFIED_OBJECT_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>Circuit Sections</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__CIRCUIT_SECTIONS = IDENTIFIED_OBJECT_FEATURE_COUNT + 7;
/**
* The feature id for the '<em><b>Measurements</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__MEASUREMENTS = IDENTIFIED_OBJECT_FEATURE_COUNT + 8;
/**
* The feature id for the '<em><b>Assets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__ASSETS = IDENTIFIED_OBJECT_FEATURE_COUNT + 9;
/**
* The feature id for the '<em><b>Schedule Steps</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__SCHEDULE_STEPS = IDENTIFIED_OBJECT_FEATURE_COUNT + 10;
/**
* The feature id for the '<em><b>PSR Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__PSR_TYPE = IDENTIFIED_OBJECT_FEATURE_COUNT + 11;
/**
* The feature id for the '<em><b>Psr Lists</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__PSR_LISTS = IDENTIFIED_OBJECT_FEATURE_COUNT + 12;
/**
* The feature id for the '<em><b>Operating Share</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__OPERATING_SHARE = IDENTIFIED_OBJECT_FEATURE_COUNT + 13;
/**
* The feature id for the '<em><b>Change Items</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__CHANGE_ITEMS = IDENTIFIED_OBJECT_FEATURE_COUNT + 14;
/**
* The feature id for the '<em><b>Document Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE__DOCUMENT_ROLES = IDENTIFIED_OBJECT_FEATURE_COUNT + 15;
/**
* The number of structural features of the '<em>Power System Resource</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE_FEATURE_COUNT = IDENTIFIED_OBJECT_FEATURE_COUNT + 16;
/**
* The number of operations of the '<em>Power System Resource</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int POWER_SYSTEM_RESOURCE_OPERATION_COUNT = IDENTIFIED_OBJECT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.ConnectivityNodeContainerImpl <em>Connectivity Node Container</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.ConnectivityNodeContainerImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getConnectivityNodeContainer()
* @generated
*/
int CONNECTIVITY_NODE_CONTAINER = 8;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__UUID = POWER_SYSTEM_RESOURCE__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__MRID = POWER_SYSTEM_RESOURCE__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__NAME = POWER_SYSTEM_RESOURCE__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__DESCRIPTION = POWER_SYSTEM_RESOURCE__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__PATH_NAME = POWER_SYSTEM_RESOURCE__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__MODELING_AUTHORITY_SET = POWER_SYSTEM_RESOURCE__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__LOCAL_NAME = POWER_SYSTEM_RESOURCE__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__ALIAS_NAME = POWER_SYSTEM_RESOURCE__ALIAS_NAME;
/**
* The feature id for the '<em><b>Reporting Group</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__REPORTING_GROUP = POWER_SYSTEM_RESOURCE__REPORTING_GROUP;
/**
* The feature id for the '<em><b>Network Data Sets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__NETWORK_DATA_SETS = POWER_SYSTEM_RESOURCE__NETWORK_DATA_SETS;
/**
* The feature id for the '<em><b>Location</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__LOCATION = POWER_SYSTEM_RESOURCE__LOCATION;
/**
* The feature id for the '<em><b>Outage Schedule</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__OUTAGE_SCHEDULE = POWER_SYSTEM_RESOURCE__OUTAGE_SCHEDULE;
/**
* The feature id for the '<em><b>PSR Event</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__PSR_EVENT = POWER_SYSTEM_RESOURCE__PSR_EVENT;
/**
* The feature id for the '<em><b>Safety Documents</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__SAFETY_DOCUMENTS = POWER_SYSTEM_RESOURCE__SAFETY_DOCUMENTS;
/**
* The feature id for the '<em><b>Erp Organisation Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__ERP_ORGANISATION_ROLES = POWER_SYSTEM_RESOURCE__ERP_ORGANISATION_ROLES;
/**
* The feature id for the '<em><b>Circuit Sections</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__CIRCUIT_SECTIONS = POWER_SYSTEM_RESOURCE__CIRCUIT_SECTIONS;
/**
* The feature id for the '<em><b>Measurements</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__MEASUREMENTS = POWER_SYSTEM_RESOURCE__MEASUREMENTS;
/**
* The feature id for the '<em><b>Assets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__ASSETS = POWER_SYSTEM_RESOURCE__ASSETS;
/**
* The feature id for the '<em><b>Schedule Steps</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__SCHEDULE_STEPS = POWER_SYSTEM_RESOURCE__SCHEDULE_STEPS;
/**
* The feature id for the '<em><b>PSR Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__PSR_TYPE = POWER_SYSTEM_RESOURCE__PSR_TYPE;
/**
* The feature id for the '<em><b>Psr Lists</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__PSR_LISTS = POWER_SYSTEM_RESOURCE__PSR_LISTS;
/**
* The feature id for the '<em><b>Operating Share</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__OPERATING_SHARE = POWER_SYSTEM_RESOURCE__OPERATING_SHARE;
/**
* The feature id for the '<em><b>Change Items</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__CHANGE_ITEMS = POWER_SYSTEM_RESOURCE__CHANGE_ITEMS;
/**
* The feature id for the '<em><b>Document Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__DOCUMENT_ROLES = POWER_SYSTEM_RESOURCE__DOCUMENT_ROLES;
/**
* The feature id for the '<em><b>Connectivity Nodes</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__CONNECTIVITY_NODES = POWER_SYSTEM_RESOURCE_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Topological Node</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER__TOPOLOGICAL_NODE = POWER_SYSTEM_RESOURCE_FEATURE_COUNT + 1;
/**
* The number of structural features of the '<em>Connectivity Node Container</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER_FEATURE_COUNT = POWER_SYSTEM_RESOURCE_FEATURE_COUNT + 2;
/**
* The number of operations of the '<em>Connectivity Node Container</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_CONTAINER_OPERATION_COUNT = POWER_SYSTEM_RESOURCE_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.EquipmentContainerImpl <em>Equipment Container</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.EquipmentContainerImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getEquipmentContainer()
* @generated
*/
int EQUIPMENT_CONTAINER = 21;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__UUID = CONNECTIVITY_NODE_CONTAINER__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__MRID = CONNECTIVITY_NODE_CONTAINER__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__NAME = CONNECTIVITY_NODE_CONTAINER__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__DESCRIPTION = CONNECTIVITY_NODE_CONTAINER__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__PATH_NAME = CONNECTIVITY_NODE_CONTAINER__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__MODELING_AUTHORITY_SET = CONNECTIVITY_NODE_CONTAINER__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__LOCAL_NAME = CONNECTIVITY_NODE_CONTAINER__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__ALIAS_NAME = CONNECTIVITY_NODE_CONTAINER__ALIAS_NAME;
/**
* The feature id for the '<em><b>Reporting Group</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__REPORTING_GROUP = CONNECTIVITY_NODE_CONTAINER__REPORTING_GROUP;
/**
* The feature id for the '<em><b>Network Data Sets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__NETWORK_DATA_SETS = CONNECTIVITY_NODE_CONTAINER__NETWORK_DATA_SETS;
/**
* The feature id for the '<em><b>Location</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__LOCATION = CONNECTIVITY_NODE_CONTAINER__LOCATION;
/**
* The feature id for the '<em><b>Outage Schedule</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__OUTAGE_SCHEDULE = CONNECTIVITY_NODE_CONTAINER__OUTAGE_SCHEDULE;
/**
* The feature id for the '<em><b>PSR Event</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__PSR_EVENT = CONNECTIVITY_NODE_CONTAINER__PSR_EVENT;
/**
* The feature id for the '<em><b>Safety Documents</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__SAFETY_DOCUMENTS = CONNECTIVITY_NODE_CONTAINER__SAFETY_DOCUMENTS;
/**
* The feature id for the '<em><b>Erp Organisation Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__ERP_ORGANISATION_ROLES = CONNECTIVITY_NODE_CONTAINER__ERP_ORGANISATION_ROLES;
/**
* The feature id for the '<em><b>Circuit Sections</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__CIRCUIT_SECTIONS = CONNECTIVITY_NODE_CONTAINER__CIRCUIT_SECTIONS;
/**
* The feature id for the '<em><b>Measurements</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__MEASUREMENTS = CONNECTIVITY_NODE_CONTAINER__MEASUREMENTS;
/**
* The feature id for the '<em><b>Assets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__ASSETS = CONNECTIVITY_NODE_CONTAINER__ASSETS;
/**
* The feature id for the '<em><b>Schedule Steps</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__SCHEDULE_STEPS = CONNECTIVITY_NODE_CONTAINER__SCHEDULE_STEPS;
/**
* The feature id for the '<em><b>PSR Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__PSR_TYPE = CONNECTIVITY_NODE_CONTAINER__PSR_TYPE;
/**
* The feature id for the '<em><b>Psr Lists</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__PSR_LISTS = CONNECTIVITY_NODE_CONTAINER__PSR_LISTS;
/**
* The feature id for the '<em><b>Operating Share</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__OPERATING_SHARE = CONNECTIVITY_NODE_CONTAINER__OPERATING_SHARE;
/**
* The feature id for the '<em><b>Change Items</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__CHANGE_ITEMS = CONNECTIVITY_NODE_CONTAINER__CHANGE_ITEMS;
/**
* The feature id for the '<em><b>Document Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__DOCUMENT_ROLES = CONNECTIVITY_NODE_CONTAINER__DOCUMENT_ROLES;
/**
* The feature id for the '<em><b>Connectivity Nodes</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__CONNECTIVITY_NODES = CONNECTIVITY_NODE_CONTAINER__CONNECTIVITY_NODES;
/**
* The feature id for the '<em><b>Topological Node</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__TOPOLOGICAL_NODE = CONNECTIVITY_NODE_CONTAINER__TOPOLOGICAL_NODE;
/**
* The feature id for the '<em><b>Equipments</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER__EQUIPMENTS = CONNECTIVITY_NODE_CONTAINER_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Equipment Container</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER_FEATURE_COUNT = CONNECTIVITY_NODE_CONTAINER_FEATURE_COUNT + 1;
/**
* The number of operations of the '<em>Equipment Container</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_CONTAINER_OPERATION_COUNT = CONNECTIVITY_NODE_CONTAINER_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.BayImpl <em>Bay</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.BayImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getBay()
* @generated
*/
int BAY = 0;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__UUID = EQUIPMENT_CONTAINER__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__MRID = EQUIPMENT_CONTAINER__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__NAME = EQUIPMENT_CONTAINER__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__DESCRIPTION = EQUIPMENT_CONTAINER__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__PATH_NAME = EQUIPMENT_CONTAINER__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__MODELING_AUTHORITY_SET = EQUIPMENT_CONTAINER__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__LOCAL_NAME = EQUIPMENT_CONTAINER__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__ALIAS_NAME = EQUIPMENT_CONTAINER__ALIAS_NAME;
/**
* The feature id for the '<em><b>Reporting Group</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__REPORTING_GROUP = EQUIPMENT_CONTAINER__REPORTING_GROUP;
/**
* The feature id for the '<em><b>Network Data Sets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__NETWORK_DATA_SETS = EQUIPMENT_CONTAINER__NETWORK_DATA_SETS;
/**
* The feature id for the '<em><b>Location</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__LOCATION = EQUIPMENT_CONTAINER__LOCATION;
/**
* The feature id for the '<em><b>Outage Schedule</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__OUTAGE_SCHEDULE = EQUIPMENT_CONTAINER__OUTAGE_SCHEDULE;
/**
* The feature id for the '<em><b>PSR Event</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__PSR_EVENT = EQUIPMENT_CONTAINER__PSR_EVENT;
/**
* The feature id for the '<em><b>Safety Documents</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__SAFETY_DOCUMENTS = EQUIPMENT_CONTAINER__SAFETY_DOCUMENTS;
/**
* The feature id for the '<em><b>Erp Organisation Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__ERP_ORGANISATION_ROLES = EQUIPMENT_CONTAINER__ERP_ORGANISATION_ROLES;
/**
* The feature id for the '<em><b>Circuit Sections</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__CIRCUIT_SECTIONS = EQUIPMENT_CONTAINER__CIRCUIT_SECTIONS;
/**
* The feature id for the '<em><b>Measurements</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__MEASUREMENTS = EQUIPMENT_CONTAINER__MEASUREMENTS;
/**
* The feature id for the '<em><b>Assets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__ASSETS = EQUIPMENT_CONTAINER__ASSETS;
/**
* The feature id for the '<em><b>Schedule Steps</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__SCHEDULE_STEPS = EQUIPMENT_CONTAINER__SCHEDULE_STEPS;
/**
* The feature id for the '<em><b>PSR Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__PSR_TYPE = EQUIPMENT_CONTAINER__PSR_TYPE;
/**
* The feature id for the '<em><b>Psr Lists</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__PSR_LISTS = EQUIPMENT_CONTAINER__PSR_LISTS;
/**
* The feature id for the '<em><b>Operating Share</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__OPERATING_SHARE = EQUIPMENT_CONTAINER__OPERATING_SHARE;
/**
* The feature id for the '<em><b>Change Items</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__CHANGE_ITEMS = EQUIPMENT_CONTAINER__CHANGE_ITEMS;
/**
* The feature id for the '<em><b>Document Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__DOCUMENT_ROLES = EQUIPMENT_CONTAINER__DOCUMENT_ROLES;
/**
* The feature id for the '<em><b>Connectivity Nodes</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__CONNECTIVITY_NODES = EQUIPMENT_CONTAINER__CONNECTIVITY_NODES;
/**
* The feature id for the '<em><b>Topological Node</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__TOPOLOGICAL_NODE = EQUIPMENT_CONTAINER__TOPOLOGICAL_NODE;
/**
* The feature id for the '<em><b>Equipments</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__EQUIPMENTS = EQUIPMENT_CONTAINER__EQUIPMENTS;
/**
* The feature id for the '<em><b>Bay Energy Meas Flag</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__BAY_ENERGY_MEAS_FLAG = EQUIPMENT_CONTAINER_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Bus Bar Configuration</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__BUS_BAR_CONFIGURATION = EQUIPMENT_CONTAINER_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Bay Power Meas Flag</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__BAY_POWER_MEAS_FLAG = EQUIPMENT_CONTAINER_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Voltage Level</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__VOLTAGE_LEVEL = EQUIPMENT_CONTAINER_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Breaker Configuration</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__BREAKER_CONFIGURATION = EQUIPMENT_CONTAINER_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Substation</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY__SUBSTATION = EQUIPMENT_CONTAINER_FEATURE_COUNT + 5;
/**
* The number of structural features of the '<em>Bay</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY_FEATURE_COUNT = EQUIPMENT_CONTAINER_FEATURE_COUNT + 6;
/**
* The number of operations of the '<em>Bay</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BAY_OPERATION_COUNT = EQUIPMENT_CONTAINER_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.TerminalImpl <em>Terminal</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.TerminalImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getTerminal()
* @generated
*/
int TERMINAL = 1;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__UUID = IDENTIFIED_OBJECT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__MRID = IDENTIFIED_OBJECT__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__NAME = IDENTIFIED_OBJECT__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__DESCRIPTION = IDENTIFIED_OBJECT__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__PATH_NAME = IDENTIFIED_OBJECT__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__MODELING_AUTHORITY_SET = IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__LOCAL_NAME = IDENTIFIED_OBJECT__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__ALIAS_NAME = IDENTIFIED_OBJECT__ALIAS_NAME;
/**
* The feature id for the '<em><b>Connectivity Node</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__CONNECTIVITY_NODE = IDENTIFIED_OBJECT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Sv Power Flow</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__SV_POWER_FLOW = IDENTIFIED_OBJECT_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Has First Mutual Coupling</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__HAS_FIRST_MUTUAL_COUPLING = IDENTIFIED_OBJECT_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Terminal Constraints</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__TERMINAL_CONSTRAINTS = IDENTIFIED_OBJECT_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Regulating Control</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__REGULATING_CONTROL = IDENTIFIED_OBJECT_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Connected</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__CONNECTED = IDENTIFIED_OBJECT_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>Measurements</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__MEASUREMENTS = IDENTIFIED_OBJECT_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>Sequence Number</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__SEQUENCE_NUMBER = IDENTIFIED_OBJECT_FEATURE_COUNT + 7;
/**
* The feature id for the '<em><b>Tie Flow</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__TIE_FLOW = IDENTIFIED_OBJECT_FEATURE_COUNT + 8;
/**
* The feature id for the '<em><b>Topological Node</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__TOPOLOGICAL_NODE = IDENTIFIED_OBJECT_FEATURE_COUNT + 9;
/**
* The feature id for the '<em><b>Branch Group Terminal</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__BRANCH_GROUP_TERMINAL = IDENTIFIED_OBJECT_FEATURE_COUNT + 10;
/**
* The feature id for the '<em><b>Bushing Info</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__BUSHING_INFO = IDENTIFIED_OBJECT_FEATURE_COUNT + 11;
/**
* The feature id for the '<em><b>Conducting Equipment</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__CONDUCTING_EQUIPMENT = IDENTIFIED_OBJECT_FEATURE_COUNT + 12;
/**
* The feature id for the '<em><b>Has Second Mutual Coupling</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__HAS_SECOND_MUTUAL_COUPLING = IDENTIFIED_OBJECT_FEATURE_COUNT + 13;
/**
* The feature id for the '<em><b>Operational Limit Set</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL__OPERATIONAL_LIMIT_SET = IDENTIFIED_OBJECT_FEATURE_COUNT + 14;
/**
* The number of structural features of the '<em>Terminal</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL_FEATURE_COUNT = IDENTIFIED_OBJECT_FEATURE_COUNT + 15;
/**
* The number of operations of the '<em>Terminal</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TERMINAL_OPERATION_COUNT = IDENTIFIED_OBJECT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.ReportingGroupImpl <em>Reporting Group</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.ReportingGroupImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getReportingGroup()
* @generated
*/
int REPORTING_GROUP = 2;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_GROUP__UUID = IDENTIFIED_OBJECT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_GROUP__MRID = IDENTIFIED_OBJECT__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_GROUP__NAME = IDENTIFIED_OBJECT__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_GROUP__DESCRIPTION = IDENTIFIED_OBJECT__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_GROUP__PATH_NAME = IDENTIFIED_OBJECT__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_GROUP__MODELING_AUTHORITY_SET = IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_GROUP__LOCAL_NAME = IDENTIFIED_OBJECT__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_GROUP__ALIAS_NAME = IDENTIFIED_OBJECT__ALIAS_NAME;
/**
* The feature id for the '<em><b>Power System Resource</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_GROUP__POWER_SYSTEM_RESOURCE = IDENTIFIED_OBJECT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Bus Name Marker</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_GROUP__BUS_NAME_MARKER = IDENTIFIED_OBJECT_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Topological Node</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_GROUP__TOPOLOGICAL_NODE = IDENTIFIED_OBJECT_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Reporting Super Group</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_GROUP__REPORTING_SUPER_GROUP = IDENTIFIED_OBJECT_FEATURE_COUNT + 3;
/**
* The number of structural features of the '<em>Reporting Group</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_GROUP_FEATURE_COUNT = IDENTIFIED_OBJECT_FEATURE_COUNT + 4;
/**
* The number of operations of the '<em>Reporting Group</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_GROUP_OPERATION_COUNT = IDENTIFIED_OBJECT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.BasePowerImpl <em>Base Power</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.BasePowerImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getBasePower()
* @generated
*/
int BASE_POWER = 3;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_POWER__UUID = IDENTIFIED_OBJECT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_POWER__MRID = IDENTIFIED_OBJECT__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_POWER__NAME = IDENTIFIED_OBJECT__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_POWER__DESCRIPTION = IDENTIFIED_OBJECT__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_POWER__PATH_NAME = IDENTIFIED_OBJECT__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_POWER__MODELING_AUTHORITY_SET = IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_POWER__LOCAL_NAME = IDENTIFIED_OBJECT__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_POWER__ALIAS_NAME = IDENTIFIED_OBJECT__ALIAS_NAME;
/**
* The feature id for the '<em><b>Base Power</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_POWER__BASE_POWER = IDENTIFIED_OBJECT_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Base Power</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_POWER_FEATURE_COUNT = IDENTIFIED_OBJECT_FEATURE_COUNT + 1;
/**
* The number of operations of the '<em>Base Power</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_POWER_OPERATION_COUNT = IDENTIFIED_OBJECT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.BasicIntervalScheduleImpl <em>Basic Interval Schedule</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.BasicIntervalScheduleImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getBasicIntervalSchedule()
* @generated
*/
int BASIC_INTERVAL_SCHEDULE = 16;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASIC_INTERVAL_SCHEDULE__UUID = IDENTIFIED_OBJECT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASIC_INTERVAL_SCHEDULE__MRID = IDENTIFIED_OBJECT__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASIC_INTERVAL_SCHEDULE__NAME = IDENTIFIED_OBJECT__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASIC_INTERVAL_SCHEDULE__DESCRIPTION = IDENTIFIED_OBJECT__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASIC_INTERVAL_SCHEDULE__PATH_NAME = IDENTIFIED_OBJECT__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASIC_INTERVAL_SCHEDULE__MODELING_AUTHORITY_SET = IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASIC_INTERVAL_SCHEDULE__LOCAL_NAME = IDENTIFIED_OBJECT__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASIC_INTERVAL_SCHEDULE__ALIAS_NAME = IDENTIFIED_OBJECT__ALIAS_NAME;
/**
* The feature id for the '<em><b>Value2 Multiplier</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASIC_INTERVAL_SCHEDULE__VALUE2_MULTIPLIER = IDENTIFIED_OBJECT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Value1 Multiplier</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASIC_INTERVAL_SCHEDULE__VALUE1_MULTIPLIER = IDENTIFIED_OBJECT_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Start Time</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASIC_INTERVAL_SCHEDULE__START_TIME = IDENTIFIED_OBJECT_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Value2 Unit</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASIC_INTERVAL_SCHEDULE__VALUE2_UNIT = IDENTIFIED_OBJECT_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Value1 Unit</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASIC_INTERVAL_SCHEDULE__VALUE1_UNIT = IDENTIFIED_OBJECT_FEATURE_COUNT + 4;
/**
* The number of structural features of the '<em>Basic Interval Schedule</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASIC_INTERVAL_SCHEDULE_FEATURE_COUNT = IDENTIFIED_OBJECT_FEATURE_COUNT + 5;
/**
* The number of operations of the '<em>Basic Interval Schedule</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASIC_INTERVAL_SCHEDULE_OPERATION_COUNT = IDENTIFIED_OBJECT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.RegularIntervalScheduleImpl <em>Regular Interval Schedule</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.RegularIntervalScheduleImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getRegularIntervalSchedule()
* @generated
*/
int REGULAR_INTERVAL_SCHEDULE = 4;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE__UUID = BASIC_INTERVAL_SCHEDULE__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE__MRID = BASIC_INTERVAL_SCHEDULE__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE__NAME = BASIC_INTERVAL_SCHEDULE__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE__DESCRIPTION = BASIC_INTERVAL_SCHEDULE__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE__PATH_NAME = BASIC_INTERVAL_SCHEDULE__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE__MODELING_AUTHORITY_SET = BASIC_INTERVAL_SCHEDULE__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE__LOCAL_NAME = BASIC_INTERVAL_SCHEDULE__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE__ALIAS_NAME = BASIC_INTERVAL_SCHEDULE__ALIAS_NAME;
/**
* The feature id for the '<em><b>Value2 Multiplier</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE__VALUE2_MULTIPLIER = BASIC_INTERVAL_SCHEDULE__VALUE2_MULTIPLIER;
/**
* The feature id for the '<em><b>Value1 Multiplier</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE__VALUE1_MULTIPLIER = BASIC_INTERVAL_SCHEDULE__VALUE1_MULTIPLIER;
/**
* The feature id for the '<em><b>Start Time</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE__START_TIME = BASIC_INTERVAL_SCHEDULE__START_TIME;
/**
* The feature id for the '<em><b>Value2 Unit</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE__VALUE2_UNIT = BASIC_INTERVAL_SCHEDULE__VALUE2_UNIT;
/**
* The feature id for the '<em><b>Value1 Unit</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE__VALUE1_UNIT = BASIC_INTERVAL_SCHEDULE__VALUE1_UNIT;
/**
* The feature id for the '<em><b>End Time</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE__END_TIME = BASIC_INTERVAL_SCHEDULE_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Time Points</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE__TIME_POINTS = BASIC_INTERVAL_SCHEDULE_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Time Step</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE__TIME_STEP = BASIC_INTERVAL_SCHEDULE_FEATURE_COUNT + 2;
/**
* The number of structural features of the '<em>Regular Interval Schedule</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE_FEATURE_COUNT = BASIC_INTERVAL_SCHEDULE_FEATURE_COUNT + 3;
/**
* The number of operations of the '<em>Regular Interval Schedule</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_INTERVAL_SCHEDULE_OPERATION_COUNT = BASIC_INTERVAL_SCHEDULE_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.CurveImpl <em>Curve</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.CurveImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getCurve()
* @generated
*/
int CURVE = 5;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__UUID = IDENTIFIED_OBJECT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__MRID = IDENTIFIED_OBJECT__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__NAME = IDENTIFIED_OBJECT__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__DESCRIPTION = IDENTIFIED_OBJECT__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__PATH_NAME = IDENTIFIED_OBJECT__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__MODELING_AUTHORITY_SET = IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__LOCAL_NAME = IDENTIFIED_OBJECT__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__ALIAS_NAME = IDENTIFIED_OBJECT__ALIAS_NAME;
/**
* The feature id for the '<em><b>Y2 Unit</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__Y2_UNIT = IDENTIFIED_OBJECT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>XMultiplier</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__XMULTIPLIER = IDENTIFIED_OBJECT_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Y3 Multiplier</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__Y3_MULTIPLIER = IDENTIFIED_OBJECT_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Y1 Unit</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__Y1_UNIT = IDENTIFIED_OBJECT_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Curve Style</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__CURVE_STYLE = IDENTIFIED_OBJECT_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Y3 Unit</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__Y3_UNIT = IDENTIFIED_OBJECT_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>XUnit</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__XUNIT = IDENTIFIED_OBJECT_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>Curve Datas</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__CURVE_DATAS = IDENTIFIED_OBJECT_FEATURE_COUNT + 7;
/**
* The feature id for the '<em><b>Y2 Multiplier</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__Y2_MULTIPLIER = IDENTIFIED_OBJECT_FEATURE_COUNT + 8;
/**
* The feature id for the '<em><b>Y1 Multiplier</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE__Y1_MULTIPLIER = IDENTIFIED_OBJECT_FEATURE_COUNT + 9;
/**
* The number of structural features of the '<em>Curve</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE_FEATURE_COUNT = IDENTIFIED_OBJECT_FEATURE_COUNT + 10;
/**
* The number of operations of the '<em>Curve</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE_OPERATION_COUNT = IDENTIFIED_OBJECT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.BaseVoltageImpl <em>Base Voltage</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.BaseVoltageImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getBaseVoltage()
* @generated
*/
int BASE_VOLTAGE = 6;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_VOLTAGE__UUID = IDENTIFIED_OBJECT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_VOLTAGE__MRID = IDENTIFIED_OBJECT__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_VOLTAGE__NAME = IDENTIFIED_OBJECT__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_VOLTAGE__DESCRIPTION = IDENTIFIED_OBJECT__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_VOLTAGE__PATH_NAME = IDENTIFIED_OBJECT__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_VOLTAGE__MODELING_AUTHORITY_SET = IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_VOLTAGE__LOCAL_NAME = IDENTIFIED_OBJECT__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_VOLTAGE__ALIAS_NAME = IDENTIFIED_OBJECT__ALIAS_NAME;
/**
* The feature id for the '<em><b>Nominal Voltage</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_VOLTAGE__NOMINAL_VOLTAGE = IDENTIFIED_OBJECT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Topological Node</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_VOLTAGE__TOPOLOGICAL_NODE = IDENTIFIED_OBJECT_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Voltage Level</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_VOLTAGE__VOLTAGE_LEVEL = IDENTIFIED_OBJECT_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Is DC</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_VOLTAGE__IS_DC = IDENTIFIED_OBJECT_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Conducting Equipment</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_VOLTAGE__CONDUCTING_EQUIPMENT = IDENTIFIED_OBJECT_FEATURE_COUNT + 4;
/**
* The number of structural features of the '<em>Base Voltage</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_VOLTAGE_FEATURE_COUNT = IDENTIFIED_OBJECT_FEATURE_COUNT + 5;
/**
* The number of operations of the '<em>Base Voltage</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int BASE_VOLTAGE_OPERATION_COUNT = IDENTIFIED_OBJECT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.OperatingShareImpl <em>Operating Share</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.OperatingShareImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getOperatingShare()
* @generated
*/
int OPERATING_SHARE = 7;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_SHARE__UUID = CIMPackage.ELEMENT__UUID;
/**
* The feature id for the '<em><b>Percentage</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_SHARE__PERCENTAGE = CIMPackage.ELEMENT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Power System Resource</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_SHARE__POWER_SYSTEM_RESOURCE = CIMPackage.ELEMENT_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Operating Participant</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_SHARE__OPERATING_PARTICIPANT = CIMPackage.ELEMENT_FEATURE_COUNT + 2;
/**
* The number of structural features of the '<em>Operating Share</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_SHARE_FEATURE_COUNT = CIMPackage.ELEMENT_FEATURE_COUNT + 3;
/**
* The number of operations of the '<em>Operating Share</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_SHARE_OPERATION_COUNT = CIMPackage.ELEMENT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.IrregularTimePointImpl <em>Irregular Time Point</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.IrregularTimePointImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getIrregularTimePoint()
* @generated
*/
int IRREGULAR_TIME_POINT = 9;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_TIME_POINT__UUID = CIMPackage.ELEMENT__UUID;
/**
* The feature id for the '<em><b>Value1</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_TIME_POINT__VALUE1 = CIMPackage.ELEMENT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Value2</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_TIME_POINT__VALUE2 = CIMPackage.ELEMENT_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Interval Schedule</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_TIME_POINT__INTERVAL_SCHEDULE = CIMPackage.ELEMENT_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Time</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_TIME_POINT__TIME = CIMPackage.ELEMENT_FEATURE_COUNT + 3;
/**
* The number of structural features of the '<em>Irregular Time Point</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_TIME_POINT_FEATURE_COUNT = CIMPackage.ELEMENT_FEATURE_COUNT + 4;
/**
* The number of operations of the '<em>Irregular Time Point</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_TIME_POINT_OPERATION_COUNT = CIMPackage.ELEMENT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.EquipmentImpl <em>Equipment</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.EquipmentImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getEquipment()
* @generated
*/
int EQUIPMENT = 10;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__UUID = POWER_SYSTEM_RESOURCE__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__MRID = POWER_SYSTEM_RESOURCE__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__NAME = POWER_SYSTEM_RESOURCE__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__DESCRIPTION = POWER_SYSTEM_RESOURCE__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__PATH_NAME = POWER_SYSTEM_RESOURCE__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__MODELING_AUTHORITY_SET = POWER_SYSTEM_RESOURCE__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__LOCAL_NAME = POWER_SYSTEM_RESOURCE__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__ALIAS_NAME = POWER_SYSTEM_RESOURCE__ALIAS_NAME;
/**
* The feature id for the '<em><b>Reporting Group</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__REPORTING_GROUP = POWER_SYSTEM_RESOURCE__REPORTING_GROUP;
/**
* The feature id for the '<em><b>Network Data Sets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__NETWORK_DATA_SETS = POWER_SYSTEM_RESOURCE__NETWORK_DATA_SETS;
/**
* The feature id for the '<em><b>Location</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__LOCATION = POWER_SYSTEM_RESOURCE__LOCATION;
/**
* The feature id for the '<em><b>Outage Schedule</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__OUTAGE_SCHEDULE = POWER_SYSTEM_RESOURCE__OUTAGE_SCHEDULE;
/**
* The feature id for the '<em><b>PSR Event</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__PSR_EVENT = POWER_SYSTEM_RESOURCE__PSR_EVENT;
/**
* The feature id for the '<em><b>Safety Documents</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__SAFETY_DOCUMENTS = POWER_SYSTEM_RESOURCE__SAFETY_DOCUMENTS;
/**
* The feature id for the '<em><b>Erp Organisation Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__ERP_ORGANISATION_ROLES = POWER_SYSTEM_RESOURCE__ERP_ORGANISATION_ROLES;
/**
* The feature id for the '<em><b>Circuit Sections</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__CIRCUIT_SECTIONS = POWER_SYSTEM_RESOURCE__CIRCUIT_SECTIONS;
/**
* The feature id for the '<em><b>Measurements</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__MEASUREMENTS = POWER_SYSTEM_RESOURCE__MEASUREMENTS;
/**
* The feature id for the '<em><b>Assets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__ASSETS = POWER_SYSTEM_RESOURCE__ASSETS;
/**
* The feature id for the '<em><b>Schedule Steps</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__SCHEDULE_STEPS = POWER_SYSTEM_RESOURCE__SCHEDULE_STEPS;
/**
* The feature id for the '<em><b>PSR Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__PSR_TYPE = POWER_SYSTEM_RESOURCE__PSR_TYPE;
/**
* The feature id for the '<em><b>Psr Lists</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__PSR_LISTS = POWER_SYSTEM_RESOURCE__PSR_LISTS;
/**
* The feature id for the '<em><b>Operating Share</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__OPERATING_SHARE = POWER_SYSTEM_RESOURCE__OPERATING_SHARE;
/**
* The feature id for the '<em><b>Change Items</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__CHANGE_ITEMS = POWER_SYSTEM_RESOURCE__CHANGE_ITEMS;
/**
* The feature id for the '<em><b>Document Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__DOCUMENT_ROLES = POWER_SYSTEM_RESOURCE__DOCUMENT_ROLES;
/**
* The feature id for the '<em><b>Operational Limit Set</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__OPERATIONAL_LIMIT_SET = POWER_SYSTEM_RESOURCE_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Contingency Equipment</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__CONTINGENCY_EQUIPMENT = POWER_SYSTEM_RESOURCE_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Norma Ily In Service</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__NORMA_ILY_IN_SERVICE = POWER_SYSTEM_RESOURCE_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Customer Agreements</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__CUSTOMER_AGREEMENTS = POWER_SYSTEM_RESOURCE_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Aggregate</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__AGGREGATE = POWER_SYSTEM_RESOURCE_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Equipment Container</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT__EQUIPMENT_CONTAINER = POWER_SYSTEM_RESOURCE_FEATURE_COUNT + 5;
/**
* The number of structural features of the '<em>Equipment</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_FEATURE_COUNT = POWER_SYSTEM_RESOURCE_FEATURE_COUNT + 6;
/**
* The number of operations of the '<em>Equipment</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EQUIPMENT_OPERATION_COUNT = POWER_SYSTEM_RESOURCE_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.SubGeographicalRegionImpl <em>Sub Geographical Region</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.SubGeographicalRegionImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getSubGeographicalRegion()
* @generated
*/
int SUB_GEOGRAPHICAL_REGION = 11;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUB_GEOGRAPHICAL_REGION__UUID = IDENTIFIED_OBJECT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUB_GEOGRAPHICAL_REGION__MRID = IDENTIFIED_OBJECT__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUB_GEOGRAPHICAL_REGION__NAME = IDENTIFIED_OBJECT__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUB_GEOGRAPHICAL_REGION__DESCRIPTION = IDENTIFIED_OBJECT__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUB_GEOGRAPHICAL_REGION__PATH_NAME = IDENTIFIED_OBJECT__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUB_GEOGRAPHICAL_REGION__MODELING_AUTHORITY_SET = IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUB_GEOGRAPHICAL_REGION__LOCAL_NAME = IDENTIFIED_OBJECT__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUB_GEOGRAPHICAL_REGION__ALIAS_NAME = IDENTIFIED_OBJECT__ALIAS_NAME;
/**
* The feature id for the '<em><b>Lines</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUB_GEOGRAPHICAL_REGION__LINES = IDENTIFIED_OBJECT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Region</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUB_GEOGRAPHICAL_REGION__REGION = IDENTIFIED_OBJECT_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Substations</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUB_GEOGRAPHICAL_REGION__SUBSTATIONS = IDENTIFIED_OBJECT_FEATURE_COUNT + 2;
/**
* The number of structural features of the '<em>Sub Geographical Region</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUB_GEOGRAPHICAL_REGION_FEATURE_COUNT = IDENTIFIED_OBJECT_FEATURE_COUNT + 3;
/**
* The number of operations of the '<em>Sub Geographical Region</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUB_GEOGRAPHICAL_REGION_OPERATION_COUNT = IDENTIFIED_OBJECT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.UnitImpl <em>Unit</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.UnitImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getUnit()
* @generated
*/
int UNIT = 12;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT__UUID = IDENTIFIED_OBJECT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT__MRID = IDENTIFIED_OBJECT__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT__NAME = IDENTIFIED_OBJECT__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT__DESCRIPTION = IDENTIFIED_OBJECT__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT__PATH_NAME = IDENTIFIED_OBJECT__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT__MODELING_AUTHORITY_SET = IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT__LOCAL_NAME = IDENTIFIED_OBJECT__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT__ALIAS_NAME = IDENTIFIED_OBJECT__ALIAS_NAME;
/**
* The feature id for the '<em><b>Controls</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT__CONTROLS = IDENTIFIED_OBJECT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Protection Equipments</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT__PROTECTION_EQUIPMENTS = IDENTIFIED_OBJECT_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Measurements</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT__MEASUREMENTS = IDENTIFIED_OBJECT_FEATURE_COUNT + 2;
/**
* The number of structural features of the '<em>Unit</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT_FEATURE_COUNT = IDENTIFIED_OBJECT_FEATURE_COUNT + 3;
/**
* The number of operations of the '<em>Unit</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT_OPERATION_COUNT = IDENTIFIED_OBJECT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.ReportingSuperGroupImpl <em>Reporting Super Group</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.ReportingSuperGroupImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getReportingSuperGroup()
* @generated
*/
int REPORTING_SUPER_GROUP = 13;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_SUPER_GROUP__UUID = IDENTIFIED_OBJECT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_SUPER_GROUP__MRID = IDENTIFIED_OBJECT__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_SUPER_GROUP__NAME = IDENTIFIED_OBJECT__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_SUPER_GROUP__DESCRIPTION = IDENTIFIED_OBJECT__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_SUPER_GROUP__PATH_NAME = IDENTIFIED_OBJECT__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_SUPER_GROUP__MODELING_AUTHORITY_SET = IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_SUPER_GROUP__LOCAL_NAME = IDENTIFIED_OBJECT__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_SUPER_GROUP__ALIAS_NAME = IDENTIFIED_OBJECT__ALIAS_NAME;
/**
* The feature id for the '<em><b>Reporting Group</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_SUPER_GROUP__REPORTING_GROUP = IDENTIFIED_OBJECT_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Reporting Super Group</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_SUPER_GROUP_FEATURE_COUNT = IDENTIFIED_OBJECT_FEATURE_COUNT + 1;
/**
* The number of operations of the '<em>Reporting Super Group</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPORTING_SUPER_GROUP_OPERATION_COUNT = IDENTIFIED_OBJECT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.RegularTimePointImpl <em>Regular Time Point</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.RegularTimePointImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getRegularTimePoint()
* @generated
*/
int REGULAR_TIME_POINT = 14;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_TIME_POINT__UUID = CIMPackage.ELEMENT__UUID;
/**
* The feature id for the '<em><b>Interval Schedule</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_TIME_POINT__INTERVAL_SCHEDULE = CIMPackage.ELEMENT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Value1</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_TIME_POINT__VALUE1 = CIMPackage.ELEMENT_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Value2</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_TIME_POINT__VALUE2 = CIMPackage.ELEMENT_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Sequence Number</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_TIME_POINT__SEQUENCE_NUMBER = CIMPackage.ELEMENT_FEATURE_COUNT + 3;
/**
* The number of structural features of the '<em>Regular Time Point</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_TIME_POINT_FEATURE_COUNT = CIMPackage.ELEMENT_FEATURE_COUNT + 4;
/**
* The number of operations of the '<em>Regular Time Point</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REGULAR_TIME_POINT_OPERATION_COUNT = CIMPackage.ELEMENT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.PsrListImpl <em>Psr List</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.PsrListImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getPsrList()
* @generated
*/
int PSR_LIST = 15;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_LIST__UUID = IDENTIFIED_OBJECT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_LIST__MRID = IDENTIFIED_OBJECT__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_LIST__NAME = IDENTIFIED_OBJECT__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_LIST__DESCRIPTION = IDENTIFIED_OBJECT__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_LIST__PATH_NAME = IDENTIFIED_OBJECT__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_LIST__MODELING_AUTHORITY_SET = IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_LIST__LOCAL_NAME = IDENTIFIED_OBJECT__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_LIST__ALIAS_NAME = IDENTIFIED_OBJECT__ALIAS_NAME;
/**
* The feature id for the '<em><b>Type PSR List</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_LIST__TYPE_PSR_LIST = IDENTIFIED_OBJECT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Power System Resources</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_LIST__POWER_SYSTEM_RESOURCES = IDENTIFIED_OBJECT_FEATURE_COUNT + 1;
/**
* The number of structural features of the '<em>Psr List</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_LIST_FEATURE_COUNT = IDENTIFIED_OBJECT_FEATURE_COUNT + 2;
/**
* The number of operations of the '<em>Psr List</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_LIST_OPERATION_COUNT = IDENTIFIED_OBJECT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.IrregularIntervalScheduleImpl <em>Irregular Interval Schedule</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.IrregularIntervalScheduleImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getIrregularIntervalSchedule()
* @generated
*/
int IRREGULAR_INTERVAL_SCHEDULE = 17;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_INTERVAL_SCHEDULE__UUID = BASIC_INTERVAL_SCHEDULE__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_INTERVAL_SCHEDULE__MRID = BASIC_INTERVAL_SCHEDULE__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_INTERVAL_SCHEDULE__NAME = BASIC_INTERVAL_SCHEDULE__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_INTERVAL_SCHEDULE__DESCRIPTION = BASIC_INTERVAL_SCHEDULE__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_INTERVAL_SCHEDULE__PATH_NAME = BASIC_INTERVAL_SCHEDULE__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_INTERVAL_SCHEDULE__MODELING_AUTHORITY_SET = BASIC_INTERVAL_SCHEDULE__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_INTERVAL_SCHEDULE__LOCAL_NAME = BASIC_INTERVAL_SCHEDULE__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_INTERVAL_SCHEDULE__ALIAS_NAME = BASIC_INTERVAL_SCHEDULE__ALIAS_NAME;
/**
* The feature id for the '<em><b>Value2 Multiplier</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_INTERVAL_SCHEDULE__VALUE2_MULTIPLIER = BASIC_INTERVAL_SCHEDULE__VALUE2_MULTIPLIER;
/**
* The feature id for the '<em><b>Value1 Multiplier</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_INTERVAL_SCHEDULE__VALUE1_MULTIPLIER = BASIC_INTERVAL_SCHEDULE__VALUE1_MULTIPLIER;
/**
* The feature id for the '<em><b>Start Time</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_INTERVAL_SCHEDULE__START_TIME = BASIC_INTERVAL_SCHEDULE__START_TIME;
/**
* The feature id for the '<em><b>Value2 Unit</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_INTERVAL_SCHEDULE__VALUE2_UNIT = BASIC_INTERVAL_SCHEDULE__VALUE2_UNIT;
/**
* The feature id for the '<em><b>Value1 Unit</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_INTERVAL_SCHEDULE__VALUE1_UNIT = BASIC_INTERVAL_SCHEDULE__VALUE1_UNIT;
/**
* The feature id for the '<em><b>Time Points</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_INTERVAL_SCHEDULE__TIME_POINTS = BASIC_INTERVAL_SCHEDULE_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Irregular Interval Schedule</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_INTERVAL_SCHEDULE_FEATURE_COUNT = BASIC_INTERVAL_SCHEDULE_FEATURE_COUNT + 1;
/**
* The number of operations of the '<em>Irregular Interval Schedule</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IRREGULAR_INTERVAL_SCHEDULE_OPERATION_COUNT = BASIC_INTERVAL_SCHEDULE_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.PSRTypeImpl <em>PSR Type</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.PSRTypeImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getPSRType()
* @generated
*/
int PSR_TYPE = 18;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_TYPE__UUID = IDENTIFIED_OBJECT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_TYPE__MRID = IDENTIFIED_OBJECT__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_TYPE__NAME = IDENTIFIED_OBJECT__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_TYPE__DESCRIPTION = IDENTIFIED_OBJECT__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_TYPE__PATH_NAME = IDENTIFIED_OBJECT__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_TYPE__MODELING_AUTHORITY_SET = IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_TYPE__LOCAL_NAME = IDENTIFIED_OBJECT__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_TYPE__ALIAS_NAME = IDENTIFIED_OBJECT__ALIAS_NAME;
/**
* The feature id for the '<em><b>Power System Resources</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_TYPE__POWER_SYSTEM_RESOURCES = IDENTIFIED_OBJECT_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>PSR Type</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_TYPE_FEATURE_COUNT = IDENTIFIED_OBJECT_FEATURE_COUNT + 1;
/**
* The number of operations of the '<em>PSR Type</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PSR_TYPE_OPERATION_COUNT = IDENTIFIED_OBJECT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.OperatingParticipantImpl <em>Operating Participant</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.OperatingParticipantImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getOperatingParticipant()
* @generated
*/
int OPERATING_PARTICIPANT = 19;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_PARTICIPANT__UUID = IDENTIFIED_OBJECT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_PARTICIPANT__MRID = IDENTIFIED_OBJECT__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_PARTICIPANT__NAME = IDENTIFIED_OBJECT__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_PARTICIPANT__DESCRIPTION = IDENTIFIED_OBJECT__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_PARTICIPANT__PATH_NAME = IDENTIFIED_OBJECT__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_PARTICIPANT__MODELING_AUTHORITY_SET = IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_PARTICIPANT__LOCAL_NAME = IDENTIFIED_OBJECT__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_PARTICIPANT__ALIAS_NAME = IDENTIFIED_OBJECT__ALIAS_NAME;
/**
* The feature id for the '<em><b>Operating Share</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_PARTICIPANT__OPERATING_SHARE = IDENTIFIED_OBJECT_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Operating Participant</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_PARTICIPANT_FEATURE_COUNT = IDENTIFIED_OBJECT_FEATURE_COUNT + 1;
/**
* The number of operations of the '<em>Operating Participant</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int OPERATING_PARTICIPANT_OPERATION_COUNT = IDENTIFIED_OBJECT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.CurveDataImpl <em>Curve Data</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.CurveDataImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getCurveData()
* @generated
*/
int CURVE_DATA = 20;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE_DATA__UUID = CIMPackage.ELEMENT__UUID;
/**
* The feature id for the '<em><b>Xvalue</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE_DATA__XVALUE = CIMPackage.ELEMENT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Curve</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE_DATA__CURVE = CIMPackage.ELEMENT_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Y2value</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE_DATA__Y2VALUE = CIMPackage.ELEMENT_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Y3value</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE_DATA__Y3VALUE = CIMPackage.ELEMENT_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Y1value</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE_DATA__Y1VALUE = CIMPackage.ELEMENT_FEATURE_COUNT + 4;
/**
* The number of structural features of the '<em>Curve Data</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE_DATA_FEATURE_COUNT = CIMPackage.ELEMENT_FEATURE_COUNT + 5;
/**
* The number of operations of the '<em>Curve Data</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CURVE_DATA_OPERATION_COUNT = CIMPackage.ELEMENT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.SubstationImpl <em>Substation</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.SubstationImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getSubstation()
* @generated
*/
int SUBSTATION = 23;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__UUID = EQUIPMENT_CONTAINER__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__MRID = EQUIPMENT_CONTAINER__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__NAME = EQUIPMENT_CONTAINER__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__DESCRIPTION = EQUIPMENT_CONTAINER__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__PATH_NAME = EQUIPMENT_CONTAINER__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__MODELING_AUTHORITY_SET = EQUIPMENT_CONTAINER__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__LOCAL_NAME = EQUIPMENT_CONTAINER__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__ALIAS_NAME = EQUIPMENT_CONTAINER__ALIAS_NAME;
/**
* The feature id for the '<em><b>Reporting Group</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__REPORTING_GROUP = EQUIPMENT_CONTAINER__REPORTING_GROUP;
/**
* The feature id for the '<em><b>Network Data Sets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__NETWORK_DATA_SETS = EQUIPMENT_CONTAINER__NETWORK_DATA_SETS;
/**
* The feature id for the '<em><b>Location</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__LOCATION = EQUIPMENT_CONTAINER__LOCATION;
/**
* The feature id for the '<em><b>Outage Schedule</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__OUTAGE_SCHEDULE = EQUIPMENT_CONTAINER__OUTAGE_SCHEDULE;
/**
* The feature id for the '<em><b>PSR Event</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__PSR_EVENT = EQUIPMENT_CONTAINER__PSR_EVENT;
/**
* The feature id for the '<em><b>Safety Documents</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__SAFETY_DOCUMENTS = EQUIPMENT_CONTAINER__SAFETY_DOCUMENTS;
/**
* The feature id for the '<em><b>Erp Organisation Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__ERP_ORGANISATION_ROLES = EQUIPMENT_CONTAINER__ERP_ORGANISATION_ROLES;
/**
* The feature id for the '<em><b>Circuit Sections</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__CIRCUIT_SECTIONS = EQUIPMENT_CONTAINER__CIRCUIT_SECTIONS;
/**
* The feature id for the '<em><b>Measurements</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__MEASUREMENTS = EQUIPMENT_CONTAINER__MEASUREMENTS;
/**
* The feature id for the '<em><b>Assets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__ASSETS = EQUIPMENT_CONTAINER__ASSETS;
/**
* The feature id for the '<em><b>Schedule Steps</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__SCHEDULE_STEPS = EQUIPMENT_CONTAINER__SCHEDULE_STEPS;
/**
* The feature id for the '<em><b>PSR Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__PSR_TYPE = EQUIPMENT_CONTAINER__PSR_TYPE;
/**
* The feature id for the '<em><b>Psr Lists</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__PSR_LISTS = EQUIPMENT_CONTAINER__PSR_LISTS;
/**
* The feature id for the '<em><b>Operating Share</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__OPERATING_SHARE = EQUIPMENT_CONTAINER__OPERATING_SHARE;
/**
* The feature id for the '<em><b>Change Items</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__CHANGE_ITEMS = EQUIPMENT_CONTAINER__CHANGE_ITEMS;
/**
* The feature id for the '<em><b>Document Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__DOCUMENT_ROLES = EQUIPMENT_CONTAINER__DOCUMENT_ROLES;
/**
* The feature id for the '<em><b>Connectivity Nodes</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__CONNECTIVITY_NODES = EQUIPMENT_CONTAINER__CONNECTIVITY_NODES;
/**
* The feature id for the '<em><b>Topological Node</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__TOPOLOGICAL_NODE = EQUIPMENT_CONTAINER__TOPOLOGICAL_NODE;
/**
* The feature id for the '<em><b>Equipments</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__EQUIPMENTS = EQUIPMENT_CONTAINER__EQUIPMENTS;
/**
* The feature id for the '<em><b>Bays</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__BAYS = EQUIPMENT_CONTAINER_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Region</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__REGION = EQUIPMENT_CONTAINER_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Voltage Levels</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION__VOLTAGE_LEVELS = EQUIPMENT_CONTAINER_FEATURE_COUNT + 2;
/**
* The number of structural features of the '<em>Substation</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION_FEATURE_COUNT = EQUIPMENT_CONTAINER_FEATURE_COUNT + 3;
/**
* The number of operations of the '<em>Substation</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUBSTATION_OPERATION_COUNT = EQUIPMENT_CONTAINER_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.GeographicalRegionImpl <em>Geographical Region</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.GeographicalRegionImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getGeographicalRegion()
* @generated
*/
int GEOGRAPHICAL_REGION = 24;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int GEOGRAPHICAL_REGION__UUID = IDENTIFIED_OBJECT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int GEOGRAPHICAL_REGION__MRID = IDENTIFIED_OBJECT__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int GEOGRAPHICAL_REGION__NAME = IDENTIFIED_OBJECT__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int GEOGRAPHICAL_REGION__DESCRIPTION = IDENTIFIED_OBJECT__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int GEOGRAPHICAL_REGION__PATH_NAME = IDENTIFIED_OBJECT__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int GEOGRAPHICAL_REGION__MODELING_AUTHORITY_SET = IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int GEOGRAPHICAL_REGION__LOCAL_NAME = IDENTIFIED_OBJECT__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int GEOGRAPHICAL_REGION__ALIAS_NAME = IDENTIFIED_OBJECT__ALIAS_NAME;
/**
* The feature id for the '<em><b>Regions</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int GEOGRAPHICAL_REGION__REGIONS = IDENTIFIED_OBJECT_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Geographical Region</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int GEOGRAPHICAL_REGION_FEATURE_COUNT = IDENTIFIED_OBJECT_FEATURE_COUNT + 1;
/**
* The number of operations of the '<em>Geographical Region</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int GEOGRAPHICAL_REGION_OPERATION_COUNT = IDENTIFIED_OBJECT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.VoltageLevelImpl <em>Voltage Level</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.VoltageLevelImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getVoltageLevel()
* @generated
*/
int VOLTAGE_LEVEL = 26;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__UUID = EQUIPMENT_CONTAINER__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__MRID = EQUIPMENT_CONTAINER__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__NAME = EQUIPMENT_CONTAINER__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__DESCRIPTION = EQUIPMENT_CONTAINER__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__PATH_NAME = EQUIPMENT_CONTAINER__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__MODELING_AUTHORITY_SET = EQUIPMENT_CONTAINER__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__LOCAL_NAME = EQUIPMENT_CONTAINER__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__ALIAS_NAME = EQUIPMENT_CONTAINER__ALIAS_NAME;
/**
* The feature id for the '<em><b>Reporting Group</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__REPORTING_GROUP = EQUIPMENT_CONTAINER__REPORTING_GROUP;
/**
* The feature id for the '<em><b>Network Data Sets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__NETWORK_DATA_SETS = EQUIPMENT_CONTAINER__NETWORK_DATA_SETS;
/**
* The feature id for the '<em><b>Location</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__LOCATION = EQUIPMENT_CONTAINER__LOCATION;
/**
* The feature id for the '<em><b>Outage Schedule</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__OUTAGE_SCHEDULE = EQUIPMENT_CONTAINER__OUTAGE_SCHEDULE;
/**
* The feature id for the '<em><b>PSR Event</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__PSR_EVENT = EQUIPMENT_CONTAINER__PSR_EVENT;
/**
* The feature id for the '<em><b>Safety Documents</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__SAFETY_DOCUMENTS = EQUIPMENT_CONTAINER__SAFETY_DOCUMENTS;
/**
* The feature id for the '<em><b>Erp Organisation Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__ERP_ORGANISATION_ROLES = EQUIPMENT_CONTAINER__ERP_ORGANISATION_ROLES;
/**
* The feature id for the '<em><b>Circuit Sections</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__CIRCUIT_SECTIONS = EQUIPMENT_CONTAINER__CIRCUIT_SECTIONS;
/**
* The feature id for the '<em><b>Measurements</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__MEASUREMENTS = EQUIPMENT_CONTAINER__MEASUREMENTS;
/**
* The feature id for the '<em><b>Assets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__ASSETS = EQUIPMENT_CONTAINER__ASSETS;
/**
* The feature id for the '<em><b>Schedule Steps</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__SCHEDULE_STEPS = EQUIPMENT_CONTAINER__SCHEDULE_STEPS;
/**
* The feature id for the '<em><b>PSR Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__PSR_TYPE = EQUIPMENT_CONTAINER__PSR_TYPE;
/**
* The feature id for the '<em><b>Psr Lists</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__PSR_LISTS = EQUIPMENT_CONTAINER__PSR_LISTS;
/**
* The feature id for the '<em><b>Operating Share</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__OPERATING_SHARE = EQUIPMENT_CONTAINER__OPERATING_SHARE;
/**
* The feature id for the '<em><b>Change Items</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__CHANGE_ITEMS = EQUIPMENT_CONTAINER__CHANGE_ITEMS;
/**
* The feature id for the '<em><b>Document Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__DOCUMENT_ROLES = EQUIPMENT_CONTAINER__DOCUMENT_ROLES;
/**
* The feature id for the '<em><b>Connectivity Nodes</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__CONNECTIVITY_NODES = EQUIPMENT_CONTAINER__CONNECTIVITY_NODES;
/**
* The feature id for the '<em><b>Topological Node</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__TOPOLOGICAL_NODE = EQUIPMENT_CONTAINER__TOPOLOGICAL_NODE;
/**
* The feature id for the '<em><b>Equipments</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__EQUIPMENTS = EQUIPMENT_CONTAINER__EQUIPMENTS;
/**
* The feature id for the '<em><b>Bays</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__BAYS = EQUIPMENT_CONTAINER_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Low Voltage Limit</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__LOW_VOLTAGE_LIMIT = EQUIPMENT_CONTAINER_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>High Voltage Limit</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__HIGH_VOLTAGE_LIMIT = EQUIPMENT_CONTAINER_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Base Voltage</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__BASE_VOLTAGE = EQUIPMENT_CONTAINER_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Substation</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL__SUBSTATION = EQUIPMENT_CONTAINER_FEATURE_COUNT + 4;
/**
* The number of structural features of the '<em>Voltage Level</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL_FEATURE_COUNT = EQUIPMENT_CONTAINER_FEATURE_COUNT + 5;
/**
* The number of operations of the '<em>Voltage Level</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE_LEVEL_OPERATION_COUNT = EQUIPMENT_CONTAINER_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.ConnectivityNodeImpl <em>Connectivity Node</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.ConnectivityNodeImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getConnectivityNode()
* @generated
*/
int CONNECTIVITY_NODE = 27;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE__UUID = IDENTIFIED_OBJECT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE__MRID = IDENTIFIED_OBJECT__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE__NAME = IDENTIFIED_OBJECT__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE__DESCRIPTION = IDENTIFIED_OBJECT__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE__PATH_NAME = IDENTIFIED_OBJECT__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE__MODELING_AUTHORITY_SET = IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE__LOCAL_NAME = IDENTIFIED_OBJECT__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE__ALIAS_NAME = IDENTIFIED_OBJECT__ALIAS_NAME;
/**
* The feature id for the '<em><b>Connectivity Node Container</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE__CONNECTIVITY_NODE_CONTAINER = IDENTIFIED_OBJECT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Topological Node</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE__TOPOLOGICAL_NODE = IDENTIFIED_OBJECT_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Bus Name Marker</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE__BUS_NAME_MARKER = IDENTIFIED_OBJECT_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Loss Penalty Factors</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE__LOSS_PENALTY_FACTORS = IDENTIFIED_OBJECT_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Node Constraint Terms</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE__NODE_CONSTRAINT_TERMS = IDENTIFIED_OBJECT_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Terminals</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE__TERMINALS = IDENTIFIED_OBJECT_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>Pnode</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE__PNODE = IDENTIFIED_OBJECT_FEATURE_COUNT + 6;
/**
* The number of structural features of the '<em>Connectivity Node</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_FEATURE_COUNT = IDENTIFIED_OBJECT_FEATURE_COUNT + 7;
/**
* The number of operations of the '<em>Connectivity Node</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTIVITY_NODE_OPERATION_COUNT = IDENTIFIED_OBJECT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.impl.ConductingEquipmentImpl <em>Conducting Equipment</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.ConductingEquipmentImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getConductingEquipment()
* @generated
*/
int CONDUCTING_EQUIPMENT = 28;
/**
* The feature id for the '<em><b>UUID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__UUID = EQUIPMENT__UUID;
/**
* The feature id for the '<em><b>MRID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__MRID = EQUIPMENT__MRID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__NAME = EQUIPMENT__NAME;
/**
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__DESCRIPTION = EQUIPMENT__DESCRIPTION;
/**
* The feature id for the '<em><b>Path Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__PATH_NAME = EQUIPMENT__PATH_NAME;
/**
* The feature id for the '<em><b>Modeling Authority Set</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__MODELING_AUTHORITY_SET = EQUIPMENT__MODELING_AUTHORITY_SET;
/**
* The feature id for the '<em><b>Local Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__LOCAL_NAME = EQUIPMENT__LOCAL_NAME;
/**
* The feature id for the '<em><b>Alias Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__ALIAS_NAME = EQUIPMENT__ALIAS_NAME;
/**
* The feature id for the '<em><b>Reporting Group</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__REPORTING_GROUP = EQUIPMENT__REPORTING_GROUP;
/**
* The feature id for the '<em><b>Network Data Sets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__NETWORK_DATA_SETS = EQUIPMENT__NETWORK_DATA_SETS;
/**
* The feature id for the '<em><b>Location</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__LOCATION = EQUIPMENT__LOCATION;
/**
* The feature id for the '<em><b>Outage Schedule</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__OUTAGE_SCHEDULE = EQUIPMENT__OUTAGE_SCHEDULE;
/**
* The feature id for the '<em><b>PSR Event</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__PSR_EVENT = EQUIPMENT__PSR_EVENT;
/**
* The feature id for the '<em><b>Safety Documents</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__SAFETY_DOCUMENTS = EQUIPMENT__SAFETY_DOCUMENTS;
/**
* The feature id for the '<em><b>Erp Organisation Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__ERP_ORGANISATION_ROLES = EQUIPMENT__ERP_ORGANISATION_ROLES;
/**
* The feature id for the '<em><b>Circuit Sections</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__CIRCUIT_SECTIONS = EQUIPMENT__CIRCUIT_SECTIONS;
/**
* The feature id for the '<em><b>Measurements</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__MEASUREMENTS = EQUIPMENT__MEASUREMENTS;
/**
* The feature id for the '<em><b>Assets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__ASSETS = EQUIPMENT__ASSETS;
/**
* The feature id for the '<em><b>Schedule Steps</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__SCHEDULE_STEPS = EQUIPMENT__SCHEDULE_STEPS;
/**
* The feature id for the '<em><b>PSR Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__PSR_TYPE = EQUIPMENT__PSR_TYPE;
/**
* The feature id for the '<em><b>Psr Lists</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__PSR_LISTS = EQUIPMENT__PSR_LISTS;
/**
* The feature id for the '<em><b>Operating Share</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__OPERATING_SHARE = EQUIPMENT__OPERATING_SHARE;
/**
* The feature id for the '<em><b>Change Items</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__CHANGE_ITEMS = EQUIPMENT__CHANGE_ITEMS;
/**
* The feature id for the '<em><b>Document Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__DOCUMENT_ROLES = EQUIPMENT__DOCUMENT_ROLES;
/**
* The feature id for the '<em><b>Operational Limit Set</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__OPERATIONAL_LIMIT_SET = EQUIPMENT__OPERATIONAL_LIMIT_SET;
/**
* The feature id for the '<em><b>Contingency Equipment</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__CONTINGENCY_EQUIPMENT = EQUIPMENT__CONTINGENCY_EQUIPMENT;
/**
* The feature id for the '<em><b>Norma Ily In Service</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__NORMA_ILY_IN_SERVICE = EQUIPMENT__NORMA_ILY_IN_SERVICE;
/**
* The feature id for the '<em><b>Customer Agreements</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__CUSTOMER_AGREEMENTS = EQUIPMENT__CUSTOMER_AGREEMENTS;
/**
* The feature id for the '<em><b>Aggregate</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__AGGREGATE = EQUIPMENT__AGGREGATE;
/**
* The feature id for the '<em><b>Equipment Container</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__EQUIPMENT_CONTAINER = EQUIPMENT__EQUIPMENT_CONTAINER;
/**
* The feature id for the '<em><b>Protection Equipments</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__PROTECTION_EQUIPMENTS = EQUIPMENT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Outage Step Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__OUTAGE_STEP_ROLES = EQUIPMENT_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Base Voltage</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__BASE_VOLTAGE = EQUIPMENT_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Clearance Tags</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__CLEARANCE_TAGS = EQUIPMENT_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Sv Status</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__SV_STATUS = EQUIPMENT_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Phases</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__PHASES = EQUIPMENT_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>Electrical Assets</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__ELECTRICAL_ASSETS = EQUIPMENT_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>Terminals</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT__TERMINALS = EQUIPMENT_FEATURE_COUNT + 7;
/**
* The number of structural features of the '<em>Conducting Equipment</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT_FEATURE_COUNT = EQUIPMENT_FEATURE_COUNT + 8;
/**
* The number of operations of the '<em>Conducting Equipment</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDUCTING_EQUIPMENT_OPERATION_COUNT = EQUIPMENT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.BreakerConfiguration <em>Breaker Configuration</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.BreakerConfiguration
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getBreakerConfiguration()
* @generated
*/
int BREAKER_CONFIGURATION = 29;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.BusbarConfiguration <em>Busbar Configuration</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.BusbarConfiguration
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getBusbarConfiguration()
* @generated
*/
int BUSBAR_CONFIGURATION = 30;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.CompanyType <em>Company Type</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.CompanyType
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getCompanyType()
* @generated
*/
int COMPANY_TYPE = 31;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.CurveStyle <em>Curve Style</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.CurveStyle
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getCurveStyle()
* @generated
*/
int CURVE_STYLE = 32;
/**
* The meta object id for the '{@link CIM.IEC61970.Core.PhaseCode <em>Phase Code</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.PhaseCode
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getPhaseCode()
* @generated
*/
int PHASE_CODE = 33;
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.Bay <em>Bay</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Bay</em>'.
* @see CIM.IEC61970.Core.Bay
* @generated
*/
EClass getBay();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Bay#isBayEnergyMeasFlag <em>Bay Energy Meas Flag</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Bay Energy Meas Flag</em>'.
* @see CIM.IEC61970.Core.Bay#isBayEnergyMeasFlag()
* @see #getBay()
* @generated
*/
EAttribute getBay_BayEnergyMeasFlag();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Bay#getBusBarConfiguration <em>Bus Bar Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Bus Bar Configuration</em>'.
* @see CIM.IEC61970.Core.Bay#getBusBarConfiguration()
* @see #getBay()
* @generated
*/
EAttribute getBay_BusBarConfiguration();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Bay#isBayPowerMeasFlag <em>Bay Power Meas Flag</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Bay Power Meas Flag</em>'.
* @see CIM.IEC61970.Core.Bay#isBayPowerMeasFlag()
* @see #getBay()
* @generated
*/
EAttribute getBay_BayPowerMeasFlag();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.Bay#getVoltageLevel <em>Voltage Level</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Voltage Level</em>'.
* @see CIM.IEC61970.Core.Bay#getVoltageLevel()
* @see #getBay()
* @generated
*/
EReference getBay_VoltageLevel();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Bay#getBreakerConfiguration <em>Breaker Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Breaker Configuration</em>'.
* @see CIM.IEC61970.Core.Bay#getBreakerConfiguration()
* @see #getBay()
* @generated
*/
EAttribute getBay_BreakerConfiguration();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.Bay#getSubstation <em>Substation</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Substation</em>'.
* @see CIM.IEC61970.Core.Bay#getSubstation()
* @see #getBay()
* @generated
*/
EReference getBay_Substation();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.Terminal <em>Terminal</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Terminal</em>'.
* @see CIM.IEC61970.Core.Terminal
* @generated
*/
EClass getTerminal();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.Terminal#getConnectivityNode <em>Connectivity Node</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Connectivity Node</em>'.
* @see CIM.IEC61970.Core.Terminal#getConnectivityNode()
* @see #getTerminal()
* @generated
*/
EReference getTerminal_ConnectivityNode();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.Terminal#getSvPowerFlow <em>Sv Power Flow</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Sv Power Flow</em>'.
* @see CIM.IEC61970.Core.Terminal#getSvPowerFlow()
* @see #getTerminal()
* @generated
*/
EReference getTerminal_SvPowerFlow();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Terminal#getHasFirst_MutualCoupling <em>Has First Mutual Coupling</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Has First Mutual Coupling</em>'.
* @see CIM.IEC61970.Core.Terminal#getHasFirst_MutualCoupling()
* @see #getTerminal()
* @generated
*/
EReference getTerminal_HasFirst_MutualCoupling();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Terminal#getTerminalConstraints <em>Terminal Constraints</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Terminal Constraints</em>'.
* @see CIM.IEC61970.Core.Terminal#getTerminalConstraints()
* @see #getTerminal()
* @generated
*/
EReference getTerminal_TerminalConstraints();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Terminal#getRegulatingControl <em>Regulating Control</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Regulating Control</em>'.
* @see CIM.IEC61970.Core.Terminal#getRegulatingControl()
* @see #getTerminal()
* @generated
*/
EReference getTerminal_RegulatingControl();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Terminal#isConnected <em>Connected</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Connected</em>'.
* @see CIM.IEC61970.Core.Terminal#isConnected()
* @see #getTerminal()
* @generated
*/
EAttribute getTerminal_Connected();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Terminal#getMeasurements <em>Measurements</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Measurements</em>'.
* @see CIM.IEC61970.Core.Terminal#getMeasurements()
* @see #getTerminal()
* @generated
*/
EReference getTerminal_Measurements();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Terminal#getSequenceNumber <em>Sequence Number</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sequence Number</em>'.
* @see CIM.IEC61970.Core.Terminal#getSequenceNumber()
* @see #getTerminal()
* @generated
*/
EAttribute getTerminal_SequenceNumber();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Terminal#getTieFlow <em>Tie Flow</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Tie Flow</em>'.
* @see CIM.IEC61970.Core.Terminal#getTieFlow()
* @see #getTerminal()
* @generated
*/
EReference getTerminal_TieFlow();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.Terminal#getTopologicalNode <em>Topological Node</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Topological Node</em>'.
* @see CIM.IEC61970.Core.Terminal#getTopologicalNode()
* @see #getTerminal()
* @generated
*/
EReference getTerminal_TopologicalNode();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Terminal#getBranchGroupTerminal <em>Branch Group Terminal</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Branch Group Terminal</em>'.
* @see CIM.IEC61970.Core.Terminal#getBranchGroupTerminal()
* @see #getTerminal()
* @generated
*/
EReference getTerminal_BranchGroupTerminal();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.Terminal#getBushingInfo <em>Bushing Info</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Bushing Info</em>'.
* @see CIM.IEC61970.Core.Terminal#getBushingInfo()
* @see #getTerminal()
* @generated
*/
EReference getTerminal_BushingInfo();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.Terminal#getConductingEquipment <em>Conducting Equipment</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Conducting Equipment</em>'.
* @see CIM.IEC61970.Core.Terminal#getConductingEquipment()
* @see #getTerminal()
* @generated
*/
EReference getTerminal_ConductingEquipment();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Terminal#getHasSecond_MutualCoupling <em>Has Second Mutual Coupling</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Has Second Mutual Coupling</em>'.
* @see CIM.IEC61970.Core.Terminal#getHasSecond_MutualCoupling()
* @see #getTerminal()
* @generated
*/
EReference getTerminal_HasSecond_MutualCoupling();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Terminal#getOperationalLimitSet <em>Operational Limit Set</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Operational Limit Set</em>'.
* @see CIM.IEC61970.Core.Terminal#getOperationalLimitSet()
* @see #getTerminal()
* @generated
*/
EReference getTerminal_OperationalLimitSet();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.ReportingGroup <em>Reporting Group</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Reporting Group</em>'.
* @see CIM.IEC61970.Core.ReportingGroup
* @generated
*/
EClass getReportingGroup();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.ReportingGroup#getPowerSystemResource <em>Power System Resource</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Power System Resource</em>'.
* @see CIM.IEC61970.Core.ReportingGroup#getPowerSystemResource()
* @see #getReportingGroup()
* @generated
*/
EReference getReportingGroup_PowerSystemResource();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.ReportingGroup#getBusNameMarker <em>Bus Name Marker</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Bus Name Marker</em>'.
* @see CIM.IEC61970.Core.ReportingGroup#getBusNameMarker()
* @see #getReportingGroup()
* @generated
*/
EReference getReportingGroup_BusNameMarker();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.ReportingGroup#getTopologicalNode <em>Topological Node</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Topological Node</em>'.
* @see CIM.IEC61970.Core.ReportingGroup#getTopologicalNode()
* @see #getReportingGroup()
* @generated
*/
EReference getReportingGroup_TopologicalNode();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.ReportingGroup#getReportingSuperGroup <em>Reporting Super Group</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Reporting Super Group</em>'.
* @see CIM.IEC61970.Core.ReportingGroup#getReportingSuperGroup()
* @see #getReportingGroup()
* @generated
*/
EReference getReportingGroup_ReportingSuperGroup();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.BasePower <em>Base Power</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Base Power</em>'.
* @see CIM.IEC61970.Core.BasePower
* @generated
*/
EClass getBasePower();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.BasePower#getBasePower <em>Base Power</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Base Power</em>'.
* @see CIM.IEC61970.Core.BasePower#getBasePower()
* @see #getBasePower()
* @generated
*/
EAttribute getBasePower_BasePower();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.RegularIntervalSchedule <em>Regular Interval Schedule</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Regular Interval Schedule</em>'.
* @see CIM.IEC61970.Core.RegularIntervalSchedule
* @generated
*/
EClass getRegularIntervalSchedule();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.RegularIntervalSchedule#getEndTime <em>End Time</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>End Time</em>'.
* @see CIM.IEC61970.Core.RegularIntervalSchedule#getEndTime()
* @see #getRegularIntervalSchedule()
* @generated
*/
EAttribute getRegularIntervalSchedule_EndTime();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.RegularIntervalSchedule#getTimePoints <em>Time Points</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Time Points</em>'.
* @see CIM.IEC61970.Core.RegularIntervalSchedule#getTimePoints()
* @see #getRegularIntervalSchedule()
* @generated
*/
EReference getRegularIntervalSchedule_TimePoints();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.RegularIntervalSchedule#getTimeStep <em>Time Step</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Time Step</em>'.
* @see CIM.IEC61970.Core.RegularIntervalSchedule#getTimeStep()
* @see #getRegularIntervalSchedule()
* @generated
*/
EAttribute getRegularIntervalSchedule_TimeStep();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.Curve <em>Curve</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Curve</em>'.
* @see CIM.IEC61970.Core.Curve
* @generated
*/
EClass getCurve();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Curve#getY2Unit <em>Y2 Unit</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Y2 Unit</em>'.
* @see CIM.IEC61970.Core.Curve#getY2Unit()
* @see #getCurve()
* @generated
*/
EAttribute getCurve_Y2Unit();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Curve#getXMultiplier <em>XMultiplier</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>XMultiplier</em>'.
* @see CIM.IEC61970.Core.Curve#getXMultiplier()
* @see #getCurve()
* @generated
*/
EAttribute getCurve_XMultiplier();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Curve#getY3Multiplier <em>Y3 Multiplier</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Y3 Multiplier</em>'.
* @see CIM.IEC61970.Core.Curve#getY3Multiplier()
* @see #getCurve()
* @generated
*/
EAttribute getCurve_Y3Multiplier();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Curve#getY1Unit <em>Y1 Unit</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Y1 Unit</em>'.
* @see CIM.IEC61970.Core.Curve#getY1Unit()
* @see #getCurve()
* @generated
*/
EAttribute getCurve_Y1Unit();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Curve#getCurveStyle <em>Curve Style</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Curve Style</em>'.
* @see CIM.IEC61970.Core.Curve#getCurveStyle()
* @see #getCurve()
* @generated
*/
EAttribute getCurve_CurveStyle();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Curve#getY3Unit <em>Y3 Unit</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Y3 Unit</em>'.
* @see CIM.IEC61970.Core.Curve#getY3Unit()
* @see #getCurve()
* @generated
*/
EAttribute getCurve_Y3Unit();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Curve#getXUnit <em>XUnit</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>XUnit</em>'.
* @see CIM.IEC61970.Core.Curve#getXUnit()
* @see #getCurve()
* @generated
*/
EAttribute getCurve_XUnit();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Curve#getCurveDatas <em>Curve Datas</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Curve Datas</em>'.
* @see CIM.IEC61970.Core.Curve#getCurveDatas()
* @see #getCurve()
* @generated
*/
EReference getCurve_CurveDatas();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Curve#getY2Multiplier <em>Y2 Multiplier</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Y2 Multiplier</em>'.
* @see CIM.IEC61970.Core.Curve#getY2Multiplier()
* @see #getCurve()
* @generated
*/
EAttribute getCurve_Y2Multiplier();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Curve#getY1Multiplier <em>Y1 Multiplier</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Y1 Multiplier</em>'.
* @see CIM.IEC61970.Core.Curve#getY1Multiplier()
* @see #getCurve()
* @generated
*/
EAttribute getCurve_Y1Multiplier();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.BaseVoltage <em>Base Voltage</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Base Voltage</em>'.
* @see CIM.IEC61970.Core.BaseVoltage
* @generated
*/
EClass getBaseVoltage();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.BaseVoltage#getNominalVoltage <em>Nominal Voltage</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Nominal Voltage</em>'.
* @see CIM.IEC61970.Core.BaseVoltage#getNominalVoltage()
* @see #getBaseVoltage()
* @generated
*/
EAttribute getBaseVoltage_NominalVoltage();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.BaseVoltage#getTopologicalNode <em>Topological Node</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Topological Node</em>'.
* @see CIM.IEC61970.Core.BaseVoltage#getTopologicalNode()
* @see #getBaseVoltage()
* @generated
*/
EReference getBaseVoltage_TopologicalNode();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.BaseVoltage#getVoltageLevel <em>Voltage Level</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Voltage Level</em>'.
* @see CIM.IEC61970.Core.BaseVoltage#getVoltageLevel()
* @see #getBaseVoltage()
* @generated
*/
EReference getBaseVoltage_VoltageLevel();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.BaseVoltage#isIsDC <em>Is DC</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Is DC</em>'.
* @see CIM.IEC61970.Core.BaseVoltage#isIsDC()
* @see #getBaseVoltage()
* @generated
*/
EAttribute getBaseVoltage_IsDC();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.BaseVoltage#getConductingEquipment <em>Conducting Equipment</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Conducting Equipment</em>'.
* @see CIM.IEC61970.Core.BaseVoltage#getConductingEquipment()
* @see #getBaseVoltage()
* @generated
*/
EReference getBaseVoltage_ConductingEquipment();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.OperatingShare <em>Operating Share</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Operating Share</em>'.
* @see CIM.IEC61970.Core.OperatingShare
* @generated
*/
EClass getOperatingShare();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.OperatingShare#getPercentage <em>Percentage</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Percentage</em>'.
* @see CIM.IEC61970.Core.OperatingShare#getPercentage()
* @see #getOperatingShare()
* @generated
*/
EAttribute getOperatingShare_Percentage();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.OperatingShare#getPowerSystemResource <em>Power System Resource</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Power System Resource</em>'.
* @see CIM.IEC61970.Core.OperatingShare#getPowerSystemResource()
* @see #getOperatingShare()
* @generated
*/
EReference getOperatingShare_PowerSystemResource();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.OperatingShare#getOperatingParticipant <em>Operating Participant</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Operating Participant</em>'.
* @see CIM.IEC61970.Core.OperatingShare#getOperatingParticipant()
* @see #getOperatingShare()
* @generated
*/
EReference getOperatingShare_OperatingParticipant();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.ConnectivityNodeContainer <em>Connectivity Node Container</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Connectivity Node Container</em>'.
* @see CIM.IEC61970.Core.ConnectivityNodeContainer
* @generated
*/
EClass getConnectivityNodeContainer();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.ConnectivityNodeContainer#getConnectivityNodes <em>Connectivity Nodes</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Connectivity Nodes</em>'.
* @see CIM.IEC61970.Core.ConnectivityNodeContainer#getConnectivityNodes()
* @see #getConnectivityNodeContainer()
* @generated
*/
EReference getConnectivityNodeContainer_ConnectivityNodes();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.ConnectivityNodeContainer#getTopologicalNode <em>Topological Node</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Topological Node</em>'.
* @see CIM.IEC61970.Core.ConnectivityNodeContainer#getTopologicalNode()
* @see #getConnectivityNodeContainer()
* @generated
*/
EReference getConnectivityNodeContainer_TopologicalNode();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.IrregularTimePoint <em>Irregular Time Point</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Irregular Time Point</em>'.
* @see CIM.IEC61970.Core.IrregularTimePoint
* @generated
*/
EClass getIrregularTimePoint();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.IrregularTimePoint#getValue1 <em>Value1</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Value1</em>'.
* @see CIM.IEC61970.Core.IrregularTimePoint#getValue1()
* @see #getIrregularTimePoint()
* @generated
*/
EAttribute getIrregularTimePoint_Value1();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.IrregularTimePoint#getValue2 <em>Value2</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Value2</em>'.
* @see CIM.IEC61970.Core.IrregularTimePoint#getValue2()
* @see #getIrregularTimePoint()
* @generated
*/
EAttribute getIrregularTimePoint_Value2();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.IrregularTimePoint#getIntervalSchedule <em>Interval Schedule</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Interval Schedule</em>'.
* @see CIM.IEC61970.Core.IrregularTimePoint#getIntervalSchedule()
* @see #getIrregularTimePoint()
* @generated
*/
EReference getIrregularTimePoint_IntervalSchedule();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.IrregularTimePoint#getTime <em>Time</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Time</em>'.
* @see CIM.IEC61970.Core.IrregularTimePoint#getTime()
* @see #getIrregularTimePoint()
* @generated
*/
EAttribute getIrregularTimePoint_Time();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.Equipment <em>Equipment</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Equipment</em>'.
* @see CIM.IEC61970.Core.Equipment
* @generated
*/
EClass getEquipment();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Equipment#getOperationalLimitSet <em>Operational Limit Set</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Operational Limit Set</em>'.
* @see CIM.IEC61970.Core.Equipment#getOperationalLimitSet()
* @see #getEquipment()
* @generated
*/
EReference getEquipment_OperationalLimitSet();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Equipment#getContingencyEquipment <em>Contingency Equipment</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Contingency Equipment</em>'.
* @see CIM.IEC61970.Core.Equipment#getContingencyEquipment()
* @see #getEquipment()
* @generated
*/
EReference getEquipment_ContingencyEquipment();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Equipment#isNormaIlyInService <em>Norma Ily In Service</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Norma Ily In Service</em>'.
* @see CIM.IEC61970.Core.Equipment#isNormaIlyInService()
* @see #getEquipment()
* @generated
*/
EAttribute getEquipment_NormaIlyInService();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Equipment#getCustomerAgreements <em>Customer Agreements</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Customer Agreements</em>'.
* @see CIM.IEC61970.Core.Equipment#getCustomerAgreements()
* @see #getEquipment()
* @generated
*/
EReference getEquipment_CustomerAgreements();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.Equipment#isAggregate <em>Aggregate</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Aggregate</em>'.
* @see CIM.IEC61970.Core.Equipment#isAggregate()
* @see #getEquipment()
* @generated
*/
EAttribute getEquipment_Aggregate();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.Equipment#getEquipmentContainer <em>Equipment Container</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Equipment Container</em>'.
* @see CIM.IEC61970.Core.Equipment#getEquipmentContainer()
* @see #getEquipment()
* @generated
*/
EReference getEquipment_EquipmentContainer();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.SubGeographicalRegion <em>Sub Geographical Region</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Sub Geographical Region</em>'.
* @see CIM.IEC61970.Core.SubGeographicalRegion
* @generated
*/
EClass getSubGeographicalRegion();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.SubGeographicalRegion#getLines <em>Lines</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Lines</em>'.
* @see CIM.IEC61970.Core.SubGeographicalRegion#getLines()
* @see #getSubGeographicalRegion()
* @generated
*/
EReference getSubGeographicalRegion_Lines();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.SubGeographicalRegion#getRegion <em>Region</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Region</em>'.
* @see CIM.IEC61970.Core.SubGeographicalRegion#getRegion()
* @see #getSubGeographicalRegion()
* @generated
*/
EReference getSubGeographicalRegion_Region();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.SubGeographicalRegion#getSubstations <em>Substations</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Substations</em>'.
* @see CIM.IEC61970.Core.SubGeographicalRegion#getSubstations()
* @see #getSubGeographicalRegion()
* @generated
*/
EReference getSubGeographicalRegion_Substations();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.Unit <em>Unit</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Unit</em>'.
* @see CIM.IEC61970.Core.Unit
* @generated
*/
EClass getUnit();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Unit#getControls <em>Controls</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Controls</em>'.
* @see CIM.IEC61970.Core.Unit#getControls()
* @see #getUnit()
* @generated
*/
EReference getUnit_Controls();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Unit#getProtectionEquipments <em>Protection Equipments</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Protection Equipments</em>'.
* @see CIM.IEC61970.Core.Unit#getProtectionEquipments()
* @see #getUnit()
* @generated
*/
EReference getUnit_ProtectionEquipments();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Unit#getMeasurements <em>Measurements</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Measurements</em>'.
* @see CIM.IEC61970.Core.Unit#getMeasurements()
* @see #getUnit()
* @generated
*/
EReference getUnit_Measurements();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.ReportingSuperGroup <em>Reporting Super Group</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Reporting Super Group</em>'.
* @see CIM.IEC61970.Core.ReportingSuperGroup
* @generated
*/
EClass getReportingSuperGroup();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.ReportingSuperGroup#getReportingGroup <em>Reporting Group</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Reporting Group</em>'.
* @see CIM.IEC61970.Core.ReportingSuperGroup#getReportingGroup()
* @see #getReportingSuperGroup()
* @generated
*/
EReference getReportingSuperGroup_ReportingGroup();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.RegularTimePoint <em>Regular Time Point</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Regular Time Point</em>'.
* @see CIM.IEC61970.Core.RegularTimePoint
* @generated
*/
EClass getRegularTimePoint();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.RegularTimePoint#getIntervalSchedule <em>Interval Schedule</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Interval Schedule</em>'.
* @see CIM.IEC61970.Core.RegularTimePoint#getIntervalSchedule()
* @see #getRegularTimePoint()
* @generated
*/
EReference getRegularTimePoint_IntervalSchedule();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.RegularTimePoint#getValue1 <em>Value1</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Value1</em>'.
* @see CIM.IEC61970.Core.RegularTimePoint#getValue1()
* @see #getRegularTimePoint()
* @generated
*/
EAttribute getRegularTimePoint_Value1();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.RegularTimePoint#getValue2 <em>Value2</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Value2</em>'.
* @see CIM.IEC61970.Core.RegularTimePoint#getValue2()
* @see #getRegularTimePoint()
* @generated
*/
EAttribute getRegularTimePoint_Value2();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.RegularTimePoint#getSequenceNumber <em>Sequence Number</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sequence Number</em>'.
* @see CIM.IEC61970.Core.RegularTimePoint#getSequenceNumber()
* @see #getRegularTimePoint()
* @generated
*/
EAttribute getRegularTimePoint_SequenceNumber();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.PsrList <em>Psr List</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Psr List</em>'.
* @see CIM.IEC61970.Core.PsrList
* @generated
*/
EClass getPsrList();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.PsrList#getTypePSRList <em>Type PSR List</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Type PSR List</em>'.
* @see CIM.IEC61970.Core.PsrList#getTypePSRList()
* @see #getPsrList()
* @generated
*/
EAttribute getPsrList_TypePSRList();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.PsrList#getPowerSystemResources <em>Power System Resources</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Power System Resources</em>'.
* @see CIM.IEC61970.Core.PsrList#getPowerSystemResources()
* @see #getPsrList()
* @generated
*/
EReference getPsrList_PowerSystemResources();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.BasicIntervalSchedule <em>Basic Interval Schedule</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Basic Interval Schedule</em>'.
* @see CIM.IEC61970.Core.BasicIntervalSchedule
* @generated
*/
EClass getBasicIntervalSchedule();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.BasicIntervalSchedule#getValue2Multiplier <em>Value2 Multiplier</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Value2 Multiplier</em>'.
* @see CIM.IEC61970.Core.BasicIntervalSchedule#getValue2Multiplier()
* @see #getBasicIntervalSchedule()
* @generated
*/
EAttribute getBasicIntervalSchedule_Value2Multiplier();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.BasicIntervalSchedule#getValue1Multiplier <em>Value1 Multiplier</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Value1 Multiplier</em>'.
* @see CIM.IEC61970.Core.BasicIntervalSchedule#getValue1Multiplier()
* @see #getBasicIntervalSchedule()
* @generated
*/
EAttribute getBasicIntervalSchedule_Value1Multiplier();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.BasicIntervalSchedule#getStartTime <em>Start Time</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Start Time</em>'.
* @see CIM.IEC61970.Core.BasicIntervalSchedule#getStartTime()
* @see #getBasicIntervalSchedule()
* @generated
*/
EAttribute getBasicIntervalSchedule_StartTime();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.BasicIntervalSchedule#getValue2Unit <em>Value2 Unit</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Value2 Unit</em>'.
* @see CIM.IEC61970.Core.BasicIntervalSchedule#getValue2Unit()
* @see #getBasicIntervalSchedule()
* @generated
*/
EAttribute getBasicIntervalSchedule_Value2Unit();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.BasicIntervalSchedule#getValue1Unit <em>Value1 Unit</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Value1 Unit</em>'.
* @see CIM.IEC61970.Core.BasicIntervalSchedule#getValue1Unit()
* @see #getBasicIntervalSchedule()
* @generated
*/
EAttribute getBasicIntervalSchedule_Value1Unit();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.IrregularIntervalSchedule <em>Irregular Interval Schedule</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Irregular Interval Schedule</em>'.
* @see CIM.IEC61970.Core.IrregularIntervalSchedule
* @generated
*/
EClass getIrregularIntervalSchedule();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.IrregularIntervalSchedule#getTimePoints <em>Time Points</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Time Points</em>'.
* @see CIM.IEC61970.Core.IrregularIntervalSchedule#getTimePoints()
* @see #getIrregularIntervalSchedule()
* @generated
*/
EReference getIrregularIntervalSchedule_TimePoints();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.PSRType <em>PSR Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>PSR Type</em>'.
* @see CIM.IEC61970.Core.PSRType
* @generated
*/
EClass getPSRType();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.PSRType#getPowerSystemResources <em>Power System Resources</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Power System Resources</em>'.
* @see CIM.IEC61970.Core.PSRType#getPowerSystemResources()
* @see #getPSRType()
* @generated
*/
EReference getPSRType_PowerSystemResources();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.OperatingParticipant <em>Operating Participant</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Operating Participant</em>'.
* @see CIM.IEC61970.Core.OperatingParticipant
* @generated
*/
EClass getOperatingParticipant();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.OperatingParticipant#getOperatingShare <em>Operating Share</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Operating Share</em>'.
* @see CIM.IEC61970.Core.OperatingParticipant#getOperatingShare()
* @see #getOperatingParticipant()
* @generated
*/
EReference getOperatingParticipant_OperatingShare();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.CurveData <em>Curve Data</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Curve Data</em>'.
* @see CIM.IEC61970.Core.CurveData
* @generated
*/
EClass getCurveData();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.CurveData#getXvalue <em>Xvalue</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Xvalue</em>'.
* @see CIM.IEC61970.Core.CurveData#getXvalue()
* @see #getCurveData()
* @generated
*/
EAttribute getCurveData_Xvalue();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.CurveData#getCurve <em>Curve</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Curve</em>'.
* @see CIM.IEC61970.Core.CurveData#getCurve()
* @see #getCurveData()
* @generated
*/
EReference getCurveData_Curve();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.CurveData#getY2value <em>Y2value</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Y2value</em>'.
* @see CIM.IEC61970.Core.CurveData#getY2value()
* @see #getCurveData()
* @generated
*/
EAttribute getCurveData_Y2value();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.CurveData#getY3value <em>Y3value</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Y3value</em>'.
* @see CIM.IEC61970.Core.CurveData#getY3value()
* @see #getCurveData()
* @generated
*/
EAttribute getCurveData_Y3value();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.CurveData#getY1value <em>Y1value</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Y1value</em>'.
* @see CIM.IEC61970.Core.CurveData#getY1value()
* @see #getCurveData()
* @generated
*/
EAttribute getCurveData_Y1value();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.EquipmentContainer <em>Equipment Container</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Equipment Container</em>'.
* @see CIM.IEC61970.Core.EquipmentContainer
* @generated
*/
EClass getEquipmentContainer();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.EquipmentContainer#getEquipments <em>Equipments</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Equipments</em>'.
* @see CIM.IEC61970.Core.EquipmentContainer#getEquipments()
* @see #getEquipmentContainer()
* @generated
*/
EReference getEquipmentContainer_Equipments();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.PowerSystemResource <em>Power System Resource</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Power System Resource</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource
* @generated
*/
EClass getPowerSystemResource();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.PowerSystemResource#getReportingGroup <em>Reporting Group</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Reporting Group</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getReportingGroup()
* @see #getPowerSystemResource()
* @generated
*/
EReference getPowerSystemResource_ReportingGroup();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.PowerSystemResource#getNetworkDataSets <em>Network Data Sets</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Network Data Sets</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getNetworkDataSets()
* @see #getPowerSystemResource()
* @generated
*/
EReference getPowerSystemResource_NetworkDataSets();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.PowerSystemResource#getLocation <em>Location</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Location</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getLocation()
* @see #getPowerSystemResource()
* @generated
*/
EReference getPowerSystemResource_Location();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.PowerSystemResource#getOutageSchedule <em>Outage Schedule</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Outage Schedule</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getOutageSchedule()
* @see #getPowerSystemResource()
* @generated
*/
EReference getPowerSystemResource_OutageSchedule();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.PowerSystemResource#getPSREvent <em>PSR Event</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>PSR Event</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getPSREvent()
* @see #getPowerSystemResource()
* @generated
*/
EReference getPowerSystemResource_PSREvent();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.PowerSystemResource#getSafetyDocuments <em>Safety Documents</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Safety Documents</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getSafetyDocuments()
* @see #getPowerSystemResource()
* @generated
*/
EReference getPowerSystemResource_SafetyDocuments();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.PowerSystemResource#getErpOrganisationRoles <em>Erp Organisation Roles</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Erp Organisation Roles</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getErpOrganisationRoles()
* @see #getPowerSystemResource()
* @generated
*/
EReference getPowerSystemResource_ErpOrganisationRoles();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.PowerSystemResource#getCircuitSections <em>Circuit Sections</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Circuit Sections</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getCircuitSections()
* @see #getPowerSystemResource()
* @generated
*/
EReference getPowerSystemResource_CircuitSections();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.PowerSystemResource#getMeasurements <em>Measurements</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Measurements</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getMeasurements()
* @see #getPowerSystemResource()
* @generated
*/
EReference getPowerSystemResource_Measurements();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.PowerSystemResource#getAssets <em>Assets</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Assets</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getAssets()
* @see #getPowerSystemResource()
* @generated
*/
EReference getPowerSystemResource_Assets();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.PowerSystemResource#getScheduleSteps <em>Schedule Steps</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Schedule Steps</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getScheduleSteps()
* @see #getPowerSystemResource()
* @generated
*/
EReference getPowerSystemResource_ScheduleSteps();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.PowerSystemResource#getPSRType <em>PSR Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>PSR Type</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getPSRType()
* @see #getPowerSystemResource()
* @generated
*/
EReference getPowerSystemResource_PSRType();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.PowerSystemResource#getPsrLists <em>Psr Lists</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Psr Lists</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getPsrLists()
* @see #getPowerSystemResource()
* @generated
*/
EReference getPowerSystemResource_PsrLists();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.PowerSystemResource#getOperatingShare <em>Operating Share</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Operating Share</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getOperatingShare()
* @see #getPowerSystemResource()
* @generated
*/
EReference getPowerSystemResource_OperatingShare();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.PowerSystemResource#getChangeItems <em>Change Items</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Change Items</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getChangeItems()
* @see #getPowerSystemResource()
* @generated
*/
EReference getPowerSystemResource_ChangeItems();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.PowerSystemResource#getDocumentRoles <em>Document Roles</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Document Roles</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getDocumentRoles()
* @see #getPowerSystemResource()
* @generated
*/
EReference getPowerSystemResource_DocumentRoles();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.Substation <em>Substation</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Substation</em>'.
* @see CIM.IEC61970.Core.Substation
* @generated
*/
EClass getSubstation();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Substation#getBays <em>Bays</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Bays</em>'.
* @see CIM.IEC61970.Core.Substation#getBays()
* @see #getSubstation()
* @generated
*/
EReference getSubstation_Bays();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.Substation#getRegion <em>Region</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Region</em>'.
* @see CIM.IEC61970.Core.Substation#getRegion()
* @see #getSubstation()
* @generated
*/
EReference getSubstation_Region();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Substation#getVoltageLevels <em>Voltage Levels</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Voltage Levels</em>'.
* @see CIM.IEC61970.Core.Substation#getVoltageLevels()
* @see #getSubstation()
* @generated
*/
EReference getSubstation_VoltageLevels();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.GeographicalRegion <em>Geographical Region</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Geographical Region</em>'.
* @see CIM.IEC61970.Core.GeographicalRegion
* @generated
*/
EClass getGeographicalRegion();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.GeographicalRegion#getRegions <em>Regions</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Regions</em>'.
* @see CIM.IEC61970.Core.GeographicalRegion#getRegions()
* @see #getGeographicalRegion()
* @generated
*/
EReference getGeographicalRegion_Regions();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.IdentifiedObject <em>Identified Object</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Identified Object</em>'.
* @see CIM.IEC61970.Core.IdentifiedObject
* @generated
*/
EClass getIdentifiedObject();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.IdentifiedObject#getMRID <em>MRID</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>MRID</em>'.
* @see CIM.IEC61970.Core.IdentifiedObject#getMRID()
* @see #getIdentifiedObject()
* @generated
*/
EAttribute getIdentifiedObject_MRID();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.IdentifiedObject#getName <em>Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Name</em>'.
* @see CIM.IEC61970.Core.IdentifiedObject#getName()
* @see #getIdentifiedObject()
* @generated
*/
EAttribute getIdentifiedObject_Name();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.IdentifiedObject#getDescription <em>Description</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Description</em>'.
* @see CIM.IEC61970.Core.IdentifiedObject#getDescription()
* @see #getIdentifiedObject()
* @generated
*/
EAttribute getIdentifiedObject_Description();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.IdentifiedObject#getPathName <em>Path Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Path Name</em>'.
* @see CIM.IEC61970.Core.IdentifiedObject#getPathName()
* @see #getIdentifiedObject()
* @generated
*/
EAttribute getIdentifiedObject_PathName();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.IdentifiedObject#getModelingAuthoritySet <em>Modeling Authority Set</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Modeling Authority Set</em>'.
* @see CIM.IEC61970.Core.IdentifiedObject#getModelingAuthoritySet()
* @see #getIdentifiedObject()
* @generated
*/
EReference getIdentifiedObject_ModelingAuthoritySet();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.IdentifiedObject#getLocalName <em>Local Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Local Name</em>'.
* @see CIM.IEC61970.Core.IdentifiedObject#getLocalName()
* @see #getIdentifiedObject()
* @generated
*/
EAttribute getIdentifiedObject_LocalName();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.IdentifiedObject#getAliasName <em>Alias Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Alias Name</em>'.
* @see CIM.IEC61970.Core.IdentifiedObject#getAliasName()
* @see #getIdentifiedObject()
* @generated
*/
EAttribute getIdentifiedObject_AliasName();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.VoltageLevel <em>Voltage Level</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Voltage Level</em>'.
* @see CIM.IEC61970.Core.VoltageLevel
* @generated
*/
EClass getVoltageLevel();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.VoltageLevel#getBays <em>Bays</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Bays</em>'.
* @see CIM.IEC61970.Core.VoltageLevel#getBays()
* @see #getVoltageLevel()
* @generated
*/
EReference getVoltageLevel_Bays();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.VoltageLevel#getLowVoltageLimit <em>Low Voltage Limit</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Low Voltage Limit</em>'.
* @see CIM.IEC61970.Core.VoltageLevel#getLowVoltageLimit()
* @see #getVoltageLevel()
* @generated
*/
EAttribute getVoltageLevel_LowVoltageLimit();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.VoltageLevel#getHighVoltageLimit <em>High Voltage Limit</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>High Voltage Limit</em>'.
* @see CIM.IEC61970.Core.VoltageLevel#getHighVoltageLimit()
* @see #getVoltageLevel()
* @generated
*/
EAttribute getVoltageLevel_HighVoltageLimit();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.VoltageLevel#getBaseVoltage <em>Base Voltage</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Base Voltage</em>'.
* @see CIM.IEC61970.Core.VoltageLevel#getBaseVoltage()
* @see #getVoltageLevel()
* @generated
*/
EReference getVoltageLevel_BaseVoltage();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.VoltageLevel#getSubstation <em>Substation</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Substation</em>'.
* @see CIM.IEC61970.Core.VoltageLevel#getSubstation()
* @see #getVoltageLevel()
* @generated
*/
EReference getVoltageLevel_Substation();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.ConnectivityNode <em>Connectivity Node</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Connectivity Node</em>'.
* @see CIM.IEC61970.Core.ConnectivityNode
* @generated
*/
EClass getConnectivityNode();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.ConnectivityNode#getConnectivityNodeContainer <em>Connectivity Node Container</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Connectivity Node Container</em>'.
* @see CIM.IEC61970.Core.ConnectivityNode#getConnectivityNodeContainer()
* @see #getConnectivityNode()
* @generated
*/
EReference getConnectivityNode_ConnectivityNodeContainer();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.ConnectivityNode#getTopologicalNode <em>Topological Node</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Topological Node</em>'.
* @see CIM.IEC61970.Core.ConnectivityNode#getTopologicalNode()
* @see #getConnectivityNode()
* @generated
*/
EReference getConnectivityNode_TopologicalNode();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.ConnectivityNode#getBusNameMarker <em>Bus Name Marker</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Bus Name Marker</em>'.
* @see CIM.IEC61970.Core.ConnectivityNode#getBusNameMarker()
* @see #getConnectivityNode()
* @generated
*/
EReference getConnectivityNode_BusNameMarker();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.ConnectivityNode#getLossPenaltyFactors <em>Loss Penalty Factors</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Loss Penalty Factors</em>'.
* @see CIM.IEC61970.Core.ConnectivityNode#getLossPenaltyFactors()
* @see #getConnectivityNode()
* @generated
*/
EReference getConnectivityNode_LossPenaltyFactors();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.ConnectivityNode#getNodeConstraintTerms <em>Node Constraint Terms</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Node Constraint Terms</em>'.
* @see CIM.IEC61970.Core.ConnectivityNode#getNodeConstraintTerms()
* @see #getConnectivityNode()
* @generated
*/
EReference getConnectivityNode_NodeConstraintTerms();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.ConnectivityNode#getTerminals <em>Terminals</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Terminals</em>'.
* @see CIM.IEC61970.Core.ConnectivityNode#getTerminals()
* @see #getConnectivityNode()
* @generated
*/
EReference getConnectivityNode_Terminals();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.ConnectivityNode#getPnode <em>Pnode</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Pnode</em>'.
* @see CIM.IEC61970.Core.ConnectivityNode#getPnode()
* @see #getConnectivityNode()
* @generated
*/
EReference getConnectivityNode_Pnode();
/**
* Returns the meta object for class '{@link CIM.IEC61970.Core.ConductingEquipment <em>Conducting Equipment</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Conducting Equipment</em>'.
* @see CIM.IEC61970.Core.ConductingEquipment
* @generated
*/
EClass getConductingEquipment();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.ConductingEquipment#getProtectionEquipments <em>Protection Equipments</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Protection Equipments</em>'.
* @see CIM.IEC61970.Core.ConductingEquipment#getProtectionEquipments()
* @see #getConductingEquipment()
* @generated
*/
EReference getConductingEquipment_ProtectionEquipments();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.ConductingEquipment#getOutageStepRoles <em>Outage Step Roles</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Outage Step Roles</em>'.
* @see CIM.IEC61970.Core.ConductingEquipment#getOutageStepRoles()
* @see #getConductingEquipment()
* @generated
*/
EReference getConductingEquipment_OutageStepRoles();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.ConductingEquipment#getBaseVoltage <em>Base Voltage</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Base Voltage</em>'.
* @see CIM.IEC61970.Core.ConductingEquipment#getBaseVoltage()
* @see #getConductingEquipment()
* @generated
*/
EReference getConductingEquipment_BaseVoltage();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.ConductingEquipment#getClearanceTags <em>Clearance Tags</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Clearance Tags</em>'.
* @see CIM.IEC61970.Core.ConductingEquipment#getClearanceTags()
* @see #getConductingEquipment()
* @generated
*/
EReference getConductingEquipment_ClearanceTags();
/**
* Returns the meta object for the reference '{@link CIM.IEC61970.Core.ConductingEquipment#getSvStatus <em>Sv Status</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Sv Status</em>'.
* @see CIM.IEC61970.Core.ConductingEquipment#getSvStatus()
* @see #getConductingEquipment()
* @generated
*/
EReference getConductingEquipment_SvStatus();
/**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Core.ConductingEquipment#getPhases <em>Phases</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Phases</em>'.
* @see CIM.IEC61970.Core.ConductingEquipment#getPhases()
* @see #getConductingEquipment()
* @generated
*/
EAttribute getConductingEquipment_Phases();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.ConductingEquipment#getElectricalAssets <em>Electrical Assets</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Electrical Assets</em>'.
* @see CIM.IEC61970.Core.ConductingEquipment#getElectricalAssets()
* @see #getConductingEquipment()
* @generated
*/
EReference getConductingEquipment_ElectricalAssets();
/**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.ConductingEquipment#getTerminals <em>Terminals</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Terminals</em>'.
* @see CIM.IEC61970.Core.ConductingEquipment#getTerminals()
* @see #getConductingEquipment()
* @generated
*/
EReference getConductingEquipment_Terminals();
/**
* Returns the meta object for enum '{@link CIM.IEC61970.Core.BreakerConfiguration <em>Breaker Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for enum '<em>Breaker Configuration</em>'.
* @see CIM.IEC61970.Core.BreakerConfiguration
* @generated
*/
EEnum getBreakerConfiguration();
/**
* Returns the meta object for enum '{@link CIM.IEC61970.Core.BusbarConfiguration <em>Busbar Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for enum '<em>Busbar Configuration</em>'.
* @see CIM.IEC61970.Core.BusbarConfiguration
* @generated
*/
EEnum getBusbarConfiguration();
/**
* Returns the meta object for enum '{@link CIM.IEC61970.Core.CompanyType <em>Company Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for enum '<em>Company Type</em>'.
* @see CIM.IEC61970.Core.CompanyType
* @generated
*/
EEnum getCompanyType();
/**
* Returns the meta object for enum '{@link CIM.IEC61970.Core.CurveStyle <em>Curve Style</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for enum '<em>Curve Style</em>'.
* @see CIM.IEC61970.Core.CurveStyle
* @generated
*/
EEnum getCurveStyle();
/**
* Returns the meta object for enum '{@link CIM.IEC61970.Core.PhaseCode <em>Phase Code</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for enum '<em>Phase Code</em>'.
* @see CIM.IEC61970.Core.PhaseCode
* @generated
*/
EEnum getPhaseCode();
/**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
* @generated
*/
CoreFactory getCoreFactory();
/**
* <!-- begin-user-doc -->
* Defines literals for the meta objects that represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each operation of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @generated
*/
interface Literals {
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.BayImpl <em>Bay</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.BayImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getBay()
* @generated
*/
EClass BAY = eINSTANCE.getBay();
/**
* The meta object literal for the '<em><b>Bay Energy Meas Flag</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute BAY__BAY_ENERGY_MEAS_FLAG = eINSTANCE.getBay_BayEnergyMeasFlag();
/**
* The meta object literal for the '<em><b>Bus Bar Configuration</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute BAY__BUS_BAR_CONFIGURATION = eINSTANCE.getBay_BusBarConfiguration();
/**
* The meta object literal for the '<em><b>Bay Power Meas Flag</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute BAY__BAY_POWER_MEAS_FLAG = eINSTANCE.getBay_BayPowerMeasFlag();
/**
* The meta object literal for the '<em><b>Voltage Level</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference BAY__VOLTAGE_LEVEL = eINSTANCE.getBay_VoltageLevel();
/**
* The meta object literal for the '<em><b>Breaker Configuration</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute BAY__BREAKER_CONFIGURATION = eINSTANCE.getBay_BreakerConfiguration();
/**
* The meta object literal for the '<em><b>Substation</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference BAY__SUBSTATION = eINSTANCE.getBay_Substation();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.TerminalImpl <em>Terminal</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.TerminalImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getTerminal()
* @generated
*/
EClass TERMINAL = eINSTANCE.getTerminal();
/**
* The meta object literal for the '<em><b>Connectivity Node</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TERMINAL__CONNECTIVITY_NODE = eINSTANCE.getTerminal_ConnectivityNode();
/**
* The meta object literal for the '<em><b>Sv Power Flow</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TERMINAL__SV_POWER_FLOW = eINSTANCE.getTerminal_SvPowerFlow();
/**
* The meta object literal for the '<em><b>Has First Mutual Coupling</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TERMINAL__HAS_FIRST_MUTUAL_COUPLING = eINSTANCE.getTerminal_HasFirst_MutualCoupling();
/**
* The meta object literal for the '<em><b>Terminal Constraints</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TERMINAL__TERMINAL_CONSTRAINTS = eINSTANCE.getTerminal_TerminalConstraints();
/**
* The meta object literal for the '<em><b>Regulating Control</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TERMINAL__REGULATING_CONTROL = eINSTANCE.getTerminal_RegulatingControl();
/**
* The meta object literal for the '<em><b>Connected</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute TERMINAL__CONNECTED = eINSTANCE.getTerminal_Connected();
/**
* The meta object literal for the '<em><b>Measurements</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TERMINAL__MEASUREMENTS = eINSTANCE.getTerminal_Measurements();
/**
* The meta object literal for the '<em><b>Sequence Number</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute TERMINAL__SEQUENCE_NUMBER = eINSTANCE.getTerminal_SequenceNumber();
/**
* The meta object literal for the '<em><b>Tie Flow</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TERMINAL__TIE_FLOW = eINSTANCE.getTerminal_TieFlow();
/**
* The meta object literal for the '<em><b>Topological Node</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TERMINAL__TOPOLOGICAL_NODE = eINSTANCE.getTerminal_TopologicalNode();
/**
* The meta object literal for the '<em><b>Branch Group Terminal</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TERMINAL__BRANCH_GROUP_TERMINAL = eINSTANCE.getTerminal_BranchGroupTerminal();
/**
* The meta object literal for the '<em><b>Bushing Info</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TERMINAL__BUSHING_INFO = eINSTANCE.getTerminal_BushingInfo();
/**
* The meta object literal for the '<em><b>Conducting Equipment</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TERMINAL__CONDUCTING_EQUIPMENT = eINSTANCE.getTerminal_ConductingEquipment();
/**
* The meta object literal for the '<em><b>Has Second Mutual Coupling</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TERMINAL__HAS_SECOND_MUTUAL_COUPLING = eINSTANCE.getTerminal_HasSecond_MutualCoupling();
/**
* The meta object literal for the '<em><b>Operational Limit Set</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TERMINAL__OPERATIONAL_LIMIT_SET = eINSTANCE.getTerminal_OperationalLimitSet();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.ReportingGroupImpl <em>Reporting Group</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.ReportingGroupImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getReportingGroup()
* @generated
*/
EClass REPORTING_GROUP = eINSTANCE.getReportingGroup();
/**
* The meta object literal for the '<em><b>Power System Resource</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference REPORTING_GROUP__POWER_SYSTEM_RESOURCE = eINSTANCE.getReportingGroup_PowerSystemResource();
/**
* The meta object literal for the '<em><b>Bus Name Marker</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference REPORTING_GROUP__BUS_NAME_MARKER = eINSTANCE.getReportingGroup_BusNameMarker();
/**
* The meta object literal for the '<em><b>Topological Node</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference REPORTING_GROUP__TOPOLOGICAL_NODE = eINSTANCE.getReportingGroup_TopologicalNode();
/**
* The meta object literal for the '<em><b>Reporting Super Group</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference REPORTING_GROUP__REPORTING_SUPER_GROUP = eINSTANCE.getReportingGroup_ReportingSuperGroup();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.BasePowerImpl <em>Base Power</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.BasePowerImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getBasePower()
* @generated
*/
EClass BASE_POWER = eINSTANCE.getBasePower();
/**
* The meta object literal for the '<em><b>Base Power</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute BASE_POWER__BASE_POWER = eINSTANCE.getBasePower_BasePower();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.RegularIntervalScheduleImpl <em>Regular Interval Schedule</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.RegularIntervalScheduleImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getRegularIntervalSchedule()
* @generated
*/
EClass REGULAR_INTERVAL_SCHEDULE = eINSTANCE.getRegularIntervalSchedule();
/**
* The meta object literal for the '<em><b>End Time</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute REGULAR_INTERVAL_SCHEDULE__END_TIME = eINSTANCE.getRegularIntervalSchedule_EndTime();
/**
* The meta object literal for the '<em><b>Time Points</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference REGULAR_INTERVAL_SCHEDULE__TIME_POINTS = eINSTANCE.getRegularIntervalSchedule_TimePoints();
/**
* The meta object literal for the '<em><b>Time Step</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute REGULAR_INTERVAL_SCHEDULE__TIME_STEP = eINSTANCE.getRegularIntervalSchedule_TimeStep();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.CurveImpl <em>Curve</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.CurveImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getCurve()
* @generated
*/
EClass CURVE = eINSTANCE.getCurve();
/**
* The meta object literal for the '<em><b>Y2 Unit</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute CURVE__Y2_UNIT = eINSTANCE.getCurve_Y2Unit();
/**
* The meta object literal for the '<em><b>XMultiplier</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute CURVE__XMULTIPLIER = eINSTANCE.getCurve_XMultiplier();
/**
* The meta object literal for the '<em><b>Y3 Multiplier</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute CURVE__Y3_MULTIPLIER = eINSTANCE.getCurve_Y3Multiplier();
/**
* The meta object literal for the '<em><b>Y1 Unit</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute CURVE__Y1_UNIT = eINSTANCE.getCurve_Y1Unit();
/**
* The meta object literal for the '<em><b>Curve Style</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute CURVE__CURVE_STYLE = eINSTANCE.getCurve_CurveStyle();
/**
* The meta object literal for the '<em><b>Y3 Unit</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute CURVE__Y3_UNIT = eINSTANCE.getCurve_Y3Unit();
/**
* The meta object literal for the '<em><b>XUnit</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute CURVE__XUNIT = eINSTANCE.getCurve_XUnit();
/**
* The meta object literal for the '<em><b>Curve Datas</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CURVE__CURVE_DATAS = eINSTANCE.getCurve_CurveDatas();
/**
* The meta object literal for the '<em><b>Y2 Multiplier</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute CURVE__Y2_MULTIPLIER = eINSTANCE.getCurve_Y2Multiplier();
/**
* The meta object literal for the '<em><b>Y1 Multiplier</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute CURVE__Y1_MULTIPLIER = eINSTANCE.getCurve_Y1Multiplier();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.BaseVoltageImpl <em>Base Voltage</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.BaseVoltageImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getBaseVoltage()
* @generated
*/
EClass BASE_VOLTAGE = eINSTANCE.getBaseVoltage();
/**
* The meta object literal for the '<em><b>Nominal Voltage</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute BASE_VOLTAGE__NOMINAL_VOLTAGE = eINSTANCE.getBaseVoltage_NominalVoltage();
/**
* The meta object literal for the '<em><b>Topological Node</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference BASE_VOLTAGE__TOPOLOGICAL_NODE = eINSTANCE.getBaseVoltage_TopologicalNode();
/**
* The meta object literal for the '<em><b>Voltage Level</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference BASE_VOLTAGE__VOLTAGE_LEVEL = eINSTANCE.getBaseVoltage_VoltageLevel();
/**
* The meta object literal for the '<em><b>Is DC</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute BASE_VOLTAGE__IS_DC = eINSTANCE.getBaseVoltage_IsDC();
/**
* The meta object literal for the '<em><b>Conducting Equipment</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference BASE_VOLTAGE__CONDUCTING_EQUIPMENT = eINSTANCE.getBaseVoltage_ConductingEquipment();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.OperatingShareImpl <em>Operating Share</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.OperatingShareImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getOperatingShare()
* @generated
*/
EClass OPERATING_SHARE = eINSTANCE.getOperatingShare();
/**
* The meta object literal for the '<em><b>Percentage</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute OPERATING_SHARE__PERCENTAGE = eINSTANCE.getOperatingShare_Percentage();
/**
* The meta object literal for the '<em><b>Power System Resource</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference OPERATING_SHARE__POWER_SYSTEM_RESOURCE = eINSTANCE.getOperatingShare_PowerSystemResource();
/**
* The meta object literal for the '<em><b>Operating Participant</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference OPERATING_SHARE__OPERATING_PARTICIPANT = eINSTANCE.getOperatingShare_OperatingParticipant();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.ConnectivityNodeContainerImpl <em>Connectivity Node Container</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.ConnectivityNodeContainerImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getConnectivityNodeContainer()
* @generated
*/
EClass CONNECTIVITY_NODE_CONTAINER = eINSTANCE.getConnectivityNodeContainer();
/**
* The meta object literal for the '<em><b>Connectivity Nodes</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CONNECTIVITY_NODE_CONTAINER__CONNECTIVITY_NODES = eINSTANCE.getConnectivityNodeContainer_ConnectivityNodes();
/**
* The meta object literal for the '<em><b>Topological Node</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CONNECTIVITY_NODE_CONTAINER__TOPOLOGICAL_NODE = eINSTANCE.getConnectivityNodeContainer_TopologicalNode();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.IrregularTimePointImpl <em>Irregular Time Point</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.IrregularTimePointImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getIrregularTimePoint()
* @generated
*/
EClass IRREGULAR_TIME_POINT = eINSTANCE.getIrregularTimePoint();
/**
* The meta object literal for the '<em><b>Value1</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute IRREGULAR_TIME_POINT__VALUE1 = eINSTANCE.getIrregularTimePoint_Value1();
/**
* The meta object literal for the '<em><b>Value2</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute IRREGULAR_TIME_POINT__VALUE2 = eINSTANCE.getIrregularTimePoint_Value2();
/**
* The meta object literal for the '<em><b>Interval Schedule</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference IRREGULAR_TIME_POINT__INTERVAL_SCHEDULE = eINSTANCE.getIrregularTimePoint_IntervalSchedule();
/**
* The meta object literal for the '<em><b>Time</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute IRREGULAR_TIME_POINT__TIME = eINSTANCE.getIrregularTimePoint_Time();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.EquipmentImpl <em>Equipment</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.EquipmentImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getEquipment()
* @generated
*/
EClass EQUIPMENT = eINSTANCE.getEquipment();
/**
* The meta object literal for the '<em><b>Operational Limit Set</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EQUIPMENT__OPERATIONAL_LIMIT_SET = eINSTANCE.getEquipment_OperationalLimitSet();
/**
* The meta object literal for the '<em><b>Contingency Equipment</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EQUIPMENT__CONTINGENCY_EQUIPMENT = eINSTANCE.getEquipment_ContingencyEquipment();
/**
* The meta object literal for the '<em><b>Norma Ily In Service</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute EQUIPMENT__NORMA_ILY_IN_SERVICE = eINSTANCE.getEquipment_NormaIlyInService();
/**
* The meta object literal for the '<em><b>Customer Agreements</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EQUIPMENT__CUSTOMER_AGREEMENTS = eINSTANCE.getEquipment_CustomerAgreements();
/**
* The meta object literal for the '<em><b>Aggregate</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute EQUIPMENT__AGGREGATE = eINSTANCE.getEquipment_Aggregate();
/**
* The meta object literal for the '<em><b>Equipment Container</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EQUIPMENT__EQUIPMENT_CONTAINER = eINSTANCE.getEquipment_EquipmentContainer();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.SubGeographicalRegionImpl <em>Sub Geographical Region</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.SubGeographicalRegionImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getSubGeographicalRegion()
* @generated
*/
EClass SUB_GEOGRAPHICAL_REGION = eINSTANCE.getSubGeographicalRegion();
/**
* The meta object literal for the '<em><b>Lines</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference SUB_GEOGRAPHICAL_REGION__LINES = eINSTANCE.getSubGeographicalRegion_Lines();
/**
* The meta object literal for the '<em><b>Region</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference SUB_GEOGRAPHICAL_REGION__REGION = eINSTANCE.getSubGeographicalRegion_Region();
/**
* The meta object literal for the '<em><b>Substations</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference SUB_GEOGRAPHICAL_REGION__SUBSTATIONS = eINSTANCE.getSubGeographicalRegion_Substations();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.UnitImpl <em>Unit</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.UnitImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getUnit()
* @generated
*/
EClass UNIT = eINSTANCE.getUnit();
/**
* The meta object literal for the '<em><b>Controls</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference UNIT__CONTROLS = eINSTANCE.getUnit_Controls();
/**
* The meta object literal for the '<em><b>Protection Equipments</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference UNIT__PROTECTION_EQUIPMENTS = eINSTANCE.getUnit_ProtectionEquipments();
/**
* The meta object literal for the '<em><b>Measurements</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference UNIT__MEASUREMENTS = eINSTANCE.getUnit_Measurements();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.ReportingSuperGroupImpl <em>Reporting Super Group</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.ReportingSuperGroupImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getReportingSuperGroup()
* @generated
*/
EClass REPORTING_SUPER_GROUP = eINSTANCE.getReportingSuperGroup();
/**
* The meta object literal for the '<em><b>Reporting Group</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference REPORTING_SUPER_GROUP__REPORTING_GROUP = eINSTANCE.getReportingSuperGroup_ReportingGroup();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.RegularTimePointImpl <em>Regular Time Point</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.RegularTimePointImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getRegularTimePoint()
* @generated
*/
EClass REGULAR_TIME_POINT = eINSTANCE.getRegularTimePoint();
/**
* The meta object literal for the '<em><b>Interval Schedule</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference REGULAR_TIME_POINT__INTERVAL_SCHEDULE = eINSTANCE.getRegularTimePoint_IntervalSchedule();
/**
* The meta object literal for the '<em><b>Value1</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute REGULAR_TIME_POINT__VALUE1 = eINSTANCE.getRegularTimePoint_Value1();
/**
* The meta object literal for the '<em><b>Value2</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute REGULAR_TIME_POINT__VALUE2 = eINSTANCE.getRegularTimePoint_Value2();
/**
* The meta object literal for the '<em><b>Sequence Number</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute REGULAR_TIME_POINT__SEQUENCE_NUMBER = eINSTANCE.getRegularTimePoint_SequenceNumber();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.PsrListImpl <em>Psr List</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.PsrListImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getPsrList()
* @generated
*/
EClass PSR_LIST = eINSTANCE.getPsrList();
/**
* The meta object literal for the '<em><b>Type PSR List</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute PSR_LIST__TYPE_PSR_LIST = eINSTANCE.getPsrList_TypePSRList();
/**
* The meta object literal for the '<em><b>Power System Resources</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference PSR_LIST__POWER_SYSTEM_RESOURCES = eINSTANCE.getPsrList_PowerSystemResources();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.BasicIntervalScheduleImpl <em>Basic Interval Schedule</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.BasicIntervalScheduleImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getBasicIntervalSchedule()
* @generated
*/
EClass BASIC_INTERVAL_SCHEDULE = eINSTANCE.getBasicIntervalSchedule();
/**
* The meta object literal for the '<em><b>Value2 Multiplier</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute BASIC_INTERVAL_SCHEDULE__VALUE2_MULTIPLIER = eINSTANCE.getBasicIntervalSchedule_Value2Multiplier();
/**
* The meta object literal for the '<em><b>Value1 Multiplier</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute BASIC_INTERVAL_SCHEDULE__VALUE1_MULTIPLIER = eINSTANCE.getBasicIntervalSchedule_Value1Multiplier();
/**
* The meta object literal for the '<em><b>Start Time</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute BASIC_INTERVAL_SCHEDULE__START_TIME = eINSTANCE.getBasicIntervalSchedule_StartTime();
/**
* The meta object literal for the '<em><b>Value2 Unit</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute BASIC_INTERVAL_SCHEDULE__VALUE2_UNIT = eINSTANCE.getBasicIntervalSchedule_Value2Unit();
/**
* The meta object literal for the '<em><b>Value1 Unit</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute BASIC_INTERVAL_SCHEDULE__VALUE1_UNIT = eINSTANCE.getBasicIntervalSchedule_Value1Unit();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.IrregularIntervalScheduleImpl <em>Irregular Interval Schedule</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.IrregularIntervalScheduleImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getIrregularIntervalSchedule()
* @generated
*/
EClass IRREGULAR_INTERVAL_SCHEDULE = eINSTANCE.getIrregularIntervalSchedule();
/**
* The meta object literal for the '<em><b>Time Points</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference IRREGULAR_INTERVAL_SCHEDULE__TIME_POINTS = eINSTANCE.getIrregularIntervalSchedule_TimePoints();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.PSRTypeImpl <em>PSR Type</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.PSRTypeImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getPSRType()
* @generated
*/
EClass PSR_TYPE = eINSTANCE.getPSRType();
/**
* The meta object literal for the '<em><b>Power System Resources</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference PSR_TYPE__POWER_SYSTEM_RESOURCES = eINSTANCE.getPSRType_PowerSystemResources();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.OperatingParticipantImpl <em>Operating Participant</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.OperatingParticipantImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getOperatingParticipant()
* @generated
*/
EClass OPERATING_PARTICIPANT = eINSTANCE.getOperatingParticipant();
/**
* The meta object literal for the '<em><b>Operating Share</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference OPERATING_PARTICIPANT__OPERATING_SHARE = eINSTANCE.getOperatingParticipant_OperatingShare();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.CurveDataImpl <em>Curve Data</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.CurveDataImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getCurveData()
* @generated
*/
EClass CURVE_DATA = eINSTANCE.getCurveData();
/**
* The meta object literal for the '<em><b>Xvalue</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute CURVE_DATA__XVALUE = eINSTANCE.getCurveData_Xvalue();
/**
* The meta object literal for the '<em><b>Curve</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CURVE_DATA__CURVE = eINSTANCE.getCurveData_Curve();
/**
* The meta object literal for the '<em><b>Y2value</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute CURVE_DATA__Y2VALUE = eINSTANCE.getCurveData_Y2value();
/**
* The meta object literal for the '<em><b>Y3value</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute CURVE_DATA__Y3VALUE = eINSTANCE.getCurveData_Y3value();
/**
* The meta object literal for the '<em><b>Y1value</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute CURVE_DATA__Y1VALUE = eINSTANCE.getCurveData_Y1value();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.EquipmentContainerImpl <em>Equipment Container</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.EquipmentContainerImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getEquipmentContainer()
* @generated
*/
EClass EQUIPMENT_CONTAINER = eINSTANCE.getEquipmentContainer();
/**
* The meta object literal for the '<em><b>Equipments</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EQUIPMENT_CONTAINER__EQUIPMENTS = eINSTANCE.getEquipmentContainer_Equipments();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.PowerSystemResourceImpl <em>Power System Resource</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.PowerSystemResourceImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getPowerSystemResource()
* @generated
*/
EClass POWER_SYSTEM_RESOURCE = eINSTANCE.getPowerSystemResource();
/**
* The meta object literal for the '<em><b>Reporting Group</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference POWER_SYSTEM_RESOURCE__REPORTING_GROUP = eINSTANCE.getPowerSystemResource_ReportingGroup();
/**
* The meta object literal for the '<em><b>Network Data Sets</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference POWER_SYSTEM_RESOURCE__NETWORK_DATA_SETS = eINSTANCE.getPowerSystemResource_NetworkDataSets();
/**
* The meta object literal for the '<em><b>Location</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference POWER_SYSTEM_RESOURCE__LOCATION = eINSTANCE.getPowerSystemResource_Location();
/**
* The meta object literal for the '<em><b>Outage Schedule</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference POWER_SYSTEM_RESOURCE__OUTAGE_SCHEDULE = eINSTANCE.getPowerSystemResource_OutageSchedule();
/**
* The meta object literal for the '<em><b>PSR Event</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference POWER_SYSTEM_RESOURCE__PSR_EVENT = eINSTANCE.getPowerSystemResource_PSREvent();
/**
* The meta object literal for the '<em><b>Safety Documents</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference POWER_SYSTEM_RESOURCE__SAFETY_DOCUMENTS = eINSTANCE.getPowerSystemResource_SafetyDocuments();
/**
* The meta object literal for the '<em><b>Erp Organisation Roles</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference POWER_SYSTEM_RESOURCE__ERP_ORGANISATION_ROLES = eINSTANCE.getPowerSystemResource_ErpOrganisationRoles();
/**
* The meta object literal for the '<em><b>Circuit Sections</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference POWER_SYSTEM_RESOURCE__CIRCUIT_SECTIONS = eINSTANCE.getPowerSystemResource_CircuitSections();
/**
* The meta object literal for the '<em><b>Measurements</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference POWER_SYSTEM_RESOURCE__MEASUREMENTS = eINSTANCE.getPowerSystemResource_Measurements();
/**
* The meta object literal for the '<em><b>Assets</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference POWER_SYSTEM_RESOURCE__ASSETS = eINSTANCE.getPowerSystemResource_Assets();
/**
* The meta object literal for the '<em><b>Schedule Steps</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference POWER_SYSTEM_RESOURCE__SCHEDULE_STEPS = eINSTANCE.getPowerSystemResource_ScheduleSteps();
/**
* The meta object literal for the '<em><b>PSR Type</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference POWER_SYSTEM_RESOURCE__PSR_TYPE = eINSTANCE.getPowerSystemResource_PSRType();
/**
* The meta object literal for the '<em><b>Psr Lists</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference POWER_SYSTEM_RESOURCE__PSR_LISTS = eINSTANCE.getPowerSystemResource_PsrLists();
/**
* The meta object literal for the '<em><b>Operating Share</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference POWER_SYSTEM_RESOURCE__OPERATING_SHARE = eINSTANCE.getPowerSystemResource_OperatingShare();
/**
* The meta object literal for the '<em><b>Change Items</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference POWER_SYSTEM_RESOURCE__CHANGE_ITEMS = eINSTANCE.getPowerSystemResource_ChangeItems();
/**
* The meta object literal for the '<em><b>Document Roles</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference POWER_SYSTEM_RESOURCE__DOCUMENT_ROLES = eINSTANCE.getPowerSystemResource_DocumentRoles();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.SubstationImpl <em>Substation</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.SubstationImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getSubstation()
* @generated
*/
EClass SUBSTATION = eINSTANCE.getSubstation();
/**
* The meta object literal for the '<em><b>Bays</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference SUBSTATION__BAYS = eINSTANCE.getSubstation_Bays();
/**
* The meta object literal for the '<em><b>Region</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference SUBSTATION__REGION = eINSTANCE.getSubstation_Region();
/**
* The meta object literal for the '<em><b>Voltage Levels</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference SUBSTATION__VOLTAGE_LEVELS = eINSTANCE.getSubstation_VoltageLevels();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.GeographicalRegionImpl <em>Geographical Region</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.GeographicalRegionImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getGeographicalRegion()
* @generated
*/
EClass GEOGRAPHICAL_REGION = eINSTANCE.getGeographicalRegion();
/**
* The meta object literal for the '<em><b>Regions</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference GEOGRAPHICAL_REGION__REGIONS = eINSTANCE.getGeographicalRegion_Regions();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.IdentifiedObjectImpl <em>Identified Object</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.IdentifiedObjectImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getIdentifiedObject()
* @generated
*/
EClass IDENTIFIED_OBJECT = eINSTANCE.getIdentifiedObject();
/**
* The meta object literal for the '<em><b>MRID</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute IDENTIFIED_OBJECT__MRID = eINSTANCE.getIdentifiedObject_MRID();
/**
* The meta object literal for the '<em><b>Name</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute IDENTIFIED_OBJECT__NAME = eINSTANCE.getIdentifiedObject_Name();
/**
* The meta object literal for the '<em><b>Description</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute IDENTIFIED_OBJECT__DESCRIPTION = eINSTANCE.getIdentifiedObject_Description();
/**
* The meta object literal for the '<em><b>Path Name</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute IDENTIFIED_OBJECT__PATH_NAME = eINSTANCE.getIdentifiedObject_PathName();
/**
* The meta object literal for the '<em><b>Modeling Authority Set</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference IDENTIFIED_OBJECT__MODELING_AUTHORITY_SET = eINSTANCE.getIdentifiedObject_ModelingAuthoritySet();
/**
* The meta object literal for the '<em><b>Local Name</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute IDENTIFIED_OBJECT__LOCAL_NAME = eINSTANCE.getIdentifiedObject_LocalName();
/**
* The meta object literal for the '<em><b>Alias Name</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute IDENTIFIED_OBJECT__ALIAS_NAME = eINSTANCE.getIdentifiedObject_AliasName();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.VoltageLevelImpl <em>Voltage Level</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.VoltageLevelImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getVoltageLevel()
* @generated
*/
EClass VOLTAGE_LEVEL = eINSTANCE.getVoltageLevel();
/**
* The meta object literal for the '<em><b>Bays</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference VOLTAGE_LEVEL__BAYS = eINSTANCE.getVoltageLevel_Bays();
/**
* The meta object literal for the '<em><b>Low Voltage Limit</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute VOLTAGE_LEVEL__LOW_VOLTAGE_LIMIT = eINSTANCE.getVoltageLevel_LowVoltageLimit();
/**
* The meta object literal for the '<em><b>High Voltage Limit</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute VOLTAGE_LEVEL__HIGH_VOLTAGE_LIMIT = eINSTANCE.getVoltageLevel_HighVoltageLimit();
/**
* The meta object literal for the '<em><b>Base Voltage</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference VOLTAGE_LEVEL__BASE_VOLTAGE = eINSTANCE.getVoltageLevel_BaseVoltage();
/**
* The meta object literal for the '<em><b>Substation</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference VOLTAGE_LEVEL__SUBSTATION = eINSTANCE.getVoltageLevel_Substation();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.ConnectivityNodeImpl <em>Connectivity Node</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.ConnectivityNodeImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getConnectivityNode()
* @generated
*/
EClass CONNECTIVITY_NODE = eINSTANCE.getConnectivityNode();
/**
* The meta object literal for the '<em><b>Connectivity Node Container</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CONNECTIVITY_NODE__CONNECTIVITY_NODE_CONTAINER = eINSTANCE.getConnectivityNode_ConnectivityNodeContainer();
/**
* The meta object literal for the '<em><b>Topological Node</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CONNECTIVITY_NODE__TOPOLOGICAL_NODE = eINSTANCE.getConnectivityNode_TopologicalNode();
/**
* The meta object literal for the '<em><b>Bus Name Marker</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CONNECTIVITY_NODE__BUS_NAME_MARKER = eINSTANCE.getConnectivityNode_BusNameMarker();
/**
* The meta object literal for the '<em><b>Loss Penalty Factors</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CONNECTIVITY_NODE__LOSS_PENALTY_FACTORS = eINSTANCE.getConnectivityNode_LossPenaltyFactors();
/**
* The meta object literal for the '<em><b>Node Constraint Terms</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CONNECTIVITY_NODE__NODE_CONSTRAINT_TERMS = eINSTANCE.getConnectivityNode_NodeConstraintTerms();
/**
* The meta object literal for the '<em><b>Terminals</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CONNECTIVITY_NODE__TERMINALS = eINSTANCE.getConnectivityNode_Terminals();
/**
* The meta object literal for the '<em><b>Pnode</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CONNECTIVITY_NODE__PNODE = eINSTANCE.getConnectivityNode_Pnode();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.impl.ConductingEquipmentImpl <em>Conducting Equipment</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.impl.ConductingEquipmentImpl
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getConductingEquipment()
* @generated
*/
EClass CONDUCTING_EQUIPMENT = eINSTANCE.getConductingEquipment();
/**
* The meta object literal for the '<em><b>Protection Equipments</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CONDUCTING_EQUIPMENT__PROTECTION_EQUIPMENTS = eINSTANCE.getConductingEquipment_ProtectionEquipments();
/**
* The meta object literal for the '<em><b>Outage Step Roles</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CONDUCTING_EQUIPMENT__OUTAGE_STEP_ROLES = eINSTANCE.getConductingEquipment_OutageStepRoles();
/**
* The meta object literal for the '<em><b>Base Voltage</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CONDUCTING_EQUIPMENT__BASE_VOLTAGE = eINSTANCE.getConductingEquipment_BaseVoltage();
/**
* The meta object literal for the '<em><b>Clearance Tags</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CONDUCTING_EQUIPMENT__CLEARANCE_TAGS = eINSTANCE.getConductingEquipment_ClearanceTags();
/**
* The meta object literal for the '<em><b>Sv Status</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CONDUCTING_EQUIPMENT__SV_STATUS = eINSTANCE.getConductingEquipment_SvStatus();
/**
* The meta object literal for the '<em><b>Phases</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute CONDUCTING_EQUIPMENT__PHASES = eINSTANCE.getConductingEquipment_Phases();
/**
* The meta object literal for the '<em><b>Electrical Assets</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CONDUCTING_EQUIPMENT__ELECTRICAL_ASSETS = eINSTANCE.getConductingEquipment_ElectricalAssets();
/**
* The meta object literal for the '<em><b>Terminals</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CONDUCTING_EQUIPMENT__TERMINALS = eINSTANCE.getConductingEquipment_Terminals();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.BreakerConfiguration <em>Breaker Configuration</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.BreakerConfiguration
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getBreakerConfiguration()
* @generated
*/
EEnum BREAKER_CONFIGURATION = eINSTANCE.getBreakerConfiguration();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.BusbarConfiguration <em>Busbar Configuration</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.BusbarConfiguration
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getBusbarConfiguration()
* @generated
*/
EEnum BUSBAR_CONFIGURATION = eINSTANCE.getBusbarConfiguration();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.CompanyType <em>Company Type</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.CompanyType
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getCompanyType()
* @generated
*/
EEnum COMPANY_TYPE = eINSTANCE.getCompanyType();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.CurveStyle <em>Curve Style</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.CurveStyle
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getCurveStyle()
* @generated
*/
EEnum CURVE_STYLE = eINSTANCE.getCurveStyle();
/**
* The meta object literal for the '{@link CIM.IEC61970.Core.PhaseCode <em>Phase Code</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see CIM.IEC61970.Core.PhaseCode
* @see CIM.IEC61970.Core.impl.CorePackageImpl#getPhaseCode()
* @generated
*/
EEnum PHASE_CODE = eINSTANCE.getPhaseCode();
}
} //CorePackage
| mit |
Alex025/AppGuardian | src/edu/iub/seclab/appguardian/SettingsPreference.java | 6168 | package edu.iub.seclab.appguardian;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import android.app.ActivityManager;
import android.app.ActivityManager.RunningServiceInfo;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.content.res.AssetManager;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
import android.preference.EditTextPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
public class SettingsPreference extends PreferenceFragment implements OnSharedPreferenceChangeListener {
Messenger mService = null;
boolean mBound;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Load the preferences from an XML resource
addPreferencesFromResource(R.xml.settings_pref);
if (!isMyServiceRunning(AppGuardianService.class)) {
getActivity().startService(new Intent(getActivity(), AppGuardianService.class));
}
getActivity().bindService(
new Intent(getActivity(), AppGuardianService.class),
mConnection, 0);
ListPreference listPreference = (ListPreference) findPreference("background_interval");
if(listPreference.getValue()==null) {
// to ensure we don't get a null value
// set first value by default
String defaultValue = "30";
PreferenceManager.getDefaultSharedPreferences(getActivity()).getString("background_interval", defaultValue);
listPreference.setValue(defaultValue);
listPreference.setSummary("30 minutes");
} else {
listPreference.setSummary(PreferenceManager.getDefaultSharedPreferences(getActivity()).getString("background_interval", "") + " minutes");
}
EditTextPreference editPreference = (EditTextPreference) findPreference("about_us");
editPreference.setEnabled(false);
Preference button = (Preference)findPreference("reset");
button.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
File file = new File(getActivity().getFilesDir().getAbsolutePath() + "/whitelist.txt");
file.delete();
copyAssets();
return true;
}
});
}
@Override
public void onResume() {
super.onResume();
getPreferenceManager().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
}
@Override
public void onPause() {
getPreferenceManager().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
super.onPause();
}
@Override
public void onDestroy() {
if (mBound) {
getActivity().unbindService(mConnection);
mBound = false;
}
super.onDestroy();
}
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key)
{
if (!mBound) return;
if (key.equals("background_interval"))
{
// Set summary to be the user-description for the selected value
ListPreference listPreference = (ListPreference) findPreference("background_interval");
listPreference.setSummary(PreferenceManager.getDefaultSharedPreferences(getActivity()).getString("background_interval", "") + " minutes");
}
Message msg = Message.obtain(null, AppGuardianService.MSG_SETTINGS_CHANGED, 0, 0);
try {
mService.send(msg);
} catch (RemoteException e) {
e.printStackTrace();
}
}
private boolean isMyServiceRunning(Class<?> serviceClass) {
ActivityManager manager = (ActivityManager) getActivity().getSystemService(Context.ACTIVITY_SERVICE);
for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {
if (serviceClass.getName().equals(service.service.getClassName())) {
return true;
}
}
return false;
}
private ServiceConnection mConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName className, IBinder service) {
// This is called when the connection with the service has been
// established, giving us the object we can use to
// interact with the service. We are communicating with the
// service using a Messenger, so here we get a client-side
// representation of that from the raw IBinder object.
mService = new Messenger(service);
mBound = true;
}
public void onServiceDisconnected(ComponentName className) {
// This is called when the connection with the service has been
// unexpectedly disconnected -- that is, its process crashed.
mService = null;
mBound = false;
}
};
private void copyAssets() {
AssetManager assetManager = getActivity().getAssets();
InputStream in = null;
OutputStream out = null;
try {
in = assetManager.open("whitelist.txt");
out = getActivity().openFileOutput("whitelist.txt", Context.MODE_PRIVATE);
copyFile(in, out);
in.close();
in = null;
out.flush();
out.close();
out = null;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
private void copyFile(InputStream in, OutputStream out) throws IOException {
byte[] buffer = new byte[1024];
int read;
while((read = in.read(buffer)) != -1){
out.write(buffer, 0, read);
}
}
} | mit |
mabranon/Arctic-Scavengers | src/arctic/cards/CardName.java | 604 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package arctic.cards;
/**
*
* @author Joshua
*/
public enum CardName {
REFUGEE,
BRAWLER,
HUNTER,
SABOTEUR,
SCOUT,
GROUP_LEADERS,
SNIPER_TEAMS,
THUGS,
SCAVENGER,
JUNK,
MULTITOOL,
NET,
SPEAR,
PICKAXE,
SHOVEL,
MEDKIT,
PILLS,
WOLF_PACK,
GRENADE,
SLED_TEAM,
FIELD_CREW,
TRIBE_FAMILY_3,
TRIBE_FAMILY_4,
TRIBE_FAMILY_5
}
| mit |
RabadanLab/Pegasus | resources/hsqldb-2.2.7/hsqldb/src/org/hsqldb/SchemaManager.java | 83727 | /* Copyright (c) 2001-2011, The HSQL Development Group
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* Neither the name of the HSQL Development Group nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.hsqldb;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import org.hsqldb.HsqlNameManager.HsqlName;
import org.hsqldb.error.Error;
import org.hsqldb.error.ErrorCode;
import org.hsqldb.lib.HashMappedList;
import org.hsqldb.lib.HsqlArrayList;
import org.hsqldb.lib.Iterator;
import org.hsqldb.lib.MultiValueHashMap;
import org.hsqldb.lib.OrderedHashSet;
import org.hsqldb.lib.StringConverter;
import org.hsqldb.lib.WrapperIterator;
import org.hsqldb.navigator.RowIterator;
import org.hsqldb.rights.Grantee;
import org.hsqldb.types.Type;
/**
* Manages all SCHEMA related database objects
*
* @author Fred Toussi (fredt@users dot sourceforge.net)
* @version 2.2.7
* @since 1.8.0
*/
public class SchemaManager {
Database database;
HsqlName defaultSchemaHsqlName;
HashMappedList schemaMap = new HashMappedList();
MultiValueHashMap referenceMap = new MultiValueHashMap();
int defaultTableType = TableBase.MEMORY_TABLE;
long schemaChangeTimestamp;
HsqlName[] catalogNameArray;
//
ReadWriteLock lock = new ReentrantReadWriteLock();
Lock readLock = lock.readLock();
Lock writeLock = lock.writeLock();
//
Table dualTable;
public Table dataChangeTable;
public SchemaManager(Database database) {
this.database = database;
defaultSchemaHsqlName = SqlInvariants.INFORMATION_SCHEMA_HSQLNAME;
catalogNameArray = new HsqlName[]{ database.getCatalogName() };
Schema schema =
new Schema(SqlInvariants.INFORMATION_SCHEMA_HSQLNAME,
SqlInvariants.INFORMATION_SCHEMA_HSQLNAME.owner);
schemaMap.put(schema.getName().name, schema);
try {
schema.typeLookup.add(TypeInvariants.CARDINAL_NUMBER);
schema.typeLookup.add(TypeInvariants.YES_OR_NO);
schema.typeLookup.add(TypeInvariants.CHARACTER_DATA);
schema.typeLookup.add(TypeInvariants.SQL_IDENTIFIER);
schema.typeLookup.add(TypeInvariants.TIME_STAMP);
schema.charsetLookup.add(TypeInvariants.SQL_TEXT);
schema.charsetLookup.add(TypeInvariants.SQL_IDENTIFIER_CHARSET);
schema.charsetLookup.add(TypeInvariants.SQL_CHARACTER);
} catch (HsqlException e) {}
}
public void setSchemaChangeTimestamp() {
schemaChangeTimestamp = database.txManager.getGlobalChangeTimestamp();
}
public long getSchemaChangeTimestamp() {
return schemaChangeTimestamp;
}
// pre-defined
public HsqlName getSQLJSchemaHsqlName() {
return SqlInvariants.SQLJ_SCHEMA_HSQLNAME;
}
// SCHEMA management
public void createPublicSchema() {
writeLock.lock();
try {
HsqlName name = database.nameManager.newHsqlName(null,
SqlInvariants.PUBLIC_SCHEMA, SchemaObject.SCHEMA);
Schema schema =
new Schema(name, database.getGranteeManager().getDBARole());
defaultSchemaHsqlName = schema.getName();
schemaMap.put(schema.getName().name, schema);
} finally {
writeLock.unlock();
}
}
/**
* Creates a schema belonging to the given grantee.
*/
public void createSchema(HsqlName name, Grantee owner) {
writeLock.lock();
try {
SqlInvariants.checkSchemaNameNotSystem(name.name);
Schema schema = new Schema(name, owner);
schemaMap.add(name.name, schema);
} finally {
writeLock.unlock();
}
}
public void dropSchema(Session session, String name, boolean cascade) {
writeLock.lock();
try {
Schema schema = (Schema) schemaMap.get(name);
if (schema == null) {
throw Error.error(ErrorCode.X_42501, name);
}
if (SqlInvariants.isLobsSchemaName(name)) {
throw Error.error(ErrorCode.X_42503, name);
}
if (!cascade && !schema.isEmpty()) {
throw Error.error(ErrorCode.X_2B000);
}
OrderedHashSet externalReferences = new OrderedHashSet();
getCascadingReferencesToSchema(schema.getName(),
externalReferences);
removeSchemaObjects(externalReferences);
Iterator tableIterator =
schema.schemaObjectIterator(SchemaObject.TABLE);
while (tableIterator.hasNext()) {
Table table = ((Table) tableIterator.next());
Constraint[] list = table.getFKConstraints();
for (int i = 0; i < list.length; i++) {
Constraint constraint = list[i];
if (constraint.getMain().getSchemaName()
!= schema.getName()) {
constraint.getMain().removeConstraint(
constraint.getMainName().name);
removeReferencesFrom(constraint);
}
}
removeTable(session, table);
}
Iterator sequenceIterator =
schema.schemaObjectIterator(SchemaObject.SEQUENCE);
while (sequenceIterator.hasNext()) {
NumberSequence sequence =
((NumberSequence) sequenceIterator.next());
database.getGranteeManager().removeDbObject(
sequence.getName());
}
schema.clearStructures();
schemaMap.remove(name);
if (defaultSchemaHsqlName.name.equals(name)) {
HsqlName hsqlName = database.nameManager.newHsqlName(name,
false, SchemaObject.SCHEMA);
schema = new Schema(hsqlName,
database.getGranteeManager().getDBARole());
defaultSchemaHsqlName = schema.getName();
schemaMap.put(schema.getName().name, schema);
}
// these are called last and in this particular order
database.getUserManager().removeSchemaReference(name);
database.getSessionManager().removeSchemaReference(schema);
} finally {
writeLock.unlock();
}
}
public void renameSchema(HsqlName name, HsqlName newName) {
writeLock.lock();
try {
Schema schema = (Schema) schemaMap.get(name.name);
Schema exists = (Schema) schemaMap.get(newName.name);
if (schema == null) {
throw Error.error(ErrorCode.X_42501, name.name);
}
if (exists != null) {
throw Error.error(ErrorCode.X_42504, newName.name);
}
SqlInvariants.checkSchemaNameNotSystem(name.name);
SqlInvariants.checkSchemaNameNotSystem(newName.name);
int index = schemaMap.getIndex(name.name);
schema.getName().rename(newName);
schemaMap.set(index, newName.name, schema);
} finally {
writeLock.unlock();
}
}
public void clearStructures() {
writeLock.lock();
try {
Iterator it = schemaMap.values().iterator();
while (it.hasNext()) {
Schema schema = (Schema) it.next();
schema.clearStructures();
}
} finally {
writeLock.unlock();
}
}
public String[] getSchemaNamesArray() {
readLock.lock();
try {
String[] array = new String[schemaMap.size()];
schemaMap.toKeysArray(array);
return array;
} finally {
readLock.unlock();
}
}
public Schema[] getAllSchemas() {
readLock.lock();
try {
Schema[] objects = new Schema[schemaMap.size()];
schemaMap.toValuesArray(objects);
return objects;
} finally {
readLock.unlock();
}
}
public HsqlName getUserSchemaHsqlName(String name) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(name);
if (schema == null) {
throw Error.error(ErrorCode.X_3F000, name);
}
if (schema.getName()
== SqlInvariants.INFORMATION_SCHEMA_HSQLNAME) {
throw Error.error(ErrorCode.X_3F000, name);
}
return schema.getName();
} finally {
readLock.unlock();
}
}
public Grantee toSchemaOwner(String name) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(name);
return schema == null ? null
: schema.getOwner();
} finally {
readLock.unlock();
}
}
public HsqlName getDefaultSchemaHsqlName() {
return defaultSchemaHsqlName;
}
public void setDefaultSchemaHsqlName(HsqlName name) {
defaultSchemaHsqlName = name;
}
public boolean schemaExists(String name) {
readLock.lock();
try {
return schemaMap.containsKey(name);
} finally {
readLock.unlock();
}
}
public HsqlName findSchemaHsqlName(String name) {
readLock.lock();
try {
Schema schema = ((Schema) schemaMap.get(name));
if (schema == null) {
return null;
}
return schema.getName();
} finally {
readLock.unlock();
}
}
/**
* If schemaName is null, return the default schema name, else return
* the HsqlName object for the schema. If schemaName does not exist,
* throw.
*/
public HsqlName getSchemaHsqlName(String name) {
if (name == null) {
return defaultSchemaHsqlName;
}
readLock.lock();
try {
Schema schema = ((Schema) schemaMap.get(name));
if (schema == null) {
throw Error.error(ErrorCode.X_3F000, name);
}
return schema.getName();
} finally {
readLock.unlock();
}
}
/**
* Same as above, but return string
*/
public String getSchemaName(String name) {
return getSchemaHsqlName(name).name;
}
public Schema findSchema(String name) {
readLock.lock();
try {
return ((Schema) schemaMap.get(name));
} finally {
readLock.unlock();
}
}
/**
* drop all schemas with the given authorisation
*/
public void dropSchemas(Session session, Grantee grantee,
boolean cascade) {
writeLock.lock();
try {
HsqlArrayList list = getSchemas(grantee);
Iterator it = list.iterator();
while (it.hasNext()) {
Schema schema = (Schema) it.next();
dropSchema(session, schema.getName().name, cascade);
}
} finally {
writeLock.unlock();
}
}
public HsqlArrayList getSchemas(Grantee grantee) {
readLock.lock();
try {
HsqlArrayList list = new HsqlArrayList();
Iterator it = schemaMap.values().iterator();
while (it.hasNext()) {
Schema schema = (Schema) it.next();
if (grantee.equals(schema.getOwner())) {
list.add(schema);
}
}
return list;
} finally {
readLock.unlock();
}
}
public boolean hasSchemas(Grantee grantee) {
readLock.lock();
try {
Iterator it = schemaMap.values().iterator();
while (it.hasNext()) {
Schema schema = (Schema) it.next();
if (grantee.equals(schema.getOwner())) {
return true;
}
}
return false;
} finally {
readLock.unlock();
}
}
/**
* Returns an HsqlArrayList containing references to all non-system
* tables and views. This includes all tables and views registered with
* this Database.
*/
public HsqlArrayList getAllTables(boolean withLobTables) {
readLock.lock();
try {
HsqlArrayList alltables = new HsqlArrayList();
String[] schemas = getSchemaNamesArray();
for (int i = 0; i < schemas.length; i++) {
String name = schemas[i];
if (!withLobTables && SqlInvariants.isLobsSchemaName(name)) {
continue;
}
if (SqlInvariants.isSystemSchemaName(name)) {
continue;
}
HashMappedList current = getTables(name);
alltables.addAll(current.values());
}
return alltables;
} finally {
readLock.unlock();
}
}
public HashMappedList getTables(String schema) {
readLock.lock();
try {
Schema temp = (Schema) schemaMap.get(schema);
return temp.tableList;
} finally {
readLock.unlock();
}
}
public HsqlName[] getCatalogNameArray() {
return catalogNameArray;
}
public HsqlName[] getCatalogAndBaseTableNames() {
readLock.lock();
try {
OrderedHashSet names = new OrderedHashSet();
HsqlArrayList tables = getAllTables(false);
for (int i = 0; i < tables.size(); i++) {
Table table = (Table) tables.get(i);
if (!table.isTemp()) {
names.add(table.getName());
}
}
names.add(database.getCatalogName());
HsqlName[] array = new HsqlName[names.size()];
names.toArray(array);
return array;
} finally {
readLock.unlock();
}
}
public HsqlName[] getCatalogAndBaseTableNames(HsqlName name) {
readLock.lock();
if (name == null) {
return catalogNameArray;
}
try {
switch (name.type) {
case SchemaObject.SCHEMA : {
if (findSchemaHsqlName(name.name) == null) {
return catalogNameArray;
}
OrderedHashSet names = new OrderedHashSet();
names.add(database.getCatalogName());
HashMappedList list = getTables(name.name);
for (int i = 0; i < list.size(); i++) {
names.add(((SchemaObject) list.get(i)).getName());
}
HsqlName[] array = new HsqlName[names.size()];
names.toArray(array);
return array;
}
case SchemaObject.GRANTEE : {
return catalogNameArray;
}
case SchemaObject.INDEX :
case SchemaObject.CONSTRAINT :
findSchemaObject(name.name, name.schema.name, name.type);
}
SchemaObject object = findSchemaObject(name.name,
name.schema.name,
name.type);
if (object == null) {
return catalogNameArray;
}
HsqlName parent = object.getName().parent;
OrderedHashSet references = getReferencesTo(object.getName());
OrderedHashSet names = new OrderedHashSet();
names.add(database.getCatalogName());
if (parent != null) {
SchemaObject parentObject = findSchemaObject(parent.name,
parent.schema.name, parent.type);
if (parentObject != null
&& parentObject.getName().type == SchemaObject.TABLE) {
names.add(parentObject.getName());
}
}
if (object.getName().type == SchemaObject.TABLE) {
names.add(object.getName());
}
for (int i = 0; i < references.size(); i++) {
HsqlName reference = (HsqlName) references.get(i);
if (reference.type == SchemaObject.TABLE) {
Table table = findUserTable(null, reference.name,
reference.schema.name);
if (table != null && !table.isTemp()) {
names.add(reference);
}
}
}
HsqlName[] array = new HsqlName[names.size()];
names.toArray(array);
return array;
} finally {
readLock.unlock();
}
}
private SchemaObjectSet getSchemaObjectSet(Schema schema, int type) {
readLock.lock();
try {
SchemaObjectSet set = null;
switch (type) {
case SchemaObject.SEQUENCE :
set = schema.sequenceLookup;
break;
case SchemaObject.TABLE :
case SchemaObject.VIEW :
set = schema.tableLookup;
break;
case SchemaObject.CHARSET :
set = schema.charsetLookup;
break;
case SchemaObject.COLLATION :
set = schema.collationLookup;
break;
case SchemaObject.PROCEDURE :
set = schema.procedureLookup;
break;
case SchemaObject.FUNCTION :
set = schema.functionLookup;
break;
case SchemaObject.DOMAIN :
case SchemaObject.TYPE :
set = schema.typeLookup;
break;
case SchemaObject.INDEX :
set = schema.indexLookup;
break;
case SchemaObject.CONSTRAINT :
set = schema.constraintLookup;
break;
case SchemaObject.TRIGGER :
set = schema.triggerLookup;
break;
case SchemaObject.SPECIFIC_ROUTINE :
set = schema.specificRoutineLookup;
}
return set;
} finally {
readLock.unlock();
}
}
public void checkSchemaObjectNotExists(HsqlName name) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(name.schema.name);
SchemaObjectSet set = getSchemaObjectSet(schema, name.type);
set.checkAdd(name);
} finally {
readLock.unlock();
}
}
/**
* Returns the specified user-defined table or view visible within the
* context of the specified Session, or any system table of the given
* name. It excludes any temp tables created in other Sessions.
* Throws if the table does not exist in the context.
*/
public Table getTable(Session session, String name, String schema) {
readLock.lock();
try {
Table t = null;
if (Tokens.T_MODULE.equals(schema)
|| Tokens.T_SESSION.equals(schema)) {
t = findSessionTable(session, name);
if (t == null) {
throw Error.error(ErrorCode.X_42501, name);
}
return t;
}
if (schema == null) {
if (session.database.sqlSyntaxOra
|| session.database.sqlSyntaxDb2) {
if (Tokens.T_DUAL.equals(name)) {
return dualTable;
}
}
t = findSessionTable(session, name);
}
if (t == null) {
schema = session.getSchemaName(schema);
t = findUserTable(session, name, schema);
}
if (t == null) {
if (SqlInvariants.INFORMATION_SCHEMA.equals(schema)
&& database.dbInfo != null) {
t = database.dbInfo.getSystemTable(session, name);
}
}
if (t == null) {
throw Error.error(ErrorCode.X_42501, name);
}
return t;
} finally {
readLock.unlock();
}
}
public Table getUserTable(Session session, HsqlName name) {
return getUserTable(session, name.name, name.schema.name);
}
/**
* Returns the specified user-defined table or view visible within the
* context of the specified Session. It excludes system tables and
* any temp tables created in different Sessions.
* Throws if the table does not exist in the context.
*/
public Table getUserTable(Session session, String name, String schema) {
Table t = findUserTable(session, name, schema);
if (t == null) {
String longName = schema == null ? name
: schema + '.' + name;
throw Error.error(ErrorCode.X_42501, longName);
}
return t;
}
/**
* Returns the specified user-defined table or view visible within the
* context of the specified schema. It excludes system tables.
* Returns null if the table does not exist in the context.
*/
public Table findUserTable(Session session, String name,
String schemaName) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(schemaName);
if (schema == null) {
return null;
}
int i = schema.tableList.getIndex(name);
if (i == -1) {
return null;
}
return (Table) schema.tableList.get(i);
} finally {
readLock.unlock();
}
}
/**
* Returns the specified session context table.
* Returns null if the table does not exist in the context.
*/
public Table findSessionTable(Session session, String name) {
return session.sessionContext.findSessionTable(name);
}
/**
* Drops the specified user-defined view or table from this Database object.
*
* <p> The process of dropping a table or view includes:
* <OL>
* <LI> checking that the specified Session's currently connected User has
* the right to perform this operation and refusing to proceed if not by
* throwing.
* <LI> checking for referential constraints that conflict with this
* operation and refusing to proceed if they exist by throwing.</LI>
* <LI> removing the specified Table from this Database object.
* <LI> removing any exported foreign keys Constraint objects held by any
* tables referenced by the table to be dropped. This is especially
* important so that the dropped Table ceases to be referenced, eventually
* allowing its full garbage collection.
* <LI>
* </OL>
*
* <p>
*
* @param session the connected context in which to perform this operation
* @param table if true and if the Table to drop does not exist, fail
* silently, else throw
* @param cascade true if the name argument refers to a View
*/
public void dropTableOrView(Session session, Table table,
boolean cascade) {
writeLock.lock();
try {
if (table.isView()) {
dropView(table, cascade);
} else {
dropTable(session, table, cascade);
}
} finally {
writeLock.unlock();
}
}
private void dropView(Table table, boolean cascade) {
Schema schema = (Schema) schemaMap.get(table.getSchemaName().name);
removeSchemaObject(table.getName(), cascade);
schema.triggerLookup.removeParent(table.getName());
}
private void dropTable(Session session, Table table, boolean cascade) {
Schema schema = (Schema) schemaMap.get(table.getSchemaName().name);
int dropIndex = schema.tableList.getIndex(table.getName().name);
OrderedHashSet externalConstraints =
table.getDependentExternalConstraints();
OrderedHashSet externalReferences = new OrderedHashSet();
getCascadingReferencesTo(table.getName(), externalReferences);
if (!cascade) {
for (int i = 0; i < externalConstraints.size(); i++) {
Constraint c = (Constraint) externalConstraints.get(i);
HsqlName refname = c.getRefName();
if (c.getConstraintType()
== SchemaObject.ConstraintTypes.MAIN) {
throw Error.error(
ErrorCode.X_42533,
refname.getSchemaQualifiedStatementName());
}
}
if (!externalReferences.isEmpty()) {
int i = 0;
for (; i < externalReferences.size(); i++) {
HsqlName name = (HsqlName) externalReferences.get(i);
if (name.parent == table.getName()) {
continue;
}
throw Error.error(ErrorCode.X_42502,
name.getSchemaQualifiedStatementName());
}
}
}
OrderedHashSet tableSet = new OrderedHashSet();
OrderedHashSet constraintNameSet = new OrderedHashSet();
OrderedHashSet indexNameSet = new OrderedHashSet();
for (int i = 0; i < externalConstraints.size(); i++) {
Constraint c = (Constraint) externalConstraints.get(i);
Table t = c.getMain();
if (t != table) {
tableSet.add(t);
}
t = c.getRef();
if (t != table) {
tableSet.add(t);
}
constraintNameSet.add(c.getMainName());
constraintNameSet.add(c.getRefName());
indexNameSet.add(c.getRefIndex().getName());
}
OrderedHashSet uniqueConstraintNames =
table.getUniquePKConstraintNames();
TableWorks tw = new TableWorks(session, table);
tableSet = tw.makeNewTables(tableSet, constraintNameSet, indexNameSet);
tw.setNewTablesInSchema(tableSet);
tw.updateConstraints(tableSet, constraintNameSet);
removeSchemaObjects(externalReferences);
removeTableDependentReferences(table); //
removeReferencesTo(uniqueConstraintNames);
removeReferencesTo(table.getName());
removeReferencesFrom(table);
schema.tableList.remove(dropIndex);
schema.indexLookup.removeParent(table.getName());
schema.constraintLookup.removeParent(table.getName());
schema.triggerLookup.removeParent(table.getName());
removeTable(session, table);
recompileDependentObjects(tableSet);
}
private void removeTable(Session session, Table table) {
database.getGranteeManager().removeDbObject(table.getName());
table.releaseTriggers();
if (table.hasLobColumn()) {
RowIterator it = table.rowIterator(session);
while (it.hasNext()) {
Row row = it.getNextRow();
Object[] data = row.getData();
session.sessionData.adjustLobUsageCount(table, data, -1);
}
}
database.persistentStoreCollection.releaseStore(table);
}
public void setTable(int index, Table table) {
writeLock.lock();
try {
Schema schema = (Schema) schemaMap.get(table.getSchemaName().name);
schema.tableList.set(index, table.getName().name, table);
} finally {
writeLock.unlock();
}
}
/**
* Returns index of a table or view in the HashMappedList that
* contains the table objects for this Database.
*
* @param table the Table object
* @return the index of the specified table or view, or -1 if not found
*/
public int getTableIndex(Table table) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(table.getSchemaName().name);
if (schema == null) {
return -1;
}
HsqlName name = table.getName();
return schema.tableList.getIndex(name.name);
} finally {
readLock.unlock();
}
}
public void recompileDependentObjects(OrderedHashSet tableSet) {
writeLock.lock();
try {
OrderedHashSet set = new OrderedHashSet();
for (int i = 0; i < tableSet.size(); i++) {
Table table = (Table) tableSet.get(i);
set.addAll(getReferencesTo(table.getName()));
}
Session session = database.sessionManager.getSysSession();
for (int i = 0; i < set.size(); i++) {
HsqlName name = (HsqlName) set.get(i);
switch (name.type) {
case SchemaObject.VIEW :
case SchemaObject.CONSTRAINT :
case SchemaObject.ASSERTION :
case SchemaObject.ROUTINE :
case SchemaObject.PROCEDURE :
case SchemaObject.FUNCTION :
case SchemaObject.SPECIFIC_ROUTINE :
SchemaObject object = getSchemaObject(name);
object.compile(session, null);
break;
}
}
if (Error.TRACE) {
HsqlArrayList list = getAllTables(false);
for (int i = 0; i < list.size(); i++) {
Table t = (Table) list.get(i);
t.verifyConstraintsIntegrity();
}
}
} finally {
writeLock.unlock();
}
}
/**
* After addition or removal of columns and indexes all views that
* reference the table should be recompiled.
*/
public void recompileDependentObjects(Table table) {
writeLock.lock();
try {
OrderedHashSet set = new OrderedHashSet();
getCascadingReferencesTo(table.getName(), set);
Session session = database.sessionManager.getSysSession();
for (int i = 0; i < set.size(); i++) {
HsqlName name = (HsqlName) set.get(i);
switch (name.type) {
case SchemaObject.VIEW :
case SchemaObject.CONSTRAINT :
case SchemaObject.ASSERTION :
case SchemaObject.ROUTINE :
case SchemaObject.PROCEDURE :
case SchemaObject.FUNCTION :
case SchemaObject.SPECIFIC_ROUTINE :
SchemaObject object = getSchemaObject(name);
object.compile(session, null);
break;
}
}
if (Error.TRACE) {
HsqlArrayList list = getAllTables(false);
for (int i = 0; i < list.size(); i++) {
Table t = (Table) list.get(i);
t.verifyConstraintsIntegrity();
}
}
} finally {
writeLock.unlock();
}
}
public NumberSequence getSequence(String name, String schemaName,
boolean raise) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(schemaName);
if (schema != null) {
NumberSequence object =
(NumberSequence) schema.sequenceList.get(name);
if (object != null) {
return object;
}
}
if (raise) {
throw Error.error(ErrorCode.X_42501, name);
}
return null;
} finally {
readLock.unlock();
}
}
public Type getUserDefinedType(String name, String schemaName,
boolean raise) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(schemaName);
if (schema != null) {
SchemaObject object = schema.typeLookup.getObject(name);
if (object != null) {
return (Type) object;
}
}
if (raise) {
throw Error.error(ErrorCode.X_42501, name);
}
return null;
} finally {
readLock.unlock();
}
}
public Type getDomainOrUDT(String name, String schemaName, boolean raise) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(schemaName);
if (schema != null) {
SchemaObject object = schema.typeLookup.getObject(name);
if (object != null) {
return (Type) object;
}
}
if (raise) {
throw Error.error(ErrorCode.X_42501, name);
}
return null;
} finally {
readLock.unlock();
}
}
public Type getDomain(String name, String schemaName, boolean raise) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(schemaName);
if (schema != null) {
SchemaObject object = schema.typeLookup.getObject(name);
if (object != null && ((Type) object).isDomainType()) {
return (Type) object;
}
}
if (raise) {
throw Error.error(ErrorCode.X_42501, name);
}
return null;
} finally {
readLock.unlock();
}
}
public Type getDistinctType(String name, String schemaName,
boolean raise) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(schemaName);
if (schema != null) {
SchemaObject object = schema.typeLookup.getObject(name);
if (object != null && ((Type) object).isDistinctType()) {
return (Type) object;
}
}
if (raise) {
throw Error.error(ErrorCode.X_42501, name);
}
return null;
} finally {
readLock.unlock();
}
}
public SchemaObject getSchemaObject(String name, String schemaName,
int type) {
readLock.lock();
try {
SchemaObject object = findSchemaObject(name, schemaName, type);
if (object == null) {
throw Error.error(SchemaObjectSet.getGetErrorCode(type), name);
}
return object;
} finally {
readLock.unlock();
}
}
public SchemaObject findSchemaObject(String name, String schemaName,
int type) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(schemaName);
if (schema == null) {
return null;
}
SchemaObjectSet set = null;
HsqlName objectName;
Table table;
switch (type) {
case SchemaObject.SEQUENCE :
return schema.sequenceLookup.getObject(name);
case SchemaObject.TABLE :
case SchemaObject.VIEW :
return schema.tableLookup.getObject(name);
case SchemaObject.CHARSET :
if (name.equals("SQL_IDENTIFIER")) {
return TypeInvariants.SQL_IDENTIFIER_CHARSET;
}
if (name.equals("SQL_TEXT")) {
return TypeInvariants.SQL_TEXT;
}
if (name.equals("LATIN1")) {
return TypeInvariants.LATIN1;
}
if (name.equals("ASCII_GRAPHIC")) {
return TypeInvariants.ASCII_GRAPHIC;
}
return schema.charsetLookup.getObject(name);
case SchemaObject.COLLATION :
return schema.collationLookup.getObject(name);
case SchemaObject.PROCEDURE :
return schema.procedureLookup.getObject(name);
case SchemaObject.FUNCTION :
return schema.functionLookup.getObject(name);
case SchemaObject.ROUTINE : {
SchemaObject object =
schema.procedureLookup.getObject(name);
if (object == null) {
object = schema.functionLookup.getObject(name);
}
return object;
}
case SchemaObject.SPECIFIC_ROUTINE :
return schema.specificRoutineLookup.getObject(name);
case SchemaObject.DOMAIN :
case SchemaObject.TYPE :
return schema.typeLookup.getObject(name);
case SchemaObject.INDEX :
set = schema.indexLookup;
objectName = set.getName(name);
if (objectName == null) {
return null;
}
table =
(Table) schema.tableList.get(objectName.parent.name);
return table.getIndex(name);
case SchemaObject.CONSTRAINT :
set = schema.constraintLookup;
objectName = set.getName(name);
if (objectName == null) {
return null;
}
table =
(Table) schema.tableList.get(objectName.parent.name);
if (table == null) {
return null;
}
return table.getConstraint(name);
case SchemaObject.TRIGGER :
set = schema.indexLookup;
objectName = set.getName(name);
if (objectName == null) {
return null;
}
table =
(Table) schema.tableList.get(objectName.parent.name);
return table.getTrigger(name);
default :
throw Error.runtimeError(ErrorCode.U_S0500,
"SchemaManager");
}
} finally {
readLock.unlock();
}
}
// INDEX management
/**
* Returns the table that has an index with the given name and schema.
*/
Table findUserTableForIndex(Session session, String name,
String schemaName) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(schemaName);
HsqlName indexName = schema.indexLookup.getName(name);
if (indexName == null) {
return null;
}
return findUserTable(session, indexName.parent.name, schemaName);
} finally {
readLock.unlock();
}
}
/**
* Drops the index with the specified name.
*/
void dropIndex(Session session, HsqlName name) {
writeLock.lock();
try {
Table t = getTable(session, name.parent.name,
name.parent.schema.name);
TableWorks tw = new TableWorks(session, t);
tw.dropIndex(name.name);
} finally {
writeLock.unlock();
}
}
/**
* Drops the index with the specified name.
*/
void dropConstraint(Session session, HsqlName name, boolean cascade) {
writeLock.lock();
try {
Table t = getTable(session, name.parent.name,
name.parent.schema.name);
TableWorks tw = new TableWorks(session, t);
tw.dropConstraint(name.name, cascade);
} finally {
writeLock.unlock();
}
}
void removeDependentObjects(HsqlName name) {
writeLock.lock();
try {
Schema schema = (Schema) schemaMap.get(name.schema.name);
schema.indexLookup.removeParent(name);
schema.constraintLookup.removeParent(name);
schema.triggerLookup.removeParent(name);
} finally {
writeLock.unlock();
}
}
/**
* Removes any foreign key Constraint objects (exported keys) held by any
* tables referenced by the specified table. <p>
*
* This method is called as the last step of a successful call to
* dropTable() in order to ensure that the dropped Table ceases to be
* referenced when enforcing referential integrity.
*
* @param toDrop The table to which other tables may be holding keys.
* This is a table that is in the process of being dropped.
*/
void removeExportedKeys(Table toDrop) {
writeLock.lock();
try {
// toDrop.schema may be null because it is not registerd
Schema schema =
(Schema) schemaMap.get(toDrop.getSchemaName().name);
for (int i = 0; i < schema.tableList.size(); i++) {
Table table = (Table) schema.tableList.get(i);
Constraint[] constraints = table.getConstraints();
for (int j = constraints.length - 1; j >= 0; j--) {
Table refTable = constraints[j].getRef();
if (toDrop == refTable) {
table.removeConstraint(j);
}
}
}
} finally {
writeLock.unlock();
}
}
public Iterator databaseObjectIterator(String schemaName, int type) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(schemaName);
return schema.schemaObjectIterator(type);
} finally {
readLock.unlock();
}
}
public Iterator databaseObjectIterator(int type) {
readLock.lock();
try {
Iterator it = schemaMap.values().iterator();
Iterator objects = new WrapperIterator();
while (it.hasNext()) {
int targetType = type;
if (type == SchemaObject.ROUTINE) {
targetType = SchemaObject.FUNCTION;
}
Schema temp = (Schema) it.next();
SchemaObjectSet set = temp.getObjectSet(targetType);
Object[] values;
if (set.map.size() != 0) {
values = new Object[set.map.size()];
set.map.valuesToArray(values);
objects = new WrapperIterator(objects,
new WrapperIterator(values));
}
if (type == SchemaObject.ROUTINE) {
set = temp.getObjectSet(SchemaObject.PROCEDURE);
if (set.map.size() != 0) {
values = new Object[set.map.size()];
set.map.valuesToArray(values);
objects =
new WrapperIterator(objects,
new WrapperIterator(values));
}
}
}
return objects;
} finally {
readLock.unlock();
}
}
// references
private void addReferencesFrom(SchemaObject object) {
OrderedHashSet set = object.getReferences();
HsqlName name = object.getName();
if (set == null) {
return;
}
for (int i = 0; i < set.size(); i++) {
HsqlName referenced = (HsqlName) set.get(i);
if (object instanceof Routine) {
name = ((Routine) object).getSpecificName();
}
referenceMap.put(referenced, name);
}
}
private void removeReferencesTo(OrderedHashSet set) {
for (int i = 0; i < set.size(); i++) {
HsqlName referenced = (HsqlName) set.get(i);
referenceMap.remove(referenced);
}
}
private void removeReferencesTo(HsqlName referenced) {
referenceMap.remove(referenced);
}
private void removeReferencesFrom(SchemaObject object) {
HsqlName name = object.getName();
OrderedHashSet set = object.getReferences();
if (set == null) {
return;
}
for (int i = 0; i < set.size(); i++) {
HsqlName referenced = (HsqlName) set.get(i);
if (object instanceof Routine) {
name = ((Routine) object).getSpecificName();
}
referenceMap.remove(referenced, name);
}
}
private void removeTableDependentReferences(Table table) {
OrderedHashSet mainSet = table.getReferencesForDependents();
if (mainSet == null) {
return;
}
for (int i = 0; i < mainSet.size(); i++) {
HsqlName name = (HsqlName) mainSet.get(i);
SchemaObject object = null;
switch (name.type) {
case SchemaObject.CONSTRAINT :
object = table.getConstraint(name.name);
break;
case SchemaObject.TRIGGER :
object = table.getTrigger(name.name);
break;
case SchemaObject.COLUMN :
object = table.getColumn(table.getColumnIndex(name.name));
break;
}
removeReferencesFrom(object);
}
}
public OrderedHashSet getReferencesTo(HsqlName object) {
readLock.lock();
try {
OrderedHashSet set = new OrderedHashSet();
Iterator it = referenceMap.get(object);
while (it.hasNext()) {
HsqlName name = (HsqlName) it.next();
set.add(name);
}
return set;
} finally {
readLock.unlock();
}
}
public OrderedHashSet getReferencesTo(HsqlName table, HsqlName column) {
readLock.lock();
try {
OrderedHashSet set = new OrderedHashSet();
Iterator it = referenceMap.get(table);
while (it.hasNext()) {
HsqlName name = (HsqlName) it.next();
SchemaObject object = getSchemaObject(name);
OrderedHashSet references = object.getReferences();
if (references.contains(column)) {
set.add(name);
}
}
return set;
} finally {
readLock.unlock();
}
}
private boolean isReferenced(HsqlName object) {
writeLock.lock();
try {
return referenceMap.containsKey(object);
} finally {
writeLock.unlock();
}
}
//
public void getCascadingReferencesTo(HsqlName object, OrderedHashSet set) {
readLock.lock();
try {
OrderedHashSet newSet = new OrderedHashSet();
Iterator it = referenceMap.get(object);
while (it.hasNext()) {
HsqlName name = (HsqlName) it.next();
boolean added = set.add(name);
if (added) {
newSet.add(name);
}
}
for (int i = 0; i < newSet.size(); i++) {
HsqlName name = (HsqlName) newSet.get(i);
getCascadingReferencesTo(name, set);
}
} finally {
readLock.unlock();
}
}
public void getCascadingReferencesToSchema(HsqlName schema,
OrderedHashSet set) {
Iterator mainIterator = referenceMap.keySet().iterator();
while (mainIterator.hasNext()) {
HsqlName name = (HsqlName) mainIterator.next();
if (name.schema != schema) {
continue;
}
getCascadingReferencesTo(name, set);
}
for (int i = 0; i < set.size(); i++) {
HsqlName name = (HsqlName) set.get(i);
if (name.schema == schema) {
set.remove(i);
i--;
}
}
}
public MultiValueHashMap getReferencesToSchema(String schemaName) {
MultiValueHashMap map = new MultiValueHashMap();
Iterator mainIterator = referenceMap.keySet().iterator();
while (mainIterator.hasNext()) {
HsqlName name = (HsqlName) mainIterator.next();
if (!name.schema.name.equals(schemaName)) {
continue;
}
Iterator it = referenceMap.get(name);
while (it.hasNext()) {
map.put(name, it.next());
}
}
return map;
}
//
public HsqlName getSchemaObjectName(HsqlName schemaName, String name,
int type, boolean raise) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(schemaName.name);
SchemaObjectSet set = null;
if (schema == null) {
if (raise) {
throw Error.error(SchemaObjectSet.getGetErrorCode(type));
} else {
return null;
}
}
if (type == SchemaObject.ROUTINE) {
set = schema.functionLookup;
SchemaObject object = schema.functionLookup.getObject(name);
if (object == null) {
set = schema.procedureLookup;
object = schema.procedureLookup.getObject(name);
}
} else {
set = getSchemaObjectSet(schema, type);
}
if (raise) {
set.checkExists(name);
}
return set.getName(name);
} finally {
readLock.unlock();
}
}
public SchemaObject getSchemaObject(HsqlName name) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(name.schema.name);
if (schema == null) {
return null;
}
switch (name.type) {
case SchemaObject.SEQUENCE :
return (SchemaObject) schema.sequenceList.get(name.name);
case SchemaObject.TABLE :
case SchemaObject.VIEW :
return (SchemaObject) schema.tableList.get(name.name);
case SchemaObject.CHARSET :
return schema.charsetLookup.getObject(name.name);
case SchemaObject.COLLATION :
return schema.collationLookup.getObject(name.name);
case SchemaObject.PROCEDURE :
return schema.procedureLookup.getObject(name.name);
case SchemaObject.FUNCTION :
return schema.functionLookup.getObject(name.name);
case RoutineSchema.SPECIFIC_ROUTINE :
return schema.specificRoutineLookup.getObject(name.name);
case RoutineSchema.ROUTINE :
SchemaObject object =
schema.functionLookup.getObject(name.name);
if (object == null) {
object = schema.procedureLookup.getObject(name.name);
}
return object;
case SchemaObject.DOMAIN :
case SchemaObject.TYPE :
return schema.typeLookup.getObject(name.name);
case SchemaObject.TRIGGER : {
name = schema.triggerLookup.getName(name.name);
if (name == null) {
return null;
}
HsqlName tableName = name.parent;
Table table = (Table) schema.tableList.get(tableName.name);
return table.getTrigger(name.name);
}
case SchemaObject.CONSTRAINT : {
name = schema.constraintLookup.getName(name.name);
if (name == null) {
return null;
}
HsqlName tableName = name.parent;
Table table = (Table) schema.tableList.get(tableName.name);
return table.getConstraint(name.name);
}
case SchemaObject.ASSERTION :
return null;
case SchemaObject.INDEX :
name = schema.indexLookup.getName(name.name);
if (name == null) {
return null;
}
HsqlName tableName = name.parent;
Table table = (Table) schema.tableList.get(tableName.name);
return table.getIndex(name.name);
}
return null;
} finally {
readLock.unlock();
}
}
public void checkColumnIsReferenced(HsqlName tableName, HsqlName name) {
OrderedHashSet set = getReferencesTo(tableName, name);
if (!set.isEmpty()) {
HsqlName objectName = (HsqlName) set.get(0);
throw Error.error(ErrorCode.X_42502,
objectName.getSchemaQualifiedStatementName());
}
}
public void checkObjectIsReferenced(HsqlName name) {
OrderedHashSet set = getReferencesTo(name);
HsqlName refName = null;
for (int i = 0; i < set.size(); i++) {
refName = (HsqlName) set.get(i);
// except columns of same table
if (refName.parent != name) {
break;
}
refName = null;
}
if (refName == null) {
return;
}
int errorCode = ErrorCode.X_42502;
if (refName.type == SchemaObject.ConstraintTypes.FOREIGN_KEY) {
errorCode = ErrorCode.X_42533;
}
throw Error.error(errorCode,
refName.getSchemaQualifiedStatementName());
}
public void checkSchemaNameCanChange(HsqlName name) {
readLock.lock();
try {
Iterator it = referenceMap.values().iterator();
HsqlName refName = null;
mainLoop:
while (it.hasNext()) {
refName = (HsqlName) it.next();
switch (refName.type) {
case SchemaObject.VIEW :
case SchemaObject.ROUTINE :
case SchemaObject.FUNCTION :
case SchemaObject.PROCEDURE :
case SchemaObject.TRIGGER :
case SchemaObject.SPECIFIC_ROUTINE :
if (refName.schema == name) {
break mainLoop;
}
break;
default :
break;
}
refName = null;
}
if (refName == null) {
return;
}
throw Error.error(ErrorCode.X_42502,
refName.getSchemaQualifiedStatementName());
} finally {
readLock.unlock();
}
}
public void addSchemaObject(SchemaObject object) {
writeLock.lock();
try {
HsqlName name = object.getName();
Schema schema = (Schema) schemaMap.get(name.schema.name);
SchemaObjectSet set = getSchemaObjectSet(schema, name.type);
switch (name.type) {
case SchemaObject.PROCEDURE :
case SchemaObject.FUNCTION : {
RoutineSchema routine =
(RoutineSchema) set.getObject(name.name);
if (routine == null) {
routine = new RoutineSchema(name.type, name);
routine.addSpecificRoutine(database, (Routine) object);
set.checkAdd(name);
SchemaObjectSet specificSet =
getSchemaObjectSet(schema,
SchemaObject.SPECIFIC_ROUTINE);
specificSet.checkAdd(
((Routine) object).getSpecificName());
set.add(routine);
specificSet.add(object);
} else {
SchemaObjectSet specificSet =
getSchemaObjectSet(schema,
SchemaObject.SPECIFIC_ROUTINE);
HsqlName specificName =
((Routine) object).getSpecificName();
if (specificName != null) {
specificSet.checkAdd(specificName);
}
routine.addSpecificRoutine(database, (Routine) object);
specificSet.add(object);
}
addReferencesFrom(object);
return;
}
case SchemaObject.TABLE : {
OrderedHashSet refs =
((Table) object).getReferencesForDependents();
for (int i = 0; i < refs.size(); i++) {
HsqlName ref = (HsqlName) refs.get(i);
switch (ref.type) {
case SchemaObject.COLUMN : {
int index =
((Table) object).findColumn(ref.name);
ColumnSchema column =
((Table) object).getColumn(index);
addSchemaObject(column);
break;
}
}
}
break;
}
case SchemaObject.COLUMN : {
if (object.getReferences().isEmpty()) {
return;
}
break;
}
}
if (set != null) {
set.add(object);
}
addReferencesFrom(object);
} finally {
writeLock.unlock();
}
}
public void removeSchemaObject(HsqlName name, boolean cascade) {
writeLock.lock();
try {
OrderedHashSet objectSet = new OrderedHashSet();
switch (name.type) {
case SchemaObject.ROUTINE :
case SchemaObject.PROCEDURE :
case SchemaObject.FUNCTION : {
RoutineSchema routine =
(RoutineSchema) getSchemaObject(name);
if (routine != null) {
Routine[] specifics = routine.getSpecificRoutines();
for (int i = 0; i < specifics.length; i++) {
getCascadingReferencesTo(
specifics[i].getSpecificName(), objectSet);
}
}
}
break;
case SchemaObject.SEQUENCE :
case SchemaObject.TABLE :
case SchemaObject.VIEW :
case SchemaObject.TYPE :
case SchemaObject.CHARSET :
case SchemaObject.COLLATION :
case SchemaObject.SPECIFIC_ROUTINE :
getCascadingReferencesTo(name, objectSet);
break;
case SchemaObject.DOMAIN :
OrderedHashSet set = getReferencesTo(name);
Iterator it = set.iterator();
while (it.hasNext()) {
HsqlName ref = (HsqlName) it.next();
if (ref.type == SchemaObject.COLUMN) {
it.remove();
}
}
if (!set.isEmpty()) {
HsqlName objectName = (HsqlName) set.get(0);
throw Error.error(
ErrorCode.X_42502,
objectName.getSchemaQualifiedStatementName());
}
break;
}
if (objectSet.isEmpty()) {
removeSchemaObject(name);
return;
}
if (!cascade) {
HsqlName objectName = (HsqlName) objectSet.get(0);
throw Error.error(
ErrorCode.X_42502,
objectName.getSchemaQualifiedStatementName());
}
objectSet.add(name);
removeSchemaObjects(objectSet);
} finally {
writeLock.unlock();
}
}
public void removeSchemaObjects(OrderedHashSet set) {
writeLock.lock();
try {
for (int i = 0; i < set.size(); i++) {
HsqlName name = (HsqlName) set.get(i);
removeSchemaObject(name);
}
} finally {
writeLock.unlock();
}
}
public void removeSchemaObject(HsqlName name) {
writeLock.lock();
try {
Schema schema = (Schema) schemaMap.get(name.schema.name);
SchemaObject object = null;
SchemaObjectSet set = null;
switch (name.type) {
case SchemaObject.SEQUENCE :
set = schema.sequenceLookup;
object = set.getObject(name.name);
break;
case SchemaObject.TABLE :
case SchemaObject.VIEW : {
set = schema.tableLookup;
object = set.getObject(name.name);
break;
}
case SchemaObject.COLUMN : {
Table table = (Table) getSchemaObject(name.parent);
if (table != null) {
object =
table.getColumn(table.getColumnIndex(name.name));
}
break;
}
case SchemaObject.CHARSET :
set = schema.charsetLookup;
object = set.getObject(name.name);
break;
case SchemaObject.COLLATION :
set = schema.collationLookup;
object = set.getObject(name.name);
break;
case SchemaObject.PROCEDURE : {
set = schema.procedureLookup;
RoutineSchema routine =
(RoutineSchema) set.getObject(name.name);
object = routine;
Routine[] specifics = routine.getSpecificRoutines();
for (int i = 0; i < specifics.length; i++) {
removeSchemaObject(specifics[i].getSpecificName());
}
break;
}
case SchemaObject.FUNCTION : {
set = schema.functionLookup;
RoutineSchema routine =
(RoutineSchema) set.getObject(name.name);
object = routine;
Routine[] specifics = routine.getSpecificRoutines();
for (int i = 0; i < specifics.length; i++) {
removeSchemaObject(specifics[i].getSpecificName());
}
break;
}
case SchemaObject.SPECIFIC_ROUTINE : {
set = schema.specificRoutineLookup;
Routine routine = (Routine) set.getObject(name.name);
object = routine;
routine.routineSchema.removeSpecificRoutine(routine);
if (routine.routineSchema.getSpecificRoutines().length
== 0) {
removeSchemaObject(routine.getName());
}
break;
}
case SchemaObject.DOMAIN :
case SchemaObject.TYPE :
set = schema.typeLookup;
object = set.getObject(name.name);
break;
case SchemaObject.INDEX :
set = schema.indexLookup;
break;
case SchemaObject.CONSTRAINT : {
set = schema.constraintLookup;
if (name.parent.type == SchemaObject.TABLE) {
Table table =
(Table) schema.tableList.get(name.parent.name);
object = table.getConstraint(name.name);
table.removeConstraint(name.name);
} else if (name.parent.type == SchemaObject.DOMAIN) {
Type type = (Type) schema.typeLookup.getObject(
name.parent.name);
object =
type.userTypeModifier.getConstraint(name.name);
type.userTypeModifier.removeConstraint(name.name);
}
break;
}
case SchemaObject.TRIGGER : {
set = schema.triggerLookup;
Table table =
(Table) schema.tableList.get(name.parent.name);
object = table.getTrigger(name.name);
if (object != null) {
table.removeTrigger((TriggerDef) object);
}
break;
}
default :
throw Error.runtimeError(ErrorCode.U_S0500,
"SchemaManager");
}
if (object != null) {
database.getGranteeManager().removeDbObject(name);
removeReferencesFrom(object);
}
if (set != null) {
set.remove(name.name);
}
removeReferencesTo(name);
} finally {
writeLock.unlock();
}
}
public void renameSchemaObject(HsqlName name, HsqlName newName) {
writeLock.lock();
try {
if (name.schema != newName.schema) {
throw Error.error(ErrorCode.X_42505, newName.schema.name);
}
checkObjectIsReferenced(name);
Schema schema = (Schema) schemaMap.get(name.schema.name);
SchemaObjectSet set = getSchemaObjectSet(schema, name.type);
set.rename(name, newName);
} finally {
writeLock.unlock();
}
}
public void replaceReferences(SchemaObject oldObject,
SchemaObject newObject) {
writeLock.lock();
try {
removeReferencesFrom(oldObject);
addReferencesFrom(newObject);
} finally {
writeLock.unlock();
}
}
public String[] getSQLArray() {
readLock.lock();
try {
OrderedHashSet resolved = new OrderedHashSet();
OrderedHashSet unresolved = new OrderedHashSet();
HsqlArrayList list = new HsqlArrayList();
Iterator schemas = schemaMap.values().iterator();
schemas = schemaMap.values().iterator();
while (schemas.hasNext()) {
Schema schema = (Schema) schemas.next();
if (SqlInvariants.isSystemSchemaName(schema.getName().name)) {
continue;
}
if (SqlInvariants.isLobsSchemaName(schema.getName().name)) {
continue;
}
list.add(schema.getSQL());
schema.addSimpleObjects(unresolved);
}
while (true) {
Iterator it = unresolved.iterator();
if (!it.hasNext()) {
break;
}
OrderedHashSet newResolved = new OrderedHashSet();
SchemaObjectSet.addAllSQL(resolved, unresolved, list, it,
newResolved);
unresolved.removeAll(newResolved);
if (newResolved.size() == 0) {
break;
}
}
schemas = schemaMap.values().iterator();
while (schemas.hasNext()) {
Schema schema = (Schema) schemas.next();
if (SqlInvariants.isLobsSchemaName(schema.getName().name)) {
continue;
}
if (SqlInvariants.isSystemSchemaName(schema.getName().name)) {
continue;
}
list.addAll(schema.getSQLArray(resolved, unresolved));
}
while (true) {
Iterator it = unresolved.iterator();
if (!it.hasNext()) {
break;
}
OrderedHashSet newResolved = new OrderedHashSet();
SchemaObjectSet.addAllSQL(resolved, unresolved, list, it,
newResolved);
unresolved.removeAll(newResolved);
if (newResolved.size() == 0) {
break;
}
}
Iterator it = unresolved.iterator();
while (it.hasNext()) {
SchemaObject object = (SchemaObject) it.next();
if (object instanceof Routine) {
list.add(((Routine) object).getSQLDeclaration());
}
}
it = unresolved.iterator();
while (it.hasNext()) {
SchemaObject object = (SchemaObject) it.next();
if (object instanceof Routine) {
list.add(((Routine) object).getSQLAlter());
} else {
list.add(object.getSQL());
}
}
schemas = schemaMap.values().iterator();
while (schemas.hasNext()) {
Schema schema = (Schema) schemas.next();
if (SqlInvariants.isLobsSchemaName(schema.getName().name)) {
continue;
}
if (SqlInvariants.isSystemSchemaName(schema.getName().name)) {
continue;
}
String[] t = schema.getTriggerSQL();
if (t.length > 0) {
list.add(Schema.getSetSchemaSQL(schema.getName()));
list.addAll(t);
}
}
schemas = schemaMap.values().iterator();
while (schemas.hasNext()) {
Schema schema = (Schema) schemas.next();
list.addAll(schema.getSequenceRestartSQL());
}
if (defaultSchemaHsqlName != null) {
StringBuffer sb = new StringBuffer();
sb.append(Tokens.T_SET).append(' ').append(Tokens.T_DATABASE);
sb.append(' ').append(Tokens.T_DEFAULT).append(' ');
sb.append(Tokens.T_INITIAL).append(' ').append(
Tokens.T_SCHEMA);
sb.append(' ').append(defaultSchemaHsqlName.statementName);
list.add(sb.toString());
}
String[] array = new String[list.size()];
list.toArray(array);
return array;
} finally {
readLock.unlock();
}
}
public String[] getTablePropsSQL(boolean withHeader) {
readLock.lock();
try {
HsqlArrayList tableList = getAllTables(false);
HsqlArrayList list = new HsqlArrayList();
for (int i = 0; i < tableList.size(); i++) {
Table t = (Table) tableList.get(i);
if (t.isText()) {
String[] ddl = t.getSQLForTextSource(withHeader);
list.addAll(ddl);
}
String ddl = t.getSQLForReadOnly();
if (ddl != null) {
list.add(ddl);
}
if (t.isCached()) {
ddl = t.getSQLForClustered();
if (ddl != null) {
list.add(ddl);
}
}
}
String[] array = new String[list.size()];
list.toArray(array);
return array;
} finally {
readLock.unlock();
}
}
public String[] getIndexRootsSQL() {
readLock.lock();
try {
Session sysSession = database.sessionManager.getSysSession();
long[][] rootsArray = getIndexRoots(sysSession);
HsqlArrayList tableList = getAllTables(true);
HsqlArrayList list = new HsqlArrayList();
for (int i = 0; i < rootsArray.length; i++) {
Table t = (Table) tableList.get(i);
if (rootsArray[i] != null && rootsArray[i].length > 0
&& rootsArray[i][0] != -1) {
String ddl = ((Table) tableList.get(i)).getIndexRootsSQL(
rootsArray[i]);
list.add(ddl);
}
}
String[] array = new String[list.size()];
list.toArray(array);
return array;
} finally {
readLock.unlock();
}
}
public String[] getCommentsArray() {
readLock.lock();
try {
HsqlArrayList tableList = getAllTables(false);
HsqlArrayList list = new HsqlArrayList();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < tableList.size(); i++) {
Table table = (Table) tableList.get(i);
if (table.getTableType() == Table.INFO_SCHEMA_TABLE) {
continue;
}
int colCount = table.getColumnCount();
for (int j = 0; j < colCount; j++) {
ColumnSchema column = table.getColumn(j);
if (column.getName().comment == null) {
continue;
}
sb.setLength(0);
sb.append(Tokens.T_COMMENT).append(' ').append(
Tokens.T_ON);
sb.append(' ').append(Tokens.T_COLUMN).append(' ');
sb.append(
table.getName().getSchemaQualifiedStatementName());
sb.append('.').append(column.getName().statementName);
sb.append(' ').append(Tokens.T_IS).append(' ');
sb.append(
StringConverter.toQuotedString(
column.getName().comment, '\'', true));
list.add(sb.toString());
}
if (table.getName().comment == null) {
continue;
}
sb.setLength(0);
sb.append(Tokens.T_COMMENT).append(' ').append(Tokens.T_ON);
sb.append(' ').append(Tokens.T_TABLE).append(' ');
sb.append(table.getName().getSchemaQualifiedStatementName());
sb.append(' ').append(Tokens.T_IS).append(' ');
sb.append(
StringConverter.toQuotedString(
table.getName().comment, '\'', true));
list.add(sb.toString());
}
Iterator it = databaseObjectIterator(SchemaObject.ROUTINE);
while (it.hasNext()) {
SchemaObject object = (SchemaObject) it.next();
if (object.getName().comment == null) {
continue;
}
sb.setLength(0);
sb.append(Tokens.T_COMMENT).append(' ').append(Tokens.T_ON);
sb.append(' ').append(Tokens.T_ROUTINE).append(' ');
sb.append(object.getName().getSchemaQualifiedStatementName());
sb.append(' ').append(Tokens.T_IS).append(' ');
sb.append(
StringConverter.toQuotedString(
object.getName().comment, '\'', true));
list.add(sb.toString());
}
String[] array = new String[list.size()];
list.toArray(array);
return array;
} finally {
readLock.unlock();
}
}
long[][] tempIndexRoots;
public void setTempIndexRoots(long[][] roots) {
tempIndexRoots = roots;
}
public long[][] getIndexRoots(Session session) {
readLock.lock();
try {
if (tempIndexRoots != null) {
long[][] roots = tempIndexRoots;
tempIndexRoots = null;
return roots;
}
HsqlArrayList allTables = getAllTables(true);
HsqlArrayList list = new HsqlArrayList();
for (int i = 0, size = allTables.size(); i < size; i++) {
Table t = (Table) allTables.get(i);
if (t.getTableType() == TableBase.CACHED_TABLE) {
long[] roots = t.getIndexRootsArray();
list.add(roots);
} else {
list.add(null);
}
}
long[][] array = new long[list.size()][];
list.toArray(array);
return array;
} finally {
readLock.unlock();
}
}
/**
* called after the completion of defrag
*/
public void setIndexRoots(long[][] roots) {
readLock.lock();
try {
HsqlArrayList allTables =
database.schemaManager.getAllTables(true);
for (int i = 0, size = allTables.size(); i < size; i++) {
Table t = (Table) allTables.get(i);
if (t.getTableType() == TableBase.CACHED_TABLE) {
long[] rootsArray = roots[i];
if (roots != null) {
t.setIndexRoots(rootsArray);
}
}
}
} finally {
readLock.unlock();
}
}
public void setDefaultTableType(int type) {
defaultTableType = type;
}
public int getDefaultTableType() {
return defaultTableType;
}
public void createSystemTables() {
dualTable = TableUtil.newSingleColumnTable(database,
SqlInvariants.DUAL_TABLE_HSQLNAME, TableBase.SYSTEM_TABLE,
SqlInvariants.DUAL_COLUMN_HSQLNAME, Type.SQL_VARCHAR);
dualTable.insertSys(database.sessionManager.getSysSession(),
dualTable.getRowStore(null), new Object[]{ "X" });
dualTable.setDataReadOnly(true);
Type[] columnTypes = new Type[] {
Type.SQL_BIGINT, Type.SQL_BIGINT, Type.SQL_BIGINT,
TypeInvariants.SQL_IDENTIFIER, TypeInvariants.SQL_IDENTIFIER,
Type.SQL_BOOLEAN
};
HsqlName tableName = database.nameManager.getSubqueryTableName();
HashMappedList columnList = new HashMappedList();
for (int i = 0; i < columnTypes.length; i++) {
HsqlName name = database.nameManager.getAutoColumnName(i + 1);
ColumnSchema column = new ColumnSchema(name, columnTypes[i], true,
false, null);
columnList.add(name.name, column);
}
dataChangeTable = new TableDerived(database, tableName,
TableBase.CHANGE_SET_TABLE,
columnTypes, columnList,
new int[]{ 0 });
dataChangeTable.createIndexForColumns(null, new int[]{ 1 });
}
}
| mit |
sunyoboy/java-tutorial | Online/src/main/java/com/lieve/online/shiro/dao/RoleDaoImpl.java | 2993 | package com.lieve.online.shiro.dao;
import com.lieve.online.shiro.JdbcTemplateUtils;
import com.lieve.online.shiro.entity.Role;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.PreparedStatementCreator;
import org.springframework.jdbc.support.GeneratedKeyHolder;
import org.springframework.stereotype.Repository;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
/**
* <p>User: Zhang Kaitao
* <p>Date: 14-1-28
* <p>Version: 1.0
*/
@Repository("roleDao")
public class RoleDaoImpl implements RoleDao {
private JdbcTemplate jdbcTemplate = JdbcTemplateUtils.jdbcTemplate();
public Role createRole(final Role Role) {
final String sql = "insert into sys_roles(role, description, available) values(?,?,?)";
GeneratedKeyHolder keyHolder = new GeneratedKeyHolder();
jdbcTemplate.update(new PreparedStatementCreator() {
@Override
public PreparedStatement createPreparedStatement(Connection connection) throws SQLException {
PreparedStatement psst = connection.prepareStatement(sql, new String[] { "id" });
psst.setString(1, Role.getRole());
psst.setString(2, Role.getDescription());
psst.setBoolean(3, Role.getAvailable());
return psst;
}
}, keyHolder);
Role.setId(keyHolder.getKey().longValue());
return Role;
}
public void deleteRole(Long roleId) {
//首先把和role关联的相关表数据删掉
String sql = "delete from sys_users_roles where role_id=?";
jdbcTemplate.update(sql, roleId);
sql = "delete from sys_roles where id=?";
jdbcTemplate.update(sql, roleId);
}
@Override
public void correlationPermissions(Long roleId, Long... permissionIds) {
if(permissionIds == null || permissionIds.length == 0) {
return;
}
String sql = "insert into sys_roles_permissions(role_id, permission_id) values(?,?)";
for(Long permissionId : permissionIds) {
if(!exists(roleId, permissionId)) {
jdbcTemplate.update(sql, roleId, permissionId);
}
}
}
@Override
public void uncorrelationPermissions(Long roleId, Long... permissionIds) {
if(permissionIds == null || permissionIds.length == 0) {
return;
}
String sql = "delete from sys_roles_permissions where role_id=? and permission_id=?";
for(Long permissionId : permissionIds) {
if(exists(roleId, permissionId)) {
jdbcTemplate.update(sql, roleId, permissionId);
}
}
}
private boolean exists(Long roleId, Long permissionId) {
String sql = "select count(1) from sys_roles_permissions where role_id=? and permission_id=?";
return jdbcTemplate.queryForObject(sql, Integer.class, roleId, permissionId) != 0;
}
}
| mit |
tkyaji/AdSwitcher | AdSwitcher-Android/app/src/main/java/net/adswitcher/sample/VideoFragment.java | 1519 | package net.adswitcher.sample;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import net.adswitcher.AdSwitcherInterstitial;
import net.adswitcher.config.AdSwitcherConfigLoader;
public class VideoFragment extends Fragment {
private Activity activity;
private static AdSwitcherInterstitial video;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
View view = inflater.inflate(R.layout.fragment_video, container, false);
if (video == null) {
video = new AdSwitcherInterstitial(this.activity, AdSwitcherConfigLoader.getInstance(), "video", true);
}
view.findViewById(R.id.button_showVideo).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
VideoFragment.this.activity.runOnUiThread(new Runnable() {
@Override
public void run() {
video.show();
}
});
}
});
return view;
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
this.activity = (Activity)context;
}
}
| mit |
mikrut/per-aspera-ad-diploma | app/src/main/java/ru/mail/park/chat/activities/tasks/ActivateContactTask.java | 1294 | package ru.mail.park.chat.activities.tasks;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.widget.Toast;
import java.io.IOException;
import ru.mail.park.chat.activities.ProfileViewActivity;
import ru.mail.park.chat.api.rest.Contacts;
/**
* Created by Михаил on 14.05.2016.
*/
public class ActivateContactTask extends AsyncTask<String, Void, String> {
private final Context context;
public ActivateContactTask(Context context) {
this.context = context;
}
@Override
protected String doInBackground(String... params) {
final String uid = params[0];
Contacts contacts = new Contacts(context);
try {
contacts.activateContact(uid);
return uid;
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(String uid) {
if (uid != null) {
Intent intent = new Intent(context, ProfileViewActivity.class);
intent.putExtra(ProfileViewActivity.UID_EXTRA, uid);
context.startActivity(intent);
} else {
Toast.makeText(context, "Failed to activate contact", Toast.LENGTH_SHORT).show();
}
}
}
| mit |
Adar/dacato | src/main/java/co/ecso/dacato/database/query/Updater.java | 4321 | package co.ecso.dacato.database.query;
import co.ecso.dacato.config.ConfigGetter;
import co.ecso.dacato.database.querywrapper.DatabaseField;
import co.ecso.dacato.database.querywrapper.SingleColumnUpdateQuery;
import co.ecso.dacato.database.transaction.Transaction;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* Updater.
*
* @param <T> Type of update, p.e. Long -> Type of query.
* @author Christian Scharmach (cs@e-cs.co)
* @since 11.09.16
*/
public interface Updater<T> extends ConfigGetter, StatementPreparer {
/**
* Statement filler.
*
* @return Statement filler.
*/
default StatementFiller statementFiller() {
return new StatementFiller() {
};
}
/**
* Update entry.
*
* @param query Query.
* @param validityCheck Validity check callback.
* @return Number of affected rows.
*/
default CompletableFuture<Integer> update(SingleColumnUpdateQuery<T> query, Callable<AtomicBoolean> validityCheck) {
final CompletableFuture<Integer> returnValueFuture = new CompletableFuture<>();
try {
if (!validityCheck.call().get()) {
returnValueFuture.completeExceptionally(new IllegalArgumentException("Object already destroyed"));
return returnValueFuture;
}
} catch (final Exception e) {
returnValueFuture.completeExceptionally(e);
return returnValueFuture;
}
final List<DatabaseField<?>> newArr = new LinkedList<>();
newArr.addAll(query.columnValuesToSet().keySet());
newArr.add(query.whereColumn());
final List<Object> values = new LinkedList<>();
CompletableFuture.runAsync(() -> {
Connection c = null;
Integer result = null;
try {
final String finalQuery = String.format(query.query(), newArr.toArray());
c = connection();
if (c == null) {
throw new SQLException("Could not obtain connection");
}
try (final PreparedStatement stmt = this.prepareStatement(finalQuery, c, this.statementOptions())) {
query.columnValuesToSet().values().forEach(values::add);
values.add(query.whereValue());
result = getResult(finalQuery,
statementFiller().fillStatement(finalQuery, newArr, values, stmt, c), c);
}
} catch (final Exception e) {
returnValueFuture.completeExceptionally(e);
} finally {
if (c != null && transaction() == null) {
try {
c.close();
} catch (final SQLException e) {
returnValueFuture.completeExceptionally(e);
}
}
if (!returnValueFuture.isCompletedExceptionally()) {
returnValueFuture.complete(result);
}
}
}, config().threadPool());
return returnValueFuture;
}
default Transaction transaction() {
return null;
}
default Connection connection() throws SQLException {
return config().databaseConnectionPool().getConnection();
}
int statementOptions();
/**
* Get result.
*
* @param stmt Statement.
* @param c Connection.
* @return Result.
* @throws SQLException if query fails.
*/
default int getResult(final String finalQuery, final PreparedStatement stmt, final Connection c)
throws SQLException {
synchronized (c) {
if (stmt.isClosed()) {
throw new SQLException(String.format("Statement %s closed unexpectedly", stmt.toString()));
}
try {
return stmt.executeUpdate();
} catch (final SQLException e) {
throw new SQLException(String.format("%s, query %s", e.getMessage(), finalQuery), e);
}
}
}
}
| mit |
pshynin/JavaRushTasks | 2.JavaCore/src/com/javarush/task/task18/task1818/Solution.java | 1023 | package com.javarush.task.task18.task1818;
/*
Два в одном
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String file1 = reader.readLine();
String file2 = reader.readLine();
String file3 = reader.readLine();
FileOutputStream output1 = new FileOutputStream(file1);
FileInputStream input2 = new FileInputStream(file2);
FileInputStream input3 = new FileInputStream(file3);
while (input2.available() > 0) {
byte[] buf = new byte[input2.available()];
input2.read(buf);
output1.write(buf);
}
while (input3.available() > 0) {
byte[] buf = new byte[input3.available()];
input3.read(buf);
output1.write(buf);
}
reader.close();
output1.close();
input2.close();
input3.close();
}
}
| mit |
robin92/tw4a | app/src/main/java/pl/rbolanowski/tw4a/TaskListFragment.java | 9227 | package pl.rbolanowski.tw4a;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.support.v4.content.FileProvider;
import android.view.*;
import android.widget.*;
import java.io.*;
import java.util.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import com.google.inject.Inject;
import roboguice.fragment.RoboListFragment;
import roboguice.inject.InjectView;
import pl.rbolanowski.tw4a.backend.BackendFactory;
import pl.rbolanowski.tw4a.backend.Database;
import static android.view.ContextMenu.ContextMenuInfo;
import static android.widget.AdapterView.AdapterContextMenuInfo;
import static pl.rbolanowski.tw4a.TaskComparators.*;
import static pl.rbolanowski.tw4a.backend.Database.*;
public class TaskListFragment
extends RoboListFragment
implements
TaskDialog.OnTaskChangedListener,
View.OnClickListener {
private static final String LOG_TAG = TaskListFragment.class.getSimpleName();
private static Vector<Task> vectorOf(Task... tasks) {
Vector<Task> result = new Vector<Task>();
for (Task task : tasks) result.add(task);
return result;
}
private class ContextMenuHandler {
private Database mDatabase;
private ContextMenuHandler() {
mDatabase = mBackend.newDatabase();
}
public boolean onItemSelected(MenuItem item) {
AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
switch (item.getItemId()) {
case R.id.done: return handleCompleteTask(info);
case R.id.edit: return handleEditTask(info);
default: return handleNotImplementedFeature();
}
}
private boolean handleCompleteTask(AdapterContextMenuInfo info) {
completeTask((Task) mTaskAdapter.getItem(info.position));
mTaskAdapter.notifyDataSetInvalidated();
registerAdapter();
return true;
}
private boolean handleEditTask(AdapterContextMenuInfo info) {
Task currentTask = (Task) mTaskAdapter.getItem(info.position);
Bundle bundle = new Bundle();
bundle.putParcelable("current task", currentTask);
TaskDialog dialog = new TaskDialog();
dialog.setOnTaskChangedListener(TaskListFragment.this);
dialog.setArguments(bundle);
dialog.show(getActivity().getSupportFragmentManager(), "Add new task");
return true;
}
private void completeTask(Task task) {
try {
task.done = true;
mDatabase.update(task);
}
catch (Database.NotStoredException e) {
task.done = false;
throw new RuntimeException(e.toString());
}
}
private boolean handleNotImplementedFeature() {
Toast.makeText(getActivity(), R.string.not_implemented, Toast.LENGTH_SHORT).show();
return true;
}
}
private class QueryListener implements SearchView.OnQueryTextListener {
@Override
public boolean onQueryTextChange(String newText) {
if (newText == null || newText.equals("")) {
filterTasks(null);
return true;
}
filterTasks(newText);
return true;
}
@Override
public boolean onQueryTextSubmit(String query) {
filterTasks(query);
return true;
}
private void filterTasks(String query) {
mTaskAdapter.getFilter().filter(query);
}
}
@Inject private BackendFactory mBackend;
@InjectView(android.R.id.empty) private View mEmptyView;
@InjectView(R.id.add_button) private View mAddNewTaskButton;
private ContextMenuHandler mContextMenu;
private TaskAdapter mTaskAdapter;
private Vector<Task> mTasks;
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setHasOptionsMenu(true);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) {
return inflater.inflate(R.layout.fragment_task_list, container, false);
}
@Override
public void onViewCreated(View view, Bundle bundle) {
super.onViewCreated(view, bundle);
registerAdapter();
registerContextMenu();
registerClickListeners();
}
private void registerAdapter() {
mTasks = vectorOf(mBackend.newDatabase().select());
Collections.sort(mTasks, reverse(byUrgency()));
mTaskAdapter = new TaskAdapter(getActivity(), R.layout.task_list_element, mTasks);
setListAdapter(mTaskAdapter);
getListView().setEmptyView(mEmptyView);
}
private void registerContextMenu() {
mContextMenu = new ContextMenuHandler();
registerForContextMenu(getListView());
}
private void registerClickListeners() {
mAddNewTaskButton.setOnClickListener(this);
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.task_list_actions, menu);
SearchView searchView = (SearchView) menu.findItem(R.id.action_search).getActionView();
searchView.setOnQueryTextListener(new QueryListener());
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_export:
try {
exportInternalData();
}
catch (IOException err) {
System.err.println(err.toString());
}
break;
default:
Toast.makeText(getActivity(), R.string.not_implemented, Toast.LENGTH_SHORT).show();
break;
}
return true;
}
private void exportInternalData() throws IOException {
File file = new File(getActivity().getCacheDir(), Long.toString(System.currentTimeMillis()) + ".zip");
OutputStream outputStream = new FileOutputStream(file);
try {
ZipExportHandler handler = new ZipExportHandler(outputStream);
mBackend.newExporter().export(handler);
}
finally {
outputStream.close();
}
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(
Intent.EXTRA_STREAM,
FileProvider.getUriForFile(
getActivity(),
"pl.rbolanowski.tw4a",
new File(getActivity().getCacheDir(), file.getName())
));
shareIntent.setType("application/zip");
startActivity(Intent.createChooser(shareIntent, "Share"));
}
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
getActivity().getMenuInflater().inflate(R.menu.context_task, menu);
}
@Override
public boolean onContextItemSelected(MenuItem item) {
return mContextMenu.onItemSelected(item);
}
@Override
public void onTaskChanged(Task task) {
boolean result;
if (task.uuid == null) {
result = tryInsertTask(task, mBackend.newDatabase());
} else {
result = tryUpdateTask(task, mBackend.newDatabase());
}
if (result) {
mTaskAdapter.notifyDataSetInvalidated();
registerAdapter();
}
}
private static boolean tryInsertTask(Task task, Database database) {
try {
database.insert(task);
return true;
}
catch (AlreadyStoredException | IncompleteArgumentException e) {
Log.e(LOG_TAG, e.toString());
}
return false;
}
private static boolean tryUpdateTask(Task task, Database database) {
try {
database.update(task);
return true;
}
catch (NotStoredException e) {
Log.e(LOG_TAG, e.toString());
}
return false;
}
@Override
public void onClick(View view) {
showAddTaskDialog();
}
private void showAddTaskDialog() {
TaskDialog dialog = new TaskDialog();
dialog.setOnTaskChangedListener(TaskListFragment.this);
dialog.show(getActivity().getSupportFragmentManager(), "Add new task");
}
}
class ZipExportHandler implements pl.rbolanowski.tw4a.backend.Exporter.Handler {
private ZipOutputStream mOutputStream;
private LinkedList<String> mCachedNames = new LinkedList<>();
public ZipExportHandler(OutputStream outputStream) {
mOutputStream = new ZipOutputStream(outputStream);
}
@Override
public void onStreamReady(String name, InputStream inputStream) throws IOException {
try {
mOutputStream.putNextEntry(new ZipEntry(name));
Streams.copy(inputStream, mOutputStream);
}
finally {
mOutputStream.closeEntry();
mCachedNames.add(name);
}
}
}
| mit |
github/codeql | java/ql/test/stubs/guava-30.0/com/google/common/collect/RegularImmutableSortedSet.java | 2245 | // Generated automatically from com.google.common.collect.RegularImmutableSortedSet for testing purposes
package com.google.common.collect;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSortedSet;
import com.google.common.collect.UnmodifiableIterator;
import java.util.Collection;
import java.util.Comparator;
import java.util.Spliterator;
import java.util.function.Consumer;
class RegularImmutableSortedSet<E> extends ImmutableSortedSet<E>
{
protected RegularImmutableSortedSet() {}
Comparator<Object> unsafeComparator(){ return null; }
ImmutableList<E> createAsList(){ return null; }
ImmutableSortedSet<E> createDescendingSet(){ return null; }
ImmutableSortedSet<E> headSetImpl(E p0, boolean p1){ return null; }
ImmutableSortedSet<E> subSetImpl(E p0, boolean p1, E p2, boolean p3){ return null; }
ImmutableSortedSet<E> tailSetImpl(E p0, boolean p1){ return null; }
Object[] internalArray(){ return null; }
RegularImmutableSortedSet(ImmutableList<E> p0, Comparator<? super E> p1){}
RegularImmutableSortedSet<E> getSubSet(int p0, int p1){ return null; }
boolean isPartialView(){ return false; }
int copyIntoArray(Object[] p0, int p1){ return 0; }
int headIndex(E p0, boolean p1){ return 0; }
int indexOf(Object p0){ return 0; }
int internalArrayEnd(){ return 0; }
int internalArrayStart(){ return 0; }
int tailIndex(E p0, boolean p1){ return 0; }
public E ceiling(E p0){ return null; }
public E first(){ return null; }
public E floor(E p0){ return null; }
public E higher(E p0){ return null; }
public E last(){ return null; }
public E lower(E p0){ return null; }
public Spliterator<E> spliterator(){ return null; }
public UnmodifiableIterator<E> descendingIterator(){ return null; }
public UnmodifiableIterator<E> iterator(){ return null; }
public boolean contains(Object p0){ return false; }
public boolean containsAll(Collection<? extends Object> p0){ return false; }
public boolean equals(Object p0){ return false; }
public int size(){ return 0; }
public void forEach(Consumer<? super E> p0){}
static RegularImmutableSortedSet<Comparable> NATURAL_EMPTY_SET = null;
}
| mit |
liwangadd/Coding | app/src/main/java/com/nicolas/coding/login/ResetPasswordActivity.java | 489 | package com.nicolas.coding.login;
import com.nicolas.coding.R;
import com.nicolas.coding.common.Global;
import com.nicolas.coding.common.umeng.UmengEvent;
import org.androidannotations.annotations.EActivity;
@EActivity(R.layout.activity_reset_password_base)
public class ResetPasswordActivity extends ResetPasswordBaseActivity {
@Override
String getRequestHost() {
umengEvent(UmengEvent.USER, "重置密码");
return Global.HOST_API + "/resetPassword";
}
}
| mit |
desperateCoder/FileTo | src/main/java/de/c4/controller/TimestampUtil.java | 308 | package main.java.de.c4.controller;
import java.text.SimpleDateFormat;
import java.util.Date;
public class TimestampUtil {
private static final SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy HH.mm.ss");
public static String getCurrentTimestamp(){
return FORMAT.format(new Date());
}
}
| mit |
michal-michaluk/ddd-wro-warehouse | warehouse-model/src/main/java/warehouse/products/ValidationResult.java | 624 | package warehouse.products;
import lombok.Value;
import java.beans.ConstructorProperties;
import java.util.Collections;
import java.util.Set;
/**
* Created by michal on 22.10.2017.
*/
@Value
public class ValidationResult {
private final Set<String> violations;
public static ValidationResult valid() {
return new ValidationResult(Collections.emptySet());
}
public boolean isValid() {
return violations.isEmpty();
}
@ConstructorProperties({"violations"})
ValidationResult(Set<String> violations) {
this.violations = Collections.unmodifiableSet(violations);
}
}
| mit |
JOML-CI/joml-lwjgl3-demos | src/org/joml/lwjgl/ReflectDemo.java | 11094 | package org.joml.lwjgl;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.system.MemoryUtil.NULL;
import static org.lwjgl.system.MemoryUtil.memAddress;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import org.joml.Matrix4f;
import org.joml.Quaternionf;
import org.joml.Vector3f;
import org.joml.camera.ArcBallCamera;
import org.lwjgl.BufferUtils;
import org.lwjgl.glfw.*;
import org.lwjgl.opengl.*;
/**
* Showcases the use of
* {@link Matrix4f#reflect(Quaternionf, Vector3f) Matrix4f.reflect()} with stencil reflections.
* <p>
* This demo also makes use of joml-camera with the {@link ArcBallCamera}.
*
* @author Kai Burjack
*/
public class ReflectDemo {
GLFWErrorCallback errorCallback;
GLFWKeyCallback keyCallback;
GLFWFramebufferSizeCallback fbCallback;
GLFWCursorPosCallback cpCallback;
GLFWScrollCallback sCallback;
GLFWMouseButtonCallback mbCallback;
long window;
int width = 800;
int height = 600;
int x, y;
float zoom = 20;
int mouseX, mouseY;
boolean down;
void run() {
try {
init();
loop();
glfwDestroyWindow(window);
keyCallback.free();
fbCallback.free();
cpCallback.free();
sCallback.free();
mbCallback.free();
} finally {
glfwTerminate();
errorCallback.free();
}
}
ArcBallCamera cam = new ArcBallCamera();
void init() {
glfwSetErrorCallback(errorCallback = GLFWErrorCallback.createPrint(System.err));
if (!glfwInit())
throw new IllegalStateException("Unable to initialize GLFW");
// Configure our window
glfwDefaultWindowHints();
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);
glfwWindowHint(GLFW_SAMPLES, 4);
window = glfwCreateWindow(width, height, "Reflection Demo", NULL, NULL);
if (window == NULL)
throw new RuntimeException("Failed to create the GLFW window");
glfwSetKeyCallback(window, keyCallback = new GLFWKeyCallback() {
@Override
public void invoke(long window, int key, int scancode, int action, int mods) {
if (key == GLFW_KEY_ESCAPE && action == GLFW_RELEASE)
glfwSetWindowShouldClose(window, true);
}
});
glfwSetFramebufferSizeCallback(window, fbCallback = new GLFWFramebufferSizeCallback() {
@Override
public void invoke(long window, int w, int h) {
if (w > 0 && h > 0) {
width = w;
height = h;
}
}
});
glfwSetCursorPosCallback(window, cpCallback = new GLFWCursorPosCallback() {
@Override
public void invoke(long window, double xpos, double ypos) {
x = (int) xpos - width / 2;
y = height / 2 - (int) ypos;
}
});
glfwSetMouseButtonCallback(window, mbCallback = new GLFWMouseButtonCallback() {
@Override
public void invoke(long window, int button, int action, int mods) {
if (action == GLFW_PRESS) {
down = true;
mouseX = x;
mouseY = y;
} else if (action == GLFW_RELEASE) {
down = false;
}
}
});
glfwSetScrollCallback(window, sCallback = new GLFWScrollCallback() {
@Override
public void invoke(long window, double xoffset, double yoffset) {
if (yoffset > 0) {
zoom /= 1.1f;
} else {
zoom *= 1.1f;
}
}
});
GLFWVidMode vidmode = glfwGetVideoMode(glfwGetPrimaryMonitor());
glfwSetWindowPos(window, (vidmode.width() - width) / 2, (vidmode.height() - height) / 2);
IntBuffer framebufferSize = BufferUtils.createIntBuffer(2);
nglfwGetFramebufferSize(window, memAddress(framebufferSize), memAddress(framebufferSize) + 4);
width = framebufferSize.get(0);
height = framebufferSize.get(1);
glfwMakeContextCurrent(window);
glfwSwapInterval(0);
glfwShowWindow(window);
}
void renderMirror(boolean backside) {
glBegin(GL_QUADS);
glColor4f(1, 1, 1, 0.5f);
glVertex3f(-0.5f, -0.5f, 0.0f);
glVertex3f(0.5f, -0.5f, 0.0f);
glVertex3f(0.5f, 0.5f, 0.0f);
glVertex3f(-0.5f, 0.5f, 0.0f);
glEnd();
if (backside) {
glBegin(GL_QUADS);
glColor4f(0.5f, 0.5f, 0.5f, 1.0f);
glVertex3f(-0.5f, -0.5f, 0.0f);
glVertex3f(-0.5f, 0.5f, 0.0f);
glVertex3f(0.5f, 0.5f, 0.0f);
glVertex3f(0.5f, -0.5f, 0.0f);
glEnd();
}
}
void renderCube() {
glBegin(GL_QUADS);
glColor3f( 0.0f, 0.0f, 0.2f );
glVertex3f( 0.5f, -0.5f, -0.5f );
glVertex3f( -0.5f, -0.5f, -0.5f );
glVertex3f( -0.5f, 0.5f, -0.5f );
glVertex3f( 0.5f, 0.5f, -0.5f );
glColor3f( 0.0f, 0.0f, 1.0f );
glVertex3f( 0.5f, -0.5f, 0.5f );
glVertex3f( 0.5f, 0.5f, 0.5f );
glVertex3f( -0.5f, 0.5f, 0.5f );
glVertex3f( -0.5f, -0.5f, 0.5f );
glColor3f( 1.0f, 0.0f, 0.0f );
glVertex3f( 0.5f, -0.5f, -0.5f );
glVertex3f( 0.5f, 0.5f, -0.5f );
glVertex3f( 0.5f, 0.5f, 0.5f );
glVertex3f( 0.5f, -0.5f, 0.5f );
glColor3f( 0.2f, 0.0f, 0.0f );
glVertex3f( -0.5f, -0.5f, 0.5f );
glVertex3f( -0.5f, 0.5f, 0.5f );
glVertex3f( -0.5f, 0.5f, -0.5f );
glVertex3f( -0.5f, -0.5f, -0.5f );
glColor3f( 0.0f, 1.0f, 0.0f );
glVertex3f( 0.5f, 0.5f, 0.5f );
glVertex3f( 0.5f, 0.5f, -0.5f );
glVertex3f( -0.5f, 0.5f, -0.5f );
glVertex3f( -0.5f, 0.5f, 0.5f );
glColor3f( 0.0f, 0.2f, 0.0f );
glVertex3f( 0.5f, -0.5f, -0.5f );
glVertex3f( 0.5f, -0.5f, 0.5f );
glVertex3f( -0.5f, -0.5f, 0.5f );
glVertex3f( -0.5f, -0.5f, -0.5f );
glEnd();
}
void renderGrid() {
glBegin(GL_LINES);
glColor3f(0.2f, 0.2f, 0.2f);
for (int i = -20; i <= 20; i++) {
glVertex3f(-20.0f, 0.0f, i);
glVertex3f(20.0f, 0.0f, i);
glVertex3f(i, 0.0f, -20.0f);
glVertex3f(i, 0.0f, 20.0f);
}
glEnd();
}
void loop() {
GL.createCapabilities();
// Set the clear color
glClearColor(0.9f, 0.9f, 0.9f, 1.0f);
// Enable depth testing
glEnable(GL_DEPTH_TEST);
glEnable(GL_CULL_FACE);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glLineWidth(1.4f);
// Remember the current time.
long lastTime = System.nanoTime();
Matrix4f mat = new Matrix4f();
// FloatBuffer for transferring matrices to OpenGL
FloatBuffer fb = BufferUtils.createFloatBuffer(16);
cam.setAlpha((float) Math.toRadians(-20));
cam.setBeta((float) Math.toRadians(20));
Vector3f mirrorPosition = new Vector3f(0.0f, 3.0f, -5.0f);
/* Build orientation quaternion of mirror. */
Quaternionf mirrorOrientation = new Quaternionf();
mirrorOrientation.rotateY((float) Math.toRadians(45))
.rotateX((float) Math.toRadians(45));
/* Used to hold the mirror transformation matrix */
Matrix4f mirrorMatrix = new Matrix4f();
/* Used to hold the reflection matrix */
Matrix4f reflectMatrix = new Matrix4f();
while (!glfwWindowShouldClose(window)) {
/* Set input values for the camera */
if (down) {
cam.setAlpha(cam.getAlpha() + Math.toRadians((x - mouseX) * 0.1f));
cam.setBeta(cam.getBeta() + Math.toRadians((mouseY - y) * 0.1f));
mouseX = x;
mouseY = y;
}
cam.zoom(zoom);
/* Compute delta time */
long thisTime = System.nanoTime();
float diff = (float) ((thisTime - lastTime) / 1E9);
lastTime = thisTime;
/* And let the camera make its update */
cam.update(diff);
glViewport(0, 0, width, height);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
mat.setPerspective((float) Math.atan((ViewSettings.screenHeight * height / ViewSettings.screenHeightPx) / ViewSettings.distanceToScreen),
(float) width / height, 0.01f, 100.0f);
glMatrixMode(GL_PROJECTION);
glLoadMatrixf(mat.get(fb));
/*
* Obtain the camera's view matrix and render grid.
*/
glMatrixMode(GL_MODELVIEW);
glLoadMatrixf(cam.viewMatrix(mat.identity()).get(fb));
/* Stencil the mirror */
mirrorMatrix.set(mat)
.translate(mirrorPosition)
.rotate(mirrorOrientation)
.scale(15.0f, 8.5f, 1.0f);
glLoadMatrixf(mirrorMatrix.get(fb));
glEnable(GL_STENCIL_TEST);
glColorMask(false, false, false, false);
glDisable(GL_DEPTH_TEST);
glStencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE);
glStencilFunc(GL_ALWAYS, 1, 1);
renderMirror(false);
glColorMask(true, true, true, true);
glEnable(GL_DEPTH_TEST);
glStencilFunc(GL_EQUAL, 1, 1);
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
/* Render the reflected scene */
reflectMatrix.set(mat)
.reflect(mirrorOrientation, mirrorPosition);
glLoadMatrixf(reflectMatrix.get(fb));
renderGrid();
glFrontFace(GL_CW);
renderCube();
glFrontFace(GL_CCW);
glDisable(GL_STENCIL_TEST);
/* Render visible mirror geometry with blending */
mirrorMatrix.get(fb);
glLoadMatrixf(fb);
glEnable(GL_BLEND);
renderMirror(true);
glDisable(GL_BLEND);
/* Render scene normally */
mat.get(fb);
glLoadMatrixf(fb);
renderGrid();
renderCube();
glfwSwapBuffers(window);
glfwPollEvents();
}
}
public static void main(String[] args) {
new ReflectDemo().run();
}
} | mit |
selvasingh/azure-sdk-for-java | sdk/compute/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/compute/v2020_06_01/PatchSettings.java | 3546 | /**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.compute.v2020_06_01;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* The PatchSettings model.
*/
public class PatchSettings {
/**
* Specifies the mode of in-guest patching to IaaS virtual machine.<br
* /><br /> Possible values are:<br /><br />
* **Manual** - You control the application of patches to a virtual
* machine. You do this by applying patches manually inside the VM. In this
* mode, automatic updates are disabled; the property
* WindowsConfiguration.enableAutomaticUpdates must be false<br
* /><br /> **AutomaticByOS** - The virtual machine will
* automatically be updated by the OS. The property
* WindowsConfiguration.enableAutomaticUpdates must be true. <br
* /><br /> ** AutomaticByPlatform** - the virtual machine will
* automatically updated by the platform. The properties provisionVMAgent
* and WindowsConfiguration.enableAutomaticUpdates must be true. Possible
* values include: 'Manual', 'AutomaticByOS', 'AutomaticByPlatform'.
*/
@JsonProperty(value = "patchMode")
private InGuestPatchMode patchMode;
/**
* Get specifies the mode of in-guest patching to IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false<br /><br /> **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. <br /><br /> ** AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Possible values include: 'Manual', 'AutomaticByOS', 'AutomaticByPlatform'.
*
* @return the patchMode value
*/
public InGuestPatchMode patchMode() {
return this.patchMode;
}
/**
* Set specifies the mode of in-guest patching to IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false<br /><br /> **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. <br /><br /> ** AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Possible values include: 'Manual', 'AutomaticByOS', 'AutomaticByPlatform'.
*
* @param patchMode the patchMode value to set
* @return the PatchSettings object itself.
*/
public PatchSettings withPatchMode(InGuestPatchMode patchMode) {
this.patchMode = patchMode;
return this;
}
}
| mit |
pardiralli-dev/pardiralli | src/main/java/ee/pardiralli/controller/SystemController.java | 984 | package ee.pardiralli.controller;
import ee.pardiralli.service.SystemPropertyService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@AllArgsConstructor(onConstructor = @__(@Autowired))
public class SystemController {
private final SystemPropertyService systemPropertyService;
@GetMapping("/set-price")
public
@ResponseBody
String setSoldItemsAndDonations(@RequestParam("price") Integer price) {
if (price > 0 && price % 5 == 0) {
systemPropertyService.setDefaultDuckPrice(price);
return "Pardi hinnaks edukalt määratud: " + price + " eurot.";
} else return "Ebasobiv hind! Peab kehtima: hind > 0 ja hind % 5 == 0";
}
}
| mit |
Azure/azure-sdk-for-java | sdk/billing/azure-resourcemanager-billing/src/samples/java/com/azure/resourcemanager/billing/generated/BillingAccountsListSamples.java | 1879 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.billing.generated;
import com.azure.core.util.Context;
/** Samples for BillingAccounts List. */
public final class BillingAccountsListSamples {
/*
* x-ms-original-file: specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountsList.json
*/
/**
* Sample code: BillingAccountsList.
*
* @param manager Entry point to BillingManager.
*/
public static void billingAccountsList(com.azure.resourcemanager.billing.BillingManager manager) {
manager.billingAccounts().list(null, Context.NONE);
}
/*
* x-ms-original-file: specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountsListWithExpandForEnrollmentDetails.json
*/
/**
* Sample code: BillingAccountsListWithExpandForEnrollmentDetails.
*
* @param manager Entry point to BillingManager.
*/
public static void billingAccountsListWithExpandForEnrollmentDetails(
com.azure.resourcemanager.billing.BillingManager manager) {
manager.billingAccounts().list("enrollmentDetails,departments,enrollmentAccounts", Context.NONE);
}
/*
* x-ms-original-file: specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountsListWithExpand.json
*/
/**
* Sample code: BillingAccountsListWithExpand.
*
* @param manager Entry point to BillingManager.
*/
public static void billingAccountsListWithExpand(com.azure.resourcemanager.billing.BillingManager manager) {
manager.billingAccounts().list("soldTo,billingProfiles,billingProfiles/invoiceSections", Context.NONE);
}
}
| mit |
zhqhzhqh/FbreaderJ | app/src/main/java/org/geometerplus/fbreader/network/NetworkException.java | 1955 | /*
* Copyright (C) 2010-2015 FBReader.ORG Limited <contact@fbreader.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
package org.geometerplus.fbreader.network;
import org.geometerplus.zlibrary.core.network.ZLNetworkException;
public abstract class NetworkException extends ZLNetworkException {
private static final long serialVersionUID = 8931535868304063605L;
public static final String ERROR_INTERNAL = "internalError";
public static final String ERROR_PURCHASE_NOT_ENOUGH_MONEY = "purchaseNotEnoughMoney";
public static final String ERROR_PURCHASE_MISSING_BOOK = "purchaseMissingBook";
public static final String ERROR_BOOK_NOT_PURCHASED = "bookNotPurchased";
public static final String ERROR_DOWNLOAD_LIMIT_EXCEEDED = "downloadLimitExceeded";
public static final String ERROR_EMAIL_NOT_SPECIFIED = "emailNotSpecified";
public static final String ERROR_NO_USER_FOR_EMAIL = "noUserForEmail";
public static final String ERROR_UNSUPPORTED_OPERATION = "unsupportedOperation";
public static final String ERROR_NOT_AN_OPDS = "notAnOPDS";
public static final String ERROR_NO_REQUIRED_INFORMATION = "noRequiredInformation";
public static final String ERROR_CACHE_DIRECTORY_ERROR = "cacheDirectoryError";
private NetworkException() {
super(null);
}
}
| mit |
Zarathul/simpleportals | src/main/java/mcjty/theoneprobe/api/IIconStyle.java | 674 | package mcjty.theoneprobe.api;
/**
* Style for the icon element.
*/
public interface IIconStyle {
/**
* Change the width of the icon. Default is 16
*/
IIconStyle width(int w);
/**
* Change the height of the icon. Default is 16
*/
IIconStyle height(int h);
int getWidth();
int getHeight();
/**
* Change the total width of the texture on which the icon sits. Default is 256
*/
IIconStyle textureWidth(int w);
/**
* Change the total height of the texture on which the icon sits. Default is 256
*/
IIconStyle textureHeight(int h);
int getTextureWidth();
int getTextureHeight();
}
| mit |
m91snik/SmartFileSync | SmartFileSyncCore/src/test/java/com/m91snik/smartfilesync/core/test/MainTest.java | 4008 | /**
* Created by m91snik on 19.01.14.
*/
package com.m91snik.smartfilesync.core.test;
import com.m91snik.smartfilesync.core.providers.DirectoryNameProvider;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.integration.MessageChannel;
import org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean;
import org.springframework.integration.endpoint.SourcePollingChannelAdapter;
import org.springframework.integration.file.FileReadingMessageSource;
import org.springframework.integration.file.config.FileReadingMessageSourceFactoryBean;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import java.io.File;
import static org.mockito.Mockito.when;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:spring/test/core-root-test.xml"})
public class MainTest implements ApplicationContextAware {
@Autowired
private DirectoryNameProvider directoryNameProvider;
private ApplicationContext applicationContext;
@Test
public void test() throws Exception {
when(directoryNameProvider.getDirectoryName()).thenReturn("/home/m91snik/tmp/12345");
String directoryName = directoryNameProvider.getDirectoryName();
ConfigurableApplicationContext configContext = (ConfigurableApplicationContext) applicationContext;
ConfigurableListableBeanFactory beanFactory = configContext.getBeanFactory();
FileReadingMessageSourceFactoryBean fileReadingMessageSourceFactoryBean = new
FileReadingMessageSourceFactoryBean();
fileReadingMessageSourceFactoryBean.setDirectory(new File(directoryName));
fileReadingMessageSourceFactoryBean.setAutoCreateDirectory(true);
//fileReadingMessageSourceFactoryBean.setFilter(new AcceptOnceFileListFilter<File>());
FileReadingMessageSource fileReadingMessageSource = fileReadingMessageSourceFactoryBean.getObject();
beanFactory.registerSingleton("fileReadingMessageSource", fileReadingMessageSource);
SourcePollingChannelAdapterFactoryBean sourcePollingChannelAdapterFactoryBean = new
SourcePollingChannelAdapterFactoryBean();
sourcePollingChannelAdapterFactoryBean.setSource(fileReadingMessageSource);
sourcePollingChannelAdapterFactoryBean.setAutoStartup(true);
sourcePollingChannelAdapterFactoryBean.setBeanClassLoader(Thread.currentThread().getContextClassLoader());
sourcePollingChannelAdapterFactoryBean.setBeanFactory(beanFactory);
sourcePollingChannelAdapterFactoryBean.setBeanName("sourcePollingChannelAdapter");
sourcePollingChannelAdapterFactoryBean.setOutputChannel((MessageChannel) applicationContext.getBean
("filesChannel"));
SourcePollingChannelAdapter sourcePollingChannelAdapter = sourcePollingChannelAdapterFactoryBean.getObject();
beanFactory.registerSingleton("sourcePollingChannelAdapter", sourcePollingChannelAdapter);
// SourcePollingChannelAdapter sourcePollingChannelAdapter1 = (SourcePollingChannelAdapter) applicationContext.getBean(
// "sourcePollingChannelAdapter");
sourcePollingChannelAdapter.start();
// SourcePollingChannelAdapter filesInCh = (SourcePollingChannelAdapter) applicationContext.getBean(
// "filesInCh");
Thread.sleep(100000);
}
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
}
}
| mit |