repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
homeworkprod/byceps | byceps/services/authentication/service.py | 1863 | """
byceps.services.authentication.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from typing import Optional
from ...typing import UserID
from ..user import service as user_service
from ..user.transfer.models import User
from .exceptions import AuthenticationFailed
from .password import service as password_service
def authenticate(screen_name_or_email_address: str, password: str) -> User:
"""Try to authenticate the user.
Return the user object on success, or raise an exception on failure.
"""
# Look up user by screen name or email address.
user_id = _find_user_id_by_screen_name_or_email_address(
screen_name_or_email_address
)
if user_id is None:
# Screen name/email address is unknown.
raise AuthenticationFailed()
# Ensure account is initialized, not suspended, and not deleted.
user = user_service.find_active_user(user_id)
if user is None:
# Should not happen as the user has been looked up before.
raise AuthenticationFailed()
# Verify credentials.
if not password_service.is_password_valid_for_user(user.id, password):
# Password does not match.
raise AuthenticationFailed()
password_service.migrate_password_hash_if_outdated(user.id, password)
return user
def _find_user_id_by_screen_name_or_email_address(
screen_name_or_email_address: str,
) -> Optional[UserID]:
if '@' in screen_name_or_email_address:
user = user_service.find_user_by_email_address(
screen_name_or_email_address
)
else:
user = user_service.find_user_by_screen_name(
screen_name_or_email_address, case_insensitive=True
)
if user is None:
return None
return user.id
| bsd-3-clause |
jfranciscomn/elecciones | views/gama-vehiculo/create.php | 495 | <?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model app\models\GamaVehiculo */
$this->title = 'Agregar Nueva Linea';
$this->params['breadcrumbs'][] = ['label' => 'Linea del Vehiculo', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="gama-vehiculo-create">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
'marcaVehiculos' => $marcaVehiculos,
]) ?>
</div>
| bsd-3-clause |
msf-oca-his/dhis2-core | dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/bundle/ReportSummaryIntegrationTest.java | 21131 | /*
* Copyright (c) 2004-2022, University of Oslo
* 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 HISP project 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 THE COPYRIGHT OWNER 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.hisp.dhis.tracker.bundle;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
import org.hisp.dhis.TransactionalIntegrationTest;
import org.hisp.dhis.common.IdentifiableObject;
import org.hisp.dhis.dxf2.metadata.objectbundle.ObjectBundle;
import org.hisp.dhis.dxf2.metadata.objectbundle.ObjectBundleMode;
import org.hisp.dhis.dxf2.metadata.objectbundle.ObjectBundleParams;
import org.hisp.dhis.dxf2.metadata.objectbundle.ObjectBundleService;
import org.hisp.dhis.dxf2.metadata.objectbundle.ObjectBundleValidationService;
import org.hisp.dhis.dxf2.metadata.objectbundle.feedback.ObjectBundleValidationReport;
import org.hisp.dhis.importexport.ImportStrategy;
import org.hisp.dhis.render.RenderFormat;
import org.hisp.dhis.render.RenderService;
import org.hisp.dhis.tracker.AtomicMode;
import org.hisp.dhis.tracker.TrackerImportParams;
import org.hisp.dhis.tracker.TrackerImportService;
import org.hisp.dhis.tracker.TrackerImportStrategy;
import org.hisp.dhis.tracker.report.TrackerImportReport;
import org.hisp.dhis.tracker.report.TrackerStatus;
import org.hisp.dhis.user.User;
import org.hisp.dhis.user.UserService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource;
class ReportSummaryIntegrationTest extends TransactionalIntegrationTest
{
@Autowired
private TrackerImportService trackerImportService;
@Autowired
private RenderService _renderService;
@Autowired
private UserService _userService;
@Autowired
private ObjectBundleService objectBundleService;
@Autowired
private ObjectBundleValidationService objectBundleValidationService;
private User userA;
@Override
public void setUpTest()
throws Exception
{
renderService = _renderService;
userService = _userService;
Map<Class<? extends IdentifiableObject>, List<IdentifiableObject>> metadata = renderService.fromMetadata(
new ClassPathResource( "tracker/simple_metadata.json" ).getInputStream(), RenderFormat.JSON );
ObjectBundleParams params = new ObjectBundleParams();
params.setObjectBundleMode( ObjectBundleMode.COMMIT );
params.setImportStrategy( ImportStrategy.CREATE );
params.setObjects( metadata );
ObjectBundle bundle = objectBundleService.create( params );
ObjectBundleValidationReport validationReport = objectBundleValidationService.validate( bundle );
assertFalse( validationReport.hasErrorReports() );
objectBundleService.commit( bundle );
userA = userService.getUser( "M5zQapPyTZI" );
}
@Test
void testStatsCountForOneCreatedTEI()
throws IOException
{
InputStream inputStream = new ClassPathResource( "tracker/single_tei.json" ).getInputStream();
TrackerImportParams params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
params.setAtomicMode( AtomicMode.OBJECT );
TrackerImportReport trackerImportTeiReport = trackerImportService.importTracker( params );
assertNotNull( trackerImportTeiReport );
assertEquals( TrackerStatus.OK, trackerImportTeiReport.getStatus() );
assertTrue( trackerImportTeiReport.getValidationReport().getErrorReports().isEmpty() );
assertEquals( 1, trackerImportTeiReport.getStats().getCreated() );
assertEquals( 0, trackerImportTeiReport.getStats().getUpdated() );
assertEquals( 0, trackerImportTeiReport.getStats().getIgnored() );
assertEquals( 0, trackerImportTeiReport.getStats().getDeleted() );
}
@Test
void testStatsCountForOneCreatedAndOneUpdatedTEI()
throws IOException
{
InputStream inputStream = new ClassPathResource( "tracker/single_tei.json" ).getInputStream();
TrackerImportParams params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
trackerImportService.importTracker( params );
inputStream = new ClassPathResource( "tracker/one_update_tei_and_one_new_tei.json" ).getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
params.setImportStrategy( TrackerImportStrategy.CREATE_AND_UPDATE );
TrackerImportReport trackerImportTeiReport = trackerImportService.importTracker( params );
assertNotNull( trackerImportTeiReport );
assertEquals( TrackerStatus.OK, trackerImportTeiReport.getStatus() );
assertTrue( trackerImportTeiReport.getValidationReport().getErrorReports().isEmpty() );
assertEquals( 1, trackerImportTeiReport.getStats().getCreated() );
assertEquals( 1, trackerImportTeiReport.getStats().getUpdated() );
assertEquals( 0, trackerImportTeiReport.getStats().getIgnored() );
assertEquals( 0, trackerImportTeiReport.getStats().getDeleted() );
}
@Test
void testStatsCountForOneCreatedAndOneUpdatedTEIAndOneInvalidTEI()
throws IOException
{
InputStream inputStream = new ClassPathResource( "tracker/single_tei.json" ).getInputStream();
TrackerImportParams params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
trackerImportService.importTracker( params );
inputStream = new ClassPathResource( "tracker/one_update_tei_and_one_new_tei_and_one_invalid_tei.json" )
.getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
params.setAtomicMode( AtomicMode.OBJECT );
params.setImportStrategy( TrackerImportStrategy.CREATE_AND_UPDATE );
TrackerImportReport trackerImportTeiReport = trackerImportService.importTracker( params );
assertNotNull( trackerImportTeiReport );
assertEquals( TrackerStatus.OK, trackerImportTeiReport.getStatus() );
assertEquals( 1, trackerImportTeiReport.getValidationReport().getErrorReports().size() );
assertEquals( 1, trackerImportTeiReport.getStats().getCreated() );
assertEquals( 1, trackerImportTeiReport.getStats().getUpdated() );
assertEquals( 1, trackerImportTeiReport.getStats().getIgnored() );
assertEquals( 0, trackerImportTeiReport.getStats().getDeleted() );
}
@Test
void testStatsCountForOneCreatedEnrollment()
throws IOException
{
InputStream inputStream = new ClassPathResource( "tracker/single_tei.json" ).getInputStream();
TrackerImportParams params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
trackerImportService.importTracker( params );
inputStream = new ClassPathResource( "tracker/single_enrollment.json" ).getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
params.setImportStrategy( TrackerImportStrategy.CREATE_AND_UPDATE );
TrackerImportReport trackerImportEnrollmentReport = trackerImportService.importTracker( params );
assertNotNull( trackerImportEnrollmentReport );
assertEquals( TrackerStatus.OK, trackerImportEnrollmentReport.getStatus() );
assertTrue( trackerImportEnrollmentReport.getValidationReport().getErrorReports().isEmpty() );
assertEquals( 1, trackerImportEnrollmentReport.getStats().getCreated() );
assertEquals( 0, trackerImportEnrollmentReport.getStats().getUpdated() );
assertEquals( 0, trackerImportEnrollmentReport.getStats().getIgnored() );
assertEquals( 0, trackerImportEnrollmentReport.getStats().getDeleted() );
}
@Test
void testStatsCountForOneCreatedEnrollmentAndUpdateSameEnrollment()
throws IOException
{
InputStream inputStream = new ClassPathResource( "tracker/single_tei.json" ).getInputStream();
TrackerImportParams params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
trackerImportService.importTracker( params );
inputStream = new ClassPathResource( "tracker/single_enrollment.json" ).getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
params.setImportStrategy( TrackerImportStrategy.CREATE_AND_UPDATE );
TrackerImportReport trackerImportEnrollmentReport = trackerImportService.importTracker( params );
assertNotNull( trackerImportEnrollmentReport );
assertEquals( TrackerStatus.OK, trackerImportEnrollmentReport.getStatus() );
assertTrue( trackerImportEnrollmentReport.getValidationReport().getErrorReports().isEmpty() );
assertEquals( 1, trackerImportEnrollmentReport.getStats().getCreated() );
assertEquals( 0, trackerImportEnrollmentReport.getStats().getUpdated() );
assertEquals( 0, trackerImportEnrollmentReport.getStats().getIgnored() );
assertEquals( 0, trackerImportEnrollmentReport.getStats().getDeleted() );
inputStream = new ClassPathResource( "tracker/single_enrollment.json" ).getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
params.setImportStrategy( TrackerImportStrategy.CREATE_AND_UPDATE );
trackerImportEnrollmentReport = trackerImportService.importTracker( params );
assertNotNull( trackerImportEnrollmentReport );
assertEquals( TrackerStatus.OK, trackerImportEnrollmentReport.getStatus() );
assertTrue( trackerImportEnrollmentReport.getValidationReport().getErrorReports().isEmpty() );
assertEquals( 0, trackerImportEnrollmentReport.getStats().getCreated() );
assertEquals( 1, trackerImportEnrollmentReport.getStats().getUpdated() );
assertEquals( 0, trackerImportEnrollmentReport.getStats().getIgnored() );
assertEquals( 0, trackerImportEnrollmentReport.getStats().getDeleted() );
}
@Test
void testStatsCountForOneUpdateEnrollmentAndOneCreatedEnrollment()
throws IOException
{
InputStream inputStream = new ClassPathResource( "tracker/one_update_tei_and_one_new_tei.json" )
.getInputStream();
TrackerImportParams params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
trackerImportService.importTracker( params );
inputStream = new ClassPathResource( "tracker/single_enrollment.json" ).getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
trackerImportService.importTracker( params );
inputStream = new ClassPathResource( "tracker/one_update_enrollment_and_one_new_enrollment.json" )
.getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
params.setImportStrategy( TrackerImportStrategy.CREATE_AND_UPDATE );
TrackerImportReport trackerImportEnrollmentReport = trackerImportService.importTracker( params );
assertNotNull( trackerImportEnrollmentReport );
assertEquals( TrackerStatus.OK, trackerImportEnrollmentReport.getStatus() );
assertTrue( trackerImportEnrollmentReport.getValidationReport().getErrorReports().isEmpty() );
assertEquals( 1, trackerImportEnrollmentReport.getStats().getCreated() );
assertEquals( 1, trackerImportEnrollmentReport.getStats().getUpdated() );
assertEquals( 0, trackerImportEnrollmentReport.getStats().getIgnored() );
assertEquals( 0, trackerImportEnrollmentReport.getStats().getDeleted() );
}
@Test
void testStatsCountForOneUpdateEnrollmentAndOneCreatedEnrollmentAndOneInvalidEnrollment()
throws IOException
{
InputStream inputStream = new ClassPathResource( "tracker/one_update_tei_and_one_new_tei.json" )
.getInputStream();
TrackerImportParams params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
trackerImportService.importTracker( params );
inputStream = new ClassPathResource( "tracker/single_enrollment.json" ).getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
trackerImportService.importTracker( params );
inputStream = new ClassPathResource( "tracker/one_update_and_one_new_and_one_invalid_enrollment.json" )
.getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
params.setAtomicMode( AtomicMode.OBJECT );
params.setImportStrategy( TrackerImportStrategy.CREATE_AND_UPDATE );
TrackerImportReport trackerImportEnrollmentReport = trackerImportService.importTracker( params );
assertNotNull( trackerImportEnrollmentReport );
assertEquals( TrackerStatus.OK, trackerImportEnrollmentReport.getStatus() );
assertEquals( 1, trackerImportEnrollmentReport.getValidationReport().getErrorReports().size() );
assertEquals( 1, trackerImportEnrollmentReport.getStats().getCreated() );
assertEquals( 1, trackerImportEnrollmentReport.getStats().getUpdated() );
assertEquals( 1, trackerImportEnrollmentReport.getStats().getIgnored() );
assertEquals( 0, trackerImportEnrollmentReport.getStats().getDeleted() );
}
@Test
void testStatsCountForOneCreatedEvent()
throws IOException
{
InputStream inputStream = new ClassPathResource( "tracker/single_tei.json" ).getInputStream();
TrackerImportParams params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
trackerImportService.importTracker( params );
inputStream = new ClassPathResource( "tracker/single_enrollment.json" ).getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
trackerImportService.importTracker( params );
inputStream = new ClassPathResource( "tracker/single_event.json" ).getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
TrackerImportReport trackerImportEventReport = trackerImportService.importTracker( params );
assertNotNull( trackerImportEventReport );
assertEquals( TrackerStatus.OK, trackerImportEventReport.getStatus() );
assertTrue( trackerImportEventReport.getValidationReport().getErrorReports().isEmpty() );
assertEquals( 1, trackerImportEventReport.getStats().getCreated() );
assertEquals( 0, trackerImportEventReport.getStats().getUpdated() );
assertEquals( 0, trackerImportEventReport.getStats().getIgnored() );
assertEquals( 0, trackerImportEventReport.getStats().getDeleted() );
}
@Test
void testStatsCountForOneUpdateEventAndOneNewEvent()
throws IOException
{
InputStream inputStream = new ClassPathResource( "tracker/single_tei.json" ).getInputStream();
TrackerImportParams params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
trackerImportService.importTracker( params );
inputStream = new ClassPathResource( "tracker/single_enrollment.json" ).getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
trackerImportService.importTracker( params );
inputStream = new ClassPathResource( "tracker/single_event.json" ).getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
trackerImportService.importTracker( params );
inputStream = new ClassPathResource( "tracker/one_update_event_and_one_new_event.json" ).getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
params.setImportStrategy( TrackerImportStrategy.CREATE_AND_UPDATE );
TrackerImportReport trackerImportEventReport = trackerImportService.importTracker( params );
assertNotNull( trackerImportEventReport );
assertEquals( TrackerStatus.OK, trackerImportEventReport.getStatus() );
assertTrue( trackerImportEventReport.getValidationReport().getErrorReports().isEmpty() );
assertEquals( 1, trackerImportEventReport.getStats().getCreated() );
assertEquals( 1, trackerImportEventReport.getStats().getUpdated() );
assertEquals( 0, trackerImportEventReport.getStats().getIgnored() );
assertEquals( 0, trackerImportEventReport.getStats().getDeleted() );
}
@Test
void testStatsCountForOneUpdateEventAndOneNewEventAndOneInvalidEvent()
throws IOException
{
InputStream inputStream = new ClassPathResource( "tracker/single_tei.json" ).getInputStream();
TrackerImportParams params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
trackerImportService.importTracker( params );
inputStream = new ClassPathResource( "tracker/single_enrollment.json" ).getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
trackerImportService.importTracker( params );
inputStream = new ClassPathResource( "tracker/single_event.json" ).getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
trackerImportService.importTracker( params );
inputStream = new ClassPathResource( "tracker/one_update_and_one_new_and_one_invalid_event.json" )
.getInputStream();
params = renderService.fromJson( inputStream, TrackerImportParams.class );
params.setUserId( userA.getUid() );
params.setAtomicMode( AtomicMode.OBJECT );
params.setImportStrategy( TrackerImportStrategy.CREATE_AND_UPDATE );
TrackerImportReport trackerImportEventReport = trackerImportService.importTracker( params );
assertNotNull( trackerImportEventReport );
assertEquals( TrackerStatus.OK, trackerImportEventReport.getStatus() );
assertEquals( 1, trackerImportEventReport.getValidationReport().getErrorReports().size() );
assertEquals( 1, trackerImportEventReport.getStats().getCreated() );
assertEquals( 1, trackerImportEventReport.getStats().getUpdated() );
assertEquals( 1, trackerImportEventReport.getStats().getIgnored() );
assertEquals( 0, trackerImportEventReport.getStats().getDeleted() );
}
}
| bsd-3-clause |
phretor/django-academic | academic/apps/projects/middleware.py | 496 | from django.http import HttpResponseRedirect
from academic.projects.models import Project
class ProjectRedirectMiddleware(object):
def process_view(self, request, view_func, view_args, view_kwargs):
if 'slug' in view_kwargs:
try:
object = Project.objects.get(slug=view_kwargs['slug'])
if object.redirect_to != '':
return HttpResponseRedirect(object.redirect_to)
except Project.DoesNotExist:
pass
return None
| bsd-3-clause |
janalis/doctrineviz | test/Graphviz/VertexTest.php | 2381 | <?php
/*
* This file is part of the doctrineviz package
*
* Copyright (c) 2017 Pierre Hennequart
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Feel free to edit as you please, and have fun.
*
* @author Pierre Hennequart <pierre@janalis.com>
*/
declare(strict_types=1);
namespace Janalis\Doctrineviz\Test\Graphviz;
use Janalis\Doctrineviz\Graphviz\Graph;
use Janalis\Doctrineviz\Graphviz\Record;
use Janalis\Doctrineviz\Graphviz\Vertex;
use Janalis\Doctrineviz\Test\DoctrinevizTestCase;
/**
* Vertex test.
*
* @coversDefaultClass \Janalis\Doctrineviz\Graphviz\Vertex
*/
class VertexTest extends DoctrinevizTestCase
{
/**
* Test accessors.
*
* @group graphviz
*/
public function testAccessors()
{
// init values
$record = new Record('bar');
$records = [$record];
$graph = new Graph();
// constructor
$vertex = new Vertex('foo');
$this->assertEquals('foo ['.PHP_EOL.
' label="foo"'.PHP_EOL.
']', (string) $vertex);
// getters and setters
$vertex = new Vertex(null);
$vertex->setRecords($records);
$vertex->setGraph($graph);
$vertex->setId('baz');
$this->assertEquals($records, $vertex->getRecords());
$this->assertEquals($graph, $vertex->getGraph());
$this->assertEquals('baz', $vertex->getId());
// creators and deletors
$vertex = new Vertex('foo');
$this->assertEmpty($vertex->getRecords());
$vertex->createRecord('bar');
$this->assertCount(1, $vertex->getRecords());
$this->assertEquals(new Record('bar', $vertex), $vertex->getRecord('bar'));
$vertex->deleteRecord('bar');
$this->assertEmpty($vertex->getRecords());
// adders and removers
$vertex = new Vertex('foo');
$vertex->addRecord($record);
$this->assertEquals($record, $vertex->getRecord($record->getId()));
$vertex->removeRecord($record);
$this->assertNull($vertex->getRecord($record->getId()));
// to string
$vertex = new Vertex('foo');
$vertex->addRecord($record);
$this->assertEquals('foo ['.PHP_EOL.
' label="FOO|<bar> bar\l"'.PHP_EOL.
']', (string) $vertex);
}
}
| bsd-3-clause |
xin3liang/platform_external_chromium_org_third_party_WebKit | Source/core/html/ime/InputMethodContext.cpp | 5739 | /*
* Copyright (C) 2013 Google Inc. 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 Google Inc. 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 THE COPYRIGHT
* OWNER 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.
*/
#include "config.h"
#include "core/html/ime/InputMethodContext.h"
#include "core/dom/Document.h"
#include "core/dom/Text.h"
#include "core/editing/InputMethodController.h"
#include "core/events/Event.h"
#include "core/frame/LocalFrame.h"
namespace blink {
PassOwnPtrWillBeRawPtr<InputMethodContext> InputMethodContext::create(HTMLElement* element)
{
return adoptPtrWillBeNoop(new InputMethodContext(element));
}
InputMethodContext::InputMethodContext(HTMLElement* element)
: m_element(element)
{
ScriptWrappable::init(this);
}
InputMethodContext::~InputMethodContext()
{
}
String InputMethodContext::locale() const
{
// FIXME: Implement this.
return emptyString();
}
HTMLElement* InputMethodContext::target() const
{
return m_element;
}
unsigned InputMethodContext::compositionStartOffset()
{
if (hasFocus())
return inputMethodController().compositionStart();
return 0;
}
unsigned InputMethodContext::compositionEndOffset()
{
if (hasFocus())
return inputMethodController().compositionEnd();
return 0;
}
void InputMethodContext::confirmComposition()
{
if (hasFocus())
inputMethodController().confirmCompositionAndResetState();
}
bool InputMethodContext::hasFocus() const
{
LocalFrame* frame = m_element->document().frame();
if (!frame)
return false;
const Element* element = frame->document()->focusedElement();
return element && element->isHTMLElement() && m_element == toHTMLElement(element);
}
String InputMethodContext::compositionText() const
{
if (!hasFocus())
return emptyString();
Text* text = inputMethodController().compositionNode();
return text ? text->wholeText() : emptyString();
}
CompositionUnderline InputMethodContext::selectedSegment() const
{
CompositionUnderline underline;
if (!hasFocus())
return underline;
const InputMethodController& controller = inputMethodController();
if (!controller.hasComposition())
return underline;
Vector<CompositionUnderline> underlines = controller.customCompositionUnderlines();
for (size_t i = 0; i < underlines.size(); ++i) {
if (underlines[i].thick)
return underlines[i];
}
// When no underline information is available while composition exists,
// build a CompositionUnderline whose element is the whole composition.
underline.endOffset = controller.compositionEnd() - controller.compositionStart();
return underline;
}
int InputMethodContext::selectionStart() const
{
return selectedSegment().startOffset;
}
int InputMethodContext::selectionEnd() const
{
return selectedSegment().endOffset;
}
const Vector<unsigned>& InputMethodContext::segments()
{
m_segments.clear();
if (!hasFocus())
return m_segments;
const InputMethodController& controller = inputMethodController();
if (!controller.hasComposition())
return m_segments;
Vector<CompositionUnderline> underlines = controller.customCompositionUnderlines();
if (!underlines.size()) {
m_segments.append(0);
} else {
for (size_t i = 0; i < underlines.size(); ++i)
m_segments.append(underlines[i].startOffset);
}
return m_segments;
}
InputMethodController& InputMethodContext::inputMethodController() const
{
return m_element->document().frame()->inputMethodController();
}
const AtomicString& InputMethodContext::interfaceName() const
{
return EventTargetNames::InputMethodContext;
}
ExecutionContext* InputMethodContext::executionContext() const
{
return &m_element->document();
}
void InputMethodContext::dispatchCandidateWindowShowEvent()
{
dispatchEvent(Event::create(EventTypeNames::candidatewindowshow));
}
void InputMethodContext::dispatchCandidateWindowUpdateEvent()
{
dispatchEvent(Event::create(EventTypeNames::candidatewindowupdate));
}
void InputMethodContext::dispatchCandidateWindowHideEvent()
{
dispatchEvent(Event::create(EventTypeNames::candidatewindowhide));
}
void InputMethodContext::trace(Visitor* visitor)
{
visitor->trace(m_element);
EventTargetWithInlineData::trace(visitor);
}
} // namespace blink
| bsd-3-clause |
timopulkkinen/BubbleFish | net/base/multi_threaded_cert_verifier.cc | 19233 | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/base/multi_threaded_cert_verifier.h"
#include <algorithm>
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/stl_util.h"
#include "base/synchronization/lock.h"
#include "base/time.h"
#include "base/threading/worker_pool.h"
#include "net/base/cert_trust_anchor_provider.h"
#include "net/base/cert_verify_proc.h"
#include "net/base/crl_set.h"
#include "net/base/net_errors.h"
#include "net/base/net_log.h"
#include "net/base/x509_certificate.h"
#include "net/base/x509_certificate_net_log_param.h"
#if defined(USE_NSS) || defined(OS_IOS)
#include <private/pprthred.h> // PR_DetachThread
#endif
namespace net {
////////////////////////////////////////////////////////////////////////////
// Life of a request:
//
// MultiThreadedCertVerifier CertVerifierJob CertVerifierWorker Request
// | (origin loop) (worker loop)
// |
// Verify()
// |---->-------------------------------------<creates>
// |
// |---->-------------------<creates>
// |
// |---->-------------------------------------------------------<creates>
// |
// |---->---------------------------------------Start
// | |
// | PostTask
// |
// | <starts verifying>
// |---->-------------------AddRequest |
// |
// |
// |
// Finish
// |
// PostTask
//
// |
// DoReply
// |----<-----------------------------------------|
// HandleResult
// |
// |---->------------------HandleResult
// |
// |------>---------------------------Post
//
//
//
// On a cache hit, MultiThreadedCertVerifier::Verify() returns synchronously
// without posting a task to a worker thread.
namespace {
// The default value of max_cache_entries_.
const unsigned kMaxCacheEntries = 256;
// The number of seconds for which we'll cache a cache entry.
const unsigned kTTLSecs = 1800; // 30 minutes.
} // namespace
MultiThreadedCertVerifier::CachedResult::CachedResult() : error(ERR_FAILED) {}
MultiThreadedCertVerifier::CachedResult::~CachedResult() {}
MultiThreadedCertVerifier::CacheValidityPeriod::CacheValidityPeriod(
const base::Time& now)
: verification_time(now),
expiration_time(now) {
}
MultiThreadedCertVerifier::CacheValidityPeriod::CacheValidityPeriod(
const base::Time& now,
const base::Time& expiration)
: verification_time(now),
expiration_time(expiration) {
}
bool MultiThreadedCertVerifier::CacheExpirationFunctor::operator()(
const CacheValidityPeriod& now,
const CacheValidityPeriod& expiration) const {
// Ensure this functor is being used for expiration only, and not strict
// weak ordering/sorting. |now| should only ever contain a single
// base::Time.
// Note: DCHECK_EQ is not used due to operator<< overloading requirements.
DCHECK(now.verification_time == now.expiration_time);
// |now| contains only a single time (verification_time), while |expiration|
// contains the validity range - both when the certificate was verified and
// when the verification result should expire.
//
// If the user receives a "not yet valid" message, and adjusts their clock
// foward to the correct time, this will (typically) cause
// now.verification_time to advance past expiration.expiration_time, thus
// treating the cached result as an expired entry and re-verifying.
// If the user receives a "expired" message, and adjusts their clock
// backwards to the correct time, this will cause now.verification_time to
// be less than expiration_verification_time, thus treating the cached
// result as an expired entry and re-verifying.
// If the user receives either of those messages, and does not adjust their
// clock, then the result will be (typically) be cached until the expiration
// TTL.
//
// This algorithm is only problematic if the user consistently keeps
// adjusting their clock backwards in increments smaller than the expiration
// TTL, in which case, cached elements continue to be added. However,
// because the cache has a fixed upper bound, if no entries are expired, a
// 'random' entry will be, thus keeping the memory constraints bounded over
// time.
return now.verification_time >= expiration.verification_time &&
now.verification_time < expiration.expiration_time;
};
// Represents the output and result callback of a request.
class CertVerifierRequest {
public:
CertVerifierRequest(const CompletionCallback& callback,
CertVerifyResult* verify_result,
const BoundNetLog& net_log)
: callback_(callback),
verify_result_(verify_result),
net_log_(net_log) {
net_log_.BeginEvent(NetLog::TYPE_CERT_VERIFIER_REQUEST);
}
~CertVerifierRequest() {
}
// Ensures that the result callback will never be made.
void Cancel() {
callback_.Reset();
verify_result_ = NULL;
net_log_.AddEvent(NetLog::TYPE_CANCELLED);
net_log_.EndEvent(NetLog::TYPE_CERT_VERIFIER_REQUEST);
}
// Copies the contents of |verify_result| to the caller's
// CertVerifyResult and calls the callback.
void Post(const MultiThreadedCertVerifier::CachedResult& verify_result) {
if (!callback_.is_null()) {
net_log_.EndEvent(NetLog::TYPE_CERT_VERIFIER_REQUEST);
*verify_result_ = verify_result.result;
callback_.Run(verify_result.error);
}
delete this;
}
bool canceled() const { return callback_.is_null(); }
const BoundNetLog& net_log() const { return net_log_; }
private:
CompletionCallback callback_;
CertVerifyResult* verify_result_;
const BoundNetLog net_log_;
};
// CertVerifierWorker runs on a worker thread and takes care of the blocking
// process of performing the certificate verification. Deletes itself
// eventually if Start() succeeds.
class CertVerifierWorker {
public:
CertVerifierWorker(CertVerifyProc* verify_proc,
X509Certificate* cert,
const std::string& hostname,
int flags,
CRLSet* crl_set,
const CertificateList& additional_trust_anchors,
MultiThreadedCertVerifier* cert_verifier)
: verify_proc_(verify_proc),
cert_(cert),
hostname_(hostname),
flags_(flags),
crl_set_(crl_set),
additional_trust_anchors_(additional_trust_anchors),
origin_loop_(MessageLoop::current()),
cert_verifier_(cert_verifier),
canceled_(false),
error_(ERR_FAILED) {
}
// Returns the certificate being verified. May only be called /before/
// Start() is called.
X509Certificate* certificate() const { return cert_; }
bool Start() {
DCHECK_EQ(MessageLoop::current(), origin_loop_);
return base::WorkerPool::PostTask(
FROM_HERE, base::Bind(&CertVerifierWorker::Run, base::Unretained(this)),
true /* task is slow */);
}
// Cancel is called from the origin loop when the MultiThreadedCertVerifier is
// getting deleted.
void Cancel() {
DCHECK_EQ(MessageLoop::current(), origin_loop_);
base::AutoLock locked(lock_);
canceled_ = true;
}
private:
void Run() {
// Runs on a worker thread.
error_ = verify_proc_->Verify(cert_, hostname_, flags_, crl_set_,
additional_trust_anchors_, &verify_result_);
#if defined(USE_NSS) || defined(OS_IOS)
// Detach the thread from NSPR.
// Calling NSS functions attaches the thread to NSPR, which stores
// the NSPR thread ID in thread-specific data.
// The threads in our thread pool terminate after we have called
// PR_Cleanup. Unless we detach them from NSPR, net_unittests gets
// segfaults on shutdown when the threads' thread-specific data
// destructors run.
PR_DetachThread();
#endif
Finish();
}
// DoReply runs on the origin thread.
void DoReply() {
DCHECK_EQ(MessageLoop::current(), origin_loop_);
{
// We lock here because the worker thread could still be in Finished,
// after the PostTask, but before unlocking |lock_|. If we do not lock in
// this case, we will end up deleting a locked Lock, which can lead to
// memory leaks or worse errors.
base::AutoLock locked(lock_);
if (!canceled_) {
cert_verifier_->HandleResult(cert_, hostname_, flags_,
additional_trust_anchors_, error_,
verify_result_);
}
}
delete this;
}
void Finish() {
// Runs on the worker thread.
// We assume that the origin loop outlives the MultiThreadedCertVerifier. If
// the MultiThreadedCertVerifier is deleted, it will call Cancel on us. If
// it does so before the Acquire, we'll delete ourselves and return. If it's
// trying to do so concurrently, then it'll block on the lock and we'll call
// PostTask while the MultiThreadedCertVerifier (and therefore the
// MessageLoop) is still alive.
// If it does so after this function, we assume that the MessageLoop will
// process pending tasks. In which case we'll notice the |canceled_| flag
// in DoReply.
bool canceled;
{
base::AutoLock locked(lock_);
canceled = canceled_;
if (!canceled) {
origin_loop_->PostTask(
FROM_HERE, base::Bind(
&CertVerifierWorker::DoReply, base::Unretained(this)));
}
}
if (canceled)
delete this;
}
scoped_refptr<CertVerifyProc> verify_proc_;
scoped_refptr<X509Certificate> cert_;
const std::string hostname_;
const int flags_;
scoped_refptr<CRLSet> crl_set_;
const CertificateList additional_trust_anchors_;
MessageLoop* const origin_loop_;
MultiThreadedCertVerifier* const cert_verifier_;
// lock_ protects canceled_.
base::Lock lock_;
// If canceled_ is true,
// * origin_loop_ cannot be accessed by the worker thread,
// * cert_verifier_ cannot be accessed by any thread.
bool canceled_;
int error_;
CertVerifyResult verify_result_;
DISALLOW_COPY_AND_ASSIGN(CertVerifierWorker);
};
// A CertVerifierJob is a one-to-one counterpart of a CertVerifierWorker. It
// lives only on the CertVerifier's origin message loop.
class CertVerifierJob {
public:
CertVerifierJob(CertVerifierWorker* worker,
const BoundNetLog& net_log)
: start_time_(base::TimeTicks::Now()),
worker_(worker),
net_log_(net_log) {
net_log_.BeginEvent(
NetLog::TYPE_CERT_VERIFIER_JOB,
base::Bind(&NetLogX509CertificateCallback,
base::Unretained(worker_->certificate())));
}
~CertVerifierJob() {
if (worker_) {
net_log_.AddEvent(NetLog::TYPE_CANCELLED);
net_log_.EndEvent(NetLog::TYPE_CERT_VERIFIER_JOB);
worker_->Cancel();
DeleteAllCanceled();
}
}
void AddRequest(CertVerifierRequest* request) {
request->net_log().AddEvent(
NetLog::TYPE_CERT_VERIFIER_REQUEST_BOUND_TO_JOB,
net_log_.source().ToEventParametersCallback());
requests_.push_back(request);
}
void HandleResult(
const MultiThreadedCertVerifier::CachedResult& verify_result) {
worker_ = NULL;
net_log_.EndEvent(NetLog::TYPE_CERT_VERIFIER_JOB);
UMA_HISTOGRAM_CUSTOM_TIMES("Net.CertVerifier_Job_Latency",
base::TimeTicks::Now() - start_time_,
base::TimeDelta::FromMilliseconds(1),
base::TimeDelta::FromMinutes(10),
100);
PostAll(verify_result);
}
private:
void PostAll(const MultiThreadedCertVerifier::CachedResult& verify_result) {
std::vector<CertVerifierRequest*> requests;
requests_.swap(requests);
for (std::vector<CertVerifierRequest*>::iterator
i = requests.begin(); i != requests.end(); i++) {
(*i)->Post(verify_result);
// Post() causes the CertVerifierRequest to delete itself.
}
}
void DeleteAllCanceled() {
for (std::vector<CertVerifierRequest*>::iterator
i = requests_.begin(); i != requests_.end(); i++) {
if ((*i)->canceled()) {
delete *i;
} else {
LOG(DFATAL) << "CertVerifierRequest leaked!";
}
}
}
const base::TimeTicks start_time_;
std::vector<CertVerifierRequest*> requests_;
CertVerifierWorker* worker_;
const BoundNetLog net_log_;
};
MultiThreadedCertVerifier::MultiThreadedCertVerifier(
CertVerifyProc* verify_proc)
: cache_(kMaxCacheEntries),
requests_(0),
cache_hits_(0),
inflight_joins_(0),
verify_proc_(verify_proc),
trust_anchor_provider_(NULL) {
CertDatabase::GetInstance()->AddObserver(this);
}
MultiThreadedCertVerifier::~MultiThreadedCertVerifier() {
STLDeleteValues(&inflight_);
CertDatabase::GetInstance()->RemoveObserver(this);
}
void MultiThreadedCertVerifier::SetCertTrustAnchorProvider(
CertTrustAnchorProvider* trust_anchor_provider) {
DCHECK(CalledOnValidThread());
trust_anchor_provider_ = trust_anchor_provider;
}
int MultiThreadedCertVerifier::Verify(X509Certificate* cert,
const std::string& hostname,
int flags,
CRLSet* crl_set,
CertVerifyResult* verify_result,
const CompletionCallback& callback,
RequestHandle* out_req,
const BoundNetLog& net_log) {
DCHECK(CalledOnValidThread());
if (callback.is_null() || !verify_result || hostname.empty()) {
*out_req = NULL;
return ERR_INVALID_ARGUMENT;
}
requests_++;
const CertificateList empty_cert_list;
const CertificateList& additional_trust_anchors =
trust_anchor_provider_ ?
trust_anchor_provider_->GetAdditionalTrustAnchors() : empty_cert_list;
const RequestParams key(cert->fingerprint(), cert->ca_fingerprint(),
hostname, flags, additional_trust_anchors);
const CertVerifierCache::value_type* cached_entry =
cache_.Get(key, CacheValidityPeriod(base::Time::Now()));
if (cached_entry) {
++cache_hits_;
*out_req = NULL;
*verify_result = cached_entry->result;
return cached_entry->error;
}
// No cache hit. See if an identical request is currently in flight.
CertVerifierJob* job;
std::map<RequestParams, CertVerifierJob*>::const_iterator j;
j = inflight_.find(key);
if (j != inflight_.end()) {
// An identical request is in flight already. We'll just attach our
// callback.
inflight_joins_++;
job = j->second;
} else {
// Need to make a new request.
CertVerifierWorker* worker =
new CertVerifierWorker(verify_proc_, cert, hostname, flags, crl_set,
additional_trust_anchors, this);
job = new CertVerifierJob(
worker,
BoundNetLog::Make(net_log.net_log(), NetLog::SOURCE_CERT_VERIFIER_JOB));
if (!worker->Start()) {
delete job;
delete worker;
*out_req = NULL;
// TODO(wtc): log to the NetLog.
LOG(ERROR) << "CertVerifierWorker couldn't be started.";
return ERR_INSUFFICIENT_RESOURCES; // Just a guess.
}
inflight_.insert(std::make_pair(key, job));
}
CertVerifierRequest* request =
new CertVerifierRequest(callback, verify_result, net_log);
job->AddRequest(request);
*out_req = request;
return ERR_IO_PENDING;
}
void MultiThreadedCertVerifier::CancelRequest(RequestHandle req) {
DCHECK(CalledOnValidThread());
CertVerifierRequest* request = reinterpret_cast<CertVerifierRequest*>(req);
request->Cancel();
}
MultiThreadedCertVerifier::RequestParams::RequestParams(
const SHA1HashValue& cert_fingerprint_arg,
const SHA1HashValue& ca_fingerprint_arg,
const std::string& hostname_arg,
int flags_arg,
const CertificateList& additional_trust_anchors)
: hostname(hostname_arg),
flags(flags_arg) {
hash_values.reserve(2 + additional_trust_anchors.size());
hash_values.push_back(cert_fingerprint_arg);
hash_values.push_back(ca_fingerprint_arg);
for (size_t i = 0; i < additional_trust_anchors.size(); ++i)
hash_values.push_back(additional_trust_anchors[i]->fingerprint());
}
MultiThreadedCertVerifier::RequestParams::~RequestParams() {}
bool MultiThreadedCertVerifier::RequestParams::operator<(
const RequestParams& other) const {
// |flags| is compared before |cert_fingerprint|, |ca_fingerprint|, and
// |hostname| under assumption that integer comparisons are faster than
// memory and string comparisons.
if (flags != other.flags)
return flags < other.flags;
if (hostname != other.hostname)
return hostname < other.hostname;
return std::lexicographical_compare(
hash_values.begin(), hash_values.end(),
other.hash_values.begin(), other.hash_values.end(),
net::SHA1HashValueLessThan());
}
// HandleResult is called by CertVerifierWorker on the origin message loop.
// It deletes CertVerifierJob.
void MultiThreadedCertVerifier::HandleResult(
X509Certificate* cert,
const std::string& hostname,
int flags,
const CertificateList& additional_trust_anchors,
int error,
const CertVerifyResult& verify_result) {
DCHECK(CalledOnValidThread());
const RequestParams key(cert->fingerprint(), cert->ca_fingerprint(),
hostname, flags, additional_trust_anchors);
CachedResult cached_result;
cached_result.error = error;
cached_result.result = verify_result;
base::Time now = base::Time::Now();
cache_.Put(
key, cached_result, CacheValidityPeriod(now),
CacheValidityPeriod(now, now + base::TimeDelta::FromSeconds(kTTLSecs)));
std::map<RequestParams, CertVerifierJob*>::iterator j;
j = inflight_.find(key);
if (j == inflight_.end()) {
NOTREACHED();
return;
}
CertVerifierJob* job = j->second;
inflight_.erase(j);
job->HandleResult(cached_result);
delete job;
}
void MultiThreadedCertVerifier::OnCertTrustChanged(
const X509Certificate* cert) {
DCHECK(CalledOnValidThread());
ClearCache();
}
} // namespace net
| bsd-3-clause |
Cocotteseb/Krypton | Source/Krypton Components/ComponentFactory.Krypton.Ribbon/View Draw/ViewDrawRibbonAppMenu.cs | 3492 | // *****************************************************************************
//
// © Component Factory Pty Ltd 2012. All rights reserved.
// The software and associated documentation supplied hereunder are the
// proprietary information of Component Factory Pty Ltd, 17/267 Nepean Hwy,
// Seaford, Vic 3198, Australia and are supplied subject to licence terms.
//
// Version 4.4.1.0 www.ComponentFactory.com
// *****************************************************************************
using System;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Diagnostics;
using ComponentFactory.Krypton.Toolkit;
namespace ComponentFactory.Krypton.Ribbon
{
/// <summary>
/// Extends the ViewDrawDocker by drawing the ribbon app menu area.
/// </summary>
internal class ViewDrawRibbonAppMenu : ViewDrawDocker
{
#region Instance Fields
private ViewBase _fixedElement;
private Rectangle _fixedScreenRect;
#endregion
#region Identity
/// <summary>
/// Initialize a new instance of the ViewDrawRibbonAppMenu class.
/// </summary>
/// <param name="paletteBack">Palette source for the background.</param>
/// <param name="paletteBorder">Palette source for the border.</param>
/// <param name="fixedElement">Element to display at provided screen rect.</param>
/// <param name="fixedScreenRect">Screen rectangle for showing the element at.</param>
public ViewDrawRibbonAppMenu(IPaletteBack paletteBack,
IPaletteBorder paletteBorder,
ViewBase fixedElement,
Rectangle fixedScreenRect)
: base(paletteBack, paletteBorder)
{
_fixedElement = fixedElement;
_fixedScreenRect = fixedScreenRect;
}
/// <summary>
/// Obtains the String representation of this instance.
/// </summary>
/// <returns>User readable name of the instance.</returns>
public override string ToString()
{
// Return the class name and instance identifier
return "ViewDrawRibbonAppMenu:" + Id;
}
#endregion
#region Paint
/// <summary>
/// Perform rendering after child elements are rendered.
/// </summary>
/// <param name="renderContext">Rendering context.</param>
public override void RenderAfter(RenderContext renderContext)
{
base.RenderAfter(renderContext);
// Convert our rectangle to the screen
Rectangle screenRect = renderContext.TopControl.RectangleToScreen(renderContext.TopControl.ClientRectangle);
// If the fixed rectangle is in our showing area and at the top
if ((screenRect.Contains(_fixedScreenRect)) && (screenRect.Y == _fixedScreenRect.Y))
{
// Position the element appropriately
using (ViewLayoutContext layoutContext = new ViewLayoutContext(renderContext.Control, renderContext.Renderer))
{
layoutContext.DisplayRectangle = renderContext.TopControl.RectangleToClient(_fixedScreenRect);
_fixedElement.Layout(layoutContext);
}
// Now draw
_fixedElement.Render(renderContext);
}
}
#endregion
}
}
| bsd-3-clause |
asamgir/openspecimen | www/app/modules/administrative/form/module.js | 856 |
angular.module('os.administrative.form',
[
'os.administrative.form.list',
'os.administrative.form.addedit',
'os.administrative.form.formctxts'
])
.config(function($stateProvider) {
$stateProvider
.state('form-list', {
url: '/forms',
templateUrl: 'modules/administrative/form/list.html',
controller: 'FormListCtrl',
parent: 'signed-in'
})
.state('form-addedit', {
url: '/form-addedit/:formId',
templateUrl: 'modules/administrative/form/addedit.html',
controller: 'FormAddEditCtrl',
resolve: {
form: function($stateParams, Form) {
if ($stateParams.formId) {
return new Form({id: $stateParams.formId});
}
return new Form();
}
},
parent: 'signed-in'
})
});
| bsd-3-clause |
praxisnetau/silverware | src/Folders/TemplateFolder.php | 2651 | <?php
/**
* This file is part of SilverWare.
*
* PHP version >=5.6.0
*
* For full copyright and license information, please view the
* LICENSE.md file that was distributed with this source code.
*
* @package SilverWare\Folders
* @author Colin Tucker <colin@praxis.net.au>
* @copyright 2017 Praxis Interactive
* @license https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
* @link https://github.com/praxisnetau/silverware
*/
namespace SilverWare\Folders;
use SilverWare\Model\Folder;
use SilverWare\Model\Template;
/**
* An extension of the folder class for a template folder.
*
* @package SilverWare\Folders
* @author Colin Tucker <colin@praxis.net.au>
* @copyright 2017 Praxis Interactive
* @license https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
* @link https://github.com/praxisnetau/silverware
*/
class TemplateFolder extends Folder
{
/**
* Human-readable singular name.
*
* @var string
* @config
*/
private static $singular_name = 'Template Folder';
/**
* Human-readable plural name.
*
* @var string
* @config
*/
private static $plural_name = 'Template Folders';
/**
* Description of this object.
*
* @var string
* @config
*/
private static $description = 'Holds a series of SilverWare templates';
/**
* Icon file for this object.
*
* @var string
* @config
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/TemplateFolder.png';
/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_TemplateFolder';
/**
* Defines an ancestor class to hide from the admin interface.
*
* @var string
* @config
*/
private static $hide_ancestor = Folder::class;
/**
* Defines the default child class for this object.
*
* @var string
* @config
*/
private static $default_child = Template::class;
/**
* Defines the allowed children for this object.
*
* @var array|string
* @config
*/
private static $allowed_children = [
Template::class
];
/**
* Populates the default values for the fields of the receiver.
*
* @return void
*/
public function populateDefaults()
{
// Populate Defaults (from parent):
parent::populateDefaults();
// Populate Defaults:
$this->Title = _t(__CLASS__ . '.DEFAULTTITLE', 'Templates');
}
}
| bsd-3-clause |
sysdevbol/entidad | application/classes/model/paises.php | 188 | <?php
defined('SYSPATH') or die ('no tiene acceso');
//descripcion del modelo productos
class Model_Paises extends ORM{
protected $_table_names_plural = false;
}
?>
| bsd-3-clause |
statiagov/gesmew | backend/spec/features/admin/configuration/tax_rates_spec.rb | 508 | require 'spec_helper'
describe "Tax Rates", type: :feature, js: true do
stub_authorization!
let!(:tax_rate) { create(:tax_rate, calculator: stub_model(Gesmew::Calculator)) }
# Regression test for #1422
it "can create a new tax rate" do
visit gesmew.admin_path
click_link "Configuration"
click_link "Tax Rates"
click_link "New Tax Rate"
fill_in "Rate", with: "0.05"
click_button "Create"
expect(page).to have_content("Tax Rate has been successfully created!")
end
end
| bsd-3-clause |
GCRC/nunaliit | nunaliit2-js/src/main/js/nunaliit2/n2.history.js | 24796 | /*
Copyright (c) 2012, Geomatics and Cartographic Research Centre, Carleton
University
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 Geomatics and Cartographic Research Centre,
Carleton University 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 THE COPYRIGHT OWNER 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.
*/
;(function($,$n2){
"use strict";
// Localization
var _loc = function(str,args){ return $n2.loc(str,'nunaliit2',args); }
,TYPE_SELECTED = 'x'
,TYPE_MULTI_SELECTED = 'm'
,TYPE_SEARCH = 's'
;
// ======================= HASH ENCODING ==============================
// The hash stored in the URL is a Base64 encoding of a JSON object.
// The JSON object has the following syntax:
// {
// t: <string, type>
// ,s: <number, timestamp>
// ...
// }
//
// where the type (t) is one of
// 'x' for user selection
// 'm' for user multi-selection
// 's' for user search
//
//
// User Selection:
// {
// t: 'x' (TYPE_SELECTED)
// ,s: <number, timestamp>
// ,i: <string, document id>
// }
//
// This is a user selection for a particular document id.
//
//
// User Multi-Selection:
// {
// t: 'm' (TYPE_MULTI_SELECTED)
// ,s: <number, timestamp>
// }
//
// This is a user selection for multiple document ids. Since the hash
// might not have the capacity to store a long list of document ids, a
// timestamp is stored in the hash, instead. This timestamp is related to
// a list of document identifiers (array) using the session storage.
//
//
// User Search:
// {
// t: 's' (TYPE_SEARCH)
// ,s: <number, timestamp>
// ,l: <string, search parameters>
// }
//
// This is a user search action. The search line is stored in the
// 'l' key.
//======================= UTILITIES ===================================
function computeHashFromEntry(entry){
var json = JSON.stringify(entry);
var hash = $n2.Base64.encode(json);
return hash;
};
function decodeEntryFromHash(hash){
var entry = undefined;
try {
var d = $n2.Base64.decode(hash);
entry = JSON.parse(d);
} catch(s) {};
return entry;
};
function createNewEntry(entry){
if( !entry.s ){
entry.s = (new Date()).getTime();
};
return entry;
};
function getCurrentHash(){
var hash = window.location.hash;
if( hash ) {
hash = hash.substr(1);
};
return hash;
};
function getEventFromHash(hash){
var event = undefined;
if( 'nostate' === hash ){
// No event
} else if( !hash || '' === hash ){
event = {
type: 'unselected'
};
} else {
var entry = decodeEntryFromHash(hash);
if( entry && TYPE_SELECTED === entry.t ){
var docId = entry.i;
event = {
type: 'userSelect'
,docId: docId
};
} else if( entry && TYPE_MULTI_SELECTED === entry.t ){
var timestamp = entry.s;
var info = getStorageInfo(timestamp);
var docIds = info.docIds;
if( !docIds ){
docIds = [];
};
event = {
type: 'userSelect'
,docIds: docIds
};
} else if( entry && TYPE_SEARCH === entry.t ){
var searchLine = entry.l;
event = {
type: 'searchInitiate'
,searchLine: searchLine
};
};
};
return event;
};
function getEventFromHref(href){
var url = new $n2.url.Url({
url: href
});
var hash = url.getHash();
return getEventFromHash(hash);
};
//======================= HISTORY =====================================
// This class mimicks the information stored in the browser's history.
// This class is needed because deeper queries are needed than what
// is offered by the browsers.
function reloadStoredHistories(){
var storage = $n2.storage.getSessionStorage();
var value = storage.getItem('n2_history');
var raw = null;
try {
raw = JSON.parse(value);
} catch(e) {
raw = {};
};
if( !raw ){
raw = {};
};
var histories = [];
for(var sessionId in raw){
var h = raw[sessionId];
var history = new History({
sessionId: sessionId
});
history._reloadFromJson(h);
histories.push(history);
};
return histories;
};
var History = $n2.Class({
sessionId: null,
dispatchService: null,
entries: null,
currentEntry: null,
lastUpdated: null,
lastHref: null,
lastHistorySize: null,
retrievedFromStorage: null,
hint: null,
initialize: function(opts_){
var opts = $n2.extend({
sessionId: undefined
,dispatchService: null
},opts_);
var _this = this;
this.sessionId = opts.sessionId;
this.dispatchService = opts.dispatchService;
this.entries = [];
this.currentEntry = undefined;
this.lastHref = undefined;
this.lastHistorySize = undefined;
this.lastUpdated = undefined;
this.retrievedFromStorage = false;
this.hint = undefined;
if( !this.sessionId ){
this.sessionId = 's' + (new Date()).getTime();
};
if( this.dispatchService ){
var f = function(m, addr, dispatcher){
_this._handle(m, addr, dispatcher);
};
var DH = 'n2.history.History';
this.dispatchService.register(DH,'start',f);
this.dispatchService.register(DH,'historyHashModified',f);
this.dispatchService.register(DH,'historyGetState',f);
this.dispatchService.register(DH,'historyBack',f);
this.dispatchService.register(DH,'historyForward',f);
};
},
saveToStorage: function(){
function removeOldestEntry(raw){
var histories = [];
for(var sessionId in raw){
var h = raw[sessionId];
histories.push({
s: sessionId
,h: h
});
};
histories.sort(function(a,b){
var aTime = a.h.lastUpdated;
var bTime = b.h.lastUpdated;
if( aTime < bTime ) -1;
if( aTime > bTime ) 1;
return 0;
});
if( histories.length > 1 ){
var sessionId = histories[0].s;
delete raw[sessionId];
return true;
};
return false;
};
// Create object to represent history
var h = {
entries: []
,lastUpdated: this.lastUpdated
};
for(var i=0,j=this.entries.length; i<j; ++i){
var entry = this.entries[i];
var e = {
h: entry.href
,i: entry.historySize
};
h.entries.push(e);
};
var storage = $n2.storage.getSessionStorage();
var value = storage.getItem('n2_history');
var raw = null;
try {
raw = JSON.parse(value);
} catch(e) {
raw = {};
};
if( !raw ){
raw = {};
};
raw[this.sessionId] = h;
var newValue = JSON.stringify(raw);
while( newValue.length > 2000000 ){
var removed = removeOldestEntry(raw);
if( removed ){
newValue = JSON.stringify(raw);
} else {
break;
};
};
storage.setItem('n2_history', newValue);
},
_reloadFromJson: function(h){
this.entries = [];
if( h && h.entries ){
for(var i=0,j=h.entries.length; i<j; ++i){
var e = h.entries[i];
var entry = {
href: e.h
,historySize: e.i
,event: getEventFromHref(e.h)
};
this.entries.push(entry);
};
};
this.lastUpdated = h.lastUpdated;
},
_reloadFromStorage: function(href,historySize){
var reloaded = false;
if( !this.retrievedFromStorage ){
var histories = reloadStoredHistories();
var candidateCount = 0;
var candidateHistory = undefined;
var candidateEntry = undefined;
for(var i=0,j=histories.length; i<j; ++i){
var history = histories[i];
var entry = history._entryWithHref(href,historySize);
if( entry ){
++candidateCount;
candidateHistory = history;
candidateEntry = entry;
};
};
if( 1 === candidateCount ){
if( this.sessionId === candidateHistory.sessionId ){
// No need to reload. What we found in storage
// is a copy of this history. What is in memory is
// fine.
} else {
// Adopt this history
this.sessionId = candidateHistory.sessionId;
this.lastUpdated = candidateHistory.lastUpdated;
var entries = [];
for(var i=0,j=candidateHistory.entries.length; i<j; ++i){
var entry = candidateHistory.entries[i];
entries.push(entry);
};
this.entries = entries;
this.currentEntry = candidateEntry;
reloaded = true;
};
this.retrievedFromStorage = true;
};
};
return reloaded;
},
_entryWithHref: function(href, historySize){
var entry = undefined;
for(var i=0,j=this.entries.length; i<j; ++i){
var e = this.entries[i];
if( e.href === href ){
if( e.historySize <= historySize ){
entry = e;
};
};
};
return entry;
},
_indexFromEntry: function(entry){
var index = undefined;
for(var i=0,j=this.entries.length; i<j; ++i){
var e = this.entries[i];
if( e === entry ){
index = i;
};
};
return index;
},
_handle: function(m, addr, dispatcher){
if( m ){
if( 'historyHashModified' === m.type ){
this._checkHistoryChange();
} else if( 'start' === m.type ) {
this._checkHistoryChange();
} else if( 'historyGetState' === m.type ) {
// Synchronous call
var state = this._computeState();
m.state = state;
} else if( 'historyBack' === m.type ) {
this.hint = 'back';
} else if( 'historyForward' === m.type ) {
this.hint = 'forward';
};
};
},
_checkHistoryChange: function(){
var historySize = undefined;
if( window && window.history ){
historySize = window.history.length;
};
var href = window.location.href;
if( this.lastHref !== href ){
this._historyChanged(href, historySize);
};
},
_historyChanged: function(href, historySize){
function insertNewEntry(history, href, historySize){
var entry = {
href: href
,historySize: historySize
,event: getEventFromHref(href)
};
// Replace the entry with the same history index and remove the
// entries after
var found = undefined;
for(var i=0,j=history.entries.length; i<j; ++i){
var e = history.entries[i];
if( e.historySize === historySize ){
found = i;
break;
};
};
if( typeof found === 'number' ){
history.entries = history.entries.slice(0,found);
};
history.entries.push(entry);
history.currentEntry = entry;
};
//$n2.log('historySize:'+historySize+' href:'+href);
// See if we can find the full history from storage
var reloaded = this._reloadFromStorage(href, historySize);
if( reloaded ){
$n2.log('history reloaded from storage');
} else if( this.lastHistorySize !== historySize ){
// This happens only when the history is modified
// Must create a new entry
insertNewEntry(this, href, historySize);
} else {
// In general, when the index does not change, it is because
// the user is moving forward and back through the history
// Find entries with matching href
var indices = [];
var currentIndex = undefined;
for(var i=0,j=this.entries.length; i<j; ++i){
var e = this.entries[i];
if( e.href === href ){
indices.push(i);
};
if( e === this.currentEntry ){
currentIndex = i;
};
};
if( indices.length < 1 ){
// Can not find a matching entry. Has the last entry changed?
// This happens when while the second last href is displayed,
// a new one is selected
if( this.currentEntry
&& this.currentEntry.historySize === (historySize - 1) ){
insertNewEntry(this, href, historySize);
} else {
// Not sure what to do here
$n2.log('history problem. Lost position');
};
} else {
// If hint is 'back', then reverse the indices in
// order to favour indices earlier in the history
if( 'back' === this.hint ){
indices.reverse();
};
// Find closest entry and make it current
var minDistance = undefined;
var minIndex = undefined;
if( typeof currentIndex === 'number' ){
for(var i=0,j=indices.length; i<j; ++i){
var index = indices[i];
var distance = (index < currentIndex) ?
currentIndex - index :
index - currentIndex;
if( typeof minDistance === 'undefined' ){
minDistance = distance;
minIndex = index;
} else if(distance <= minDistance) {
minDistance = distance;
minIndex = index;
};
};
};
if( typeof minIndex === 'number' ){
var currentEntry = this.entries[minIndex];
this.currentEntry = currentEntry;
};
};
};
this.lastHref = href;
this.lastHistorySize = historySize;
this.lastUpdated = (new Date()).getTime();
this.saveToStorage();
this._reportChange();
},
_computeState: function(){
var currentIndex = this._indexFromEntry(this.currentEntry);
var backIsAvailable = false;
var forwardIsAvailable = false;
if( typeof currentIndex === 'number' ){
if( currentIndex > 0 ){
backIsAvailable = true;
};
if( currentIndex < (this.entries.length - 1) ){
forwardIsAvailable = true;
};
};
var state = {
entries: this.entries
,currentEntry: this.currentEntry
,currentIndex: currentIndex
,backIsAvailable: backIsAvailable
,forwardIsAvailable: forwardIsAvailable
};
return state;
},
_reportChange: function(){
var state = this._computeState();
var m = {
type: 'historyReportState'
,state: state
};
this._dispatch(m);
//$n2.log('historyReportState', state);
},
_dispatch: function(m){
var d = this.dispatchService;
if( d ){
d.send('n2.history.History',m);
};
}
});
// ======================= MONITOR ====================================
// Tracks the changes to hash and reports them as dispatcher messages.
// Accepts 'historyBack', 'historyForward' and 'setHash' messages.
var Monitor = $n2.Class({
options: null,
initialize: function(opts_){
this.options = $n2.extend({
directory: null
},opts_);
var _this = this;
if( window && 'onhashchange' in window ) {
// Supported
$(window).bind('hashchange',function(e){
_this._hashChange(e);
});
};
var d = this._getDispatcher();
if( d ){
var f = function(m){
_this._handle(m);
};
var DH = 'n2.history.Monitor';
d.register(DH,'historyBack',f);
d.register(DH,'historyForward',f);
d.register(DH,'setHash',f);
d.register(DH,'replaceHash',f);
};
},
_getDispatcher: function(){
var d = null;
if( this.options.directory ){
d = this.options.directory.dispatchService;
};
return d;
},
_dispatch: function(m){
var d = this._getDispatcher();
if( d ){
d.send('n2.history.Monitor',m);
};
},
_hashChange: function(e){
var hash = getCurrentHash();
// Report changes in hash from browser
this._dispatch({
type: 'hashChanged'
,hash: hash
});
// Event associated with all changes top hash
this._dispatch({
type: 'historyHashModified'
,hash: hash
});
},
_handle: function(m){
if( 'historyBack' === m.type ){
if( window.history.back ) {
window.history.back();
};
} else if( 'historyForward' === m.type ){
if( window.history.forward ) {
window.history.forward();
};
} else if( 'setHash' === m.type ){
var hash = m.hash;
if( window.history.pushState ){
if( hash ) {
window.history.pushState({},'','#'+hash);
} else {
window.history.pushState({},'','#');
};
} else {
if( hash ) {
window.location = '#'+hash;
} else {
window.location = '#';
};
};
this._dispatch({
type: 'historyHashModified'
,hash: getCurrentHash()
});
} else if( 'replaceHash' === m.type ){
var hash = m.hash;
if( window.history.replaceState ){
if( hash ) {
window.history.replaceState({},'','#'+hash);
} else {
window.history.replaceState({},'','#');
};
} else {
if( hash ) {
window.location = '#'+hash;
} else {
window.location = '#';
};
};
this._dispatch({
type: 'historyHashModified'
,hash: getCurrentHash()
});
};
}
});
//======================= TRACKER ====================================
// Keeps track of currently selected document and encodes it in the
// URL. On hashChanged events, re-selects the document.
var Tracker = $n2.Class({
options: null,
last: null,
waitingDocId: null,
forceHashReplay: null,
initialize: function(opts_){
this.options = $n2.extend({
dispatchService: null
,disabled: false
},opts_);
var _this = this;
this.last = {};
this.forceHashReplay = false;
var d = this._getDispatcher();
if( d ){
var f = function(m){
_this._handle(m);
};
var DH = 'n2.history.Tracker';
d.register(DH,'start',f);
d.register(DH,'hashChanged',f);
d.register(DH,'userSelect',f);
d.register(DH,'userSelectCancelled',f);
d.register(DH,'unselected',f);
d.register(DH,'documentCreated',f);
d.register(DH,'documentUpdated',f);
d.register(DH,'documentDeleted',f);
d.register(DH,'searchInitiate',f);
d.register(DH,'editInitiate',f);
d.register(DH,'editCreateFromGeometry',f);
d.register(DH,'editClosed',f);
};
},
getForceHashReplay: function(){
return this.forceHashReplay;
},
setForceHashReplay: function(flag){
if( flag ){
this.forceHashReplay = true;
} else {
this.forceHashReplay = false;
};
},
_getDispatcher: function(){
var d = null;
if( this.options ){
d = this.options.dispatchService;
};
return d;
},
_dispatch: function(m){
var d = this._getDispatcher();
if( d ){
d.send('n2.history.Tracker',m);
};
},
_synchronousCall: function(m){
var d = this._getDispatcher();
if( d ){
d.synchronousCall('n2.history.Tracker',m);
};
},
_handle: function(m){
if( this.options.disabled ){
return;
};
if( 'start' === m.type ){
var hash = getCurrentHash();
if( hash && hash !== '') {
this._dispatch({
type: 'hashChanged'
,hash: hash
});
};
} else if( 'userSelect' === m.type ){
if( m.docId ) {
this.last = {
selected: m.docId
};
if( !m._suppressSetHash ) {
var type = 'setHash';
if( m._replaceHash ) type = 'replaceHash';
var entry = createNewEntry({t:TYPE_SELECTED,i:m.docId});
var hash = computeHashFromEntry(entry);
this._dispatch({
type: type
,hash: hash
});
this.waitingDocId = null;
};
} else if( m.docIds ) {
this.last = {
multi_selected: m.docIds
};
if( !m._suppressSetHash ) {
var type = 'setHash';
if( m._replaceHash ) type = 'replaceHash';
// Save doc ids with a session object associated
// with the timestamp
var ts = (new Date()).getTime();
saveStorageInfo(ts, {
docIds: m.docIds
});
var entry = createNewEntry({t:TYPE_MULTI_SELECTED,s:ts});
var hash = computeHashFromEntry(entry);
this._dispatch({
type: type
,hash: hash
});
this.waitingDocId = null;
};
};
} else if( 'userSelectCancelled' === m.type ){
this.last = {
selectCancel: true
};
if( !m._suppressSetHash ) {
this._dispatch({
type: 'historyBack'
});
};
} else if( 'unselected' === m.type ){
this.last = {
unselected: true
};
if( !m._suppressSetHash ) {
this._dispatch({
type: 'setHash'
,hash: null
});
this.waitingDocId = null;
};
} else if( 'documentDeleted' === m.type ){
var deletedDocId = m.docId;
if( this.last.selected === deletedDocId ){
this.last = {
deleted: deletedDocId
};
this._dispatch({
type: 'historyBack'
});
};
} else if( 'searchInitiate' === m.type ){
this.last = {
search: m.searchLine
};
if( !m._suppressSetHash ) {
var entry = createNewEntry({t:TYPE_SEARCH,l:m.searchLine});
var hash = computeHashFromEntry(entry);
this._dispatch({
type: 'setHash'
,hash: hash
});
this.waitingDocId = null;
};
} else if( 'editInitiate' === m.type
|| 'editCreateFromGeometry' === m.type ){
this.last = {
edit: true
};
this.waitingDocId = null;
this._dispatch({
type: 'setHash'
,hash: 'nostate'
});
} else if( 'editClosed' === m.type ) {
var lastIsEditInitiate = false;
if( this.last.edit ){
lastIsEditInitiate = true;
};
this.last = {
editClosed: true
};
if( m.inserted && !m.submissionDs) {
// A document was created. Select it so it is reflected in the
// history hash
this._dispatch({
type: 'userSelect'
,docId: m.doc._id
,_replaceHash: true
});
} else if( m.inserted && m.submissionDs ){
// For now, go back and wait for document
if(lastIsEditInitiate) {
this._dispatch({
type: 'historyBack'
});
};
this.waitingDocId = m.doc._id;
} else {
// cancelled or deleted
if(lastIsEditInitiate) {
this._dispatch({
type: 'historyBack'
});
};
};
} else if( 'hashChanged' === m.type ){
var o = null;
if( !this.last.editClosed ){
this.waitingDocId = null;
};
if( 'nostate' === m.hash ){
// Do not do anything
} else {
var c = {
type: 'historyIsHashChangePermitted'
,permitted: true
};
this._synchronousCall(c);
if( c.permitted ){
if( '' === m.hash || !m.hash ){
if( !this.last.unselected ){
this._dispatch({
type: 'unselected'
,_suppressSetHash: true
});
};
} else {
// Attempt to interpret hash
this._reloadHash(m.hash);
};
} else {
// Go back to edit state
this._dispatch({
type: 'historyForward'
});
};
};
} else if( 'documentCreated' === m.type
|| 'documentUpdated' === m.type ){
if( m.docId && m.docId === this.waitingDocId ){
// OK, we have been waiting for this document. Select it
this._dispatch({
type: 'userSelect'
,docId: m.docId
});
};
};
},
_reloadHash: function(hash){
var m = getEventFromHash(hash);
if( m ){
m._suppressSetHash = true;
if( 'userSelect' === m.type
&& typeof m.docId === 'string'
&& this.last.selected === m.docId ){
// Do not replay selection if already selected
if( this.forceHashReplay ){
// Unless specifically requested
this._dispatch(m);
};
} else {
this._dispatch(m);
};
};
}
});
// ======================= SESSION STORAGE ========================
// Handle saving information relating to a URL
function getStorageInfo(timestamp){
var storage = $n2.storage.getSessionStorage();
var value = storage.getItem('n2_historyHash');
if( !value ){
return {};
};
var raw = null;
try {
raw = JSON.parse(value);
} catch(e) {
$n2.log('Error parsing history hash(1):'+value);
raw = {};
};
if( !raw ){
raw = {};
};
var info = raw[''+timestamp];
if( !info ){
return {};
};
return info;
};
function saveStorageInfo(timestamp, info){
$n2.log('Save hash '+timestamp);
var storage = $n2.storage.getSessionStorage();
var value = storage.getItem('n2_historyHash');
var raw = null;
try {
raw = JSON.parse(value);
} catch(e) {
$n2.log('Error parsing history hash(2):'+value);
raw = {};
};
if( !raw ){
raw = {};
};
raw[''+timestamp] = info;
var newValue = JSON.stringify(raw);
while( newValue.length > 2000000 ){
_removeOldestEntry(raw);
newValue = JSON.stringify(raw);
};
storage.setItem('n2_historyHash', newValue);
return value;
};
function _removeOldestEntry(raw){
var oldestKey = null;
for(var key in raw){
if( !oldestKey ){
oldestKey = key;
} else if( key < oldestKey ) {
oldestKey = key;
};
};
if( oldestKey ){
delete raw[oldestKey];
};
};
//======================= EXPORT ++++++++++========================
$n2.history = {
Monitor: Monitor
,Tracker: Tracker
,History: History
};
})(jQuery,nunaliit2);
| bsd-3-clause |
mikest/geode | geode/geometry/Bezier.cpp | 15380 | #include "Bezier.h"
#include <geode/vector/Matrix4x4.h>
#include <geode/vector/Matrix.h>
#include <geode/utility/stl.h>
#include <geode/python/Class.h>
#include <geode/python/stl.h>
#include <geode/geometry/polygon.h>
#include <iostream>
namespace geode {
using std::cout;
using std::endl;
template<> GEODE_DEFINE_TYPE(Bezier<2>)
template<> GEODE_DEFINE_TYPE(Knot<2>)
static double interpolate(double v0, double v1, double v2, double v3, double t) {
Vector<real,4> i(v0,v1,v2,v3);
Matrix<real,4> mx( -1, 3, -3, 1,
3, -6, 3, 0,
-3,3, 0, 0,
1, 0,0, 0);
Vector<real,4> a = mx*i; // transpose because of legacy constructor
return a.w + t*(a.z + t*(a.y + t*a.x));
}
template<int d> static Vector<real,d> point(Vector<real,d> v0, Vector<real,d> v1, Vector<real,d> v2, Vector<real,d> v3, double t) {
Vector<real,d> result;
for (int i = 0; i < d; i++)
result[i] = interpolate(v0[i],v1[i],v2[i],v3[i],t);
return result;
}
template<int d> Tuple<Array<Vector<real,d>>, vector<int>> Bezier<d>::evaluate_core(const InvertibleBox& range, int res) const{
Array<Vector<real,d>> path;
vector<int> forced;
if (knots.size()<=1) return tuple(path,forced);
Vector<real,d> p1, p2, p3, p4;
auto it = knots.upper_bound(range.begin);
auto end = knots.lower_bound(range.end);
if (end == knots.end()) end--;
if (it!=knots.begin()) it--;
GEODE_ASSERT(it!=knots.end() && end!=knots.end());
while(it!=end){
//jump across null segment end->beginning for closed
if(b_closed && it->first == t_max()){
if(range.end == t_min() || range.end == t_max())
break;
it = knots.begin();
}
p1 = it->second->pt;
p2 = it->second->tangent_out;
it++;
if(!b_closed) GEODE_ASSERT(it!=knots.end());
if(it == knots.end()) it = knots.begin(); // wrap around at end
p3 = it->second->tangent_in;
p4 = it->second->pt;
//ignore the segment if the two points are practically indistinguishable
if ((p4-p1).magnitude() > 1e-8 || (dot((p2-p1).normalized(),(p3-p4).normalized()) < 1-1e-7) ) {
// first point in this segment
forced.push_back(path.size());
path.append(geode::point(p1,p2,p3,p4,0));
for (int j=1;j<res;j++) {
real t = j/(real)(res); // (0,1)
path.append(geode::point(p1,p2,p3,p4,t));
}
}
}
// last point
forced.push_back(path.size());
path.append(end->second->pt);
return tuple(path, forced);
}
template<int d> Array<Vector<real,d>> Bezier<d>::evaluate(const InvertibleBox& range, int res) const{
return evaluate_core(range, res).x;
}
template<int d> real Bezier<d>::arclength(const InvertibleBox& range, int res) const {
Array<Vector<real,d>> path = evaluate(range,std::max(res, 500));
// measure the length of the path
real total_length = 0;
for (int i = 1; i < (int)path.size(); ++i) {
total_length += (path[i-1] - path[i]).magnitude();
}
return total_length;
}
template<int d> Array<Vector<real,d>> Bezier<d>::alen_evaluate(const InvertibleBox& range, int res) const{
const bool debug = false;
if (debug)
std::cout << "sampling range " << range << " with " << res << " segments." << " bezier range: " << t_range << std::endl;
auto pathinfo = evaluate_core(range,std::max(10*res, 500));
Array<Vector<real,d>> const &path = pathinfo.x;
vector<int> const &forced = pathinfo.y;
bool ignore_forced = false;
if((int)forced.size() >= res+1) ignore_forced = true;
// measure the length of the path
real total_length = 0;
for (int i = 1; i < (int)path.size(); ++i) {
total_length += (path[i-1] - path[i]).magnitude();
}
if (debug)
std::cout << " total length " << total_length << std::endl;
// pick points on the interior at distance i/n*l for i = 0...n
Array<Vector<real,d>> samples;
samples.append(path.front());
int forced_idx = 1;
real step = total_length/(double)res;
if (total_length == 0)
return samples;
real distance = 0;
real sample_d = samples.size()*step;
for (int i = 1; i < (int)path.size()-1; ++i) {
distance += (path[i-1] - path[i]).magnitude();
// this index was forced, we have to add it no matter what
// exchange it for either the previous or the next point
if (forced[forced_idx] == i && !ignore_forced) {
forced_idx++;
if (fabs(sample_d-distance) < step/2 &&
(int)samples.size() < (int)res-2 // cannot skip a sample if this is the last
) {
// get rid of the next sample
// (implicitly by change in sample_d below)
if (debug)
std::cout << " skipping next sample to make space for forced sample" << std::endl;
} else {
// get rid of the previous sample
samples.resize(samples.size()-1);
if (debug)
std::cout << " removed last sample to make space for forced sample" << std::endl;
}
if (debug)
std::cout << " adding forced sample " << samples.size() << " at d=" << distance << " sample_d=" << sample_d << std::endl;
samples.append(path[i]);
sample_d = samples.size()*step;
} else {
if (distance >= sample_d) {
if (debug)
std::cout << " adding sample " << samples.size() << " at d=" << distance << " sample_d=" << sample_d << std::endl;
samples.append(path[i]);
sample_d = samples.size()*step;
}
}
}
samples.append(path.back());
if (debug)
std::cout << " samples: " << samples.size() << " res+1: " << res+1 << " sample_d: " << sample_d << " len: " << total_length << std::endl;
GEODE_ASSERT(samples.size() >= 2);
if (samples.size() != res+1)
std::cout << "incorrect number of samples! expected " << res+1 << ", found " << samples.size() << std::endl;
GEODE_ASSERT(samples.size() == res+1);
return samples;
}
template<int d> Span<d> Bezier<d>::segment(real t) const {
auto it = knots.lower_bound(t);
GEODE_ASSERT(it != knots.end());
if (it != knots.begin()) --it;
auto iit = it; ++iit;
return Span<d>(it->second,iit->second,it->first,iit->first);
}
template<int d> Vector<real,d> Bezier<d>::point(real t) const{
if(knots.count(t)) return knots.find(t)->second->pt;
Span<d> seg = segment(t);
if(seg.start_t==seg.end_t) {Vector<real,d> v; v.fill(numeric_limits<real>::infinity()); return v;}
return geode::point(seg.start->pt,seg.start->tangent_out,seg.end->tangent_in,seg.end->pt,(t-seg.start_t)/(seg.end_t-seg.start_t));
}
template<int d> Vector<real,d> Bezier<d>::tangent(real t) const{
Span<d> seg = segment(t);
return tangent(seg, t);
}
template<int d> Vector<real,d> Bezier<d>::tangent(Span<d> const &seg, real t) const{
if (seg.start_t==seg.end_t) {
Vector<real,d> v;
v.fill(numeric_limits<real>::infinity());
return v;
}
real subt = (t-seg.start_t)/(seg.end_t-seg.start_t);
/*
real u = 1.-subt;
TV out = (seg.start.pt*-3*u*u + seg.start.tangent_out*3*(u*u - 2*u*subt) + seg.end.tangent_in*3*(2*u*subt - subt*subt) + seg.end.pt*3*subt*subt).normalized();
*/
Matrix<real,4,d> P;
for(int i =0; i < d; i++){
P.set_column(i,Vector<real,4>(seg.start->pt[i],seg.start->tangent_out[i],seg.end->tangent_in[i],seg.end->pt[i]));
}
Matrix<real,4> A( -1, 3, -3, 1,
3, -6, 3, 0,
-3,3, 0, 0,
1, 0,0, 0);
Matrix<real,4,d> AP = A*P;
Matrix<real,4,1> tt; tt.set_column(0,Vector<real,4>(3*subt*subt,2*subt,1,0));
return (tt.transposed()*AP).transposed().column(0).normalized();
}
template<int d> Vector<real,d> Bezier<d>::left_tangent(real t) const {
if (knots.count(t)) {
// get the knot's tangent if it's not singular
auto kit = knots.find(t);
auto const &k = kit->second;
if (k->singular_in()) {
// evaluate tangent at t in the segment just before this knot
// if it is the first knot, evaluate in the last segment at tend
auto iit = kit;
if (kit != knots.begin())
--kit;
else {
// set kit/iit to end-2,end-1
kit = iit = --knots.end();
--kit;
}
Span<d> seg = Span<d>(kit->second,iit->second,kit->first,iit->first);
return tangent(seg,iit->first);
} else {
return k->tangent_in;
}
} else {
return tangent(t);
}
}
template<int d> Vector<real,d> Bezier<d>::right_tangent(real t) const {
if (knots.count(t)) {
// get the knot's tangent if it's not singular
auto kit = knots.find(t);
auto const &k = kit->second;
if (k->singular_out()) {
// evaluate tangent at t in the segment just after this knot
// if it is the last knot, evaluate in the first segment at tbegin
auto iit = kit;
++iit;
if (iit == knots.end()) {
iit = kit = knots.begin();
++iit;
}
Span<d> seg = Span<d>(kit->second,iit->second,kit->first,iit->first);
return tangent(seg,kit->first);
} else {
return k->tangent_out;
}
} else {
return tangent(t);
}
}
template<int d> real Bezier<d>::angle_at(real t) const {
return angle_between(left_tangent(t), right_tangent(t));
}
template<int d> real Bezier<d>::polygon_angle_at(real t) const {
auto jt = knots.find(t);
if (jt == knots.end())
return 0.;
auto it = jt;
if (it == knots.begin())
it = --(--knots.end());
auto kt = jt; kt++;
if (kt == knots.end())
kt = ++knots.begin();
auto vin = jt->second->pt - it->second->pt;
auto vout = kt->second->pt - jt->second->pt;
return angle_between(vin, vout);
}
template<int d> Array<Vector<real,d>> Bezier<d>::evaluate(int res) const{
if(t_range == Box<real>(0)) return Array<Vector<real,d>>();
return evaluate(InvertibleBox(t_range.min, t_range.max),res);
}
template<int d> Array<Vector<real,d>> Bezier<d>::alen_evaluate(int res) const{
if(t_range == Box<real>(0)) return Array<Vector<real,d>>();
return alen_evaluate(InvertibleBox(t_range.min, t_range.max),res);
}
template<int d> void Bezier<d>::append_knot(const TV& pt, TV tin, TV tout){
if(!isfinite(tin)) tin = pt;
if(!isfinite(tout)) tout = pt;
if(knots.size()) t_range.max+=1.;
knots.insert(make_pair(t_range.max,new_<Knot<d>>(pt,tin,tout)));
}
template<int d> void Bezier<d>::insert_knot(const real t){
if(knots.count(t)) return;
auto it = knots.upper_bound(t);
GEODE_ASSERT(it!=knots.begin() && it!=knots.end());
// have we accounted for all collision cases?
Knot<d>& pt2 = *it->second; real t1 = it->first;
--it;
Knot<d>& pt1 = *it->second; real t2 = it->first;
real isub_t = (t-t1)/(t2-t1);
real sub_t = 1-isub_t;
//via de casteljau algorithm http://en.wikipedia.org/wiki/De_Casteljau's_algorithm
TV prev_out = isub_t*pt1.pt + sub_t*pt1.tangent_out;
TV sub_pt = isub_t*pt1.tangent_out + sub_t*pt2.tangent_in;
TV new_in = isub_t*prev_out + sub_t*sub_pt;
TV next_in = isub_t*pt2.tangent_in + sub_t*pt2.pt;
TV new_out = isub_t*sub_pt + sub_t*next_in;
TV new_pt = isub_t*new_in + sub_t*new_out;
knots.insert(make_pair(t,new_<Knot<d>>(new_pt)));
pt1.tangent_out = prev_out;
Ref<Knot<d> > k = knots.find(t)->second;
k->tangent_in = new_in;
k->tangent_out = new_out;
pt2.tangent_in = next_in;
}
template<int d> Box<Vector<real,d> > Bezier<d>::bounding_box() const{
Box<Vector<real,d> > bx;
for(auto& pr : knots){
const Knot<d>& knot = *pr.second;
bx.enlarge(knot.pt);
bx.enlarge(knot.tangent_in);
bx.enlarge(knot.tangent_out);
}
return bx;
}
template<int d> void Bezier<d>::translate(const TV& t){
for(auto& k : knots){
if(!(k.first == t_max() && closed())) (*k.second)+=t;
}
}
template<int d> void Bezier<d>::scale(real amt, const TV& ctr){
TV c = isfinite(ctr) ? ctr : bounding_box().center();
for(auto& k : knots){
TV pt = k.second->pt;
if(!(k.first == t_max() && closed())) {
k.second->pt = (k.second->pt - c)*amt + c;
k.second->tangent_in = (k.second->tangent_in - c)*amt + c;
k.second->tangent_out = (k.second->tangent_out - c)*amt + c;
}
}
}
template<int d> void Bezier<d>::fuse_ends(){
if(knots.size()<=2) return;
TV b = knots.begin()->second->pt;
auto it = knots.end(); --it;
if(b_closed) --it; //jump back one because a closed bezier has a doubled beginning
real sz = 1e-5*bounding_box().sizes().magnitude();
GEODE_ASSERT(it!=knots.end());
TV e = it->second->pt;
if((b-e).sqr_magnitude() < sz*sz){
if(knots.find(t_range.max)->second == knots.begin()->second){
knots.erase(t_range.max);
auto end = knots.end(); --end;
t_range.max = end->first;
}
TV tin = knots.find(t_range.max)->second->tangent_in;
knots.erase(t_range.max);
knots.insert(make_pair(t_range.max,knots.find(t_range.min)->second));
knots.begin()->second->tangent_in = tin;
b_closed = true;
}
}
template<int d> void Bezier<d>::close(){
if(b_closed) return;
GEODE_ASSERT(knots.size()>2);
t_range.max += (T)1;
knots.insert(make_pair(t_range.max,knots.find(t_range.min)->second));
b_closed = true;
}
template<int d> void Bezier<d>::erase(real t){
auto it = knots.find(t);
GEODE_ASSERT(it!=knots.end());
if(it==knots.begin()) {
t_range.min=(++it)->first;
if(b_closed){
auto end = knots.end(); --end;
knots.erase(end);
end = knots.end(); --end;
t_range.max = end->first;
b_closed = false;
}
}else if(++it==knots.end()){
--it;
t_range.max=(--it)->first;
if(b_closed){
auto b = knots.begin();
knots.erase(b);
b = knots.begin();
t_range.min = b->first;
b_closed = false;
}
}
knots.erase(t);
}
template<int d> Bezier<d>::Bezier() : t_range(0),b_closed(false){}
template<int d> Bezier<d>::Bezier(const Bezier<d>& b) : t_range(b.t_range),b_closed(b.b_closed)
{
for(auto& k : b.knots)
knots.insert(make_pair(k.first,(k.first==b.t_max() && b.closed()) ? knots.begin()->second : new_<Knot<d>>(*k.second)));
}
template<int d> Bezier<d>::~Bezier(){}
template<int d> real PointSolve<d>::distance(real t){
Vector<real,d> p = geode::point(k1.second->pt,k1.second->tangent_out,k2.second->tangent_in,k2.second->pt,t/(k2.first-k1.first));
return (p-pt).magnitude();
}
template class Bezier<2>;
template struct PointSolve<2>;
template struct PointSolve<3>;
template struct Span<2>;
template struct Span<3>;
#ifdef GEODE_PYTHON
PyObject* to_python(const InvertibleBox& self) {
return to_python(tuple(self.begin,self.end));
}
InvertibleBox FromPython<InvertibleBox>::convert(PyObject* object) {
const auto extents = from_python<Tuple<real,real>>(object);
return InvertibleBox(extents.x,extents.y);
}
#endif
std::ostream& operator<<(std::ostream& os, const InvertibleBox& ib) {
os << "[" << ib.begin << ", " << ib.end << "]";
return os;
}
}
using namespace geode;
void wrap_bezier() {
{
typedef Knot<2> Self;
Class<Self>("Knot")
.GEODE_INIT()
.GEODE_FIELD(pt)
.GEODE_FIELD(tangent_in)
.GEODE_FIELD(tangent_out)
;
}
{
typedef Bezier<2> Self;
typedef Array<Vector<real,2>>(Self::*eval_t)(int)const;
Class<Self>("Bezier")
.GEODE_INIT()
.GEODE_FIELD(knots)
.GEODE_METHOD(t_max)
.GEODE_METHOD(t_min)
.GEODE_METHOD(closed)
.GEODE_METHOD(close)
.GEODE_METHOD(fuse_ends)
.GEODE_OVERLOADED_METHOD(eval_t, evaluate)
.GEODE_METHOD(append_knot)
;
}
}
| bsd-3-clause |
N3X15/MiddleCraft | src-interface/net/minecraft/server/NoiseGenerator.java | 235 | // AUTOMATICALLY GENERATED BY MIDDLECRAFT
/* Allows plugins to access server functions without needing to link the actual server Jar. */
package net.minecraft.server;
public abstract class NoiseGenerator {
// FIELDS
// METHODS
}
| bsd-3-clause |
wolfspyre/go-collectd | cdtime/cdtime_test.go | 2116 | package cdtime // import "collectd.org/cdtime"
import (
"testing"
"time"
)
// TestConversion converts a time.Time to a cdtime.Time and back, expecting the
// original time.Time back.
func TestConversion(t *testing.T) {
cases := []string{
"2009-02-04T21:00:57-08:00",
"2009-02-04T21:00:57.1-08:00",
"2009-02-04T21:00:57.01-08:00",
"2009-02-04T21:00:57.001-08:00",
"2009-02-04T21:00:57.0001-08:00",
"2009-02-04T21:00:57.00001-08:00",
"2009-02-04T21:00:57.000001-08:00",
"2009-02-04T21:00:57.0000001-08:00",
"2009-02-04T21:00:57.00000001-08:00",
"2009-02-04T21:00:57.000000001-08:00",
}
for _, s := range cases {
want, err := time.Parse(time.RFC3339Nano, s)
if err != nil {
t.Errorf("time.Parse(%q): got (%v, %v), want (<time.Time>, nil)", s, want, err)
continue
}
cdtime := New(want)
got := cdtime.Time()
if !got.Equal(want) {
t.Errorf("cdtime.Time(): got %v, want %v", got, want)
}
}
}
func TestDecompose(t *testing.T) {
cases := []struct {
in Time
s, ns int64
}{
// 1546167635576736987 / 2^30 = 1439980823.1524536265...
{Time(1546167635576736987), 1439980823, 152453627},
// 1546167831554815222 / 2^30 = 1439981005.6712620165...
{Time(1546167831554815222), 1439981005, 671262017},
// 1546167986577716567 / 2^30 = 1439981150.0475896215...
{Time(1546167986577716567), 1439981150, 47589622},
}
for _, c := range cases {
s, ns := c.in.decompose()
if s != c.s || ns != c.ns {
t.Errorf("decompose(%d) = (%d, %d) want (%d, %d)", c.in, s, ns, c.s, c.ns)
}
}
}
func TestNewNano(t *testing.T) {
cases := []struct {
ns uint64
want Time
}{
// 1439981652801860766 * 2^30 / 10^9 = 1546168526406004689.4
{1439981652801860766, Time(1546168526406004689)},
// 1439981836985281914 * 2^30 / 10^9 = 1546168724171447263.4
{1439981836985281914, Time(1546168724171447263)},
// 1439981880053705608 * 2^30 / 10^9 = 1546168770415815077.4
{1439981880053705608, Time(1546168770415815077)},
}
for _, c := range cases {
got := newNano(c.ns)
if got != c.want {
t.Errorf("newNano(%d) = %d, want %d", c.ns, got, c.want)
}
}
}
| isc |
RangerMauve/lignum | examples/exampleStringBuilder.js | 466 | "use strict";
var path = require("path");
var fs = require("fs");
var stringBuilder = require("../lib/stringBuilder");
var treeify = require("../lib/treeify");
var tokenize = require("../lib/tokenize");
var templateName = path.join(__dirname, "./example.html");
var template = fs.readFileSync(templateName, "utf8");
var inspect = require("util").inspect;
var tokens = tokenize(template);
var tree = treeify(tokens);
var fn = stringBuilder(tree);
console.log(fn);
| isc |
damienmortini/dlib | node_modules/jsdoc/lib/jsdoc/readme.js | 553 | /**
* Make the contents of a README file available to include in the output.
* @module jsdoc/readme
*/
const env = require('jsdoc/env');
const fs = require('jsdoc/fs');
const markdown = require('jsdoc/util/markdown');
/**
* Represents a README file.
*/
class ReadMe {
/**
* @param {string} path - The filepath to the README.
*/
constructor(path) {
const content = fs.readFileSync(path, env.opts.encoding);
const parse = markdown.getParser();
this.html = parse(content);
}
}
module.exports = ReadMe;
| isc |
LukasBombach/new-type-js | src/utilities/environment.js | 211 | 'use strict';
export default class Environment {
/**
* Is the user's computer a Macintosh computer
* @type {boolean}
*/
static get mac() { return navigator.appVersion.indexOf('Mac') !== -1; };
}
| mit |
s4san/WSN | Simulation/src/base/package-info.java | 55 | /**
*
*/
/**
* @author welcome
*
*/
package base; | mit |
tzanetos/graphs | graphs/libs/ubigraph/UbiGraph-alpha-0.2.4-Linux64-Ubuntu-8.04/examples/Java/examples/JavaCC/JavaParser.java | 216784 | /* Generated By:JJTree&JavaCC: Do not edit this line. JavaParser.java */
import java.io.*;
/**
* Grammar to parse Java version 1.5
* @author Sreenivasa Viswanadha - Simplified and enhanced for 1.5
*/
public class JavaParser/*@bgen(jjtree)*/implements JavaParserTreeConstants, JavaParserConstants {/*@bgen(jjtree)*/
protected JJTJavaParserState jjtree = new JJTJavaParserState();/**
* Class to hold modifiers.
*/
static public final class ModifierSet
{
/* Definitions of the bits in the modifiers field. */
public static final int PUBLIC = 0x0001;
public static final int PROTECTED = 0x0002;
public static final int PRIVATE = 0x0004;
public static final int ABSTRACT = 0x0008;
public static final int STATIC = 0x0010;
public static final int FINAL = 0x0020;
public static final int SYNCHRONIZED = 0x0040;
public static final int NATIVE = 0x0080;
public static final int TRANSIENT = 0x0100;
public static final int VOLATILE = 0x0200;
public static final int STRICTFP = 0x1000;
/** A set of accessors that indicate whether the specified modifier
is in the set. */
public boolean isPublic(int modifiers)
{
return (modifiers & PUBLIC) != 0;
}
public boolean isProtected(int modifiers)
{
return (modifiers & PROTECTED) != 0;
}
public boolean isPrivate(int modifiers)
{
return (modifiers & PRIVATE) != 0;
}
public boolean isStatic(int modifiers)
{
return (modifiers & STATIC) != 0;
}
public boolean isAbstract(int modifiers)
{
return (modifiers & ABSTRACT) != 0;
}
public boolean isFinal(int modifiers)
{
return (modifiers & FINAL) != 0;
}
public boolean isNative(int modifiers)
{
return (modifiers & NATIVE) != 0;
}
public boolean isStrictfp(int modifiers)
{
return (modifiers & STRICTFP) != 0;
}
public boolean isSynchronized(int modifiers)
{
return (modifiers & SYNCHRONIZED) != 0;
}
public boolean isTransient(int modifiers)
{
return (modifiers & TRANSIENT) != 0;
}
public boolean isVolatile(int modifiers)
{
return (modifiers & VOLATILE) != 0;
}
/**
* Removes the given modifier.
*/
static int removeModifier(int modifiers, int mod)
{
return modifiers & ~mod;
}
}
public JavaParser(String fileName)
{
this(System.in);
try { ReInit(new FileInputStream(new File(fileName))); }
catch(Exception e) { e.printStackTrace(); }
}
public static void main(String args[]) {
JavaParser parser;
if (args.length == 0) {
System.out.println("Java Parser Version 1.1: Reading from standard input . . .");
parser = new JavaParser(System.in);
} else if (args.length == 1) {
System.out.println("Java Parser Version 1.1: Reading from file " + args[0] + " . . .");
try {
parser = new JavaParser(new java.io.FileInputStream(args[0]));
} catch (java.io.FileNotFoundException e) {
System.out.println("Java Parser Version 1.1: File " + args[0] + " not found.");
return;
}
} else {
System.out.println("Java Parser Version 1.1: Usage is one of:");
System.out.println(" java JavaParser < inputfile");
System.out.println("OR");
System.out.println(" java JavaParser inputfile");
return;
}
try {
parser.CompilationUnit();
System.out.println("Java Parser Version 1.1: Java program parsed successfully.");
} catch (ParseException e) {
System.out.println(e.getMessage());
System.out.println("Java Parser Version 1.1: Encountered errors during parse.");
}
}
static void jjtreeOpenNodeScope(Node n)
{
}
static void jjtreeCloseNodeScope(Node n)
{
}
/*****************************************
* THE JAVA LANGUAGE GRAMMAR STARTS HERE *
*****************************************/
/*
* Program structuring syntax follows.
*/
final public void CompilationUnit() throws ParseException {
/*@bgen(jjtree) CompilationUnit */
ASTCompilationUnit jjtn000 = new ASTCompilationUnit(this, JJTCOMPILATIONUNIT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case PACKAGE:
PackageDeclaration();
break;
default:
;
}
label_1:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case IMPORT:
;
break;
default:
break label_1;
}
ImportDeclaration();
}
label_2:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ABSTRACT:
case CLASS:
case ENUM:
case FINAL:
case INTERFACE:
case NATIVE:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case STATIC:
case STRICTFP:
case SYNCHRONIZED:
case TRANSIENT:
case VOLATILE:
case SEMICOLON:
case AT:
;
break;
default:
break label_2;
}
TypeDeclaration();
}
jj_consume_token(0);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void PackageDeclaration() throws ParseException {
/*@bgen(jjtree) PackageDeclaration */
ASTPackageDeclaration jjtn000 = new ASTPackageDeclaration(this, JJTPACKAGEDECLARATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(PACKAGE);
Name();
jj_consume_token(SEMICOLON);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ImportDeclaration() throws ParseException {
/*@bgen(jjtree) ImportDeclaration */
ASTImportDeclaration jjtn000 = new ASTImportDeclaration(this, JJTIMPORTDECLARATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(IMPORT);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case STATIC:
jj_consume_token(STATIC);
break;
default:
;
}
Name();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case DOT:
jj_consume_token(DOT);
jj_consume_token(STAR);
break;
default:
;
}
jj_consume_token(SEMICOLON);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
/*
* Modifiers. We match all modifiers in a single rule to reduce the chances of
* syntax errors for simple modifier mistakes. It will also enable us to give
* better error messages.
*/
final public int Modifiers() throws ParseException {
/*@bgen(jjtree) Modifiers */
ASTModifiers jjtn000 = new ASTModifiers(this, JJTMODIFIERS);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);int modifiers = 0;
try {
label_3:
while (true) {
if (jj_2_1(2)) {
;
} else {
break label_3;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case PUBLIC:
jj_consume_token(PUBLIC);
modifiers |= ModifierSet.PUBLIC;
break;
case STATIC:
jj_consume_token(STATIC);
modifiers |= ModifierSet.STATIC;
break;
case PROTECTED:
jj_consume_token(PROTECTED);
modifiers |= ModifierSet.PROTECTED;
break;
case PRIVATE:
jj_consume_token(PRIVATE);
modifiers |= ModifierSet.PRIVATE;
break;
case FINAL:
jj_consume_token(FINAL);
modifiers |= ModifierSet.FINAL;
break;
case ABSTRACT:
jj_consume_token(ABSTRACT);
modifiers |= ModifierSet.ABSTRACT;
break;
case SYNCHRONIZED:
jj_consume_token(SYNCHRONIZED);
modifiers |= ModifierSet.SYNCHRONIZED;
break;
case NATIVE:
jj_consume_token(NATIVE);
modifiers |= ModifierSet.NATIVE;
break;
case TRANSIENT:
jj_consume_token(TRANSIENT);
modifiers |= ModifierSet.TRANSIENT;
break;
case VOLATILE:
jj_consume_token(VOLATILE);
modifiers |= ModifierSet.VOLATILE;
break;
case STRICTFP:
jj_consume_token(STRICTFP);
modifiers |= ModifierSet.STRICTFP;
break;
case AT:
Annotation();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
jjtreeCloseNodeScope(jjtn000);
{if (true) return modifiers;}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
throw new Error("Missing return statement in function");
}
/*
* Declaration syntax follows.
*/
final public void TypeDeclaration() throws ParseException {
/*@bgen(jjtree) TypeDeclaration */
ASTTypeDeclaration jjtn000 = new ASTTypeDeclaration(this, JJTTYPEDECLARATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);int modifiers;
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case SEMICOLON:
jj_consume_token(SEMICOLON);
break;
case ABSTRACT:
case CLASS:
case ENUM:
case FINAL:
case INTERFACE:
case NATIVE:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case STATIC:
case STRICTFP:
case SYNCHRONIZED:
case TRANSIENT:
case VOLATILE:
case AT:
modifiers = Modifiers();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case CLASS:
case INTERFACE:
ClassOrInterfaceDeclaration(modifiers);
break;
case ENUM:
EnumDeclaration(modifiers);
break;
case AT:
AnnotationTypeDeclaration(modifiers);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ClassOrInterfaceDeclaration(int modifiers) throws ParseException {
/*@bgen(jjtree) ClassOrInterfaceDeclaration */
ASTClassOrInterfaceDeclaration jjtn000 = new ASTClassOrInterfaceDeclaration(this, JJTCLASSORINTERFACEDECLARATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);boolean isInterface = false;
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case CLASS:
jj_consume_token(CLASS);
break;
case INTERFACE:
jj_consume_token(INTERFACE);
isInterface = true;
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
jj_consume_token(IDENTIFIER);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LT:
TypeParameters();
break;
default:
;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case EXTENDS:
ExtendsList(isInterface);
break;
default:
;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case IMPLEMENTS:
ImplementsList(isInterface);
break;
default:
;
}
ClassOrInterfaceBody(isInterface);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ExtendsList(boolean isInterface) throws ParseException {
/*@bgen(jjtree) ExtendsList */
ASTExtendsList jjtn000 = new ASTExtendsList(this, JJTEXTENDSLIST);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);boolean extendsMoreThanOne = false;
try {
jj_consume_token(EXTENDS);
ClassOrInterfaceType();
label_4:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
;
break;
default:
break label_4;
}
jj_consume_token(COMMA);
ClassOrInterfaceType();
extendsMoreThanOne = true;
}
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
jjtreeCloseNodeScope(jjtn000);
if (extendsMoreThanOne && !isInterface)
{if (true) throw new ParseException("A class cannot extend more than one other class");}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ImplementsList(boolean isInterface) throws ParseException {
/*@bgen(jjtree) ImplementsList */
ASTImplementsList jjtn000 = new ASTImplementsList(this, JJTIMPLEMENTSLIST);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(IMPLEMENTS);
ClassOrInterfaceType();
label_5:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
;
break;
default:
break label_5;
}
jj_consume_token(COMMA);
ClassOrInterfaceType();
}
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
jjtreeCloseNodeScope(jjtn000);
if (isInterface)
{if (true) throw new ParseException("An interface cannot implement other interfaces");}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void EnumDeclaration(int modifiers) throws ParseException {
/*@bgen(jjtree) EnumDeclaration */
ASTEnumDeclaration jjtn000 = new ASTEnumDeclaration(this, JJTENUMDECLARATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(ENUM);
jj_consume_token(IDENTIFIER);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case IMPLEMENTS:
ImplementsList(false);
break;
default:
;
}
EnumBody();
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void EnumBody() throws ParseException {
/*@bgen(jjtree) EnumBody */
ASTEnumBody jjtn000 = new ASTEnumBody(this, JJTENUMBODY);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(LBRACE);
EnumConstant();
label_6:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
;
break;
default:
break label_6;
}
jj_consume_token(COMMA);
EnumConstant();
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case SEMICOLON:
jj_consume_token(SEMICOLON);
label_7:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ABSTRACT:
case BOOLEAN:
case BYTE:
case CHAR:
case CLASS:
case DOUBLE:
case ENUM:
case FINAL:
case FLOAT:
case INT:
case INTERFACE:
case LONG:
case NATIVE:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case SHORT:
case STATIC:
case STRICTFP:
case SYNCHRONIZED:
case TRANSIENT:
case VOID:
case VOLATILE:
case IDENTIFIER:
case LBRACE:
case SEMICOLON:
case AT:
case LT:
;
break;
default:
break label_7;
}
ClassOrInterfaceBodyDeclaration(false);
}
break;
default:
;
}
jj_consume_token(RBRACE);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void EnumConstant() throws ParseException {
/*@bgen(jjtree) EnumConstant */
ASTEnumConstant jjtn000 = new ASTEnumConstant(this, JJTENUMCONSTANT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(IDENTIFIER);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LPAREN:
Arguments();
break;
default:
;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACE:
ClassOrInterfaceBody(false);
break;
default:
;
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void TypeParameters() throws ParseException {
/*@bgen(jjtree) TypeParameters */
ASTTypeParameters jjtn000 = new ASTTypeParameters(this, JJTTYPEPARAMETERS);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(LT);
TypeParameter();
label_8:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
;
break;
default:
break label_8;
}
jj_consume_token(COMMA);
TypeParameter();
}
jj_consume_token(GT);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void TypeParameter() throws ParseException {
/*@bgen(jjtree) TypeParameter */
ASTTypeParameter jjtn000 = new ASTTypeParameter(this, JJTTYPEPARAMETER);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(IDENTIFIER);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case EXTENDS:
TypeBound();
break;
default:
;
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void TypeBound() throws ParseException {
/*@bgen(jjtree) TypeBound */
ASTTypeBound jjtn000 = new ASTTypeBound(this, JJTTYPEBOUND);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(EXTENDS);
ClassOrInterfaceType();
label_9:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BIT_AND:
;
break;
default:
break label_9;
}
jj_consume_token(BIT_AND);
ClassOrInterfaceType();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ClassOrInterfaceBody(boolean isInterface) throws ParseException {
/*@bgen(jjtree) ClassOrInterfaceBody */
ASTClassOrInterfaceBody jjtn000 = new ASTClassOrInterfaceBody(this, JJTCLASSORINTERFACEBODY);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(LBRACE);
label_10:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ABSTRACT:
case BOOLEAN:
case BYTE:
case CHAR:
case CLASS:
case DOUBLE:
case ENUM:
case FINAL:
case FLOAT:
case INT:
case INTERFACE:
case LONG:
case NATIVE:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case SHORT:
case STATIC:
case STRICTFP:
case SYNCHRONIZED:
case TRANSIENT:
case VOID:
case VOLATILE:
case IDENTIFIER:
case LBRACE:
case SEMICOLON:
case AT:
case LT:
;
break;
default:
break label_10;
}
ClassOrInterfaceBodyDeclaration(isInterface);
}
jj_consume_token(RBRACE);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ClassOrInterfaceBodyDeclaration(boolean isInterface) throws ParseException {
/*@bgen(jjtree) ClassOrInterfaceBodyDeclaration */
ASTClassOrInterfaceBodyDeclaration jjtn000 = new ASTClassOrInterfaceBodyDeclaration(this, JJTCLASSORINTERFACEBODYDECLARATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);boolean isNestedInterface = false;
int modifiers;
try {
if (jj_2_4(2)) {
Initializer();
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
jjtreeCloseNodeScope(jjtn000);
if (isInterface)
{if (true) throw new ParseException("An interface cannot have initializers");}
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ABSTRACT:
case BOOLEAN:
case BYTE:
case CHAR:
case CLASS:
case DOUBLE:
case ENUM:
case FINAL:
case FLOAT:
case INT:
case INTERFACE:
case LONG:
case NATIVE:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case SHORT:
case STATIC:
case STRICTFP:
case SYNCHRONIZED:
case TRANSIENT:
case VOID:
case VOLATILE:
case IDENTIFIER:
case AT:
case LT:
modifiers = Modifiers();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case CLASS:
case INTERFACE:
ClassOrInterfaceDeclaration(modifiers);
break;
case ENUM:
EnumDeclaration(modifiers);
break;
default:
if (jj_2_2(2147483647)) {
ConstructorDeclaration();
} else if (jj_2_3(2147483647)) {
FieldDeclaration(modifiers);
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FLOAT:
case INT:
case LONG:
case SHORT:
case VOID:
case IDENTIFIER:
case LT:
MethodDeclaration(modifiers);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
}
break;
case SEMICOLON:
jj_consume_token(SEMICOLON);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void FieldDeclaration(int modifiers) throws ParseException {
/*@bgen(jjtree) FieldDeclaration */
ASTFieldDeclaration jjtn000 = new ASTFieldDeclaration(this, JJTFIELDDECLARATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
Type();
VariableDeclarator();
label_11:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
;
break;
default:
break label_11;
}
jj_consume_token(COMMA);
VariableDeclarator();
}
jj_consume_token(SEMICOLON);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void VariableDeclarator() throws ParseException {
/*@bgen(jjtree) VariableDeclarator */
ASTVariableDeclarator jjtn000 = new ASTVariableDeclarator(this, JJTVARIABLEDECLARATOR);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
VariableDeclaratorId();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ASSIGN:
jj_consume_token(ASSIGN);
VariableInitializer();
break;
default:
;
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void VariableDeclaratorId() throws ParseException {
/*@bgen(jjtree) VariableDeclaratorId */
ASTVariableDeclaratorId jjtn000 = new ASTVariableDeclaratorId(this, JJTVARIABLEDECLARATORID);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);Token t;
try {
t = jj_consume_token(IDENTIFIER);
label_12:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET:
;
break;
default:
break label_12;
}
jj_consume_token(LBRACKET);
jj_consume_token(RBRACKET);
}
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
jjtreeCloseNodeScope(jjtn000);
jjtn000.name = t.image; jjtn000.refreshLabel();
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void VariableInitializer() throws ParseException {
/*@bgen(jjtree) VariableInitializer */
ASTVariableInitializer jjtn000 = new ASTVariableInitializer(this, JJTVARIABLEINITIALIZER);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACE:
ArrayInitializer();
break;
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case BANG:
case TILDE:
case INCR:
case DECR:
case PLUS:
case MINUS:
Expression();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ArrayInitializer() throws ParseException {
/*@bgen(jjtree) ArrayInitializer */
ASTArrayInitializer jjtn000 = new ASTArrayInitializer(this, JJTARRAYINITIALIZER);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(LBRACE);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case LBRACE:
case BANG:
case TILDE:
case INCR:
case DECR:
case PLUS:
case MINUS:
VariableInitializer();
label_13:
while (true) {
if (jj_2_5(2)) {
;
} else {
break label_13;
}
jj_consume_token(COMMA);
VariableInitializer();
}
break;
default:
;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
jj_consume_token(COMMA);
break;
default:
;
}
jj_consume_token(RBRACE);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void MethodDeclaration(int modifiers) throws ParseException {
/*@bgen(jjtree) MethodDeclaration */
ASTMethodDeclaration jjtn000 = new ASTMethodDeclaration(this, JJTMETHODDECLARATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LT:
TypeParameters();
break;
default:
;
}
ResultType();
MethodDeclarator();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case THROWS:
jj_consume_token(THROWS);
NameList();
break;
default:
;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACE:
Block();
break;
case SEMICOLON:
jj_consume_token(SEMICOLON);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void MethodDeclarator() throws ParseException {
/*@bgen(jjtree) MethodDeclarator */
ASTMethodDeclarator jjtn000 = new ASTMethodDeclarator(this, JJTMETHODDECLARATOR);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);Token t;
try {
t = jj_consume_token(IDENTIFIER);
FormalParameters();
label_14:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET:
;
break;
default:
break label_14;
}
jj_consume_token(LBRACKET);
jj_consume_token(RBRACKET);
}
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
jjtreeCloseNodeScope(jjtn000);
jjtn000.name = t.image; jjtn000.refreshLabel();
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void FormalParameters() throws ParseException {
/*@bgen(jjtree) FormalParameters */
ASTFormalParameters jjtn000 = new ASTFormalParameters(this, JJTFORMALPARAMETERS);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(LPAREN);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FINAL:
case FLOAT:
case INT:
case LONG:
case SHORT:
case IDENTIFIER:
FormalParameter();
label_15:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
;
break;
default:
break label_15;
}
jj_consume_token(COMMA);
FormalParameter();
}
break;
default:
;
}
jj_consume_token(RPAREN);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void FormalParameter() throws ParseException {
/*@bgen(jjtree) FormalParameter */
ASTFormalParameter jjtn000 = new ASTFormalParameter(this, JJTFORMALPARAMETER);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case FINAL:
jj_consume_token(FINAL);
break;
default:
;
}
Type();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ELLIPSIS:
jj_consume_token(ELLIPSIS);
break;
default:
;
}
VariableDeclaratorId();
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ConstructorDeclaration() throws ParseException {
/*@bgen(jjtree) ConstructorDeclaration */
ASTConstructorDeclaration jjtn000 = new ASTConstructorDeclaration(this, JJTCONSTRUCTORDECLARATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LT:
TypeParameters();
break;
default:
;
}
jj_consume_token(IDENTIFIER);
FormalParameters();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case THROWS:
jj_consume_token(THROWS);
NameList();
break;
default:
;
}
jj_consume_token(LBRACE);
if (jj_2_6(2147483647)) {
ExplicitConstructorInvocation();
} else {
;
}
label_16:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ASSERT:
case BOOLEAN:
case BREAK:
case BYTE:
case CHAR:
case CLASS:
case CONTINUE:
case DO:
case DOUBLE:
case FALSE:
case FINAL:
case FLOAT:
case FOR:
case IF:
case INT:
case INTERFACE:
case LONG:
case NEW:
case NULL:
case RETURN:
case SHORT:
case SUPER:
case SWITCH:
case SYNCHRONIZED:
case THIS:
case THROW:
case TRUE:
case TRY:
case VOID:
case WHILE:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case LBRACE:
case SEMICOLON:
case INCR:
case DECR:
;
break;
default:
break label_16;
}
BlockStatement();
}
jj_consume_token(RBRACE);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ExplicitConstructorInvocation() throws ParseException {
/*@bgen(jjtree) ExplicitConstructorInvocation */
ASTExplicitConstructorInvocation jjtn000 = new ASTExplicitConstructorInvocation(this, JJTEXPLICITCONSTRUCTORINVOCATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
if (jj_2_8(2147483647)) {
jj_consume_token(THIS);
Arguments();
jj_consume_token(SEMICOLON);
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
if (jj_2_7(2)) {
PrimaryExpression();
jj_consume_token(DOT);
} else {
;
}
jj_consume_token(SUPER);
Arguments();
jj_consume_token(SEMICOLON);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void Initializer() throws ParseException {
/*@bgen(jjtree) Initializer */
ASTInitializer jjtn000 = new ASTInitializer(this, JJTINITIALIZER);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case STATIC:
jj_consume_token(STATIC);
break;
default:
;
}
Block();
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
/*
* Type, name and expression syntax follows.
*/
final public void Type() throws ParseException {
/*@bgen(jjtree) Type */
ASTType jjtn000 = new ASTType(this, JJTTYPE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
if (jj_2_9(2)) {
ReferenceType();
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FLOAT:
case INT:
case LONG:
case SHORT:
PrimitiveType();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ReferenceType() throws ParseException {
/*@bgen(jjtree) ReferenceType */
ASTReferenceType jjtn000 = new ASTReferenceType(this, JJTREFERENCETYPE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FLOAT:
case INT:
case LONG:
case SHORT:
PrimitiveType();
label_17:
while (true) {
jj_consume_token(LBRACKET);
jj_consume_token(RBRACKET);
if (jj_2_10(2)) {
;
} else {
break label_17;
}
}
break;
case IDENTIFIER:
ClassOrInterfaceType();
label_18:
while (true) {
if (jj_2_11(2)) {
;
} else {
break label_18;
}
jj_consume_token(LBRACKET);
jj_consume_token(RBRACKET);
}
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ClassOrInterfaceType() throws ParseException {
/*@bgen(jjtree) ClassOrInterfaceType */
ASTClassOrInterfaceType jjtn000 = new ASTClassOrInterfaceType(this, JJTCLASSORINTERFACETYPE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(IDENTIFIER);
if (jj_2_12(2)) {
TypeArguments();
} else {
;
}
label_19:
while (true) {
if (jj_2_13(2)) {
;
} else {
break label_19;
}
jj_consume_token(DOT);
jj_consume_token(IDENTIFIER);
if (jj_2_14(2)) {
TypeArguments();
} else {
;
}
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void TypeArguments() throws ParseException {
/*@bgen(jjtree) TypeArguments */
ASTTypeArguments jjtn000 = new ASTTypeArguments(this, JJTTYPEARGUMENTS);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(LT);
TypeArgument();
label_20:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
;
break;
default:
break label_20;
}
jj_consume_token(COMMA);
TypeArgument();
}
jj_consume_token(GT);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void TypeArgument() throws ParseException {
/*@bgen(jjtree) TypeArgument */
ASTTypeArgument jjtn000 = new ASTTypeArgument(this, JJTTYPEARGUMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FLOAT:
case INT:
case LONG:
case SHORT:
case IDENTIFIER:
ReferenceType();
break;
case HOOK:
jj_consume_token(HOOK);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case EXTENDS:
case SUPER:
WildcardBounds();
break;
default:
;
}
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void WildcardBounds() throws ParseException {
/*@bgen(jjtree) WildcardBounds */
ASTWildcardBounds jjtn000 = new ASTWildcardBounds(this, JJTWILDCARDBOUNDS);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case EXTENDS:
jj_consume_token(EXTENDS);
ReferenceType();
break;
case SUPER:
jj_consume_token(SUPER);
ReferenceType();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void PrimitiveType() throws ParseException {
/*@bgen(jjtree) PrimitiveType */
ASTPrimitiveType jjtn000 = new ASTPrimitiveType(this, JJTPRIMITIVETYPE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
jj_consume_token(BOOLEAN);
break;
case CHAR:
jj_consume_token(CHAR);
break;
case BYTE:
jj_consume_token(BYTE);
break;
case SHORT:
jj_consume_token(SHORT);
break;
case INT:
jj_consume_token(INT);
break;
case LONG:
jj_consume_token(LONG);
break;
case FLOAT:
jj_consume_token(FLOAT);
break;
case DOUBLE:
jj_consume_token(DOUBLE);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ResultType() throws ParseException {
/*@bgen(jjtree) ResultType */
ASTResultType jjtn000 = new ASTResultType(this, JJTRESULTTYPE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case VOID:
jj_consume_token(VOID);
break;
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FLOAT:
case INT:
case LONG:
case SHORT:
case IDENTIFIER:
Type();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void Name() throws ParseException {
/*@bgen(jjtree) Name */
ASTName jjtn000 = new ASTName(this, JJTNAME);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);Token t;
try {
t = jj_consume_token(IDENTIFIER);
label_21:
while (true) {
if (jj_2_15(2)) {
;
} else {
break label_21;
}
jj_consume_token(DOT);
jj_consume_token(IDENTIFIER);
}
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
jjtreeCloseNodeScope(jjtn000);
jjtn000.name = t.image; jjtn000.refreshLabel();
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void NameList() throws ParseException {
/*@bgen(jjtree) NameList */
ASTNameList jjtn000 = new ASTNameList(this, JJTNAMELIST);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
Name();
label_22:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
;
break;
default:
break label_22;
}
jj_consume_token(COMMA);
Name();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
/*
* Expression syntax follows.
*/
final public void Expression() throws ParseException {
/*@bgen(jjtree) Expression */
ASTExpression jjtn000 = new ASTExpression(this, JJTEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
ConditionalExpression();
if (jj_2_16(2)) {
AssignmentOperator();
Expression();
} else {
;
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void AssignmentOperator() throws ParseException {
/*@bgen(jjtree) AssignmentOperator */
ASTAssignmentOperator jjtn000 = new ASTAssignmentOperator(this, JJTASSIGNMENTOPERATOR);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ASSIGN:
jj_consume_token(ASSIGN);
break;
case STARASSIGN:
jj_consume_token(STARASSIGN);
break;
case SLASHASSIGN:
jj_consume_token(SLASHASSIGN);
break;
case REMASSIGN:
jj_consume_token(REMASSIGN);
break;
case PLUSASSIGN:
jj_consume_token(PLUSASSIGN);
break;
case MINUSASSIGN:
jj_consume_token(MINUSASSIGN);
break;
case LSHIFTASSIGN:
jj_consume_token(LSHIFTASSIGN);
break;
case RSIGNEDSHIFTASSIGN:
jj_consume_token(RSIGNEDSHIFTASSIGN);
break;
case RUNSIGNEDSHIFTASSIGN:
jj_consume_token(RUNSIGNEDSHIFTASSIGN);
break;
case ANDASSIGN:
jj_consume_token(ANDASSIGN);
break;
case XORASSIGN:
jj_consume_token(XORASSIGN);
break;
case ORASSIGN:
jj_consume_token(ORASSIGN);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ConditionalExpression() throws ParseException {
/*@bgen(jjtree) ConditionalExpression */
ASTConditionalExpression jjtn000 = new ASTConditionalExpression(this, JJTCONDITIONALEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
ConditionalOrExpression();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case HOOK:
jj_consume_token(HOOK);
Expression();
jj_consume_token(COLON);
Expression();
break;
default:
;
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ConditionalOrExpression() throws ParseException {
/*@bgen(jjtree) ConditionalOrExpression */
ASTConditionalOrExpression jjtn000 = new ASTConditionalOrExpression(this, JJTCONDITIONALOREXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
ConditionalAndExpression();
label_23:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case SC_OR:
;
break;
default:
break label_23;
}
jj_consume_token(SC_OR);
ConditionalAndExpression();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ConditionalAndExpression() throws ParseException {
/*@bgen(jjtree) ConditionalAndExpression */
ASTConditionalAndExpression jjtn000 = new ASTConditionalAndExpression(this, JJTCONDITIONALANDEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
InclusiveOrExpression();
label_24:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case SC_AND:
;
break;
default:
break label_24;
}
jj_consume_token(SC_AND);
InclusiveOrExpression();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void InclusiveOrExpression() throws ParseException {
/*@bgen(jjtree) InclusiveOrExpression */
ASTInclusiveOrExpression jjtn000 = new ASTInclusiveOrExpression(this, JJTINCLUSIVEOREXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
ExclusiveOrExpression();
label_25:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BIT_OR:
;
break;
default:
break label_25;
}
jj_consume_token(BIT_OR);
ExclusiveOrExpression();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ExclusiveOrExpression() throws ParseException {
/*@bgen(jjtree) ExclusiveOrExpression */
ASTExclusiveOrExpression jjtn000 = new ASTExclusiveOrExpression(this, JJTEXCLUSIVEOREXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
AndExpression();
label_26:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case XOR:
;
break;
default:
break label_26;
}
jj_consume_token(XOR);
AndExpression();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void AndExpression() throws ParseException {
/*@bgen(jjtree) AndExpression */
ASTAndExpression jjtn000 = new ASTAndExpression(this, JJTANDEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
EqualityExpression();
label_27:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BIT_AND:
;
break;
default:
break label_27;
}
jj_consume_token(BIT_AND);
EqualityExpression();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void EqualityExpression() throws ParseException {
/*@bgen(jjtree) EqualityExpression */
ASTEqualityExpression jjtn000 = new ASTEqualityExpression(this, JJTEQUALITYEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
InstanceOfExpression();
label_28:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case EQ:
case NE:
;
break;
default:
break label_28;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case EQ:
jj_consume_token(EQ);
break;
case NE:
jj_consume_token(NE);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
InstanceOfExpression();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void InstanceOfExpression() throws ParseException {
/*@bgen(jjtree) InstanceOfExpression */
ASTInstanceOfExpression jjtn000 = new ASTInstanceOfExpression(this, JJTINSTANCEOFEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
RelationalExpression();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case INSTANCEOF:
jj_consume_token(INSTANCEOF);
Type();
break;
default:
;
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void RelationalExpression() throws ParseException {
/*@bgen(jjtree) RelationalExpression */
ASTRelationalExpression jjtn000 = new ASTRelationalExpression(this, JJTRELATIONALEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
ShiftExpression();
label_29:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LT:
case LE:
case GE:
case GT:
;
break;
default:
break label_29;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LT:
jj_consume_token(LT);
break;
case GT:
jj_consume_token(GT);
break;
case LE:
jj_consume_token(LE);
break;
case GE:
jj_consume_token(GE);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
ShiftExpression();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ShiftExpression() throws ParseException {
/*@bgen(jjtree) ShiftExpression */
ASTShiftExpression jjtn000 = new ASTShiftExpression(this, JJTSHIFTEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
AdditiveExpression();
label_30:
while (true) {
if (jj_2_17(1)) {
;
} else {
break label_30;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LSHIFT:
jj_consume_token(LSHIFT);
break;
default:
if (jj_2_18(1)) {
RSIGNEDSHIFT();
} else if (jj_2_19(1)) {
RUNSIGNEDSHIFT();
} else {
jj_consume_token(-1);
throw new ParseException();
}
}
AdditiveExpression();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void AdditiveExpression() throws ParseException {
/*@bgen(jjtree) AdditiveExpression */
ASTAdditiveExpression jjtn000 = new ASTAdditiveExpression(this, JJTADDITIVEEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
MultiplicativeExpression();
label_31:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case PLUS:
case MINUS:
;
break;
default:
break label_31;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case PLUS:
jj_consume_token(PLUS);
break;
case MINUS:
jj_consume_token(MINUS);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
MultiplicativeExpression();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void MultiplicativeExpression() throws ParseException {
/*@bgen(jjtree) MultiplicativeExpression */
ASTMultiplicativeExpression jjtn000 = new ASTMultiplicativeExpression(this, JJTMULTIPLICATIVEEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
UnaryExpression();
label_32:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case STAR:
case SLASH:
case REM:
;
break;
default:
break label_32;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case STAR:
jj_consume_token(STAR);
break;
case SLASH:
jj_consume_token(SLASH);
break;
case REM:
jj_consume_token(REM);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
UnaryExpression();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void UnaryExpression() throws ParseException {
/*@bgen(jjtree) UnaryExpression */
ASTUnaryExpression jjtn000 = new ASTUnaryExpression(this, JJTUNARYEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case PLUS:
case MINUS:
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case PLUS:
jj_consume_token(PLUS);
break;
case MINUS:
jj_consume_token(MINUS);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
UnaryExpression();
break;
case INCR:
PreIncrementExpression();
break;
case DECR:
PreDecrementExpression();
break;
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case BANG:
case TILDE:
UnaryExpressionNotPlusMinus();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void PreIncrementExpression() throws ParseException {
/*@bgen(jjtree) PreIncrementExpression */
ASTPreIncrementExpression jjtn000 = new ASTPreIncrementExpression(this, JJTPREINCREMENTEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(INCR);
PrimaryExpression();
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void PreDecrementExpression() throws ParseException {
/*@bgen(jjtree) PreDecrementExpression */
ASTPreDecrementExpression jjtn000 = new ASTPreDecrementExpression(this, JJTPREDECREMENTEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(DECR);
PrimaryExpression();
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void UnaryExpressionNotPlusMinus() throws ParseException {
/*@bgen(jjtree) UnaryExpressionNotPlusMinus */
ASTUnaryExpressionNotPlusMinus jjtn000 = new ASTUnaryExpressionNotPlusMinus(this, JJTUNARYEXPRESSIONNOTPLUSMINUS);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BANG:
case TILDE:
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case TILDE:
jj_consume_token(TILDE);
break;
case BANG:
jj_consume_token(BANG);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
UnaryExpression();
break;
default:
if (jj_2_20(2147483647)) {
CastExpression();
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
PostfixExpression();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
// This production is to determine lookahead only. The LOOKAHEAD specifications
// below are not used, but they are there just to indicate that we know about
// this.
final public void CastLookahead() throws ParseException {
/*@bgen(jjtree) CastLookahead */
ASTCastLookahead jjtn000 = new ASTCastLookahead(this, JJTCASTLOOKAHEAD);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
if (jj_2_21(2)) {
jj_consume_token(LPAREN);
PrimitiveType();
} else if (jj_2_22(2147483647)) {
jj_consume_token(LPAREN);
Type();
jj_consume_token(LBRACKET);
jj_consume_token(RBRACKET);
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LPAREN:
jj_consume_token(LPAREN);
Type();
jj_consume_token(RPAREN);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case TILDE:
jj_consume_token(TILDE);
break;
case BANG:
jj_consume_token(BANG);
break;
case LPAREN:
jj_consume_token(LPAREN);
break;
case IDENTIFIER:
jj_consume_token(IDENTIFIER);
break;
case THIS:
jj_consume_token(THIS);
break;
case SUPER:
jj_consume_token(SUPER);
break;
case NEW:
jj_consume_token(NEW);
break;
case FALSE:
case NULL:
case TRUE:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
Literal();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void PostfixExpression() throws ParseException {
/*@bgen(jjtree) PostfixExpression */
ASTPostfixExpression jjtn000 = new ASTPostfixExpression(this, JJTPOSTFIXEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
PrimaryExpression();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case INCR:
case DECR:
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case INCR:
jj_consume_token(INCR);
break;
case DECR:
jj_consume_token(DECR);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
break;
default:
;
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void CastExpression() throws ParseException {
/*@bgen(jjtree) CastExpression */
ASTCastExpression jjtn000 = new ASTCastExpression(this, JJTCASTEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
if (jj_2_23(2147483647)) {
jj_consume_token(LPAREN);
Type();
jj_consume_token(RPAREN);
UnaryExpression();
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LPAREN:
jj_consume_token(LPAREN);
Type();
jj_consume_token(RPAREN);
UnaryExpressionNotPlusMinus();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void PrimaryExpression() throws ParseException {
/*@bgen(jjtree) PrimaryExpression */
ASTPrimaryExpression jjtn000 = new ASTPrimaryExpression(this, JJTPRIMARYEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
PrimaryPrefix();
label_33:
while (true) {
if (jj_2_24(2)) {
;
} else {
break label_33;
}
PrimarySuffix();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void MemberSelector() throws ParseException {
/*@bgen(jjtree) MemberSelector */
ASTMemberSelector jjtn000 = new ASTMemberSelector(this, JJTMEMBERSELECTOR);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(DOT);
TypeArguments();
jj_consume_token(IDENTIFIER);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void PrimaryPrefix() throws ParseException {
/*@bgen(jjtree) PrimaryPrefix */
ASTPrimaryPrefix jjtn000 = new ASTPrimaryPrefix(this, JJTPRIMARYPREFIX);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case FALSE:
case NULL:
case TRUE:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
Literal();
break;
case THIS:
jj_consume_token(THIS);
break;
case SUPER:
jj_consume_token(SUPER);
jj_consume_token(DOT);
jj_consume_token(IDENTIFIER);
break;
case LPAREN:
jj_consume_token(LPAREN);
Expression();
jj_consume_token(RPAREN);
break;
case NEW:
AllocationExpression();
break;
default:
if (jj_2_25(2147483647)) {
ResultType();
jj_consume_token(DOT);
jj_consume_token(CLASS);
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case IDENTIFIER:
Name();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void PrimarySuffix() throws ParseException {
/*@bgen(jjtree) PrimarySuffix */
ASTPrimarySuffix jjtn000 = new ASTPrimarySuffix(this, JJTPRIMARYSUFFIX);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
if (jj_2_26(2)) {
jj_consume_token(DOT);
jj_consume_token(THIS);
} else if (jj_2_27(2)) {
jj_consume_token(DOT);
AllocationExpression();
} else if (jj_2_28(3)) {
MemberSelector();
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET:
jj_consume_token(LBRACKET);
Expression();
jj_consume_token(RBRACKET);
break;
case DOT:
jj_consume_token(DOT);
jj_consume_token(IDENTIFIER);
break;
case LPAREN:
Arguments();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void Literal() throws ParseException {
/*@bgen(jjtree) Literal */
ASTLiteral jjtn000 = new ASTLiteral(this, JJTLITERAL);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case INTEGER_LITERAL:
jj_consume_token(INTEGER_LITERAL);
break;
case FLOATING_POINT_LITERAL:
jj_consume_token(FLOATING_POINT_LITERAL);
break;
case CHARACTER_LITERAL:
jj_consume_token(CHARACTER_LITERAL);
break;
case STRING_LITERAL:
jj_consume_token(STRING_LITERAL);
break;
case FALSE:
case TRUE:
BooleanLiteral();
break;
case NULL:
NullLiteral();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void BooleanLiteral() throws ParseException {
/*@bgen(jjtree) BooleanLiteral */
ASTBooleanLiteral jjtn000 = new ASTBooleanLiteral(this, JJTBOOLEANLITERAL);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case TRUE:
jj_consume_token(TRUE);
break;
case FALSE:
jj_consume_token(FALSE);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void NullLiteral() throws ParseException {
/*@bgen(jjtree) NullLiteral */
ASTNullLiteral jjtn000 = new ASTNullLiteral(this, JJTNULLLITERAL);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(NULL);
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void Arguments() throws ParseException {
/*@bgen(jjtree) Arguments */
ASTArguments jjtn000 = new ASTArguments(this, JJTARGUMENTS);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(LPAREN);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case BANG:
case TILDE:
case INCR:
case DECR:
case PLUS:
case MINUS:
ArgumentList();
break;
default:
;
}
jj_consume_token(RPAREN);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ArgumentList() throws ParseException {
/*@bgen(jjtree) ArgumentList */
ASTArgumentList jjtn000 = new ASTArgumentList(this, JJTARGUMENTLIST);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
Expression();
label_34:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
;
break;
default:
break label_34;
}
jj_consume_token(COMMA);
Expression();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void AllocationExpression() throws ParseException {
/*@bgen(jjtree) AllocationExpression */
ASTAllocationExpression jjtn000 = new ASTAllocationExpression(this, JJTALLOCATIONEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
if (jj_2_29(2)) {
jj_consume_token(NEW);
PrimitiveType();
ArrayDimsAndInits();
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case NEW:
jj_consume_token(NEW);
ClassOrInterfaceType();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LT:
TypeArguments();
break;
default:
;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET:
ArrayDimsAndInits();
break;
case LPAREN:
Arguments();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACE:
ClassOrInterfaceBody(false);
break;
default:
;
}
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
/*
* The third LOOKAHEAD specification below is to parse to PrimarySuffix
* if there is an expression between the "[...]".
*/
final public void ArrayDimsAndInits() throws ParseException {
/*@bgen(jjtree) ArrayDimsAndInits */
ASTArrayDimsAndInits jjtn000 = new ASTArrayDimsAndInits(this, JJTARRAYDIMSANDINITS);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
if (jj_2_32(2)) {
label_35:
while (true) {
jj_consume_token(LBRACKET);
Expression();
jj_consume_token(RBRACKET);
if (jj_2_30(2)) {
;
} else {
break label_35;
}
}
label_36:
while (true) {
if (jj_2_31(2)) {
;
} else {
break label_36;
}
jj_consume_token(LBRACKET);
jj_consume_token(RBRACKET);
}
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET:
label_37:
while (true) {
jj_consume_token(LBRACKET);
jj_consume_token(RBRACKET);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET:
;
break;
default:
break label_37;
}
}
ArrayInitializer();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
/*
* Statement syntax follows.
*/
final public void Statement() throws ParseException {
/*@bgen(jjtree) Statement */
ASTStatement jjtn000 = new ASTStatement(this, JJTSTATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
if (jj_2_33(2)) {
LabeledStatement();
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ASSERT:
AssertStatement();
break;
case LBRACE:
Block();
break;
case SEMICOLON:
EmptyStatement();
break;
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case INCR:
case DECR:
StatementExpression();
jj_consume_token(SEMICOLON);
break;
case SWITCH:
SwitchStatement();
break;
case IF:
IfStatement();
break;
case WHILE:
WhileStatement();
break;
case DO:
DoStatement();
break;
case FOR:
ForStatement();
break;
case BREAK:
BreakStatement();
break;
case CONTINUE:
ContinueStatement();
break;
case RETURN:
ReturnStatement();
break;
case THROW:
ThrowStatement();
break;
case SYNCHRONIZED:
SynchronizedStatement();
break;
case TRY:
TryStatement();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void AssertStatement() throws ParseException {
/*@bgen(jjtree) AssertStatement */
ASTAssertStatement jjtn000 = new ASTAssertStatement(this, JJTASSERTSTATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(ASSERT);
Expression();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COLON:
jj_consume_token(COLON);
Expression();
break;
default:
;
}
jj_consume_token(SEMICOLON);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void LabeledStatement() throws ParseException {
/*@bgen(jjtree) LabeledStatement */
ASTLabeledStatement jjtn000 = new ASTLabeledStatement(this, JJTLABELEDSTATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(IDENTIFIER);
jj_consume_token(COLON);
Statement();
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void Block() throws ParseException {
/*@bgen(jjtree) Block */
ASTBlock jjtn000 = new ASTBlock(this, JJTBLOCK);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(LBRACE);
label_38:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ASSERT:
case BOOLEAN:
case BREAK:
case BYTE:
case CHAR:
case CLASS:
case CONTINUE:
case DO:
case DOUBLE:
case FALSE:
case FINAL:
case FLOAT:
case FOR:
case IF:
case INT:
case INTERFACE:
case LONG:
case NEW:
case NULL:
case RETURN:
case SHORT:
case SUPER:
case SWITCH:
case SYNCHRONIZED:
case THIS:
case THROW:
case TRUE:
case TRY:
case VOID:
case WHILE:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case LBRACE:
case SEMICOLON:
case INCR:
case DECR:
;
break;
default:
break label_38;
}
BlockStatement();
}
jj_consume_token(RBRACE);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void BlockStatement() throws ParseException {
/*@bgen(jjtree) BlockStatement */
ASTBlockStatement jjtn000 = new ASTBlockStatement(this, JJTBLOCKSTATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
if (jj_2_34(2147483647)) {
LocalVariableDeclaration();
jj_consume_token(SEMICOLON);
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ASSERT:
case BOOLEAN:
case BREAK:
case BYTE:
case CHAR:
case CONTINUE:
case DO:
case DOUBLE:
case FALSE:
case FLOAT:
case FOR:
case IF:
case INT:
case LONG:
case NEW:
case NULL:
case RETURN:
case SHORT:
case SUPER:
case SWITCH:
case SYNCHRONIZED:
case THIS:
case THROW:
case TRUE:
case TRY:
case VOID:
case WHILE:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case LBRACE:
case SEMICOLON:
case INCR:
case DECR:
Statement();
break;
case CLASS:
case INTERFACE:
ClassOrInterfaceDeclaration(0);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void LocalVariableDeclaration() throws ParseException {
/*@bgen(jjtree) LocalVariableDeclaration */
ASTLocalVariableDeclaration jjtn000 = new ASTLocalVariableDeclaration(this, JJTLOCALVARIABLEDECLARATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case FINAL:
jj_consume_token(FINAL);
break;
default:
;
}
Type();
VariableDeclarator();
label_39:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
;
break;
default:
break label_39;
}
jj_consume_token(COMMA);
VariableDeclarator();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void EmptyStatement() throws ParseException {
/*@bgen(jjtree) EmptyStatement */
ASTEmptyStatement jjtn000 = new ASTEmptyStatement(this, JJTEMPTYSTATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(SEMICOLON);
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void StatementExpression() throws ParseException {
/*@bgen(jjtree) StatementExpression */
ASTStatementExpression jjtn000 = new ASTStatementExpression(this, JJTSTATEMENTEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case INCR:
PreIncrementExpression();
break;
case DECR:
PreDecrementExpression();
break;
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
PrimaryExpression();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ASSIGN:
case INCR:
case DECR:
case PLUSASSIGN:
case MINUSASSIGN:
case STARASSIGN:
case SLASHASSIGN:
case ANDASSIGN:
case ORASSIGN:
case XORASSIGN:
case REMASSIGN:
case LSHIFTASSIGN:
case RSIGNEDSHIFTASSIGN:
case RUNSIGNEDSHIFTASSIGN:
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case INCR:
jj_consume_token(INCR);
break;
case DECR:
jj_consume_token(DECR);
break;
case ASSIGN:
case PLUSASSIGN:
case MINUSASSIGN:
case STARASSIGN:
case SLASHASSIGN:
case ANDASSIGN:
case ORASSIGN:
case XORASSIGN:
case REMASSIGN:
case LSHIFTASSIGN:
case RSIGNEDSHIFTASSIGN:
case RUNSIGNEDSHIFTASSIGN:
AssignmentOperator();
Expression();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
break;
default:
;
}
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void SwitchStatement() throws ParseException {
/*@bgen(jjtree) SwitchStatement */
ASTSwitchStatement jjtn000 = new ASTSwitchStatement(this, JJTSWITCHSTATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(SWITCH);
jj_consume_token(LPAREN);
Expression();
jj_consume_token(RPAREN);
jj_consume_token(LBRACE);
label_40:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case CASE:
case _DEFAULT:
;
break;
default:
break label_40;
}
SwitchLabel();
label_41:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ASSERT:
case BOOLEAN:
case BREAK:
case BYTE:
case CHAR:
case CLASS:
case CONTINUE:
case DO:
case DOUBLE:
case FALSE:
case FINAL:
case FLOAT:
case FOR:
case IF:
case INT:
case INTERFACE:
case LONG:
case NEW:
case NULL:
case RETURN:
case SHORT:
case SUPER:
case SWITCH:
case SYNCHRONIZED:
case THIS:
case THROW:
case TRUE:
case TRY:
case VOID:
case WHILE:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case LBRACE:
case SEMICOLON:
case INCR:
case DECR:
;
break;
default:
break label_41;
}
BlockStatement();
}
}
jj_consume_token(RBRACE);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void SwitchLabel() throws ParseException {
/*@bgen(jjtree) SwitchLabel */
ASTSwitchLabel jjtn000 = new ASTSwitchLabel(this, JJTSWITCHLABEL);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case CASE:
jj_consume_token(CASE);
Expression();
jj_consume_token(COLON);
break;
case _DEFAULT:
jj_consume_token(_DEFAULT);
jj_consume_token(COLON);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void IfStatement() throws ParseException {
/*@bgen(jjtree) IfStatement */
ASTIfStatement jjtn000 = new ASTIfStatement(this, JJTIFSTATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(IF);
jj_consume_token(LPAREN);
Expression();
jj_consume_token(RPAREN);
Statement();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ELSE:
jj_consume_token(ELSE);
Statement();
break;
default:
;
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void WhileStatement() throws ParseException {
/*@bgen(jjtree) WhileStatement */
ASTWhileStatement jjtn000 = new ASTWhileStatement(this, JJTWHILESTATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(WHILE);
jj_consume_token(LPAREN);
Expression();
jj_consume_token(RPAREN);
Statement();
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void DoStatement() throws ParseException {
/*@bgen(jjtree) DoStatement */
ASTDoStatement jjtn000 = new ASTDoStatement(this, JJTDOSTATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(DO);
Statement();
jj_consume_token(WHILE);
jj_consume_token(LPAREN);
Expression();
jj_consume_token(RPAREN);
jj_consume_token(SEMICOLON);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ForStatement() throws ParseException {
/*@bgen(jjtree) ForStatement */
ASTForStatement jjtn000 = new ASTForStatement(this, JJTFORSTATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(FOR);
jj_consume_token(LPAREN);
if (jj_2_35(2147483647)) {
Type();
jj_consume_token(IDENTIFIER);
jj_consume_token(COLON);
Expression();
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FINAL:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case SEMICOLON:
case INCR:
case DECR:
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FINAL:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case INCR:
case DECR:
ForInit();
break;
default:
;
}
jj_consume_token(SEMICOLON);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case BANG:
case TILDE:
case INCR:
case DECR:
case PLUS:
case MINUS:
Expression();
break;
default:
;
}
jj_consume_token(SEMICOLON);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case INCR:
case DECR:
ForUpdate();
break;
default:
;
}
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
jj_consume_token(RPAREN);
Statement();
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ForInit() throws ParseException {
/*@bgen(jjtree) ForInit */
ASTForInit jjtn000 = new ASTForInit(this, JJTFORINIT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
if (jj_2_36(2147483647)) {
LocalVariableDeclaration();
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case INCR:
case DECR:
StatementExpressionList();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void StatementExpressionList() throws ParseException {
/*@bgen(jjtree) StatementExpressionList */
ASTStatementExpressionList jjtn000 = new ASTStatementExpressionList(this, JJTSTATEMENTEXPRESSIONLIST);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
StatementExpression();
label_42:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
;
break;
default:
break label_42;
}
jj_consume_token(COMMA);
StatementExpression();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ForUpdate() throws ParseException {
/*@bgen(jjtree) ForUpdate */
ASTForUpdate jjtn000 = new ASTForUpdate(this, JJTFORUPDATE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
StatementExpressionList();
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void BreakStatement() throws ParseException {
/*@bgen(jjtree) BreakStatement */
ASTBreakStatement jjtn000 = new ASTBreakStatement(this, JJTBREAKSTATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(BREAK);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case IDENTIFIER:
jj_consume_token(IDENTIFIER);
break;
default:
;
}
jj_consume_token(SEMICOLON);
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ContinueStatement() throws ParseException {
/*@bgen(jjtree) ContinueStatement */
ASTContinueStatement jjtn000 = new ASTContinueStatement(this, JJTCONTINUESTATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(CONTINUE);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case IDENTIFIER:
jj_consume_token(IDENTIFIER);
break;
default:
;
}
jj_consume_token(SEMICOLON);
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ReturnStatement() throws ParseException {
/*@bgen(jjtree) ReturnStatement */
ASTReturnStatement jjtn000 = new ASTReturnStatement(this, JJTRETURNSTATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(RETURN);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case BANG:
case TILDE:
case INCR:
case DECR:
case PLUS:
case MINUS:
Expression();
break;
default:
;
}
jj_consume_token(SEMICOLON);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void ThrowStatement() throws ParseException {
/*@bgen(jjtree) ThrowStatement */
ASTThrowStatement jjtn000 = new ASTThrowStatement(this, JJTTHROWSTATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(THROW);
Expression();
jj_consume_token(SEMICOLON);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void SynchronizedStatement() throws ParseException {
/*@bgen(jjtree) SynchronizedStatement */
ASTSynchronizedStatement jjtn000 = new ASTSynchronizedStatement(this, JJTSYNCHRONIZEDSTATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(SYNCHRONIZED);
jj_consume_token(LPAREN);
Expression();
jj_consume_token(RPAREN);
Block();
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void TryStatement() throws ParseException {
/*@bgen(jjtree) TryStatement */
ASTTryStatement jjtn000 = new ASTTryStatement(this, JJTTRYSTATEMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(TRY);
Block();
label_43:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case CATCH:
;
break;
default:
break label_43;
}
jj_consume_token(CATCH);
jj_consume_token(LPAREN);
FormalParameter();
jj_consume_token(RPAREN);
Block();
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case FINALLY:
jj_consume_token(FINALLY);
Block();
break;
default:
;
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
/* We use productions to match >>>, >> and > so that we can keep the
* type declaration syntax with generics clean
*/
final public void RUNSIGNEDSHIFT() throws ParseException {
/*@bgen(jjtree) RUNSIGNEDSHIFT */
ASTRUNSIGNEDSHIFT jjtn000 = new ASTRUNSIGNEDSHIFT(this, JJTRUNSIGNEDSHIFT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
if (getToken(1).kind == GT &&
((Token.GTToken)getToken(1)).realKind == RUNSIGNEDSHIFT) {
} else {
jj_consume_token(-1);
throw new ParseException();
}
jj_consume_token(GT);
jj_consume_token(GT);
jj_consume_token(GT);
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void RSIGNEDSHIFT() throws ParseException {
/*@bgen(jjtree) RSIGNEDSHIFT */
ASTRSIGNEDSHIFT jjtn000 = new ASTRSIGNEDSHIFT(this, JJTRSIGNEDSHIFT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
if (getToken(1).kind == GT &&
((Token.GTToken)getToken(1)).realKind == RSIGNEDSHIFT) {
} else {
jj_consume_token(-1);
throw new ParseException();
}
jj_consume_token(GT);
jj_consume_token(GT);
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
/* Annotation syntax follows. */
final public void Annotation() throws ParseException {
/*@bgen(jjtree) Annotation */
ASTAnnotation jjtn000 = new ASTAnnotation(this, JJTANNOTATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
if (jj_2_37(2147483647)) {
NormalAnnotation();
} else if (jj_2_38(2147483647)) {
SingleMemberAnnotation();
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case AT:
MarkerAnnotation();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void NormalAnnotation() throws ParseException {
/*@bgen(jjtree) NormalAnnotation */
ASTNormalAnnotation jjtn000 = new ASTNormalAnnotation(this, JJTNORMALANNOTATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(AT);
Name();
jj_consume_token(LPAREN);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case IDENTIFIER:
MemberValuePairs();
break;
default:
;
}
jj_consume_token(RPAREN);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void MarkerAnnotation() throws ParseException {
/*@bgen(jjtree) MarkerAnnotation */
ASTMarkerAnnotation jjtn000 = new ASTMarkerAnnotation(this, JJTMARKERANNOTATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(AT);
Name();
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void SingleMemberAnnotation() throws ParseException {
/*@bgen(jjtree) SingleMemberAnnotation */
ASTSingleMemberAnnotation jjtn000 = new ASTSingleMemberAnnotation(this, JJTSINGLEMEMBERANNOTATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(AT);
Name();
jj_consume_token(LPAREN);
MemberValue();
jj_consume_token(RPAREN);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void MemberValuePairs() throws ParseException {
/*@bgen(jjtree) MemberValuePairs */
ASTMemberValuePairs jjtn000 = new ASTMemberValuePairs(this, JJTMEMBERVALUEPAIRS);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
MemberValuePair();
label_44:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
;
break;
default:
break label_44;
}
jj_consume_token(COMMA);
MemberValuePair();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void MemberValuePair() throws ParseException {
/*@bgen(jjtree) MemberValuePair */
ASTMemberValuePair jjtn000 = new ASTMemberValuePair(this, JJTMEMBERVALUEPAIR);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(IDENTIFIER);
jj_consume_token(ASSIGN);
MemberValue();
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void MemberValue() throws ParseException {
/*@bgen(jjtree) MemberValue */
ASTMemberValue jjtn000 = new ASTMemberValue(this, JJTMEMBERVALUE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case AT:
Annotation();
break;
case LBRACE:
MemberValueArrayInitializer();
break;
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case BANG:
case TILDE:
case INCR:
case DECR:
case PLUS:
case MINUS:
ConditionalExpression();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void MemberValueArrayInitializer() throws ParseException {
/*@bgen(jjtree) MemberValueArrayInitializer */
ASTMemberValueArrayInitializer jjtn000 = new ASTMemberValueArrayInitializer(this, JJTMEMBERVALUEARRAYINITIALIZER);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(LBRACE);
MemberValue();
label_45:
while (true) {
if (jj_2_39(2)) {
;
} else {
break label_45;
}
jj_consume_token(COMMA);
MemberValue();
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
jj_consume_token(COMMA);
break;
default:
;
}
jj_consume_token(RBRACE);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
/* Annotation Types. */
final public void AnnotationTypeDeclaration(int modifiers) throws ParseException {
/*@bgen(jjtree) AnnotationTypeDeclaration */
ASTAnnotationTypeDeclaration jjtn000 = new ASTAnnotationTypeDeclaration(this, JJTANNOTATIONTYPEDECLARATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(AT);
jj_consume_token(INTERFACE);
jj_consume_token(IDENTIFIER);
AnnotationTypeBody();
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void AnnotationTypeBody() throws ParseException {
/*@bgen(jjtree) AnnotationTypeBody */
ASTAnnotationTypeBody jjtn000 = new ASTAnnotationTypeBody(this, JJTANNOTATIONTYPEBODY);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(LBRACE);
label_46:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ABSTRACT:
case BOOLEAN:
case BYTE:
case CHAR:
case CLASS:
case DOUBLE:
case ENUM:
case FINAL:
case FLOAT:
case INT:
case INTERFACE:
case LONG:
case NATIVE:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case SHORT:
case STATIC:
case STRICTFP:
case SYNCHRONIZED:
case TRANSIENT:
case VOLATILE:
case IDENTIFIER:
case SEMICOLON:
case AT:
;
break;
default:
break label_46;
}
AnnotationTypeMemberDeclaration();
}
jj_consume_token(RBRACE);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void AnnotationTypeMemberDeclaration() throws ParseException {
/*@bgen(jjtree) AnnotationTypeMemberDeclaration */
ASTAnnotationTypeMemberDeclaration jjtn000 = new ASTAnnotationTypeMemberDeclaration(this, JJTANNOTATIONTYPEMEMBERDECLARATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);int modifiers;
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ABSTRACT:
case BOOLEAN:
case BYTE:
case CHAR:
case CLASS:
case DOUBLE:
case ENUM:
case FINAL:
case FLOAT:
case INT:
case INTERFACE:
case LONG:
case NATIVE:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case SHORT:
case STATIC:
case STRICTFP:
case SYNCHRONIZED:
case TRANSIENT:
case VOLATILE:
case IDENTIFIER:
case AT:
modifiers = Modifiers();
if (jj_2_40(2147483647)) {
Type();
jj_consume_token(IDENTIFIER);
jj_consume_token(LPAREN);
jj_consume_token(RPAREN);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case _DEFAULT:
DefaultValue();
break;
default:
;
}
jj_consume_token(SEMICOLON);
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case CLASS:
case INTERFACE:
ClassOrInterfaceDeclaration(modifiers);
break;
case ENUM:
EnumDeclaration(modifiers);
break;
case AT:
AnnotationTypeDeclaration(modifiers);
break;
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FLOAT:
case INT:
case LONG:
case SHORT:
case IDENTIFIER:
FieldDeclaration(modifiers);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
break;
case SEMICOLON:
jj_consume_token(SEMICOLON);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final public void DefaultValue() throws ParseException {
/*@bgen(jjtree) DefaultValue */
ASTDefaultValue jjtn000 = new ASTDefaultValue(this, JJTDEFAULTVALUE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
try {
jj_consume_token(_DEFAULT);
MemberValue();
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
final private boolean jj_2_1(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_1(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_2(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_2(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_3(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_3(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_4(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_4(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_5(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_5(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_6(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_6(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_7(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_7(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_8(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_8(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_9(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_9(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_10(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_10(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_11(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_11(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_12(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_12(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_13(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_13(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_14(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_14(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_15(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_15(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_16(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_16(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_17(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_17(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_18(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_18(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_19(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_19(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_20(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_20(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_21(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_21(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_22(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_22(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_23(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_23(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_24(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_24(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_25(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_25(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_26(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_26(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_27(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_27(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_28(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_28(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_29(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_29(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_30(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_30(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_31(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_31(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_32(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_32(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_33(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_33(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_34(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_34(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_35(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_35(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_36(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_36(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_37(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_37(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_38(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_38(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_39(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_39(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_2_40(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_40(); }
catch(LookaheadSuccess ls) { return true; }
}
final private boolean jj_3_9() {
if (jj_3R_67()) return true;
return false;
}
final private boolean jj_3R_60() {
Token xsp;
xsp = jj_scanpos;
if (jj_3_9()) {
jj_scanpos = xsp;
if (jj_3R_85()) return true;
}
return false;
}
final private boolean jj_3_8() {
if (jj_scan_token(THIS)) return true;
if (jj_3R_66()) return true;
if (jj_scan_token(SEMICOLON)) return true;
return false;
}
final private boolean jj_3R_62() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(52)) jj_scanpos = xsp;
if (jj_3R_86()) return true;
return false;
}
final private boolean jj_3_6() {
if (jj_3R_64()) return true;
return false;
}
final private boolean jj_3R_265() {
if (jj_scan_token(LBRACKET)) return true;
if (jj_scan_token(RBRACKET)) return true;
return false;
}
final private boolean jj_3_7() {
if (jj_3R_65()) return true;
if (jj_scan_token(DOT)) return true;
return false;
}
final private boolean jj_3R_90() {
Token xsp;
xsp = jj_scanpos;
if (jj_3_7()) jj_scanpos = xsp;
if (jj_scan_token(SUPER)) return true;
if (jj_3R_66()) return true;
if (jj_scan_token(SEMICOLON)) return true;
return false;
}
final private boolean jj_3R_274() {
if (jj_scan_token(COMMA)) return true;
if (jj_3R_273()) return true;
return false;
}
final private boolean jj_3R_89() {
if (jj_scan_token(THIS)) return true;
if (jj_3R_66()) return true;
if (jj_scan_token(SEMICOLON)) return true;
return false;
}
final private boolean jj_3R_64() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_89()) {
jj_scanpos = xsp;
if (jj_3R_90()) return true;
}
return false;
}
final private boolean jj_3R_245() {
if (jj_3R_133()) return true;
return false;
}
final private boolean jj_3R_244() {
if (jj_3R_64()) return true;
return false;
}
final private boolean jj_3R_241() {
if (jj_3R_84()) return true;
return false;
}
final private boolean jj_3R_231() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_241()) jj_scanpos = xsp;
if (jj_scan_token(IDENTIFIER)) return true;
if (jj_3R_242()) return true;
xsp = jj_scanpos;
if (jj_3R_243()) jj_scanpos = xsp;
if (jj_scan_token(LBRACE)) return true;
xsp = jj_scanpos;
if (jj_3R_244()) jj_scanpos = xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_245()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(RBRACE)) return true;
return false;
}
final private boolean jj_3_5() {
if (jj_scan_token(COMMA)) return true;
if (jj_3R_63()) return true;
return false;
}
final private boolean jj_3R_250() {
if (jj_scan_token(THROWS)) return true;
if (jj_3R_262()) return true;
return false;
}
final private boolean jj_3R_273() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(31)) jj_scanpos = xsp;
if (jj_3R_60()) return true;
xsp = jj_scanpos;
if (jj_scan_token(121)) jj_scanpos = xsp;
if (jj_3R_263()) return true;
return false;
}
final private boolean jj_3R_261() {
if (jj_3R_273()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_274()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_242() {
if (jj_scan_token(LPAREN)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_261()) jj_scanpos = xsp;
if (jj_scan_token(RPAREN)) return true;
return false;
}
final private boolean jj_3R_249() {
if (jj_scan_token(IDENTIFIER)) return true;
if (jj_3R_242()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_265()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3_40() {
if (jj_3R_60()) return true;
if (jj_scan_token(IDENTIFIER)) return true;
if (jj_scan_token(LPAREN)) return true;
return false;
}
final private boolean jj_3R_251() {
if (jj_3R_86()) return true;
return false;
}
final private boolean jj_3R_248() {
if (jj_3R_84()) return true;
return false;
}
final private boolean jj_3R_210() {
if (jj_3R_63()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3_5()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_233() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_248()) jj_scanpos = xsp;
if (jj_3R_76()) return true;
if (jj_3R_249()) return true;
xsp = jj_scanpos;
if (jj_3R_250()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_3R_251()) {
jj_scanpos = xsp;
if (jj_scan_token(83)) return true;
}
return false;
}
final private boolean jj_3R_264() {
if (jj_scan_token(ASSIGN)) return true;
if (jj_3R_63()) return true;
return false;
}
final private boolean jj_3R_247() {
if (jj_scan_token(COMMA)) return true;
if (jj_3R_246()) return true;
return false;
}
final private boolean jj_3R_276() {
if (jj_scan_token(LBRACKET)) return true;
if (jj_scan_token(RBRACKET)) return true;
return false;
}
final private boolean jj_3R_115() {
if (jj_scan_token(LBRACE)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_210()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_scan_token(84)) jj_scanpos = xsp;
if (jj_scan_token(RBRACE)) return true;
return false;
}
final private boolean jj_3_39() {
if (jj_scan_token(COMMA)) return true;
if (jj_3R_82()) return true;
return false;
}
final private boolean jj_3R_61() {
if (jj_scan_token(LBRACKET)) return true;
if (jj_scan_token(RBRACKET)) return true;
return false;
}
final private boolean jj_3R_88() {
if (jj_3R_70()) return true;
return false;
}
final private boolean jj_3R_87() {
if (jj_3R_115()) return true;
return false;
}
final private boolean jj_3R_63() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_87()) {
jj_scanpos = xsp;
if (jj_3R_88()) return true;
}
return false;
}
final private boolean jj_3R_263() {
if (jj_scan_token(IDENTIFIER)) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_276()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_246() {
if (jj_3R_263()) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_264()) jj_scanpos = xsp;
return false;
}
final private boolean jj_3R_128() {
if (jj_scan_token(LBRACE)) return true;
if (jj_3R_82()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3_39()) { jj_scanpos = xsp; break; }
}
xsp = jj_scanpos;
if (jj_scan_token(84)) jj_scanpos = xsp;
if (jj_scan_token(RBRACE)) return true;
return false;
}
final private boolean jj_3R_292() {
if (jj_scan_token(COMMA)) return true;
if (jj_3R_291()) return true;
return false;
}
final private boolean jj_3_3() {
if (jj_3R_60()) return true;
if (jj_scan_token(IDENTIFIER)) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_61()) { jj_scanpos = xsp; break; }
}
xsp = jj_scanpos;
if (jj_scan_token(84)) {
jj_scanpos = xsp;
if (jj_scan_token(87)) {
jj_scanpos = xsp;
if (jj_scan_token(83)) return true;
}
}
return false;
}
final private boolean jj_3R_59() {
if (jj_3R_84()) return true;
return false;
}
final private boolean jj_3R_108() {
if (jj_3R_96()) return true;
return false;
}
final private boolean jj_3_2() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_59()) jj_scanpos = xsp;
if (jj_scan_token(IDENTIFIER)) return true;
if (jj_scan_token(LPAREN)) return true;
return false;
}
final private boolean jj_3R_232() {
if (jj_3R_60()) return true;
if (jj_3R_246()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_247()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(SEMICOLON)) return true;
return false;
}
final private boolean jj_3R_107() {
if (jj_3R_128()) return true;
return false;
}
final private boolean jj_3R_106() {
if (jj_3R_83()) return true;
return false;
}
final private boolean jj_3R_82() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_106()) {
jj_scanpos = xsp;
if (jj_3R_107()) {
jj_scanpos = xsp;
if (jj_3R_108()) return true;
}
}
return false;
}
final private boolean jj_3R_225() {
if (jj_3R_233()) return true;
return false;
}
final private boolean jj_3R_291() {
if (jj_scan_token(IDENTIFIER)) return true;
if (jj_scan_token(ASSIGN)) return true;
if (jj_3R_82()) return true;
return false;
}
final private boolean jj_3R_144() {
if (jj_scan_token(BIT_AND)) return true;
if (jj_3R_123()) return true;
return false;
}
final private boolean jj_3R_224() {
if (jj_3R_232()) return true;
return false;
}
final private boolean jj_3R_223() {
if (jj_3R_231()) return true;
return false;
}
final private boolean jj_3R_222() {
if (jj_3R_230()) return true;
return false;
}
final private boolean jj_3R_281() {
if (jj_3R_291()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_292()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_280() {
if (jj_3R_281()) return true;
return false;
}
final private boolean jj_3R_221() {
if (jj_3R_147()) return true;
return false;
}
final private boolean jj_3R_81() {
if (jj_scan_token(IDENTIFIER)) return true;
if (jj_scan_token(ASSIGN)) return true;
return false;
}
final private boolean jj_3R_130() {
if (jj_scan_token(AT)) return true;
if (jj_3R_80()) return true;
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_82()) return true;
if (jj_scan_token(RPAREN)) return true;
return false;
}
final private boolean jj_3R_217() {
if (jj_3R_220()) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_221()) {
jj_scanpos = xsp;
if (jj_3R_222()) {
jj_scanpos = xsp;
if (jj_3R_223()) {
jj_scanpos = xsp;
if (jj_3R_224()) {
jj_scanpos = xsp;
if (jj_3R_225()) return true;
}
}
}
}
return false;
}
final private boolean jj_3R_131() {
if (jj_scan_token(AT)) return true;
if (jj_3R_80()) return true;
return false;
}
final private boolean jj_3_4() {
if (jj_3R_62()) return true;
return false;
}
final private boolean jj_3R_214() {
Token xsp;
xsp = jj_scanpos;
if (jj_3_4()) {
jj_scanpos = xsp;
if (jj_3R_217()) {
jj_scanpos = xsp;
if (jj_scan_token(83)) return true;
}
}
return false;
}
final private boolean jj_3_38() {
if (jj_scan_token(AT)) return true;
if (jj_3R_80()) return true;
if (jj_scan_token(LPAREN)) return true;
return false;
}
final private boolean jj_3R_271() {
if (jj_3R_205()) return true;
return false;
}
final private boolean jj_3R_211() {
if (jj_3R_214()) return true;
return false;
}
final private boolean jj_3R_129() {
if (jj_scan_token(AT)) return true;
if (jj_3R_80()) return true;
if (jj_scan_token(LPAREN)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_280()) jj_scanpos = xsp;
if (jj_scan_token(RPAREN)) return true;
return false;
}
final private boolean jj_3R_113() {
if (jj_scan_token(COMMA)) return true;
if (jj_3R_112()) return true;
return false;
}
final private boolean jj_3_37() {
if (jj_scan_token(AT)) return true;
if (jj_3R_80()) return true;
if (jj_scan_token(LPAREN)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_81()) {
jj_scanpos = xsp;
if (jj_scan_token(78)) return true;
}
return false;
}
final private boolean jj_3R_132() {
if (jj_3R_137()) return true;
return false;
}
final private boolean jj_3R_205() {
if (jj_scan_token(LBRACE)) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_211()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(RBRACE)) return true;
return false;
}
final private boolean jj_3R_111() {
if (jj_3R_131()) return true;
return false;
}
final private boolean jj_3R_110() {
if (jj_3R_130()) return true;
return false;
}
final private boolean jj_3R_137() {
if (jj_scan_token(EXTENDS)) return true;
if (jj_3R_123()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_144()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_109() {
if (jj_3R_129()) return true;
return false;
}
final private boolean jj_3R_97() {
return false;
}
final private boolean jj_3R_83() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_109()) {
jj_scanpos = xsp;
if (jj_3R_110()) {
jj_scanpos = xsp;
if (jj_3R_111()) return true;
}
}
return false;
}
final private boolean jj_3R_270() {
if (jj_3R_66()) return true;
return false;
}
final private boolean jj_3R_112() {
if (jj_scan_token(IDENTIFIER)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_132()) jj_scanpos = xsp;
return false;
}
final private boolean jj_3R_259() {
if (jj_scan_token(COMMA)) return true;
if (jj_3R_258()) return true;
return false;
}
final private boolean jj_3R_98() {
return false;
}
final private boolean jj_3R_84() {
if (jj_scan_token(LT)) return true;
if (jj_3R_112()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_113()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(GT)) return true;
return false;
}
final private boolean jj_3R_71() {
Token xsp;
xsp = jj_scanpos;
lookingAhead = true;
jj_semLA = getToken(1).kind == GT &&
((Token.GTToken)getToken(1)).realKind == RSIGNEDSHIFT;
lookingAhead = false;
if (!jj_semLA || jj_3R_97()) return true;
if (jj_scan_token(GT)) return true;
if (jj_scan_token(GT)) return true;
return false;
}
final private boolean jj_3R_272() {
if (jj_3R_214()) return true;
return false;
}
final private boolean jj_3R_258() {
if (jj_scan_token(IDENTIFIER)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_270()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_3R_271()) jj_scanpos = xsp;
return false;
}
final private boolean jj_3R_72() {
Token xsp;
xsp = jj_scanpos;
lookingAhead = true;
jj_semLA = getToken(1).kind == GT &&
((Token.GTToken)getToken(1)).realKind == RUNSIGNEDSHIFT;
lookingAhead = false;
if (!jj_semLA || jj_3R_98()) return true;
if (jj_scan_token(GT)) return true;
if (jj_scan_token(GT)) return true;
if (jj_scan_token(GT)) return true;
return false;
}
final private boolean jj_3R_260() {
if (jj_scan_token(SEMICOLON)) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_272()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_240() {
if (jj_scan_token(LBRACE)) return true;
if (jj_3R_258()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_259()) { jj_scanpos = xsp; break; }
}
xsp = jj_scanpos;
if (jj_3R_260()) jj_scanpos = xsp;
if (jj_scan_token(RBRACE)) return true;
return false;
}
final private boolean jj_3R_290() {
if (jj_scan_token(FINALLY)) return true;
if (jj_3R_86()) return true;
return false;
}
final private boolean jj_3R_289() {
if (jj_scan_token(CATCH)) return true;
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_273()) return true;
if (jj_scan_token(RPAREN)) return true;
if (jj_3R_86()) return true;
return false;
}
final private boolean jj_3R_239() {
if (jj_3R_257()) return true;
return false;
}
final private boolean jj_3R_184() {
if (jj_scan_token(TRY)) return true;
if (jj_3R_86()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_289()) { jj_scanpos = xsp; break; }
}
xsp = jj_scanpos;
if (jj_3R_290()) jj_scanpos = xsp;
return false;
}
final private boolean jj_3R_230() {
if (jj_scan_token(ENUM)) return true;
if (jj_scan_token(IDENTIFIER)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_239()) jj_scanpos = xsp;
if (jj_3R_240()) return true;
return false;
}
final private boolean jj_3R_269() {
if (jj_scan_token(COMMA)) return true;
if (jj_3R_123()) return true;
return false;
}
final private boolean jj_3R_183() {
if (jj_scan_token(SYNCHRONIZED)) return true;
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_70()) return true;
if (jj_scan_token(RPAREN)) return true;
if (jj_3R_86()) return true;
return false;
}
final private boolean jj_3R_288() {
if (jj_3R_70()) return true;
return false;
}
final private boolean jj_3R_257() {
if (jj_scan_token(IMPLEMENTS)) return true;
if (jj_3R_123()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_269()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_182() {
if (jj_scan_token(THROW)) return true;
if (jj_3R_70()) return true;
if (jj_scan_token(SEMICOLON)) return true;
return false;
}
final private boolean jj_3R_298() {
if (jj_3R_303()) return true;
return false;
}
final private boolean jj_3R_268() {
if (jj_scan_token(COMMA)) return true;
if (jj_3R_123()) return true;
return false;
}
final private boolean jj_3R_307() {
if (jj_scan_token(COMMA)) return true;
if (jj_3R_173()) return true;
return false;
}
final private boolean jj_3R_181() {
if (jj_scan_token(RETURN)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_288()) jj_scanpos = xsp;
if (jj_scan_token(SEMICOLON)) return true;
return false;
}
final private boolean jj_3R_256() {
if (jj_scan_token(EXTENDS)) return true;
if (jj_3R_123()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_268()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_167() {
if (jj_scan_token(INTERFACE)) return true;
return false;
}
final private boolean jj_3R_180() {
if (jj_scan_token(CONTINUE)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(74)) jj_scanpos = xsp;
if (jj_scan_token(SEMICOLON)) return true;
return false;
}
final private boolean jj_3R_238() {
if (jj_3R_257()) return true;
return false;
}
final private boolean jj_3R_237() {
if (jj_3R_256()) return true;
return false;
}
final private boolean jj_3R_236() {
if (jj_3R_84()) return true;
return false;
}
final private boolean jj_3R_179() {
if (jj_scan_token(BREAK)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(74)) jj_scanpos = xsp;
if (jj_scan_token(SEMICOLON)) return true;
return false;
}
final private boolean jj_3R_147() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(21)) {
jj_scanpos = xsp;
if (jj_3R_167()) return true;
}
if (jj_scan_token(IDENTIFIER)) return true;
xsp = jj_scanpos;
if (jj_3R_236()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_3R_237()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_3R_238()) jj_scanpos = xsp;
if (jj_3R_205()) return true;
return false;
}
final private boolean jj_3R_303() {
if (jj_3R_306()) return true;
return false;
}
final private boolean jj_3R_297() {
if (jj_3R_70()) return true;
return false;
}
final private boolean jj_3_36() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(31)) jj_scanpos = xsp;
if (jj_3R_60()) return true;
if (jj_scan_token(IDENTIFIER)) return true;
return false;
}
final private boolean jj_3R_306() {
if (jj_3R_173()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_307()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_285() {
if (jj_scan_token(ELSE)) return true;
if (jj_3R_146()) return true;
return false;
}
final private boolean jj_3R_305() {
if (jj_3R_306()) return true;
return false;
}
final private boolean jj_3_35() {
if (jj_3R_60()) return true;
if (jj_scan_token(IDENTIFIER)) return true;
if (jj_scan_token(COLON)) return true;
return false;
}
final private boolean jj_3R_304() {
if (jj_3R_145()) return true;
return false;
}
final private boolean jj_3R_302() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_304()) {
jj_scanpos = xsp;
if (jj_3R_305()) return true;
}
return false;
}
final private boolean jj_3R_296() {
if (jj_3R_302()) return true;
return false;
}
final private boolean jj_3R_287() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_296()) jj_scanpos = xsp;
if (jj_scan_token(SEMICOLON)) return true;
xsp = jj_scanpos;
if (jj_3R_297()) jj_scanpos = xsp;
if (jj_scan_token(SEMICOLON)) return true;
xsp = jj_scanpos;
if (jj_3R_298()) jj_scanpos = xsp;
return false;
}
final private boolean jj_3R_286() {
if (jj_3R_60()) return true;
if (jj_scan_token(IDENTIFIER)) return true;
if (jj_scan_token(COLON)) return true;
if (jj_3R_70()) return true;
return false;
}
final private boolean jj_3R_178() {
if (jj_scan_token(FOR)) return true;
if (jj_scan_token(LPAREN)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_286()) {
jj_scanpos = xsp;
if (jj_3R_287()) return true;
}
if (jj_scan_token(RPAREN)) return true;
if (jj_3R_146()) return true;
return false;
}
final private boolean jj_3R_58() {
if (jj_3R_83()) return true;
return false;
}
final private boolean jj_3R_57() {
if (jj_scan_token(STRICTFP)) return true;
return false;
}
final private boolean jj_3R_56() {
if (jj_scan_token(VOLATILE)) return true;
return false;
}
final private boolean jj_3R_177() {
if (jj_scan_token(DO)) return true;
if (jj_3R_146()) return true;
if (jj_scan_token(WHILE)) return true;
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_70()) return true;
if (jj_scan_token(RPAREN)) return true;
if (jj_scan_token(SEMICOLON)) return true;
return false;
}
final private boolean jj_3R_55() {
if (jj_scan_token(TRANSIENT)) return true;
return false;
}
final private boolean jj_3R_54() {
if (jj_scan_token(NATIVE)) return true;
return false;
}
final private boolean jj_3R_53() {
if (jj_scan_token(SYNCHRONIZED)) return true;
return false;
}
final private boolean jj_3R_176() {
if (jj_scan_token(WHILE)) return true;
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_70()) return true;
if (jj_scan_token(RPAREN)) return true;
if (jj_3R_146()) return true;
return false;
}
final private boolean jj_3R_52() {
if (jj_scan_token(ABSTRACT)) return true;
return false;
}
final private boolean jj_3R_51() {
if (jj_scan_token(FINAL)) return true;
return false;
}
final private boolean jj_3R_50() {
if (jj_scan_token(PRIVATE)) return true;
return false;
}
final private boolean jj_3R_295() {
if (jj_3R_133()) return true;
return false;
}
final private boolean jj_3R_175() {
if (jj_scan_token(IF)) return true;
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_70()) return true;
if (jj_scan_token(RPAREN)) return true;
if (jj_3R_146()) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_285()) jj_scanpos = xsp;
return false;
}
final private boolean jj_3R_49() {
if (jj_scan_token(PROTECTED)) return true;
return false;
}
final private boolean jj_3R_48() {
if (jj_scan_token(STATIC)) return true;
return false;
}
final private boolean jj_3R_47() {
if (jj_scan_token(PUBLIC)) return true;
return false;
}
final private boolean jj_3_1() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_47()) {
jj_scanpos = xsp;
if (jj_3R_48()) {
jj_scanpos = xsp;
if (jj_3R_49()) {
jj_scanpos = xsp;
if (jj_3R_50()) {
jj_scanpos = xsp;
if (jj_3R_51()) {
jj_scanpos = xsp;
if (jj_3R_52()) {
jj_scanpos = xsp;
if (jj_3R_53()) {
jj_scanpos = xsp;
if (jj_3R_54()) {
jj_scanpos = xsp;
if (jj_3R_55()) {
jj_scanpos = xsp;
if (jj_3R_56()) {
jj_scanpos = xsp;
if (jj_3R_57()) {
jj_scanpos = xsp;
if (jj_3R_58()) return true;
}
}
}
}
}
}
}
}
}
}
}
return false;
}
final private boolean jj_3R_220() {
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3_1()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_301() {
if (jj_scan_token(_DEFAULT)) return true;
if (jj_scan_token(COLON)) return true;
return false;
}
final private boolean jj_3R_300() {
if (jj_scan_token(CASE)) return true;
if (jj_3R_70()) return true;
if (jj_scan_token(COLON)) return true;
return false;
}
final private boolean jj_3R_294() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_300()) {
jj_scanpos = xsp;
if (jj_3R_301()) return true;
}
return false;
}
final private boolean jj_3R_279() {
if (jj_scan_token(COMMA)) return true;
if (jj_3R_246()) return true;
return false;
}
final private boolean jj_3R_284() {
if (jj_3R_294()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_295()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_174() {
if (jj_scan_token(SWITCH)) return true;
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_70()) return true;
if (jj_scan_token(RPAREN)) return true;
if (jj_scan_token(LBRACE)) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_284()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(RBRACE)) return true;
return false;
}
final private boolean jj_3R_299() {
if (jj_3R_69()) return true;
if (jj_3R_70()) return true;
return false;
}
final private boolean jj_3R_293() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(99)) {
jj_scanpos = xsp;
if (jj_scan_token(100)) {
jj_scanpos = xsp;
if (jj_3R_299()) return true;
}
}
return false;
}
final private boolean jj_3R_189() {
if (jj_3R_65()) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_293()) jj_scanpos = xsp;
return false;
}
final private boolean jj_3R_188() {
if (jj_3R_198()) return true;
return false;
}
final private boolean jj_3R_173() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_187()) {
jj_scanpos = xsp;
if (jj_3R_188()) {
jj_scanpos = xsp;
if (jj_3R_189()) return true;
}
}
return false;
}
final private boolean jj_3R_187() {
if (jj_3R_197()) return true;
return false;
}
final private boolean jj_3R_172() {
if (jj_scan_token(SEMICOLON)) return true;
return false;
}
final private boolean jj_3R_145() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(31)) jj_scanpos = xsp;
if (jj_3R_60()) return true;
if (jj_3R_246()) return true;
while (true) {
xsp = jj_scanpos;
if (jj_3R_279()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3_34() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(31)) jj_scanpos = xsp;
if (jj_3R_60()) return true;
if (jj_scan_token(IDENTIFIER)) return true;
return false;
}
final private boolean jj_3R_283() {
if (jj_scan_token(COLON)) return true;
if (jj_3R_70()) return true;
return false;
}
final private boolean jj_3R_140() {
if (jj_3R_147()) return true;
return false;
}
final private boolean jj_3R_139() {
if (jj_3R_146()) return true;
return false;
}
final private boolean jj_3R_138() {
if (jj_3R_145()) return true;
if (jj_scan_token(SEMICOLON)) return true;
return false;
}
final private boolean jj_3R_133() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_138()) {
jj_scanpos = xsp;
if (jj_3R_139()) {
jj_scanpos = xsp;
if (jj_3R_140()) return true;
}
}
return false;
}
final private boolean jj_3R_114() {
if (jj_3R_133()) return true;
return false;
}
final private boolean jj_3R_86() {
if (jj_scan_token(LBRACE)) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_114()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(RBRACE)) return true;
return false;
}
final private boolean jj_3R_79() {
if (jj_scan_token(IDENTIFIER)) return true;
if (jj_scan_token(COLON)) return true;
if (jj_3R_146()) return true;
return false;
}
final private boolean jj_3R_171() {
if (jj_scan_token(ASSERT)) return true;
if (jj_3R_70()) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_283()) jj_scanpos = xsp;
if (jj_scan_token(SEMICOLON)) return true;
return false;
}
final private boolean jj_3R_166() {
if (jj_3R_184()) return true;
return false;
}
final private boolean jj_3R_165() {
if (jj_3R_183()) return true;
return false;
}
final private boolean jj_3_31() {
if (jj_scan_token(LBRACKET)) return true;
if (jj_scan_token(RBRACKET)) return true;
return false;
}
final private boolean jj_3R_164() {
if (jj_3R_182()) return true;
return false;
}
final private boolean jj_3R_163() {
if (jj_3R_181()) return true;
return false;
}
final private boolean jj_3R_162() {
if (jj_3R_180()) return true;
return false;
}
final private boolean jj_3R_161() {
if (jj_3R_179()) return true;
return false;
}
final private boolean jj_3R_160() {
if (jj_3R_178()) return true;
return false;
}
final private boolean jj_3R_159() {
if (jj_3R_177()) return true;
return false;
}
final private boolean jj_3R_158() {
if (jj_3R_176()) return true;
return false;
}
final private boolean jj_3R_157() {
if (jj_3R_175()) return true;
return false;
}
final private boolean jj_3R_156() {
if (jj_3R_174()) return true;
return false;
}
final private boolean jj_3R_155() {
if (jj_3R_173()) return true;
if (jj_scan_token(SEMICOLON)) return true;
return false;
}
final private boolean jj_3R_154() {
if (jj_3R_172()) return true;
return false;
}
final private boolean jj_3R_153() {
if (jj_3R_86()) return true;
return false;
}
final private boolean jj_3R_152() {
if (jj_3R_171()) return true;
return false;
}
final private boolean jj_3R_191() {
if (jj_3R_68()) return true;
return false;
}
final private boolean jj_3_33() {
if (jj_3R_79()) return true;
return false;
}
final private boolean jj_3R_146() {
Token xsp;
xsp = jj_scanpos;
if (jj_3_33()) {
jj_scanpos = xsp;
if (jj_3R_152()) {
jj_scanpos = xsp;
if (jj_3R_153()) {
jj_scanpos = xsp;
if (jj_3R_154()) {
jj_scanpos = xsp;
if (jj_3R_155()) {
jj_scanpos = xsp;
if (jj_3R_156()) {
jj_scanpos = xsp;
if (jj_3R_157()) {
jj_scanpos = xsp;
if (jj_3R_158()) {
jj_scanpos = xsp;
if (jj_3R_159()) {
jj_scanpos = xsp;
if (jj_3R_160()) {
jj_scanpos = xsp;
if (jj_3R_161()) {
jj_scanpos = xsp;
if (jj_3R_162()) {
jj_scanpos = xsp;
if (jj_3R_163()) {
jj_scanpos = xsp;
if (jj_3R_164()) {
jj_scanpos = xsp;
if (jj_3R_165()) {
jj_scanpos = xsp;
if (jj_3R_166()) return true;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
return false;
}
final private boolean jj_3R_200() {
if (jj_3R_205()) return true;
return false;
}
final private boolean jj_3R_204() {
if (jj_scan_token(LBRACKET)) return true;
if (jj_scan_token(RBRACKET)) return true;
return false;
}
final private boolean jj_3_30() {
if (jj_scan_token(LBRACKET)) return true;
if (jj_3R_70()) return true;
if (jj_scan_token(RBRACKET)) return true;
return false;
}
final private boolean jj_3R_199() {
Token xsp;
if (jj_3R_204()) return true;
while (true) {
xsp = jj_scanpos;
if (jj_3R_204()) { jj_scanpos = xsp; break; }
}
if (jj_3R_115()) return true;
return false;
}
final private boolean jj_3_32() {
Token xsp;
if (jj_3_30()) return true;
while (true) {
xsp = jj_scanpos;
if (jj_3_30()) { jj_scanpos = xsp; break; }
}
while (true) {
xsp = jj_scanpos;
if (jj_3_31()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_190() {
Token xsp;
xsp = jj_scanpos;
if (jj_3_32()) {
jj_scanpos = xsp;
if (jj_3R_199()) return true;
}
return false;
}
final private boolean jj_3R_193() {
if (jj_3R_66()) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_200()) jj_scanpos = xsp;
return false;
}
final private boolean jj_3R_135() {
if (jj_scan_token(COMMA)) return true;
if (jj_3R_70()) return true;
return false;
}
final private boolean jj_3R_192() {
if (jj_3R_190()) return true;
return false;
}
final private boolean jj_3R_105() {
if (jj_scan_token(NEW)) return true;
if (jj_3R_123()) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_191()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_3R_192()) {
jj_scanpos = xsp;
if (jj_3R_193()) return true;
}
return false;
}
final private boolean jj_3_29() {
if (jj_scan_token(NEW)) return true;
if (jj_3R_74()) return true;
if (jj_3R_190()) return true;
return false;
}
final private boolean jj_3R_77() {
Token xsp;
xsp = jj_scanpos;
if (jj_3_29()) {
jj_scanpos = xsp;
if (jj_3R_105()) return true;
}
return false;
}
final private boolean jj_3R_122() {
if (jj_3R_70()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_135()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_92() {
if (jj_3R_122()) return true;
return false;
}
final private boolean jj_3R_66() {
if (jj_scan_token(LPAREN)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_92()) jj_scanpos = xsp;
if (jj_scan_token(RPAREN)) return true;
return false;
}
final private boolean jj_3R_149() {
if (jj_scan_token(NULL)) return true;
return false;
}
final private boolean jj_3R_148() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(61)) {
jj_scanpos = xsp;
if (jj_scan_token(30)) return true;
}
return false;
}
final private boolean jj_3R_142() {
if (jj_3R_149()) return true;
return false;
}
final private boolean jj_3R_141() {
if (jj_3R_148()) return true;
return false;
}
final private boolean jj_3R_127() {
if (jj_3R_134()) return true;
return false;
}
final private boolean jj_3R_134() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(66)) {
jj_scanpos = xsp;
if (jj_scan_token(70)) {
jj_scanpos = xsp;
if (jj_scan_token(72)) {
jj_scanpos = xsp;
if (jj_scan_token(73)) {
jj_scanpos = xsp;
if (jj_3R_141()) {
jj_scanpos = xsp;
if (jj_3R_142()) return true;
}
}
}
}
}
return false;
}
final private boolean jj_3R_103() {
if (jj_3R_66()) return true;
return false;
}
final private boolean jj_3R_102() {
if (jj_scan_token(DOT)) return true;
if (jj_scan_token(IDENTIFIER)) return true;
return false;
}
final private boolean jj_3R_101() {
if (jj_scan_token(LBRACKET)) return true;
if (jj_3R_70()) return true;
if (jj_scan_token(RBRACKET)) return true;
return false;
}
final private boolean jj_3_28() {
if (jj_3R_78()) return true;
return false;
}
final private boolean jj_3_27() {
if (jj_scan_token(DOT)) return true;
if (jj_3R_77()) return true;
return false;
}
final private boolean jj_3_25() {
if (jj_3R_76()) return true;
if (jj_scan_token(DOT)) return true;
if (jj_scan_token(CLASS)) return true;
return false;
}
final private boolean jj_3_26() {
if (jj_scan_token(DOT)) return true;
if (jj_scan_token(THIS)) return true;
return false;
}
final private boolean jj_3R_75() {
Token xsp;
xsp = jj_scanpos;
if (jj_3_26()) {
jj_scanpos = xsp;
if (jj_3_27()) {
jj_scanpos = xsp;
if (jj_3_28()) {
jj_scanpos = xsp;
if (jj_3R_101()) {
jj_scanpos = xsp;
if (jj_3R_102()) {
jj_scanpos = xsp;
if (jj_3R_103()) return true;
}
}
}
}
}
return false;
}
final private boolean jj_3R_121() {
if (jj_3R_80()) return true;
return false;
}
final private boolean jj_3R_120() {
if (jj_3R_76()) return true;
if (jj_scan_token(DOT)) return true;
if (jj_scan_token(CLASS)) return true;
return false;
}
final private boolean jj_3R_119() {
if (jj_3R_77()) return true;
return false;
}
final private boolean jj_3R_118() {
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_70()) return true;
if (jj_scan_token(RPAREN)) return true;
return false;
}
final private boolean jj_3_24() {
if (jj_3R_75()) return true;
return false;
}
final private boolean jj_3R_117() {
if (jj_scan_token(SUPER)) return true;
if (jj_scan_token(DOT)) return true;
if (jj_scan_token(IDENTIFIER)) return true;
return false;
}
final private boolean jj_3R_116() {
if (jj_3R_134()) return true;
return false;
}
final private boolean jj_3R_91() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_116()) {
jj_scanpos = xsp;
if (jj_scan_token(57)) {
jj_scanpos = xsp;
if (jj_3R_117()) {
jj_scanpos = xsp;
if (jj_3R_118()) {
jj_scanpos = xsp;
if (jj_3R_119()) {
jj_scanpos = xsp;
if (jj_3R_120()) {
jj_scanpos = xsp;
if (jj_3R_121()) return true;
}
}
}
}
}
}
return false;
}
final private boolean jj_3R_282() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(99)) {
jj_scanpos = xsp;
if (jj_scan_token(100)) return true;
}
return false;
}
final private boolean jj_3R_78() {
if (jj_scan_token(DOT)) return true;
if (jj_3R_68()) return true;
if (jj_scan_token(IDENTIFIER)) return true;
return false;
}
final private boolean jj_3_23() {
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_74()) return true;
return false;
}
final private boolean jj_3R_65() {
if (jj_3R_91()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3_24()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_278() {
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_60()) return true;
if (jj_scan_token(RPAREN)) return true;
if (jj_3R_235()) return true;
return false;
}
final private boolean jj_3R_277() {
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_60()) return true;
if (jj_scan_token(RPAREN)) return true;
if (jj_3R_219()) return true;
return false;
}
final private boolean jj_3R_266() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_277()) {
jj_scanpos = xsp;
if (jj_3R_278()) return true;
}
return false;
}
final private boolean jj_3_22() {
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_60()) return true;
if (jj_scan_token(LBRACKET)) return true;
return false;
}
final private boolean jj_3R_267() {
if (jj_3R_65()) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_282()) jj_scanpos = xsp;
return false;
}
final private boolean jj_3R_100() {
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_60()) return true;
if (jj_scan_token(RPAREN)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(90)) {
jj_scanpos = xsp;
if (jj_scan_token(89)) {
jj_scanpos = xsp;
if (jj_scan_token(77)) {
jj_scanpos = xsp;
if (jj_scan_token(74)) {
jj_scanpos = xsp;
if (jj_scan_token(57)) {
jj_scanpos = xsp;
if (jj_scan_token(54)) {
jj_scanpos = xsp;
if (jj_scan_token(44)) {
jj_scanpos = xsp;
if (jj_3R_127()) return true;
}
}
}
}
}
}
}
return false;
}
final private boolean jj_3R_99() {
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_60()) return true;
if (jj_scan_token(LBRACKET)) return true;
if (jj_scan_token(RBRACKET)) return true;
return false;
}
final private boolean jj_3_21() {
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_74()) return true;
return false;
}
final private boolean jj_3R_73() {
Token xsp;
xsp = jj_scanpos;
if (jj_3_21()) {
jj_scanpos = xsp;
if (jj_3R_99()) {
jj_scanpos = xsp;
if (jj_3R_100()) return true;
}
}
return false;
}
final private boolean jj_3_20() {
if (jj_3R_73()) return true;
return false;
}
final private boolean jj_3_19() {
if (jj_3R_72()) return true;
return false;
}
final private boolean jj_3R_255() {
if (jj_3R_267()) return true;
return false;
}
final private boolean jj_3R_254() {
if (jj_3R_266()) return true;
return false;
}
final private boolean jj_3R_235() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_253()) {
jj_scanpos = xsp;
if (jj_3R_254()) {
jj_scanpos = xsp;
if (jj_3R_255()) return true;
}
}
return false;
}
final private boolean jj_3R_253() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(90)) {
jj_scanpos = xsp;
if (jj_scan_token(89)) return true;
}
if (jj_3R_219()) return true;
return false;
}
final private boolean jj_3R_198() {
if (jj_scan_token(DECR)) return true;
if (jj_3R_65()) return true;
return false;
}
final private boolean jj_3R_234() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(101)) {
jj_scanpos = xsp;
if (jj_scan_token(102)) return true;
}
if (jj_3R_216()) return true;
return false;
}
final private boolean jj_3_18() {
if (jj_3R_71()) return true;
return false;
}
final private boolean jj_3R_252() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(103)) {
jj_scanpos = xsp;
if (jj_scan_token(104)) {
jj_scanpos = xsp;
if (jj_scan_token(108)) return true;
}
}
if (jj_3R_219()) return true;
return false;
}
final private boolean jj_3R_197() {
if (jj_scan_token(INCR)) return true;
if (jj_3R_65()) return true;
return false;
}
final private boolean jj_3R_229() {
if (jj_3R_235()) return true;
return false;
}
final private boolean jj_3_17() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(109)) {
jj_scanpos = xsp;
if (jj_3_18()) {
jj_scanpos = xsp;
if (jj_3_19()) return true;
}
}
if (jj_3R_213()) return true;
return false;
}
final private boolean jj_3R_228() {
if (jj_3R_198()) return true;
return false;
}
final private boolean jj_3R_227() {
if (jj_3R_197()) return true;
return false;
}
final private boolean jj_3R_219() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_226()) {
jj_scanpos = xsp;
if (jj_3R_227()) {
jj_scanpos = xsp;
if (jj_3R_228()) {
jj_scanpos = xsp;
if (jj_3R_229()) return true;
}
}
}
return false;
}
final private boolean jj_3R_226() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(101)) {
jj_scanpos = xsp;
if (jj_scan_token(102)) return true;
}
if (jj_3R_219()) return true;
return false;
}
final private boolean jj_3R_218() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(88)) {
jj_scanpos = xsp;
if (jj_scan_token(124)) {
jj_scanpos = xsp;
if (jj_scan_token(94)) {
jj_scanpos = xsp;
if (jj_scan_token(95)) return true;
}
}
}
if (jj_3R_207()) return true;
return false;
}
final private boolean jj_3R_215() {
if (jj_scan_token(INSTANCEOF)) return true;
if (jj_3R_60()) return true;
return false;
}
final private boolean jj_3R_216() {
if (jj_3R_219()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_252()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_212() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(93)) {
jj_scanpos = xsp;
if (jj_scan_token(96)) return true;
}
if (jj_3R_195()) return true;
return false;
}
final private boolean jj_3R_213() {
if (jj_3R_216()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_234()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_207() {
if (jj_3R_213()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3_17()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_206() {
if (jj_scan_token(BIT_AND)) return true;
if (jj_3R_186()) return true;
return false;
}
final private boolean jj_3R_202() {
if (jj_3R_207()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_218()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_194() {
if (jj_scan_token(BIT_OR)) return true;
if (jj_3R_151()) return true;
return false;
}
final private boolean jj_3R_195() {
if (jj_3R_202()) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_215()) jj_scanpos = xsp;
return false;
}
final private boolean jj_3R_201() {
if (jj_scan_token(XOR)) return true;
if (jj_3R_169()) return true;
return false;
}
final private boolean jj_3R_185() {
if (jj_scan_token(SC_AND)) return true;
if (jj_3R_143()) return true;
return false;
}
final private boolean jj_3R_186() {
if (jj_3R_195()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_212()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_168() {
if (jj_scan_token(SC_OR)) return true;
if (jj_3R_136()) return true;
return false;
}
final private boolean jj_3R_169() {
if (jj_3R_186()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_206()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_150() {
if (jj_scan_token(HOOK)) return true;
if (jj_3R_70()) return true;
if (jj_scan_token(COLON)) return true;
if (jj_3R_70()) return true;
return false;
}
final private boolean jj_3R_151() {
if (jj_3R_169()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_201()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_143() {
if (jj_3R_151()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_194()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_136() {
if (jj_3R_143()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_185()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_126() {
if (jj_3R_136()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_168()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_96() {
if (jj_3R_126()) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_150()) jj_scanpos = xsp;
return false;
}
final private boolean jj_3R_69() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(87)) {
jj_scanpos = xsp;
if (jj_scan_token(112)) {
jj_scanpos = xsp;
if (jj_scan_token(113)) {
jj_scanpos = xsp;
if (jj_scan_token(117)) {
jj_scanpos = xsp;
if (jj_scan_token(110)) {
jj_scanpos = xsp;
if (jj_scan_token(111)) {
jj_scanpos = xsp;
if (jj_scan_token(118)) {
jj_scanpos = xsp;
if (jj_scan_token(119)) {
jj_scanpos = xsp;
if (jj_scan_token(120)) {
jj_scanpos = xsp;
if (jj_scan_token(114)) {
jj_scanpos = xsp;
if (jj_scan_token(116)) {
jj_scanpos = xsp;
if (jj_scan_token(115)) return true;
}
}
}
}
}
}
}
}
}
}
}
return false;
}
final private boolean jj_3_16() {
if (jj_3R_69()) return true;
if (jj_3R_70()) return true;
return false;
}
final private boolean jj_3R_70() {
if (jj_3R_96()) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3_16()) jj_scanpos = xsp;
return false;
}
final private boolean jj_3R_275() {
if (jj_scan_token(COMMA)) return true;
if (jj_3R_80()) return true;
return false;
}
final private boolean jj_3R_262() {
if (jj_3R_80()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_275()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3_15() {
if (jj_scan_token(DOT)) return true;
if (jj_scan_token(IDENTIFIER)) return true;
return false;
}
final private boolean jj_3R_80() {
if (jj_scan_token(IDENTIFIER)) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3_15()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_104() {
if (jj_3R_60()) return true;
return false;
}
final private boolean jj_3R_76() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(63)) {
jj_scanpos = xsp;
if (jj_3R_104()) return true;
}
return false;
}
final private boolean jj_3_14() {
if (jj_3R_68()) return true;
return false;
}
final private boolean jj_3R_74() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(15)) {
jj_scanpos = xsp;
if (jj_scan_token(20)) {
jj_scanpos = xsp;
if (jj_scan_token(17)) {
jj_scanpos = xsp;
if (jj_scan_token(51)) {
jj_scanpos = xsp;
if (jj_scan_token(40)) {
jj_scanpos = xsp;
if (jj_scan_token(42)) {
jj_scanpos = xsp;
if (jj_scan_token(33)) {
jj_scanpos = xsp;
if (jj_scan_token(26)) return true;
}
}
}
}
}
}
}
return false;
}
final private boolean jj_3R_170() {
if (jj_scan_token(COMMA)) return true;
if (jj_3R_95()) return true;
return false;
}
final private boolean jj_3_11() {
if (jj_scan_token(LBRACKET)) return true;
if (jj_scan_token(RBRACKET)) return true;
return false;
}
final private boolean jj_3R_209() {
if (jj_scan_token(SUPER)) return true;
if (jj_3R_67()) return true;
return false;
}
final private boolean jj_3R_196() {
if (jj_3R_203()) return true;
return false;
}
final private boolean jj_3R_203() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_208()) {
jj_scanpos = xsp;
if (jj_3R_209()) return true;
}
return false;
}
final private boolean jj_3R_208() {
if (jj_scan_token(EXTENDS)) return true;
if (jj_3R_67()) return true;
return false;
}
final private boolean jj_3R_125() {
if (jj_scan_token(HOOK)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_196()) jj_scanpos = xsp;
return false;
}
final private boolean jj_3_12() {
if (jj_3R_68()) return true;
return false;
}
final private boolean jj_3R_124() {
if (jj_3R_67()) return true;
return false;
}
final private boolean jj_3R_95() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_124()) {
jj_scanpos = xsp;
if (jj_3R_125()) return true;
}
return false;
}
final private boolean jj_3_10() {
if (jj_scan_token(LBRACKET)) return true;
if (jj_scan_token(RBRACKET)) return true;
return false;
}
final private boolean jj_3R_68() {
if (jj_scan_token(LT)) return true;
if (jj_3R_95()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_170()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(GT)) return true;
return false;
}
final private boolean jj_3_13() {
if (jj_scan_token(DOT)) return true;
if (jj_scan_token(IDENTIFIER)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3_14()) jj_scanpos = xsp;
return false;
}
final private boolean jj_3R_123() {
if (jj_scan_token(IDENTIFIER)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3_12()) jj_scanpos = xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3_13()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_94() {
if (jj_3R_123()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3_11()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_93() {
if (jj_3R_74()) return true;
Token xsp;
if (jj_3_10()) return true;
while (true) {
xsp = jj_scanpos;
if (jj_3_10()) { jj_scanpos = xsp; break; }
}
return false;
}
final private boolean jj_3R_67() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_93()) {
jj_scanpos = xsp;
if (jj_3R_94()) return true;
}
return false;
}
final private boolean jj_3R_243() {
if (jj_scan_token(THROWS)) return true;
if (jj_3R_262()) return true;
return false;
}
final private boolean jj_3R_85() {
if (jj_3R_74()) return true;
return false;
}
public JavaParserTokenManager token_source;
JavaCharStream jj_input_stream;
public Token token, jj_nt;
private int jj_ntk;
private Token jj_scanpos, jj_lastpos;
private int jj_la;
public boolean lookingAhead = false;
private boolean jj_semLA;
public JavaParser(java.io.InputStream stream) {
this(stream, null);
}
public JavaParser(java.io.InputStream stream, String encoding) {
try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
token_source = new JavaParserTokenManager(jj_input_stream);
token = new Token();
jj_ntk = -1;
}
public void ReInit(java.io.InputStream stream) {
ReInit(stream, null);
}
public void ReInit(java.io.InputStream stream, String encoding) {
try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
token_source.ReInit(jj_input_stream);
token = new Token();
jj_ntk = -1;
jjtree.reset();
}
public JavaParser(java.io.Reader stream) {
jj_input_stream = new JavaCharStream(stream, 1, 1);
token_source = new JavaParserTokenManager(jj_input_stream);
token = new Token();
jj_ntk = -1;
}
public void ReInit(java.io.Reader stream) {
jj_input_stream.ReInit(stream, 1, 1);
token_source.ReInit(jj_input_stream);
token = new Token();
jj_ntk = -1;
jjtree.reset();
}
public JavaParser(JavaParserTokenManager tm) {
token_source = tm;
token = new Token();
jj_ntk = -1;
}
public void ReInit(JavaParserTokenManager tm) {
token_source = tm;
token = new Token();
jj_ntk = -1;
jjtree.reset();
}
final private Token jj_consume_token(int kind) throws ParseException {
Token oldToken;
if ((oldToken = token).next != null) token = token.next;
else token = token.next = token_source.getNextToken();
jj_ntk = -1;
if (token.kind == kind) {
return token;
}
token = oldToken;
throw generateParseException();
}
static private final class LookaheadSuccess extends java.lang.Error { }
final private LookaheadSuccess jj_ls = new LookaheadSuccess();
final private boolean jj_scan_token(int kind) {
if (jj_scanpos == jj_lastpos) {
jj_la--;
if (jj_scanpos.next == null) {
jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
} else {
jj_lastpos = jj_scanpos = jj_scanpos.next;
}
} else {
jj_scanpos = jj_scanpos.next;
}
if (jj_scanpos.kind != kind) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
return false;
}
final public Token getNextToken() {
if (token.next != null) token = token.next;
else token = token.next = token_source.getNextToken();
jj_ntk = -1;
return token;
}
final public Token getToken(int index) {
Token t = lookingAhead ? jj_scanpos : token;
for (int i = 0; i < index; i++) {
if (t.next != null) t = t.next;
else t = t.next = token_source.getNextToken();
}
return t;
}
final private int jj_ntk() {
if ((jj_nt=token.next) == null)
return (jj_ntk = (token.next=token_source.getNextToken()).kind);
else
return (jj_ntk = jj_nt.kind);
}
public ParseException generateParseException() {
Token errortok = token.next;
int line = errortok.beginLine, column = errortok.beginColumn;
String mess = (errortok.kind == 0) ? tokenImage[0] : errortok.image;
return new ParseException("Parse error at line " + line + ", column " + column + ". Encountered: " + mess);
}
final public void enable_tracing() {
}
final public void disable_tracing() {
}
}
| mit |
whizark/php-patterns | src/Whizark/DesignPatterns/GoF/Creational/FactoryMethod/CreatorInterface.php | 395 | <?php
namespace Whizark\DesignPatterns\GoF\Creational\FactoryMethod;
use Whizark\DesignPatterns\GoF\Creational\FactoryMethod\ProductInterface;
/**
* Interface CreatorInterface
* @package Whizark\DesignPatterns\GoF\Creational\FactoryMethod
*/
interface CreatorInterface
{
/**
* A Factory Method.
*
* @return ProductInterface
*/
public function factoryMethod();
}
| mit |
YaniLozanov/Software-University | Java Script/01. JS Fundamentals/Exam 11.05.2016/01. Medenka Wars.js | 1484 | function medenkaWars(input) {
let whiteDamage = 0, darkDamage = 0;
let whiteNormalAttacks = [];
let darkNormalAttacks = [];
for(let line of input){
let tokens = line.split(' ').filter(t => t != "");
let damage = Number(tokens[0]) * 60;
let attacker = tokens[1];
if(attacker == 'white'){
if(whiteNormalAttacks.length >= 1){
if(damage == whiteNormalAttacks[whiteNormalAttacks.length - 1]){
damage *= 2.75;
whiteNormalAttacks = [];
} else {
whiteNormalAttacks.push(damage);
}
} else {
whiteNormalAttacks.push(damage);
}
whiteDamage += damage;
} else {
if(darkNormalAttacks.length >= 4){
if(damage == darkNormalAttacks[darkNormalAttacks.length - 1] && damage == darkNormalAttacks[darkNormalAttacks.length - 2] && damage == darkNormalAttacks[darkNormalAttacks.length - 3] && damage == darkNormalAttacks[darkNormalAttacks.length - 4]) {
damage *= 4.5;
}
}
darkDamage += damage;
darkNormalAttacks.push(damage);
}
}
if(whiteDamage > darkDamage) {
console.log("Winner - Vitkor");
console.log(`Damage - ${whiteDamage}`);
} else {
console.log("Winner - Naskor");
console.log(`Damage - ${darkDamage}`);
}
}
| mit |
jakedetels/easy-bdd | lib/browser/utils/each-series.js | 469 | import RSVP from 'RSVP';
export default function eachSeries (arr, iterator) {
var completed = 0;
return new RSVP.Promise(function(resolve, reject) {
iterate();
function iterate() {
if (completed >= arr.length) {
resolve();
return;
}
iterator(arr[completed], function (err) {
if (err) {
reject(err);
} else {
completed += 1;
iterate();
}
});
}
});
}
| mit |
thestranger/propertycrowd | config/initializers/devise.rb | 9839 | # Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
config.warden do |manager|
manager.failure_app = CustomFailure
end
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
config.mailer_sender = "UrbanKIT <system@urbank.it>"
# Configure the class responsible to send e-mails.
config.mailer = "Devise::Mailer"
# ==> ORM configuration
# Load and configure the ORM. Supports :active_record (default) and
# :mongoid (bson_ext recommended) by default. Other ORMs may be
# available as additional gems.
require 'devise/orm/active_record'
# ==> Configuration for any authentication mechanism
# Configure which keys are used when authenticating a user. The default is
# just :email. You can configure it to use [:username, :subdomain], so for
# authenticating a user, both parameters are required. Remember that those
# parameters are used only when authenticating and not when retrieving from
# session. If you need permissions, you should implement that in a before filter.
# You can also supply a hash where the value is a boolean determining whether
# or not authentication should be aborted when the value is not present.
# config.authentication_keys = [ :email ]
# Configure parameters from the request object used for authentication. Each entry
# given should be a request method and it will automatically be passed to the
# find_for_authentication method and considered in your model lookup. For instance,
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
# The same considerations mentioned for authentication_keys also apply to request_keys.
# config.request_keys = []
# Configure which authentication keys should be case-insensitive.
# These keys will be downcased upon creating or modifying a user and when used
# to authenticate or find a user. Default is :email.
config.case_insensitive_keys = [ :email ]
# Configure which authentication keys should have whitespace stripped.
# These keys will have whitespace before and after removed upon creating or
# modifying a user and when used to authenticate or find a user. Default is :email.
config.strip_whitespace_keys = [ :email ]
# Tell if authentication through request.params is enabled. True by default.
# config.params_authenticatable = true
# Tell if authentication through HTTP Basic Auth is enabled. False by default.
# config.http_authenticatable = false
# If http headers should be returned for AJAX requests. True by default.
# config.http_authenticatable_on_xhr = true
# The realm used in Http Basic Authentication. "Application" by default.
# config.http_authentication_realm = "Application"
# It will change confirmation, password recovery and other workflows
# to behave the same regardless if the e-mail provided was right or wrong.
# Does not affect registerable.
# config.paranoid = true
# ==> Configuration for :database_authenticatable
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
# using other encryptors, it sets how many times you want the password re-encrypted.
#
# Limiting the stretches to just one in testing will increase the performance of
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
# a value less than 10 in other environments.
config.stretches = Rails.env.test? ? 1 : 10
# Setup a pepper to generate the encrypted password.
# config.pepper = "587b78f141ec4047290faac9df7c22f6c54a26b00c816304a89ce34e9495dc8831d1fbb8068a02963acdf72a6070035090f033deee79032cb10f8bc075ac6580"
# ==> Configuration for :confirmable
# A period that the user is allowed to access the website even without
# confirming his account. For instance, if set to 2.days, the user will be
# able to access the website for two days without confirming his account,
# access will be blocked just in the third day. Default is 0.days, meaning
# the user cannot access the website without confirming his account.
# config.confirm_within = 2.days
# Defines which key will be used when confirming an account
# config.confirmation_keys = [ :email ]
# ==> Configuration for :rememberable
# The time the user will be remembered without asking for credentials again.
# config.remember_for = 2.weeks
# If true, a valid remember token can be re-used between multiple browsers.
# config.remember_across_browsers = true
# If true, extends the user's remember period when remembered via cookie.
# config.extend_remember_period = false
# If true, uses the password salt as remember token. This should be turned
# to false if you are not using database authenticatable.
config.use_salt_as_remember_token = true
# Options to be passed to the created cookie. For instance, you can set
# :secure => true in order to force SSL only cookies.
# config.cookie_options = {}
# ==> Configuration for :validatable
# Range for password length. Default is 6..128.
# config.password_length = 6..128
# Email regex used to validate email formats. It simply asserts that
# an one (and only one) @ exists in the given string. This is mainly
# to give user feedback and not to assert the e-mail validity.
# config.email_regexp = /\A[^@]+@[^@]+\z/
# ==> Configuration for :timeoutable
# The time you want to timeout the user session without activity. After this
# time the user will be asked for credentials again. Default is 30 minutes.
# config.timeout_in = 30.minutes
# ==> Configuration for :lockable
# Defines which strategy will be used to lock an account.
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
# :none = No lock strategy. You should handle locking by yourself.
# config.lock_strategy = :failed_attempts
# Defines which key will be used when locking and unlocking an account
# config.unlock_keys = [ :email ]
# Defines which strategy will be used to unlock an account.
# :email = Sends an unlock link to the user email
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
# :both = Enables both strategies
# :none = No unlock strategy. You should handle unlocking by yourself.
# config.unlock_strategy = :both
# Number of authentication tries before locking an account if lock_strategy
# is failed attempts.
# config.maximum_attempts = 20
# Time interval to unlock the account if :time is enabled as unlock_strategy.
# config.unlock_in = 1.hour
# ==> Configuration for :recoverable
#
# Defines which key will be used when recovering the password for an account
# config.reset_password_keys = [ :email ]
# Time interval you can reset your password with a reset password key.
# Don't put a too small interval or your users won't have the time to
# change their passwords.
config.reset_password_within = 2.hours
# ==> Configuration for :encryptable
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
# REST_AUTH_SITE_KEY to pepper)
# config.encryptor = :sha512
# ==> Configuration for :token_authenticatable
# Defines name of the authentication token params key
# config.token_authentication_key = :auth_token
# If true, authentication through token does not store user in session and needs
# to be supplied on each request. Useful if you are using the token as API token.
# config.stateless_token = false
# ==> Scopes configuration
# Turn scoped views on. Before rendering "sessions/new", it will first check for
# "users/sessions/new". It's turned off by default because it's slower if you
# are using only default views.
# config.scoped_views = false
# Configure the default scope given to Warden. By default it's the first
# devise role declared in your routes (usually :user).
# config.default_scope = :user
# Configure sign_out behavior.
# Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
# The default is true, which means any logout action will sign out all active scopes.
# config.sign_out_all_scopes = true
# ==> Navigation configuration
# Lists the formats that should be treated as navigational. Formats like
# :html, should redirect to the sign in page when the user does not have
# access, but formats like :xml or :json, should return 401.
#
# If you have any extra navigational formats, like :iphone or :mobile, you
# should add them to the navigational formats lists.
#
# The :"*/*" and "*/*" formats below is required to match Internet
# Explorer requests.
# config.navigational_formats = [:"*/*", "*/*", :html]
# The default HTTP method used to sign out a resource. Default is :delete.
config.sign_out_via = :get
# ==> OmniAuth
# Add a new OmniAuth provider. Check the wiki for more information on setting
# up on your models and hooks.
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
# ==> Warden configuration
# If you want to use other strategies, that are not supported by Devise, or
# change the failure app, you can configure them inside the config.warden block.
#
# config.warden do |manager|
# manager.intercept_401 = false
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
# end
end
| mit |
RalfEggert/phpmagazin.console | module/Application/template_map.php | 377 | <?php
// Generated by ZF2's ./bin/templatemap_generator.php
return array(
'application/index/index' =>
__DIR__ . '/view/application/index/index.phtml',
'error/index' => __DIR__ . '/view/error/index.phtml',
'error/404' => __DIR__ . '/view/error/404.phtml',
'layout/layout' => __DIR__ . '/view/layout/layout.phtml',
);
| mit |
jaredthirsk/Core | src/LionFire.Utility.Legacy/BugReporter/IBugReporter.cs | 986 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Threading;
using System.Text;
using System.Threading.Tasks;
namespace LionFire.Applications
{
public interface IBugReporter
{
bool IsEnabled { get; set; }
#if !UNITY
/// <summary>
/// Return true if handled, false otherwise.
/// </summary>
/// <param name="ex"></param>
/// <returns></returns>
bool OnApplicationDispatcherException(object sender, DispatcherUnhandledExceptionEventArgs args);
#endif
}
public class NullBugReporter : IBugReporter
{
public bool IsEnabled { get; set; }
#if !UNITY
bool OnApplicationDispatcherException(object sender, DispatcherUnhandledExceptionEventArgs args) { return IsEnabled; }
bool IBugReporter.OnApplicationDispatcherException(object sender, DispatcherUnhandledExceptionEventArgs args)
{
return IsEnabled;
}
#endif
}
}
| mit |
exercism/xgo | exercises/yacht/.meta/gen.go | 1008 | package main
import (
"log"
"text/template"
"../../../gen"
)
func main() {
t, err := template.New("").Parse(tmpl)
if err != nil {
log.Fatal(err)
}
var j js
if err := gen.Gen("yacht", &j, t); err != nil {
log.Fatal(err)
}
}
// The JSON structure we expect to be able to unmarshal into
type js struct {
Exercise string
Version string
Comments []string
Cases []OneCase
}
// OneCase is a go structure for storing the json information
// of a single test case
type OneCase struct {
Description string
Input struct {
Dice []int
Category string
}
Expected int
}
// Template to generate list of test cases.
var tmpl = `package yacht
{{.Header}}
var testCases = []struct {
description string
dice []int
category string
expected int
}{ {{range .J.Cases}}
{
description: {{printf "%q" .Description}},
dice: {{.Input.Dice | printf "%#v"}} ,
category: {{printf "%q" .Input.Category}},
expected: {{printf "%d" .Expected}},
},{{end}}
}
`
| mit |
tmcgee/cmv-wab-widgets | wab/2.13/widgets/DistanceAndDirection/setting/nls/fi/strings.js | 612 | define({
"feedbackStyleLabel": "Etäisyyden ja suunnan palautteen tyyli",
"showTabLabel": "Näytä välilehti",
"feedbackShapeLabel": "Palautteen muoto",
"lineColorLabel": "Viivan väri",
"lineWidthLabel": "Viivan leveys",
"feedbackLabel": "Palautteen tunnusteksti",
"textColorLabel": "Tekstin väri",
"textSizeLabel": "Tekstin koko",
"tabErrorMessage": "Pienoisohjelma on määritettävä siten, että siinä näkyy vähintään yksi välilehti",
"lineLabel": "Viiva",
"circleLabel": "Ympyrä",
"ellipseLabel": "Ellipsi",
"ringsLabel": "Renkaat",
"transparency": "Läpinäkyvyys"
}); | mit |
chhe/livestreamer-twitch-gui | src/test/tests/services/notification/badge.js | 1939 | import { module, test } from "qunit";
import { buildOwner, runDestroy } from "test-utils";
import { set } from "@ember/object";
import { run } from "@ember/runloop";
import Service from "@ember/service";
import notificationServiceBadgeMixinInjector
from "inject-loader?nwjs/Window!services/notification/badge";
module( "services/notification/badge" );
test( "Badge", assert => {
assert.expect( 5 );
let expected = "";
const { default: NotificationServiceBadgeMixin } = notificationServiceBadgeMixinInjector({
"nwjs/Window": {
setBadgeLabel( label ) {
assert.strictEqual( label, expected, "Sets the badge label" );
}
}
});
const owner = buildOwner();
owner.register( "service:settings", Service.extend({
notification: {
badgelabel: false
}
}) );
owner.register( "service:notification", Service.extend( NotificationServiceBadgeMixin ) );
const settings = owner.lookup( "service:settings" );
const service = owner.lookup( "service:notification" );
// doesn't update the label when not running or disabled in settings
service.trigger( "streams-all", [ {}, {} ] );
run( () => set( settings, "notification.badgelabel", true ) );
// doesn't update the label when enabled, but not running
service.trigger( "streams-all", [ {}, {} ] );
run( () => set( service, "running", true ) );
// updates the label when running and enabled
expected = "2";
service.trigger( "streams-all", [ {}, {} ] );
expected = "3";
service.trigger( "streams-all", [ {}, {}, {} ] );
// clears label when it gets disabled
expected = "";
run( () => set( settings, "notification.badgelabel", false ) );
// doesn't reset label, requires a new streams-all event
run( () => set( settings, "notification.badgelabel", true ) );
expected = "1";
service.trigger( "streams-all", [ {} ] );
// clears label when service stops
expected = "";
run( () => set( service, "running", false ) );
runDestroy( owner );
});
| mit |
ungdev/integration-UTT | database/migrations/2019_07_04_150341_AddPushTokenTable.php | 771 | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddPushTokenTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('devices', function (Blueprint $table) {
$table->increments('id')->unsigned()->unique();
$table->text('push_token');
$table->text('name');
$table->text('uid');
$table->unsignedInteger('user_id')->nullable(false);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('devices');
}
}
| mit |
metno/satistjenesten | docs/conf.py | 10619 | # -*- coding: utf-8 -*-
#
# satistjenesten documentation build configuration file, created by
# sphinx-quickstart on Thu Nov 13 10:58:40 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
from mock import Mock as MagicMock
class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
return Mock()
MOCK_MODULES = ['netCDF4', 'argparse', 'argparse']
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinxcontrib.napoleon'
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'satistjenesten'
copyright = u'2014, Mikhail Itkin'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = ''
# The full version, including alpha/beta/rc tags.
release = '0.1.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'satistjenestendoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'satistjenesten.tex', u'satistjenesten Documentation',
u'Mikhail Itkin', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'satistjenesten', u'satistjenesten Documentation',
[u'Mikhail Itkin'], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'satistjenesten', u'satistjenesten Documentation',
u'Mikhail Itkin', 'satistjenesten', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
# -- Options for Epub output ----------------------------------------------
# Bibliographic Dublin Core info.
epub_title = u'satistjenesten'
epub_author = u'Mikhail Itkin'
epub_publisher = u'Mikhail Itkin'
epub_copyright = u'2014, Mikhail Itkin'
# The basename for the epub file. It defaults to the project name.
#epub_basename = u'satistjenesten'
# The HTML theme for the epub output. Since the default themes are not optimized
# for small screen space, using the same theme for HTML and epub output is
# usually not wise. This defaults to 'epub', a theme designed to save visual
# space.
#epub_theme = 'epub'
# The language of the text. It defaults to the language option
# or en if the language is not set.
#epub_language = ''
# The scheme of the identifier. Typical schemes are ISBN or URL.
#epub_scheme = ''
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#epub_identifier = ''
# A unique identification for the text.
#epub_uid = ''
# A tuple containing the cover image and cover page html template filenames.
#epub_cover = ()
# A sequence of (type, uri, title) tuples for the guide element of content.opf.
#epub_guide = ()
# HTML files that should be inserted before the pages created by sphinx.
# The format is a list of tuples containing the path and title.
#epub_pre_files = []
# HTML files shat should be inserted after the pages created by sphinx.
# The format is a list of tuples containing the path and title.
#epub_post_files = []
# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']
# The depth of the table of contents in toc.ncx.
#epub_tocdepth = 3
# Allow duplicate toc entries.
#epub_tocdup = True
# Choose between 'default' and 'includehidden'.
#epub_tocscope = 'default'
# Fix unsupported image types using the PIL.
#epub_fix_images = False
# Scale large images.
#epub_max_image_width = 0
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#epub_show_urls = 'inline'
# If false, no index is generated.
#epub_use_index = True
| mit |
rick/larry | app/controllers/hosts_controller.rb | 761 | class HostsController < ApplicationController
resources_controller_for :host
before_filter :extract_format_from_hostname, :only => [ :configuration ]
def configuration
@host = Host.find_by_name!(params[:name])
respond_to do |format|
format.html { redirect_to host_url(@host) }
format.pp { render :text => @host.puppet_manifest }
format.json { render :json => @host.configuration.to_json }
format.yaml { render :text => @host.configuration.to_yaml }
end
end
protected
def extract_format_from_hostname
return unless params[:name].first =~ /\./
return unless params[:format].blank?
params[:name], params[:format] = (Regexp.new(/^(.*)\.([^.]*)$/).match(params[:name].first)[1..2])
end
end
| mit |
stephaneAG/PengPod700 | QtEsrc/qt-everywhere-opensource-src-4.8.5/examples/graphicsview/anchorlayout/main.cpp | 5510 | /****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "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 Digia Plc and its Subsidiary(-ies) 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 THE COPYRIGHT
** OWNER 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."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QGraphicsWidget>
#include <QGraphicsProxyWidget>
#include <QGraphicsAnchorLayout>
#include <QtGui>
static QGraphicsProxyWidget *createItem(const QSizeF &minimum = QSizeF(100.0, 100.0),
const QSizeF &preferred = QSize(150.0, 100.0),
const QSizeF &maximum = QSizeF(200.0, 100.0),
const QString &name = "0")
{
QGraphicsProxyWidget *w = new QGraphicsProxyWidget;
w->setWidget(new QPushButton(name));
w->setData(0, name);
w->setMinimumSize(minimum);
w->setPreferredSize(preferred);
w->setMaximumSize(maximum);
w->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
return w;
}
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QGraphicsScene scene;
scene.setSceneRect(0, 0, 800, 480);
QSizeF minSize(30, 100);
QSizeF prefSize(210, 100);
QSizeF maxSize(300, 100);
QGraphicsProxyWidget *a = createItem(minSize, prefSize, maxSize, "A");
QGraphicsProxyWidget *b = createItem(minSize, prefSize, maxSize, "B");
QGraphicsProxyWidget *c = createItem(minSize, prefSize, maxSize, "C");
QGraphicsProxyWidget *d = createItem(minSize, prefSize, maxSize, "D");
QGraphicsProxyWidget *e = createItem(minSize, prefSize, maxSize, "E");
QGraphicsProxyWidget *f = createItem(QSizeF(30, 50), QSizeF(150, 50), maxSize, "F (overflow)");
QGraphicsProxyWidget *g = createItem(QSizeF(30, 50), QSizeF(30, 100), maxSize, "G (overflow)");
QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout;
l->setSpacing(0);
QGraphicsWidget *w = new QGraphicsWidget(0, Qt::Window);
w->setPos(20, 20);
w->setLayout(l);
// vertical
QGraphicsAnchor *anchor = l->addAnchor(a, Qt::AnchorTop, l, Qt::AnchorTop);
anchor = l->addAnchor(b, Qt::AnchorTop, l, Qt::AnchorTop);
anchor = l->addAnchor(c, Qt::AnchorTop, a, Qt::AnchorBottom);
anchor = l->addAnchor(c, Qt::AnchorTop, b, Qt::AnchorBottom);
anchor = l->addAnchor(c, Qt::AnchorBottom, d, Qt::AnchorTop);
anchor = l->addAnchor(c, Qt::AnchorBottom, e, Qt::AnchorTop);
anchor = l->addAnchor(d, Qt::AnchorBottom, l, Qt::AnchorBottom);
anchor = l->addAnchor(e, Qt::AnchorBottom, l, Qt::AnchorBottom);
anchor = l->addAnchor(c, Qt::AnchorTop, f, Qt::AnchorTop);
anchor = l->addAnchor(c, Qt::AnchorVerticalCenter, f, Qt::AnchorBottom);
anchor = l->addAnchor(f, Qt::AnchorBottom, g, Qt::AnchorTop);
anchor = l->addAnchor(c, Qt::AnchorBottom, g, Qt::AnchorBottom);
// horizontal
anchor = l->addAnchor(l, Qt::AnchorLeft, a, Qt::AnchorLeft);
anchor = l->addAnchor(l, Qt::AnchorLeft, d, Qt::AnchorLeft);
anchor = l->addAnchor(a, Qt::AnchorRight, b, Qt::AnchorLeft);
anchor = l->addAnchor(a, Qt::AnchorRight, c, Qt::AnchorLeft);
anchor = l->addAnchor(c, Qt::AnchorRight, e, Qt::AnchorLeft);
anchor = l->addAnchor(b, Qt::AnchorRight, l, Qt::AnchorRight);
anchor = l->addAnchor(e, Qt::AnchorRight, l, Qt::AnchorRight);
anchor = l->addAnchor(d, Qt::AnchorRight, e, Qt::AnchorLeft);
anchor = l->addAnchor(l, Qt::AnchorLeft, f, Qt::AnchorLeft);
anchor = l->addAnchor(l, Qt::AnchorLeft, g, Qt::AnchorLeft);
anchor = l->addAnchor(f, Qt::AnchorRight, g, Qt::AnchorRight);
scene.addItem(w);
scene.setBackgroundBrush(Qt::darkGreen);
QGraphicsView view(&scene);
#if defined(Q_WS_S60)
view.showMaximized();
#else
view.show();
#endif
return app.exec();
}
| mit |
carlosrubio/TimeWatcher | tasks/test.js | 475 | 'use strict';
module.exports = function (grunt) {
grunt.registerTask('testserver', [
'clean:server',
'concurrent:server',
'autoprefixer',
'connect:test'
]);
grunt.registerTask('test', [
'karma:unit',
'testserver',
'karma:e2e'
]);
grunt.registerTask('test:unit', [
'karma:unit_auto'
]);
grunt.registerTask('test:e2e', [
'testserver',
'karma:e2e_auto'
]);
};
| mit |
Moccine/global-service-plus.com | web/libariries/bootstrap/node_modules/grunt-legacy-log-utils/node_modules/lodash/isPlainObject.js | 1860 | var isHostObject = require('./_isHostObject'),
isObjectLike = require('./isObjectLike');
/** `Object#toString` result references. */
var objectTag = '[object Object]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString;
/** Used to infer the `Object` constructor. */
var objectCtorString = funcToString.call(Object);
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/** Built-in value references. */
var getPrototypeOf = Object.getPrototypeOf;
/**
* Checks if `value` is a plain object, that is, an object created by the
* `Object` constructor or one with a `[[Prototype]]` of `null`.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
* @example
*
* function Foo() {
* this.a = 1;
* }
*
* _.isPlainObject(new Foo);
* // => false
*
* _.isPlainObject([1, 2, 3]);
* // => false
*
* _.isPlainObject({ 'x': 0, 'y': 0 });
* // => true
*
* _.isPlainObject(Object.create(null));
* // => true
*/
function isPlainObject(value) {
if (!isObjectLike(value) || objectToString.call(value) != objectTag || isHostObject(value)) {
return false;
}
var proto = objectProto;
if (typeof value.constructor == 'function') {
proto = getPrototypeOf(value);
}
if (proto === null) {
return true;
}
var Ctor = proto.constructor;
return (typeof Ctor == 'function' &&
Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
}
module.exports = isPlainObject;
| mit |
icaynia/SoundKi | pracler/src/main/java/com/icaynia/pracler/Fragment/HomeFragment.java | 4457 | package com.icaynia.pracler.Fragment;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.Fragment;
import android.support.v4.widget.SwipeRefreshLayout;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.icaynia.pracler.Global;
import com.icaynia.pracler.CardLayout.MyStateView;
import com.icaynia.pracler.CardLayout.RecommandSongView;
import com.icaynia.pracler.models.MusicDto;
import com.icaynia.pracler.R;
import com.icaynia.pracler.View.Card;
import java.util.Random;
/**
* Created by icaynia on 2017. 2. 8..
*/
public class HomeFragment extends Fragment
{
private Global global;
private View v;
private SwipeRefreshLayout swipeRefreshLayout;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
global = (Global) getContext().getApplicationContext();
v = inflater.inflate(R.layout.fragment_home, container, false);
setHasOptionsMenu(true);
viewInitialize();
prepare();
return v;
}
private void viewInitialize()
{
swipeRefreshLayout = (SwipeRefreshLayout) v.findViewById(R.id.swiperefresh);
swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener()
{
@Override
public void onRefresh()
{
prepare();
}
});
}
private void prepare()
{
swipeRefreshLayout.setRefreshing(true);
UpdateTask updateTask = new UpdateTask();
updateTask.execute();
}
public class UpdateTask extends AsyncTask<String, Void, MusicDto>
{
private static final String TAG = "AlbumImageTask";
private int randint;
@Override
protected void onPreExecute()
{
super.onPreExecute();
Log.i(TAG, "PreExecute");
}
@Override
protected MusicDto doInBackground(String... id)
{
if (global.mMusicManager.getMusicList().size() != 0)
{
Random rand = new Random();
int size = global.mMusicManager.getMusicList().size();
if (size != 0)
randint = rand.nextInt(size);
else
randint = 0;
MusicDto musicDto = global.mMusicManager.getMusicList().getItem(randint);
for (String i : id)
{
}
return musicDto;
}
else
{
return null;
}
}
@Override
protected void onPostExecute(MusicDto result)
{
super.onPostExecute(result);
Card cv = (Card) v.findViewById(R.id.card_yourstate);
cv.setTitleText(getString(R.string.my_history));
cv.deleteContent();
MyStateView msv = new MyStateView(getContext());
msv.setPlayCount(global.localHistoryManager.getHistoryCount());
msv.setMylikecount(global.localLikeManager.getSongLikeCount());
cv.addContent(msv);
if (result == null)
{
swipeRefreshLayout.setRefreshing(false);
return;
}
RecommandSongView rsv = new RecommandSongView(getContext());
rsv.setRecommandSong(result);
rsv.setImage(global.mMusicManager.getAlbumImage(getContext(), Integer.parseInt(result.getAlbumId()), 100));
Card card = (Card) v.findViewById(R.id.card_recommand);
card.setTitleText(getString(R.string.recommand_for_you));
card.deleteContent();
card.addContent(rsv);
card.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view)
{
global.playMusic(Integer.parseInt(global.mMusicManager.getMusicList().getItem(randint).getUid_local()));
}
});
Handler handler = new Handler();
handler.postDelayed(new Runnable()
{
@Override
public void run()
{
swipeRefreshLayout.setRefreshing(false);
}
}, 1000);
}
}
}
| mit |
xtina-starr/reaction | src/Components/Publishing/RelatedArticles/Canvas/__tests__/RelatedArticlesCanvas.test.tsx | 2421 | import { mockTracking } from "Artsy/Analytics"
import { RelatedCanvas } from "Components/Publishing/Fixtures/Components"
import { mount } from "enzyme"
import "jest-styled-components"
import React from "react"
import renderer from "react-test-renderer"
import Waypoint from "react-waypoint"
import { RelatedArticleCanvasLink } from "../RelatedArticleCanvasLink"
import { RelatedArticlesCanvas } from "../RelatedArticlesCanvas"
jest.unmock("react-tracking")
describe("RelatedArticlesCanvas", () => {
const getWrapper = props => {
return mount(<RelatedArticlesCanvas {...props} />)
}
let testProps
beforeEach(() => {
testProps = { articles: RelatedCanvas, vertical: { name: "Art Market" } }
})
it("renders the related articles canvas", () => {
const related = renderer
.create(<RelatedArticlesCanvas {...testProps} />)
.toJSON()
expect(related).toMatchSnapshot()
})
it("renders the vertical name if there is one", () => {
const component = getWrapper(testProps)
expect(component.text()).toMatch("Further reading in Art Market")
})
it("renders a default message if there is no vertical", () => {
delete testProps.vertical
const component = getWrapper(testProps)
expect(component.html()).toMatch("More from Artsy Editorial")
})
it("renders article links", () => {
const component = getWrapper(testProps)
expect(component.find(RelatedArticleCanvasLink)).toHaveLength(4)
})
it("Calls a tracking impression", () => {
const { Component, dispatch } = mockTracking(RelatedArticlesCanvas)
const component = mount(<Component articles={RelatedCanvas} />)
component
.find(Waypoint)
.getElement()
.props.onEnter()
expect(dispatch).toBeCalledWith({
action_type: "Impression",
context_module: "Further reading",
subject: "Further reading",
})
})
it("Tracks link clicks", () => {
const { Component, dispatch } = mockTracking(RelatedArticlesCanvas)
const component = mount(<Component articles={RelatedCanvas} />)
component
.find(RelatedArticleCanvasLink)
.at(0)
.simulate("click")
expect(dispatch).toBeCalledWith({
action_type: "Click",
context_module: "Further reading",
subject: "Further reading",
destination_path:
"/article/artsy-editorial-15-top-art-schools-united-states",
type: "thumbnail",
})
})
})
| mit |
acornea/meta-intel-iot-security | meta-security-smack/lib/oeqa/runtime/files/notroot.py | 898 | #!/usr/bin/env python
#
# Script used for running executables with custom labels, as well as custom uid/gid
# Process label is changed by writing to /proc/self/attr/curent
#
# Script expects user id and group id to exist, and be the same.
#
# From adduser manual:
# """By default, each user in Debian GNU/Linux is given a corresponding group
# with the same name. """
#
# Usage: root@desk:~# python notroot.py <uid> <label> <full_path_to_executable> [arguments ..]
# eg: python notroot.py 1000 User::Label /bin/ping -c 3 192.168.1.1
#
# Author: Alexandru Cornea <alexandru.cornea@intel.com>
import os
import sys
try:
uid = int(sys.argv[1])
sys.argv.pop(1)
label = sys.argv[1]
sys.argv.pop(1)
open("/proc/self/attr/current", "w").write(label)
path=sys.argv[1]
sys.argv.pop(0)
os.setgid(uid)
os.setuid(uid)
os.execv(path,sys.argv)
except Exception,e:
print e.message
sys.exit(1)
| mit |
ScottKolo/UFSMC-Web | db/collection_data/matrices/Sandia/oscil_dcop_55.rb | 1219 | {
matrix_id: '1166',
name: 'oscil_dcop_55',
group: 'Sandia',
description: 'Sandia/oscil_dcop_55 circuit simulation matrix. Sandia National Lab.',
author: 'R. Hoekstra',
editor: 'T. Davis',
date: '2003',
kind: 'subsequent circuit simulation problem',
problem_2D_or_3D: '0',
num_rows: '430',
num_cols: '430',
nonzeros: '1544',
num_explicit_zeros: '0',
num_strongly_connected_components: '9',
num_dmperm_blocks: '31',
structural_full_rank: 'true',
structural_rank: '430',
pattern_symmetry: '0.976',
numeric_symmetry: '0.698',
rb_type: 'real',
structure: 'unsymmetric',
cholesky_candidate: 'no',
positive_definite: 'no',
notes: 'next: Sandia/oscil_dcop_56 first: Sandia/oscil_dcop_01
',
b_field: 'full 430-by-1
',
norm: '2.001004e+06',
min_singular_value: '2.433814e-14',
condition_number: '8.221681e+19',
svd_rank: '410',
sprank_minus_rank: '20',
null_space_dimension: '20',
full_numerical_rank: 'no',
svd_gap: '14.128113',
image_files: 'oscil_dcop_55.png,oscil_dcop_55_dmperm.png,oscil_dcop_55_scc.png,oscil_dcop_55_svd.png,oscil_dcop_55_APlusAT_graph.gif,oscil_dcop_55_graph.gif,',
}
| mit |
KonH/UDBase | Extensions/OneLine/OneLine/Example/Details/Scripts/ExpandableExample.cs | 561 | using System;
using UnityEngine;
using OneLine;
namespace OneLine.Examples {
[CreateAssetMenu(menuName = "OneLine/ExpandableExample")]
public class ExpandableExample : ScriptableObject {
[SerializeField, Expandable]
private UnityEngine.Object withoutOneLine;
[SerializeField, OneLine]
private TwoFields withOneLine;
[Serializable]
public class TwoFields {
[SerializeField, ReadOnlyExpandable]
private ScriptableObject first;
[SerializeField, Expandable]
private UnityEngine.Object second;
}
}
} | mit |
nrc/rustc-perf | collector/benchmarks/cranelift-codegen/cranelift-codegen/src/legalizer/mod.rs | 14098 | //! Legalize instructions.
//!
//! A legal instruction is one that can be mapped directly to a machine code instruction for the
//! target ISA. The `legalize_function()` function takes as input any function and transforms it
//! into an equivalent function using only legal instructions.
//!
//! The characteristics of legal instructions depend on the target ISA, so any given instruction
//! can be legal for one ISA and illegal for another.
//!
//! Besides transforming instructions, the legalizer also fills out the `function.encodings` map
//! which provides a legal encoding recipe for every instruction.
//!
//! The legalizer does not deal with register allocation constraints. These constraints are derived
//! from the encoding recipes, and solved later by the register allocator.
use crate::bitset::BitSet;
use crate::cursor::{Cursor, FuncCursor};
use crate::flowgraph::ControlFlowGraph;
use crate::ir::types::I32;
use crate::ir::{self, InstBuilder, MemFlags};
use crate::isa::TargetIsa;
use crate::timing;
mod boundary;
mod call;
mod globalvalue;
mod heap;
mod libcall;
mod split;
mod table;
use self::call::expand_call;
use self::globalvalue::expand_global_value;
use self::heap::expand_heap_addr;
use self::libcall::expand_as_libcall;
use self::table::expand_table_addr;
/// Legalize `inst` for `isa`. Return true if any changes to the code were
/// made; return false if the instruction was successfully encoded as is.
fn legalize_inst(
inst: ir::Inst,
pos: &mut FuncCursor,
cfg: &mut ControlFlowGraph,
isa: &TargetIsa,
) -> bool {
let opcode = pos.func.dfg[inst].opcode();
// Check for ABI boundaries that need to be converted to the legalized signature.
if opcode.is_call() {
if boundary::handle_call_abi(inst, pos.func, cfg) {
return true;
}
} else if opcode.is_return() {
if boundary::handle_return_abi(inst, pos.func, cfg) {
return true;
}
} else if opcode.is_branch() {
split::simplify_branch_arguments(&mut pos.func.dfg, inst);
}
match pos.func.update_encoding(inst, isa) {
Ok(()) => false,
Err(action) => {
// We should transform the instruction into legal equivalents.
// If the current instruction was replaced, we need to double back and revisit
// the expanded sequence. This is both to assign encodings and possible to
// expand further.
// There's a risk of infinite looping here if the legalization patterns are
// unsound. Should we attempt to detect that?
if action(inst, pos.func, cfg, isa) {
return true;
}
// We don't have any pattern expansion for this instruction either.
// Try converting it to a library call as a last resort.
expand_as_libcall(inst, pos.func, isa)
}
}
}
/// Legalize `func` for `isa`.
///
/// - Transform any instructions that don't have a legal representation in `isa`.
/// - Fill out `func.encodings`.
///
pub fn legalize_function(func: &mut ir::Function, cfg: &mut ControlFlowGraph, isa: &TargetIsa) {
let _tt = timing::legalize();
debug_assert!(cfg.is_valid());
boundary::legalize_signatures(func, isa);
func.encodings.resize(func.dfg.num_insts());
let mut pos = FuncCursor::new(func);
// Process EBBs in layout order. Some legalization actions may split the current EBB or append
// new ones to the end. We need to make sure we visit those new EBBs too.
while let Some(_ebb) = pos.next_ebb() {
// Keep track of the cursor position before the instruction being processed, so we can
// double back when replacing instructions.
let mut prev_pos = pos.position();
while let Some(inst) = pos.next_inst() {
if legalize_inst(inst, &mut pos, cfg, isa) {
// Go back and legalize the inserted return value conversion instructions.
pos.set_position(prev_pos);
} else {
// Remember this position in case we need to double back.
prev_pos = pos.position();
}
}
}
// Now that we've lowered all br_tables, we don't need the jump tables anymore.
if !isa.flags().jump_tables_enabled() {
pos.func.jump_tables.clear();
}
}
// Include legalization patterns that were generated by `gen_legalizer.py` from the `XForms` in
// `cranelift-codegen/meta-python/base/legalize.py`.
//
// Concretely, this defines private functions `narrow()`, and `expand()`.
include!(concat!(env!("OUT_DIR"), "/legalizer.rs"));
/// Custom expansion for conditional trap instructions.
/// TODO: Add CFG support to the Python patterns so we won't have to do this.
fn expand_cond_trap(
inst: ir::Inst,
func: &mut ir::Function,
cfg: &mut ControlFlowGraph,
_isa: &TargetIsa,
) {
// Parse the instruction.
let trapz;
let (arg, code) = match func.dfg[inst] {
ir::InstructionData::CondTrap { opcode, arg, code } => {
// We want to branch *over* an unconditional trap.
trapz = match opcode {
ir::Opcode::Trapz => true,
ir::Opcode::Trapnz => false,
_ => panic!("Expected cond trap: {}", func.dfg.display_inst(inst, None)),
};
(arg, code)
}
_ => panic!("Expected cond trap: {}", func.dfg.display_inst(inst, None)),
};
// Split the EBB after `inst`:
//
// trapnz arg
//
// Becomes:
//
// brz arg, new_ebb
// trap
// new_ebb:
//
let old_ebb = func.layout.pp_ebb(inst);
let new_ebb = func.dfg.make_ebb();
if trapz {
func.dfg.replace(inst).brnz(arg, new_ebb, &[]);
} else {
func.dfg.replace(inst).brz(arg, new_ebb, &[]);
}
let mut pos = FuncCursor::new(func).after_inst(inst);
pos.use_srcloc(inst);
pos.ins().trap(code);
pos.insert_ebb(new_ebb);
// Finally update the CFG.
cfg.recompute_ebb(pos.func, old_ebb);
cfg.recompute_ebb(pos.func, new_ebb);
}
/// Jump tables.
fn expand_br_table(
inst: ir::Inst,
func: &mut ir::Function,
cfg: &mut ControlFlowGraph,
isa: &TargetIsa,
) {
if isa.flags().jump_tables_enabled() {
expand_br_table_jt(inst, func, cfg, isa);
} else {
expand_br_table_conds(inst, func, cfg, isa);
}
}
/// Expand br_table to jump table.
fn expand_br_table_jt(
inst: ir::Inst,
func: &mut ir::Function,
cfg: &mut ControlFlowGraph,
isa: &TargetIsa,
) {
use crate::ir::condcodes::IntCC;
let (arg, default_ebb, table) = match func.dfg[inst] {
ir::InstructionData::BranchTable {
opcode: ir::Opcode::BrTable,
arg,
destination,
table,
} => (arg, destination, table),
_ => panic!("Expected br_table: {}", func.dfg.display_inst(inst, None)),
};
let table_size = func.jump_tables[table].len();
let addr_ty = isa.pointer_type();
let entry_ty = I32;
let mut pos = FuncCursor::new(func).at_inst(inst);
pos.use_srcloc(inst);
// Bounds check
let oob = pos
.ins()
.icmp_imm(IntCC::UnsignedGreaterThanOrEqual, arg, table_size as i64);
pos.ins().brnz(oob, default_ebb, &[]);
let base_addr = pos.ins().jump_table_base(addr_ty, table);
let entry = pos
.ins()
.jump_table_entry(addr_ty, arg, base_addr, entry_ty.bytes() as u8, table);
let addr = pos.ins().iadd(base_addr, entry);
pos.ins().indirect_jump_table_br(addr, table);
let ebb = pos.current_ebb().unwrap();
pos.remove_inst();
cfg.recompute_ebb(pos.func, ebb);
}
/// Expand br_table to series of conditionals.
fn expand_br_table_conds(
inst: ir::Inst,
func: &mut ir::Function,
cfg: &mut ControlFlowGraph,
_isa: &TargetIsa,
) {
use crate::ir::condcodes::IntCC;
let (arg, default_ebb, table) = match func.dfg[inst] {
ir::InstructionData::BranchTable {
opcode: ir::Opcode::BrTable,
arg,
destination,
table,
} => (arg, destination, table),
_ => panic!("Expected br_table: {}", func.dfg.display_inst(inst, None)),
};
// This is a poor man's jump table using just a sequence of conditional branches.
let table_size = func.jump_tables[table].len();
let mut pos = FuncCursor::new(func).at_inst(inst);
pos.use_srcloc(inst);
for i in 0..table_size {
let dest = pos.func.jump_tables[table].as_slice()[i];
let t = pos.ins().icmp_imm(IntCC::Equal, arg, i as i64);
pos.ins().brnz(t, dest, &[]);
}
// `br_table` jumps to the default destination if nothing matches
pos.ins().jump(default_ebb, &[]);
let ebb = pos.current_ebb().unwrap();
pos.remove_inst();
cfg.recompute_ebb(pos.func, ebb);
}
/// Expand the select instruction.
///
/// Conditional moves are available in some ISAs for some register classes. The remaining selects
/// are handled by a branch.
fn expand_select(
inst: ir::Inst,
func: &mut ir::Function,
cfg: &mut ControlFlowGraph,
_isa: &TargetIsa,
) {
let (ctrl, tval, fval) = match func.dfg[inst] {
ir::InstructionData::Ternary {
opcode: ir::Opcode::Select,
args,
} => (args[0], args[1], args[2]),
_ => panic!("Expected select: {}", func.dfg.display_inst(inst, None)),
};
// Replace `result = select ctrl, tval, fval` with:
//
// brnz ctrl, new_ebb(tval)
// jump new_ebb(fval)
// new_ebb(result):
let old_ebb = func.layout.pp_ebb(inst);
let result = func.dfg.first_result(inst);
func.dfg.clear_results(inst);
let new_ebb = func.dfg.make_ebb();
func.dfg.attach_ebb_param(new_ebb, result);
func.dfg.replace(inst).brnz(ctrl, new_ebb, &[tval]);
let mut pos = FuncCursor::new(func).after_inst(inst);
pos.use_srcloc(inst);
pos.ins().jump(new_ebb, &[fval]);
pos.insert_ebb(new_ebb);
cfg.recompute_ebb(pos.func, new_ebb);
cfg.recompute_ebb(pos.func, old_ebb);
}
fn expand_br_icmp(
inst: ir::Inst,
func: &mut ir::Function,
cfg: &mut ControlFlowGraph,
_isa: &TargetIsa,
) {
let (cond, a, b, destination, ebb_args) = match func.dfg[inst] {
ir::InstructionData::BranchIcmp {
cond,
destination,
ref args,
..
} => (
cond,
args.get(0, &func.dfg.value_lists).unwrap(),
args.get(1, &func.dfg.value_lists).unwrap(),
destination,
args.as_slice(&func.dfg.value_lists)[2..].to_vec(),
),
_ => panic!("Expected br_icmp {}", func.dfg.display_inst(inst, None)),
};
let old_ebb = func.layout.pp_ebb(inst);
func.dfg.clear_results(inst);
let icmp_res = func.dfg.replace(inst).icmp(cond, a, b);
let mut pos = FuncCursor::new(func).after_inst(inst);
pos.use_srcloc(inst);
pos.ins().brnz(icmp_res, destination, &ebb_args);
cfg.recompute_ebb(pos.func, destination);
cfg.recompute_ebb(pos.func, old_ebb);
}
/// Expand illegal `f32const` and `f64const` instructions.
fn expand_fconst(
inst: ir::Inst,
func: &mut ir::Function,
_cfg: &mut ControlFlowGraph,
_isa: &TargetIsa,
) {
let ty = func.dfg.value_type(func.dfg.first_result(inst));
debug_assert!(!ty.is_vector(), "Only scalar fconst supported: {}", ty);
// In the future, we may want to generate constant pool entries for these constants, but for
// now use an `iconst` and a bit cast.
let mut pos = FuncCursor::new(func).at_inst(inst);
pos.use_srcloc(inst);
let ival = match pos.func.dfg[inst] {
ir::InstructionData::UnaryIeee32 {
opcode: ir::Opcode::F32const,
imm,
} => pos.ins().iconst(ir::types::I32, i64::from(imm.bits())),
ir::InstructionData::UnaryIeee64 {
opcode: ir::Opcode::F64const,
imm,
} => pos.ins().iconst(ir::types::I64, imm.bits() as i64),
_ => panic!("Expected fconst: {}", pos.func.dfg.display_inst(inst, None)),
};
pos.func.dfg.replace(inst).bitcast(ty, ival);
}
/// Expand illegal `stack_load` instructions.
fn expand_stack_load(
inst: ir::Inst,
func: &mut ir::Function,
_cfg: &mut ControlFlowGraph,
isa: &TargetIsa,
) {
let ty = func.dfg.value_type(func.dfg.first_result(inst));
let addr_ty = isa.pointer_type();
let mut pos = FuncCursor::new(func).at_inst(inst);
pos.use_srcloc(inst);
let (stack_slot, offset) = match pos.func.dfg[inst] {
ir::InstructionData::StackLoad {
opcode: _opcode,
stack_slot,
offset,
} => (stack_slot, offset),
_ => panic!(
"Expected stack_load: {}",
pos.func.dfg.display_inst(inst, None)
),
};
let addr = pos.ins().stack_addr(addr_ty, stack_slot, offset);
// Stack slots are required to be accessible and aligned.
let mflags = MemFlags::trusted();
pos.func.dfg.replace(inst).load(ty, mflags, addr, 0);
}
/// Expand illegal `stack_store` instructions.
fn expand_stack_store(
inst: ir::Inst,
func: &mut ir::Function,
_cfg: &mut ControlFlowGraph,
isa: &TargetIsa,
) {
let addr_ty = isa.pointer_type();
let mut pos = FuncCursor::new(func).at_inst(inst);
pos.use_srcloc(inst);
let (val, stack_slot, offset) = match pos.func.dfg[inst] {
ir::InstructionData::StackStore {
opcode: _opcode,
arg,
stack_slot,
offset,
} => (arg, stack_slot, offset),
_ => panic!(
"Expected stack_store: {}",
pos.func.dfg.display_inst(inst, None)
),
};
let addr = pos.ins().stack_addr(addr_ty, stack_slot, offset);
let mut mflags = MemFlags::new();
// Stack slots are required to be accessible and aligned.
mflags.set_notrap();
mflags.set_aligned();
pos.func.dfg.replace(inst).store(mflags, val, addr, 0);
}
| mit |
types/npm-ramda | tests/endsWith.ts | 323 | import * as R from '../ramda/dist/index';
declare const string: string;
declare const boolean_array: boolean[];
// @dts-jest:pass:snap
R.endsWith(string);
// @dts-jest:pass:snap
R.endsWith(string, string);
// @dts-jest:pass:snap
R.endsWith(boolean_array);
// @dts-jest:pass:snap
R.endsWith(boolean_array, boolean_array);
| mit |
oliviertassinari/material-ui | packages/mui-icons-material/lib/esm/DonutSmallRounded.js | 524 | import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsx("path", {
d: "M11 3.18v17.64c0 .64-.59 1.12-1.21.98C5.32 20.8 2 16.79 2 12s3.32-8.8 7.79-9.8c.62-.14 1.21.34 1.21.98zm2.03 0v6.81c0 .55.45 1 1 1h6.79c.64 0 1.12-.59.98-1.22-.85-3.76-3.8-6.72-7.55-7.57-.63-.14-1.22.34-1.22.98zm0 10.83v6.81c0 .64.59 1.12 1.22.98 3.76-.85 6.71-3.82 7.56-7.58.14-.62-.35-1.22-.98-1.22h-6.79c-.56.01-1.01.46-1.01 1.01z"
}), 'DonutSmallRounded'); | mit |
mauriciozaffari/mongoid_search | spec/spec_helper.rb | 835 | require 'simplecov'
SimpleCov.start
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'mongoid'
require 'database_cleaner'
require 'fast_stemmer'
require 'yaml'
require 'mongoid_search'
require 'mongoid-compatibility'
Mongoid.configure do |config|
config.connect_to 'mongoid_search_test'
end
Dir["#{File.dirname(__FILE__)}/models/*.rb"].each { |file| require file }
DatabaseCleaner.orm = :mongoid
RSpec.configure do |config|
config.before(:all) do
Mongoid.logger.level = Logger::INFO
Mongo::Logger.logger.level = Logger::INFO if Mongoid::Compatibility::Version.mongoid5_or_newer?
DatabaseCleaner.strategy = :truncation
end
config.before(:each) do
DatabaseCleaner.start
end
config.after(:each) do
DatabaseCleaner.clean
end
end
| mit |
dotJEM/angular-lessons | src/assets/lib/bower/dotjem-angular-routing/build/src/state/stateRules.d.ts | 236 | /// <reference path="../refs.d.ts" />
declare class StateRules {
private static nameValidation;
private static targetValidation;
static validateName(name: string): void;
static validateTarget(target: string): boolean;
}
| mit |
jamescallmebrent/gold-record | test/cases/associations/habtm_uuid_to_uuid_association_test.rb | 487 | require 'cases/helper'
require 'models/artist'
require 'models/fan'
class HabtmUuidToUuidAssociationTest < ActiveRecord::TestCase
fixtures :artists
fixtures :fans
def test_association_find
artist = artists(:beatles)
fans = artist.fans
assert_equal 8, fans.size
fans.each do |fans|
assert fans.instance_of?(Fan)
end
end
def test_empty_assocation_find
artist = artists(:ll_cool_j)
fans = artist.fans
assert_equal 0, fans.size
end
end
| mit |
cahein/oui5lib | examples/FormPage/fragment/HelpButton.fragment.js | 399 | sap.ui.jsfragment("oum.fragment.HelpButton", {
createContent: function () {
const btn = new sap.m.Button({
icon : "sap-icon://sys-help",
tooltip : "{i18n>help.tooltip}",
press: function() {
const router = oui5lib.util.getComponentRouter();
router.vNavTo("help");
}
});
return btn;
}
});
| mit |
box-project/amend | src/tests/KevinGH/Amend/Tests/CommandTest.php | 4019 | <?php
/* This file is part of Amend.
*
* (c) 2012 Kevin Herrera
*
* For the full copyright and license information, please
* view the LICENSE file that was distributed with this
* source code.
*/
namespace KevinGH\Amend\Tests;
use KevinGH\Amend\Command;
use KevinGH\Amend\Helper;
use Herrera\Box\Box;
use Herrera\PHPUnit\TestCase;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
class CommandTest extends TestCase
{
/**
* @var Command
*/
private $command;
public function testSetManifestUri()
{
$this->command->setManifestUri('http://example.com/test.json');
$this->assertEquals(
'http://example.com/test.json',
$this->getPropertyValue($this->command, 'manifestUri')
);
}
public function testConfigure()
{
$definition = $this->command->getDefinition();
$this->assertTrue($definition->hasOption('redo'));
$this->assertTrue($definition->hasOption('upgrade'));
}
public function testConfigureDisabled()
{
$command = new Command('upgrade', true);
$definition = $command->getDefinition();
$this->assertTrue($definition->hasOption('redo'));
$this->assertFalse($definition->hasOption('upgrade'));
}
public function testExecuteNoManifest()
{
$app = new Application('Test', '1.0.0');
$app->getHelperSet()->set(new Helper());
$app->add(new Command('upgrade'));
$tester = new CommandTester($app->get('upgrade'));
$this->setExpectedException(
'LogicException',
'No manifest URI has been configured.'
);
$tester->execute(array('command' => 'upgrade'));
}
public function testExecute()
{
$_SERVER['argv'][0] = $this->createPhar('a.phar', 'alpha');
$b = $this->createPhar('b.phar', 'beta');
$manifest = $this->createFile();
file_put_contents($manifest, json_encode(array(
array(
'name' => 'a.phar',
'sha1' => sha1_file($b),
'url' => $b,
'version' => '1.2.0'
),
array(
'name' => 'a.phar',
'sha1' => 'abcdef0123abcdef0123abcdef0123abcdef0123',
'url' => 'file:///does/not/exist',
'version' => '2.0.0'
)
)));
$command = new Command('upgrade', true);
$command->setManifestUri($manifest);
$app = new Application('Test', '1.0.0');
$app->getHelperSet()->set(new Helper());
$app->add($command);
$tester = new CommandTester($app->get('upgrade'));
$tester->execute(array('command' => 'upgrade'));
$this->assertRegExp(
'/Update successful!/',
$tester->getDisplay()
);
$this->assertEquals(
'beta',
exec('php ' . escapeshellarg($_SERVER['argv'][0]))
);
}
public function testExecuteCurrent()
{
$manifest = $this->createFile();
file_put_contents($manifest, '[]');
$command = new Command('upgrade', true);
$command->setManifestUri($manifest);
$app = new Application('Test', '1.0.0');
$app->getHelperSet()->set(new Helper());
$app->add($command);
$tester = new CommandTester($app->get('upgrade'));
$tester->execute(array('command' => 'upgrade'));
$this->assertRegExp(
'/Already up-to-date\./',
$tester->getDisplay()
);
}
protected function createPhar($name, $echo)
{
unlink($file = $this->createFile($name));
$box = Box::create($file);
$box->addFromString(
'index.php',
'<?php echo ' . var_export($echo, true) . ';'
);
unset($box);
return $file;
}
protected function setUp()
{
$this->command = new Command('upgrade');
}
} | mit |
timsvoice/great_green_sources | core/lexicon/ru/system_info.inc.php | 3597 | <?php
/**
* System Info Russian lexicon topic
*
* @language ru
* @package modx
* @subpackage lexicon
*/
$_lang['database_charset'] = 'Кодировка базы данных';
$_lang['database_name'] = 'Имя базы данных';
$_lang['database_server'] = 'Сервер базы данных';
$_lang['database_tables'] = 'Таблицы базы данных';
$_lang['database_optimize'] = 'Оптимизировать базу данных';
$_lang['database_table_clickhere'] = 'Нажмите здесь';
$_lang['database_table_clickbackup'] = 'для создания и скачивания резервной копии выбранных таблиц';
$_lang['database_table_datasize'] = 'Размер данных';
$_lang['database_table_droptablestatements'] = 'Добавить команды DROP TABLE.';
$_lang['database_table_effectivesize'] = 'Реальный размер';
$_lang['database_table_indexsize'] = 'Размер индекса';
$_lang['database_table_overhead'] = 'Перерасход';
$_lang['database_table_reserved'] = 'Зарезервировано';
$_lang['database_table_records'] = 'Записей';
$_lang['database_table_tablename'] = 'Имя таблицы';
$_lang['database_table_totalsize'] = 'Общий размер';
$_lang['database_table_totals'] = 'Итого:';
$_lang['database_table_unused'] = 'Не использовано';
$_lang['database_type'] = 'Тип базы данных';
$_lang['database_version'] = 'Версия базы данных';
$_lang['extjs_version'] = 'Версия <a href="http://extjs.com/" target="_blank">ExtJS</a>';
$_lang['localtime'] = 'Местное время';
$_lang['magpie_version'] = 'Версия <a href="http://magpierss.sourceforge.net/" target="_blank">MagpieRSS</a>';
$_lang['modx_version'] = 'Версия MODX';
$_lang['onlineusers_action'] = 'Действие';
$_lang['onlineusers_actionid'] = 'ID действия';
$_lang['onlineusers_ipaddress'] = 'IP-адрес пользователя';
$_lang['onlineusers_lasthit'] = 'Последнее посещение';
$_lang['onlineusers_message'] = 'Этот список показывает всех активных пользователей за последние 20 минут (текущее время: ';
$_lang['onlineusers_title'] = 'Пользователи онлайн';
$_lang['onlineusers_user'] = 'Пользователь';
$_lang['onlineusers_userid'] = 'ID пользователя';
$_lang['optimize_table'] = 'Для оптимизации таблицы нажмите сюда';
$_lang['optimize_table_err'] = 'Ошибка оптимизации таблицы';
$_lang['phpmailer_version'] = 'Версия <a href="http://sourceforge.net/projects/phpmailer/" target="_blank">PHPMailer</a>';
$_lang['server'] = 'Сервер';
$_lang['servertime'] = 'Серверное время';
$_lang['serveroffset'] = 'Смещение серверного времени';
$_lang['smarty_version'] = 'Версия <a href="http://smarty.net/" target="_blank">Smarty</a>';
$_lang['sysinfo_desc'] = 'Здесь вы можете просматривать общую информацию о среде, в которой работает MODX.';
$_lang['view_sysinfo'] = 'Информация о системе';
$_lang['table_prefix'] = 'Префикс таблицы';
$_lang['truncate_table'] = 'Для очистки таблицы нажмите сюда';
$_lang['truncate_table_err'] = 'Ошибка очистки таблицы';
$_lang['version_codename'] = 'Кодовое имя версии'; | mit |
oliviertassinari/material-ui | packages/mui-icons-material/lib/ArrowDropUpTwoTone.js | 490 | "use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon"));
var _jsxRuntime = require("react/jsx-runtime");
var _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "m7 14 5-5 5 5H7z"
}), 'ArrowDropUpTwoTone');
exports.default = _default; | mit |
JimmyBlastoff/unbroken | src/qt/locale/bitcoin_de.ts | 120305 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="de" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Bitcoin</source>
<translation>Über Bitcoin</translation>
</message>
<message>
<location line="+39"/>
<source><b>Bitcoin</b> version</source>
<translation><b>Bitcoin</b>-Version</translation>
</message>
<message>
<location line="+57"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
<translation>
Dies ist experimentelle Software.
Veröffentlicht unter der MIT/X11-Softwarelizenz, siehe beiligende Datei COPYING oder http://www.opensource.org/licenses/mit-license.php.
Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im OpenSSL-Toolkit (http://www.openssl.org/) entwickelt wurde, sowie kryptographische Software geschrieben von Eric Young (eay@cryptsoft.com) und UPnP-Software geschrieben von Thomas Bernard.</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="+14"/>
<source>Copyright</source>
<translation>Copyright</translation>
</message>
<message>
<location line="+0"/>
<source>The Bitcoin developers</source>
<translation>Die Bitcoinentwickler</translation>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>Adressbuch</translation>
</message>
<message>
<location line="+19"/>
<source>Double-click to edit address or label</source>
<translation>Doppelklicken, um die Adresse oder die Bezeichnung zu bearbeiten</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>Eine neue Adresse erstellen</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Ausgewählte Adresse in die Zwischenablage kopieren</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation>&Neue Adresse</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+63"/>
<source>These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation>Dies sind Ihre Bitcoin-Adressen zum Empfangen von Zahlungen. Es steht Ihnen frei, jedem Absender eine Andere mitzuteilen, um einen besseren Überblick über eingehende Zahlungen zu erhalten.</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>&Copy Address</source>
<translation>Adresse &kopieren</translation>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation>&QR-Code anzeigen</translation>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a Bitcoin address</source>
<translation>Eine Nachricht signieren, um den Besitz einer Bitcoin-Adresse zu beweisen</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>Nachricht &signieren</translation>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation>Die ausgewählte Adresse aus der Liste entfernen.</translation>
</message>
<message>
<location line="+27"/>
<source>Export the data in the current tab to a file</source>
<translation>Daten der aktuellen Ansicht in eine Datei exportieren</translation>
</message>
<message>
<location line="+3"/>
<source>&Export</source>
<translation>E&xportieren</translation>
</message>
<message>
<location line="-44"/>
<source>Verify a message to ensure it was signed with a specified Bitcoin address</source>
<translation>Eine Nachricht verifizieren, um sicherzustellen, dass diese mit einer angegebenen Bitcoin-Adresse signiert wurde</translation>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation>Nachricht &verifizieren</translation>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&Löschen</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="-5"/>
<source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation>Dies sind Ihre Bitcoin-Adressen zum Tätigen von Überweisungen. Bitte prüfen Sie den Betrag und die Empfangsadresse, bevor Sie Bitcoins überweisen.</translation>
</message>
<message>
<location line="+13"/>
<source>Copy &Label</source>
<translation>&Bezeichnung kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>&Edit</source>
<translation>&Editieren</translation>
</message>
<message>
<location line="+1"/>
<source>Send &Coins</source>
<translation>Bitcoins &überweisen</translation>
</message>
<message>
<location line="+260"/>
<source>Export Address Book Data</source>
<translation>Adressbuch exportieren</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Kommagetrennte-Datei (*.csv)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation>Fehler beim Exportieren</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Konnte nicht in Datei %1 schreiben.</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>Bezeichnung</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Adresse</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(keine Bezeichnung)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation>Passphrasendialog</translation>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Passphrase eingeben</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Neue Passphrase</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Neue Passphrase wiederholen</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+33"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>Geben Sie die neue Passphrase für die Brieftasche ein.<br>Bitte benutzen Sie eine Passphrase bestehend aus <b>10 oder mehr zufälligen Zeichen</b> oder <b>8 oder mehr Wörtern</b>.</translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>Brieftasche verschlüsseln</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Dieser Vorgang benötigt Ihre Passphrase, um die Brieftasche zu entsperren.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Brieftasche entsperren</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Dieser Vorgang benötigt Ihre Passphrase, um die Brieftasche zu entschlüsseln.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Brieftasche entschlüsseln</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Passphrase ändern</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Geben Sie die alte und neue Passphrase der Brieftasche ein.</translation>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation>Verschlüsselung der Brieftasche bestätigen</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>!</source>
<translation>Warnung: Wenn Sie Ihre Brieftasche verschlüsseln und Ihre Passphrase verlieren, werden Sie <b>alle Ihre Bitcoins verlieren</b>!</translation>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>Sind Sie sich sicher, dass Sie Ihre Brieftasche verschlüsseln möchten?</translation>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation>WICHTIG: Alle vorherigen Sicherungen Ihrer Brieftasche sollten durch die neu erzeugte, verschlüsselte Brieftasche ersetzt werden. Aus Sicherheitsgründen werden vorherige Sicherungen der unverschlüsselten Brieftasche nutzlos, sobald Sie die neue, verschlüsselte Brieftasche verwenden.</translation>
</message>
<message>
<location line="+100"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation>Warnung: Die Feststelltaste ist aktiviert!</translation>
</message>
<message>
<location line="-130"/>
<location line="+58"/>
<source>Wallet encrypted</source>
<translation>Brieftasche verschlüsselt</translation>
</message>
<message>
<location line="-56"/>
<source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
<translation>Bitcoin wird jetzt beendet, um den Verschlüsselungsprozess abzuschließen. Bitte beachten Sie, dass die Verschlüsselung Ihrer Brieftasche nicht vollständig vor Diebstahl Ihrer Bitcoins durch Schadsoftware schützt, die Ihren Computer befällt.</translation>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+42"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>Verschlüsselung der Brieftasche fehlgeschlagen</translation>
</message>
<message>
<location line="-54"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Die Verschlüsselung der Brieftasche ist aufgrund eines internen Fehlers fehlgeschlagen. Ihre Brieftasche wurde nicht verschlüsselt.</translation>
</message>
<message>
<location line="+7"/>
<location line="+48"/>
<source>The supplied passphrases do not match.</source>
<translation>Die eingegebenen Passphrasen stimmen nicht überein.</translation>
</message>
<message>
<location line="-37"/>
<source>Wallet unlock failed</source>
<translation>Entsperrung der Brieftasche fehlgeschlagen</translation>
</message>
<message>
<location line="+1"/>
<location line="+11"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>Die eingegebene Passphrase zum Entschlüsseln der Brieftasche war nicht korrekt.</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Entschlüsselung der Brieftasche fehlgeschlagen</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation>Die Passphrase der Brieftasche wurde erfolgreich geändert.</translation>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+233"/>
<source>Sign &message...</source>
<translation>Nachricht s&ignieren...</translation>
</message>
<message>
<location line="+280"/>
<source>Synchronizing with network...</source>
<translation>Synchronisiere mit Netzwerk...</translation>
</message>
<message>
<location line="-349"/>
<source>&Overview</source>
<translation>&Übersicht</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>Allgemeine Übersicht der Brieftasche anzeigen</translation>
</message>
<message>
<location line="+20"/>
<source>&Transactions</source>
<translation>&Transaktionen</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Transaktionsverlauf durchsehen</translation>
</message>
<message>
<location line="+7"/>
<source>Edit the list of stored addresses and labels</source>
<translation>Liste der gespeicherten Zahlungsadressen und Bezeichnungen bearbeiten</translation>
</message>
<message>
<location line="-14"/>
<source>Show the list of addresses for receiving payments</source>
<translation>Liste der Empfangsadressen anzeigen</translation>
</message>
<message>
<location line="+31"/>
<source>E&xit</source>
<translation>&Beenden</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Anwendung beenden</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about Bitcoin</source>
<translation>Informationen über Bitcoin anzeigen</translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation>Über &Qt</translation>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation>Informationen über Qt anzeigen</translation>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&Konfiguration...</translation>
</message>
<message>
<location line="+6"/>
<source>&Encrypt Wallet...</source>
<translation>Brieftasche &verschlüsseln...</translation>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation>Brieftasche &sichern...</translation>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation>Passphrase &ändern...</translation>
</message>
<message>
<location line="+285"/>
<source>Importing blocks from disk...</source>
<translation>Importiere Blöcke von Laufwerk...</translation>
</message>
<message>
<location line="+3"/>
<source>Reindexing blocks on disk...</source>
<translation>Reindiziere Blöcke auf Laufwerk...</translation>
</message>
<message>
<location line="-347"/>
<source>Send coins to a Bitcoin address</source>
<translation>Bitcoins an eine Bitcoin-Adresse überweisen</translation>
</message>
<message>
<location line="+49"/>
<source>Modify configuration options for Bitcoin</source>
<translation>Die Konfiguration des Clients bearbeiten</translation>
</message>
<message>
<location line="+9"/>
<source>Backup wallet to another location</source>
<translation>Eine Sicherungskopie der Brieftasche erstellen und abspeichern</translation>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>Ändert die Passphrase, die für die Verschlüsselung der Brieftasche benutzt wird</translation>
</message>
<message>
<location line="+6"/>
<source>&Debug window</source>
<translation>&Debugfenster</translation>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation>Debugging- und Diagnosekonsole öffnen</translation>
</message>
<message>
<location line="-4"/>
<source>&Verify message...</source>
<translation>Nachricht &verifizieren...</translation>
</message>
<message>
<location line="-165"/>
<location line="+530"/>
<source>Bitcoin</source>
<translation>Bitcoin</translation>
</message>
<message>
<location line="-530"/>
<source>Wallet</source>
<translation>Brieftasche</translation>
</message>
<message>
<location line="+101"/>
<source>&Send</source>
<translation>Überweisen</translation>
</message>
<message>
<location line="+7"/>
<source>&Receive</source>
<translation>&Empfangen</translation>
</message>
<message>
<location line="+14"/>
<source>&Addresses</source>
<translation>&Adressen</translation>
</message>
<message>
<location line="+22"/>
<source>&About Bitcoin</source>
<translation>&Über Bitcoin</translation>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation>&Anzeigen / Verstecken</translation>
</message>
<message>
<location line="+1"/>
<source>Show or hide the main Window</source>
<translation>Das Hauptfenster anzeigen oder verstecken</translation>
</message>
<message>
<location line="+3"/>
<source>Encrypt the private keys that belong to your wallet</source>
<translation>Verschlüsselt die zu Ihrer Brieftasche gehörenden privaten Schlüssel</translation>
</message>
<message>
<location line="+7"/>
<source>Sign messages with your Bitcoin addresses to prove you own them</source>
<translation>Nachrichten signieren, um den Besitz Ihrer Bitcoin-Adressen zu beweisen</translation>
</message>
<message>
<location line="+2"/>
<source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
<translation>Nachrichten verifizieren, um sicherzustellen, dass diese mit den angegebenen Bitcoin-Adressen signiert wurden</translation>
</message>
<message>
<location line="+28"/>
<source>&File</source>
<translation>&Datei</translation>
</message>
<message>
<location line="+7"/>
<source>&Settings</source>
<translation>&Einstellungen</translation>
</message>
<message>
<location line="+6"/>
<source>&Help</source>
<translation>&Hilfe</translation>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation>Registerkartenleiste</translation>
</message>
<message>
<location line="+17"/>
<location line="+10"/>
<source>[testnet]</source>
<translation>[Testnetz]</translation>
</message>
<message>
<location line="+47"/>
<source>Bitcoin client</source>
<translation>Bitcoin-Client</translation>
</message>
<message numerus="yes">
<location line="+141"/>
<source>%n active connection(s) to Bitcoin network</source>
<translation><numerusform>%n aktive Verbindung zum Bitcoin-Netzwerk</numerusform><numerusform>%n aktive Verbindungen zum Bitcoin-Netzwerk</numerusform></translation>
</message>
<message>
<location line="+22"/>
<source>No block source available...</source>
<translation>Keine Blockquelle verfügbar...</translation>
</message>
<message>
<location line="+12"/>
<source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
<translation>%1 von (geschätzten) %2 Blöcken des Transaktionsverlaufs verarbeitet.</translation>
</message>
<message>
<location line="+4"/>
<source>Processed %1 blocks of transaction history.</source>
<translation>%1 Blöcke des Transaktionsverlaufs verarbeitet.</translation>
</message>
<message numerus="yes">
<location line="+20"/>
<source>%n hour(s)</source>
<translation><numerusform>%n Stunde</numerusform><numerusform>%n Stunden</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation><numerusform>%n Tag</numerusform><numerusform>%n Tage</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n week(s)</source>
<translation><numerusform>%n Woche</numerusform><numerusform>%n Wochen</numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>%1 behind</source>
<translation>%1 im Rückstand</translation>
</message>
<message>
<location line="+14"/>
<source>Last received block was generated %1 ago.</source>
<translation>Der letzte empfangene Block ist %1 alt.</translation>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation>Transaktionen hiernach werden noch nicht angezeigt.</translation>
</message>
<message>
<location line="+22"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation>Warnung</translation>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation>Hinweis</translation>
</message>
<message>
<location line="+70"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation>Die Transaktion übersteigt das Größenlimit. Sie können sie trotzdem senden, wenn Sie eine zusätzliche Transaktionsgebühr in Höhe von %1 zahlen. Diese wird an die Knoten verteilt, die Ihre Transaktion bearbeiten und unterstützt damit das Bitcoin-Netzwerk. Möchten Sie die Gebühr bezahlen?</translation>
</message>
<message>
<location line="-140"/>
<source>Up to date</source>
<translation>Auf aktuellem Stand</translation>
</message>
<message>
<location line="+31"/>
<source>Catching up...</source>
<translation>Hole auf...</translation>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation>Transaktionsgebühr bestätigen</translation>
</message>
<message>
<location line="+8"/>
<source>Sent transaction</source>
<translation>Gesendete Transaktion</translation>
</message>
<message>
<location line="+0"/>
<source>Incoming transaction</source>
<translation>Eingehende Transaktion</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation>Datum: %1
Betrag: %2
Typ: %3
Adresse: %4</translation>
</message>
<message>
<location line="+33"/>
<location line="+23"/>
<source>URI handling</source>
<translation>URI Verarbeitung</translation>
</message>
<message>
<location line="-23"/>
<location line="+23"/>
<source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
<translation>URI kann nicht analysiert werden! Dies kann durch eine ungültige Bitcoin-Adresse oder fehlerhafte URI-Parameter verursacht werden.</translation>
</message>
<message>
<location line="+17"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>Brieftasche ist <b>verschlüsselt</b> und aktuell <b>entsperrt</b></translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>Brieftasche ist <b>verschlüsselt</b> und aktuell <b>gesperrt</b></translation>
</message>
<message>
<location filename="../bitcoin.cpp" line="+111"/>
<source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
<translation>Ein schwerer Fehler ist aufgetreten. Bitcoin kann nicht stabil weiter ausgeführt werden und wird beendet.</translation>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+104"/>
<source>Network Alert</source>
<translation>Netzwerkalarm</translation>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>Adresse bearbeiten</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>&Bezeichnung</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation>Die Bezeichnung dieses Adressbuchseintrags</translation>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&Adresse</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation>Die Adresse des Adressbucheintrags. Diese kann nur für Zahlungsadressen bearbeitet werden.</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation>Neue Empfangsadresse</translation>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation>Neue Zahlungsadresse</translation>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation>Empfangsadresse bearbeiten</translation>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation>Zahlungsadresse bearbeiten</translation>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>Die eingegebene Adresse "%1" befindet sich bereits im Adressbuch.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid Bitcoin address.</source>
<translation>Die eingegebene Adresse "%1" ist keine gültige Bitcoin-Adresse.</translation>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>Die Brieftasche konnte nicht entsperrt werden.</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>Generierung eines neuen Schlüssels fehlgeschlagen.</translation>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+424"/>
<location line="+12"/>
<source>Bitcoin-Qt</source>
<translation>Bitcoin-Qt</translation>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation>Version</translation>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation>Benutzung:</translation>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation>Kommandozeilenoptionen</translation>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation>UI-Optionen</translation>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation>Sprache festlegen, z.B. "de_DE" (Standard: System Locale)</translation>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation>Minimiert starten</translation>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation>Startbildschirm beim Starten anzeigen (Standard: 1)</translation>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation>Erweiterte Einstellungen</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation>&Allgemein</translation>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
<translation>Optionale Transaktionsgebühr pro KB, die sicherstellt, dass Ihre Transaktionen schnell bearbeitet werden. Die meisten Transaktionen sind 1 kB groß.</translation>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation>Transaktions&gebühr bezahlen</translation>
</message>
<message>
<location line="+31"/>
<source>Automatically start Bitcoin after logging in to the system.</source>
<translation>Bitcoin nach der Anmeldung am System automatisch ausführen.</translation>
</message>
<message>
<location line="+3"/>
<source>&Start Bitcoin on system login</source>
<translation>&Starte Bitcoin nach Systemanmeldung</translation>
</message>
<message>
<location line="+35"/>
<source>Reset all client options to default.</source>
<translation>Setzt die Clientkonfiguration auf Standardwerte zurück.</translation>
</message>
<message>
<location line="+3"/>
<source>&Reset Options</source>
<translation>Konfiguration &zurücksetzen</translation>
</message>
<message>
<location line="+13"/>
<source>&Network</source>
<translation>&Netzwerk</translation>
</message>
<message>
<location line="+6"/>
<source>Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation>Automatisch den Bitcoin-Clientport auf dem Router öffnen. Dies funktioniert nur, wenn Ihr Router UPnP unterstützt und dies aktiviert ist.</translation>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation>Portweiterleitung via &UPnP</translation>
</message>
<message>
<location line="+7"/>
<source>Connect to the Bitcoin network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation>Über einen SOCKS-Proxy mit dem Bitcoin-Netzwerk verbinden (z.B. beim Verbinden über Tor).</translation>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation>Über einen SOCKS-Proxy &verbinden:</translation>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation>Proxy-&IP:</translation>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation>IP-Adresse des Proxies (z.B. 127.0.0.1)</translation>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation>&Port:</translation>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation>Port des Proxies (z.B. 9050)</translation>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation>SOCKS-&Version:</translation>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation>SOCKS-Version des Proxies (z.B. 5)</translation>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation>&Programmfenster</translation>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Nur ein Symbol im Infobereich anzeigen, nachdem das Programmfenster minimiert wurde.</translation>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation>In den Infobereich anstatt in die Taskleiste &minimieren</translation>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation>Minimiert die Anwendung anstatt sie zu beenden wenn das Fenster geschlossen wird. Wenn dies aktiviert ist, müssen Sie das Programm über "Beenden" im Menü schließen.</translation>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation>Beim Schließen m&inimieren</translation>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation>&Anzeige</translation>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation>&Sprache der Benutzeroberfläche:</translation>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
<translation>Legt die Sprache der Benutzeroberfläche fest. Diese Einstellung wird erst nach einem Neustart von Bitcoin aktiv.</translation>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation>&Einheit der Beträge:</translation>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation>Wählen Sie die Standarduntereinheit, die in der Benutzeroberfläche und beim Überweisen von Bitcoins angezeigt werden soll.</translation>
</message>
<message>
<location line="+9"/>
<source>Whether to show Bitcoin addresses in the transaction list or not.</source>
<translation>Legt fest, ob Bitcoin-Adressen in der Transaktionsliste angezeigt werden.</translation>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation>Adressen in der Transaktionsliste &anzeigen</translation>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation>&OK</translation>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation>&Abbrechen</translation>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation>&Übernehmen</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+53"/>
<source>default</source>
<translation>Standard</translation>
</message>
<message>
<location line="+130"/>
<source>Confirm options reset</source>
<translation>Zurücksetzen der Konfiguration bestätigen</translation>
</message>
<message>
<location line="+1"/>
<source>Some settings may require a client restart to take effect.</source>
<translation>Einige Einstellungen benötigen möglicherweise einen Clientneustart, um aktiv zu werden.</translation>
</message>
<message>
<location line="+0"/>
<source>Do you want to proceed?</source>
<translation>Wollen Sie fortfahren?</translation>
</message>
<message>
<location line="+42"/>
<location line="+9"/>
<source>Warning</source>
<translation>Warnung</translation>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting Bitcoin.</source>
<translation>Diese Einstellung wird erst nach einem Neustart von Bitcoin aktiv.</translation>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation>Die eingegebene Proxyadresse ist ungültig.</translation>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>Formular</translation>
</message>
<message>
<location line="+50"/>
<location line="+166"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
<translation>Die angezeigten Informationen sind möglicherweise nicht mehr aktuell. Ihre Brieftasche wird automatisch synchronisiert, nachdem eine Verbindung zum Bitcoin-Netzwerk hergestellt wurde. Dieser Prozess ist jedoch derzeit noch nicht abgeschlossen.</translation>
</message>
<message>
<location line="-124"/>
<source>Balance:</source>
<translation>Kontostand:</translation>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation>Unbestätigt:</translation>
</message>
<message>
<location line="-78"/>
<source>Wallet</source>
<translation>Brieftasche</translation>
</message>
<message>
<location line="+107"/>
<source>Immature:</source>
<translation>Unreif:</translation>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation>Erarbeiteter Betrag der noch nicht gereift ist</translation>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation><b>Letzte Transaktionen</b></translation>
</message>
<message>
<location line="-101"/>
<source>Your current balance</source>
<translation>Ihr aktueller Kontostand</translation>
</message>
<message>
<location line="+29"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation>Betrag aus unbestätigten Transaktionen, der noch nicht im aktuellen Kontostand enthalten ist</translation>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation>nicht synchron</translation>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start bitcoin: click-to-pay handler</source>
<translation>"bitcoin: Klicken-zum-Bezahlen"-Handler konnte nicht gestartet werden</translation>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation>QR-Code-Dialog</translation>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation>Zahlung anfordern</translation>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation>Betrag:</translation>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation>Bezeichnung:</translation>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation>Nachricht:</translation>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation>&Speichern unter...</translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation>Fehler beim Kodieren der URI in den QR-Code.</translation>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation>Der eingegebene Betrag ist ungültig, bitte überprüfen.</translation>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation>Resultierende URI zu lang, bitte den Text für Bezeichnung / Nachricht kürzen.</translation>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation>QR-Code abspeichern</translation>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation>PNG-Bild (*.png)</translation>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation>Clientname</translation>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+339"/>
<source>N/A</source>
<translation>n.v.</translation>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation>Clientversion</translation>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation>&Information</translation>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation>Verwendete OpenSSL-Version</translation>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation>Startzeit</translation>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation>Netzwerk</translation>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation>Anzahl Verbindungen</translation>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation>Im Testnetz</translation>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation>Blockkette</translation>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation>Aktuelle Anzahl Blöcke</translation>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation>Geschätzte Gesamtzahl Blöcke</translation>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation>Letzte Blockzeit</translation>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation>&Öffnen</translation>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation>Kommandozeilenoptionen</translation>
</message>
<message>
<location line="+7"/>
<source>Show the Bitcoin-Qt help message to get a list with possible Bitcoin command-line options.</source>
<translation>Zeige die Bitcoin-Qt-Hilfsnachricht, um eine Liste mit möglichen Kommandozeilenoptionen zu erhalten.</translation>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation>&Anzeigen</translation>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation>&Konsole</translation>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation>Erstellungsdatum</translation>
</message>
<message>
<location line="-104"/>
<source>Bitcoin - Debug window</source>
<translation>Bitcoin - Debugfenster</translation>
</message>
<message>
<location line="+25"/>
<source>Bitcoin Core</source>
<translation>Bitcoin-Kern</translation>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation>Debugprotokolldatei</translation>
</message>
<message>
<location line="+7"/>
<source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation>Öffnet die Bitcoin-Debugprotokolldatei aus dem aktuellen Datenverzeichnis. Dies kann bei großen Protokolldateien einige Sekunden dauern.</translation>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation>Konsole zurücksetzen</translation>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-30"/>
<source>Welcome to the Bitcoin RPC console.</source>
<translation>Willkommen in der Bitcoin-RPC-Konsole.</translation>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation>Pfeiltaste hoch und runter, um die Historie durchzublättern und <b>Strg-L</b>, um die Konsole zurückzusetzen.</translation>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation>Bitte <b>help</b> eingeben, um eine Übersicht verfügbarer Befehle zu erhalten.</translation>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+124"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation>Bitcoins überweisen</translation>
</message>
<message>
<location line="+50"/>
<source>Send to multiple recipients at once</source>
<translation>In einer Transaktion an mehrere Empfänger auf einmal überweisen</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation>Empfänger &hinzufügen</translation>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation>Alle Überweisungsfelder zurücksetzen</translation>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation>&Zurücksetzen</translation>
</message>
<message>
<location line="+22"/>
<source>Balance:</source>
<translation>Kontostand:</translation>
</message>
<message>
<location line="+10"/>
<source>123.456 BTC</source>
<translation>123.456 BTC</translation>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation>Überweisung bestätigen</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation>&Überweisen</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-59"/>
<source><b>%1</b> to %2 (%3)</source>
<translation><b>%1</b> an %2 (%3)</translation>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation>Überweisung bestätigen</translation>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation>Sind Sie sich sicher, dass Sie die folgende Überweisung ausführen möchten?<br>%1</translation>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation> und </translation>
</message>
<message>
<location line="+23"/>
<source>The recipient address is not valid, please recheck.</source>
<translation>Die Zahlungsadresse ist ungültig, bitte nochmals überprüfen.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation>Der zu zahlende Betrag muss größer als 0 sein.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation>Der angegebene Betrag übersteigt Ihren Kontostand.</translation>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation>Der angegebene Betrag übersteigt aufgrund der Transaktionsgebühr in Höhe von %1 Ihren Kontostand.</translation>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation>Doppelte Adresse gefunden, pro Überweisung kann an jede Adresse nur einmalig etwas überwiesen werden.</translation>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation>Fehler: Transaktionserstellung fehlgeschlagen!</translation>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation>Fehler: Die Transaktion wurde abgelehnt. Dies kann passieren, wenn einige Bitcoins aus Ihrer Brieftasche bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die Bitcoins dort ausgegeben haben und dies daher in der derzeit aktiven Brieftasche nicht vermerkt ist.</translation>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation>Formular</translation>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation>&Betrag:</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>&Empfänger:</translation>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
<translation>Die Zahlungsadresse der Überweisung (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
</message>
<message>
<location line="+60"/>
<location filename="../sendcoinsentry.cpp" line="+26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation>Adressbezeichnung eingeben (diese wird zusammen mit der Adresse dem Adressbuch hinzugefügt)</translation>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation>&Bezeichnung:</translation>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation>Adresse aus Adressbuch wählen</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation>Adresse aus der Zwischenablage einfügen</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation>Diesen Empfänger entfernen</translation>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
<translation>Bitcoin-Adresse eingeben (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation>Signaturen - eine Nachricht signieren / verifizieren</translation>
</message>
<message>
<location line="+13"/>
<source>&Sign Message</source>
<translation>Nachricht &signieren</translation>
</message>
<message>
<location line="+6"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation>Sie können Nachrichten mit Ihren Adressen signieren, um den Besitz dieser Adressen zu beweisen. Bitte nutzen Sie diese Funktion mit Vorsicht und nehmen Sie sich vor Phishingangriffen in Acht. Signieren Sie nur Nachrichten, mit denen Sie vollständig einverstanden sind.</translation>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
<translation>Die Adresse mit der die Nachricht signiert wird (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
</message>
<message>
<location line="+10"/>
<location line="+213"/>
<source>Choose an address from the address book</source>
<translation>Eine Adresse aus dem Adressbuch wählen</translation>
</message>
<message>
<location line="-203"/>
<location line="+213"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="-203"/>
<source>Paste address from clipboard</source>
<translation>Adresse aus der Zwischenablage einfügen</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation>Zu signierende Nachricht hier eingeben</translation>
</message>
<message>
<location line="+7"/>
<source>Signature</source>
<translation>Signatur</translation>
</message>
<message>
<location line="+27"/>
<source>Copy the current signature to the system clipboard</source>
<translation>Aktuelle Signatur in die Zwischenablage kopieren</translation>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this Bitcoin address</source>
<translation>Die Nachricht signieren, um den Besitz dieser Bitcoin-Adresse zu beweisen</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>&Nachricht signieren</translation>
</message>
<message>
<location line="+14"/>
<source>Reset all sign message fields</source>
<translation>Alle "Nachricht signieren"-Felder zurücksetzen</translation>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation>&Zurücksetzen</translation>
</message>
<message>
<location line="-87"/>
<source>&Verify Message</source>
<translation>Nachricht &verifizieren</translation>
</message>
<message>
<location line="+6"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation>Geben Sie die signierende Adresse, Nachricht (achten Sie darauf Zeilenumbrüche, Leerzeichen, Tabulatoren usw. exakt zu kopieren) und Signatur unten ein, um die Nachricht zu verifizieren. Vorsicht, interpretieren Sie nicht mehr in die Signatur, als in der signierten Nachricht selber enthalten ist, um nicht von einerm Man-in-the-middle-Angriff hinters Licht geführt zu werden.</translation>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
<translation>Die Adresse mit der die Nachricht signiert wurde (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
<translation>Die Nachricht verifizieren, um sicherzustellen, dass diese mit der angegebenen Bitcoin-Adresse signiert wurde</translation>
</message>
<message>
<location line="+3"/>
<source>Verify &Message</source>
<translation>&Nachricht verifizieren</translation>
</message>
<message>
<location line="+14"/>
<source>Reset all verify message fields</source>
<translation>Alle "Nachricht verifizieren"-Felder zurücksetzen</translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
<translation>Bitcoin-Adresse eingeben (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation>Auf "Nachricht signieren" klicken, um die Signatur zu erzeugen</translation>
</message>
<message>
<location line="+3"/>
<source>Enter Bitcoin signature</source>
<translation>Bitcoin-Signatur eingeben</translation>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation>Die eingegebene Adresse ist ungültig.</translation>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation>Bitte überprüfen Sie die Adresse und versuchen Sie es erneut.</translation>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation>Die eingegebene Adresse verweist nicht auf einen Schlüssel.</translation>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation>Entsperrung der Brieftasche wurde abgebrochen.</translation>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation>Privater Schlüssel zur eingegebenen Adresse ist nicht verfügbar.</translation>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation>Signierung der Nachricht fehlgeschlagen.</translation>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation>Nachricht signiert.</translation>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation>Die Signatur konnte nicht dekodiert werden.</translation>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation>Bitte überprüfen Sie die Signatur und versuchen Sie es erneut.</translation>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation>Die Signatur entspricht nicht dem Message Digest.</translation>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation>Verifikation der Nachricht fehlgeschlagen.</translation>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation>Nachricht verifiziert.</translation>
</message>
</context>
<context>
<name>SplashScreen</name>
<message>
<location filename="../splashscreen.cpp" line="+22"/>
<source>The Bitcoin developers</source>
<translation>Die Bitcoinentwickler</translation>
</message>
<message>
<location line="+1"/>
<source>[testnet]</source>
<translation>[Testnetz]</translation>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+20"/>
<source>Open until %1</source>
<translation>Offen bis %1</translation>
</message>
<message>
<location line="+6"/>
<source>%1/offline</source>
<translation>%1/offline</translation>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation>%1/unbestätigt</translation>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation>%1 Bestätigungen</translation>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation>Status</translation>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation><numerusform>, über %n Knoten übertragen</numerusform><numerusform>, über %n Knoten übertragen</numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation>Quelle</translation>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation>Generiert</translation>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation>Von</translation>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation>An</translation>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation>eigene Adresse</translation>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation>Bezeichnung</translation>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation>Gutschrift</translation>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation><numerusform>reift noch %n weiteren Block</numerusform><numerusform>reift noch %n weitere Blöcke</numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation>nicht angenommen</translation>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation>Belastung</translation>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation>Transaktionsgebühr</translation>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation>Nettobetrag</translation>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation>Nachricht signieren</translation>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation>Kommentar</translation>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation>Transaktions-ID</translation>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation>Generierte Bitcoins müssen 120 Blöcke lang reifen, bevor sie ausgegeben werden können. Als Sie diesen Block generierten, wurde er an das Netzwerk übertragen, um ihn der Blockkette hinzuzufügen. Falls dies fehlschlägt wird der Status in "nicht angenommen" geändert und der Betrag wird nicht verfügbar werden. Das kann gelegentlich passieren, wenn ein anderer Knoten einen Block fast zeitgleich generiert.</translation>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation>Debuginformationen</translation>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation>Transaktion</translation>
</message>
<message>
<location line="+3"/>
<source>Inputs</source>
<translation>Eingaben</translation>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation>Betrag</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation>wahr</translation>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation>falsch</translation>
</message>
<message>
<location line="-209"/>
<source>, has not been successfully broadcast yet</source>
<translation>, wurde noch nicht erfolgreich übertragen</translation>
</message>
<message numerus="yes">
<location line="-35"/>
<source>Open for %n more block(s)</source>
<translation><numerusform>Offen für %n weiteren Block</numerusform><numerusform>Offen für %n weitere Blöcke</numerusform></translation>
</message>
<message>
<location line="+70"/>
<source>unknown</source>
<translation>unbekannt</translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation>Transaktionsdetails</translation>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>Dieser Bereich zeigt eine detaillierte Beschreibung der Transaktion an</translation>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+225"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>Typ</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Adresse</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>Betrag</translation>
</message>
<message numerus="yes">
<location line="+57"/>
<source>Open for %n more block(s)</source>
<translation><numerusform>Offen für %n weiteren Block</numerusform><numerusform>Offen für %n weitere Blöcke</numerusform></translation>
</message>
<message>
<location line="+3"/>
<source>Open until %1</source>
<translation>Offen bis %1</translation>
</message>
<message>
<location line="+3"/>
<source>Offline (%1 confirmations)</source>
<translation>Offline (%1 Bestätigungen)</translation>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed (%1 of %2 confirmations)</source>
<translation>Unbestätigt (%1 von %2 Bestätigungen)</translation>
</message>
<message>
<location line="+3"/>
<source>Confirmed (%1 confirmations)</source>
<translation>Bestätigt (%1 Bestätigungen)</translation>
</message>
<message numerus="yes">
<location line="+8"/>
<source>Mined balance will be available when it matures in %n more block(s)</source>
<translation><numerusform>Erarbeiteter Betrag wird verfügbar sein, nachdem er noch %n weiteren Block reift</numerusform><numerusform>Erarbeiteter Betrag wird verfügbar sein, nachdem er noch %n weitere Blöcke reift</numerusform></translation>
</message>
<message>
<location line="+5"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>Dieser Block wurde von keinem anderen Knoten empfangen und wird wahrscheinlich nicht angenommen werden!</translation>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation>Generiert, jedoch nicht angenommen</translation>
</message>
<message>
<location line="+43"/>
<source>Received with</source>
<translation>Empfangen über</translation>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation>Empfangen von</translation>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation>Überwiesen an</translation>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation>Eigenüberweisung</translation>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation>Erarbeitet</translation>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation>(k.A.)</translation>
</message>
<message>
<location line="+199"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>Transaktionsstatus. Fahren Sie mit der Maus über dieses Feld, um die Anzahl der Bestätigungen zu sehen.</translation>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation>Datum und Uhrzeit als die Transaktion empfangen wurde.</translation>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation>Art der Transaktion</translation>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation>Zieladresse der Transaktion</translation>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation>Der Betrag, der dem Kontostand abgezogen oder hinzugefügt wurde.</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+52"/>
<location line="+16"/>
<source>All</source>
<translation>Alle</translation>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation>Heute</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>Diese Woche</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>Diesen Monat</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>Letzten Monat</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>Dieses Jahr</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation>Zeitraum...</translation>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation>Empfangen über</translation>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation>Überwiesen an</translation>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation>Eigenüberweisung</translation>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation>Erarbeitet</translation>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation>Andere</translation>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation>Zu suchende Adresse oder Bezeichnung eingeben</translation>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation>Minimaler Betrag</translation>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation>Adresse kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Bezeichnung kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>Betrag kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation>Transaktions-ID kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation>Bezeichnung bearbeiten</translation>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation>Transaktionsdetails anzeigen</translation>
</message>
<message>
<location line="+139"/>
<source>Export Transaction Data</source>
<translation>Transaktionen exportieren</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Kommagetrennte-Datei (*.csv)</translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation>Bestätigt</translation>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>Typ</translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Bezeichnung</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Adresse</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>Betrag</translation>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation>Fehler beim Exportieren</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Konnte nicht in Datei %1 schreiben.</translation>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation>Zeitraum:</translation>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation>bis</translation>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+193"/>
<source>Send Coins</source>
<translation>Bitcoins überweisen</translation>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<location filename="../walletview.cpp" line="+42"/>
<source>&Export</source>
<translation>E&xportieren</translation>
</message>
<message>
<location line="+1"/>
<source>Export the data in the current tab to a file</source>
<translation>Daten der aktuellen Ansicht in eine Datei exportieren</translation>
</message>
<message>
<location line="+193"/>
<source>Backup Wallet</source>
<translation>Brieftasche sichern</translation>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation>Brieftaschendaten (*.dat)</translation>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation>Sicherung fehlgeschlagen</translation>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation>Beim Speichern der Brieftaschendaten an die neue Position ist ein Fehler aufgetreten.</translation>
</message>
<message>
<location line="+4"/>
<source>Backup Successful</source>
<translation>Sicherung erfolgreich</translation>
</message>
<message>
<location line="+0"/>
<source>The wallet data was successfully saved to the new location.</source>
<translation>Speichern der Brieftaschendaten an die neue Position war erfolgreich.</translation>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+94"/>
<source>Bitcoin version</source>
<translation>Bitcoin-Version</translation>
</message>
<message>
<location line="+102"/>
<source>Usage:</source>
<translation>Benutzung:</translation>
</message>
<message>
<location line="-29"/>
<source>Send command to -server or bitcoind</source>
<translation>Befehl an -server oder bitcoind senden</translation>
</message>
<message>
<location line="-23"/>
<source>List commands</source>
<translation>Befehle auflisten</translation>
</message>
<message>
<location line="-12"/>
<source>Get help for a command</source>
<translation>Hilfe zu einem Befehl erhalten</translation>
</message>
<message>
<location line="+24"/>
<source>Options:</source>
<translation>Optionen:</translation>
</message>
<message>
<location line="+24"/>
<source>Specify configuration file (default: bitcoin.conf)</source>
<translation>Konfigurationsdatei festlegen (Standard: bitcoin.conf)</translation>
</message>
<message>
<location line="+3"/>
<source>Specify pid file (default: bitcoind.pid)</source>
<translation>PID-Datei festlegen (Standard: bitcoind.pid)</translation>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation>Datenverzeichnis festlegen</translation>
</message>
<message>
<location line="-9"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation>Größe des Datenbankcaches in MB festlegen (Standard: 25)</translation>
</message>
<message>
<location line="-28"/>
<source>Listen for connections on <port> (default: 8546 or testnet: 18546)</source>
<translation><port> nach Verbindungen abhören (Standard: 8546 oder Testnetz: 18546)</translation>
</message>
<message>
<location line="+5"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>Maximal <n> Verbindungen zu Gegenstellen aufrechterhalten (Standard: 125)</translation>
</message>
<message>
<location line="-48"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation>Mit dem Knoten verbinden um Adressen von Gegenstellen abzufragen, danach trennen</translation>
</message>
<message>
<location line="+82"/>
<source>Specify your own public address</source>
<translation>Die eigene öffentliche Adresse angeben</translation>
</message>
<message>
<location line="+3"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation>Schwellenwert, um Verbindungen zu sich nicht konform verhaltenden Gegenstellen zu beenden (Standard: 100)</translation>
</message>
<message>
<location line="-134"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation>Anzahl Sekunden, während denen sich nicht konform verhaltenden Gegenstellen die Wiederverbindung verweigert wird (Standard: 86400)</translation>
</message>
<message>
<location line="-29"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation>Beim Einrichten des abzuhörenden RPC-Ports %u für IPv4 ist ein Fehler aufgetreten: %s</translation>
</message>
<message>
<location line="+27"/>
<source>Listen for JSON-RPC connections on <port> (default: 9546 or testnet: 19546)</source>
<translation><port> nach JSON-RPC-Verbindungen abhören (Standard: 9546 oder Testnetz: 19546)</translation>
</message>
<message>
<location line="+37"/>
<source>Accept command line and JSON-RPC commands</source>
<translation>Kommandozeilenbefehle und JSON-RPC-Befehle annehmen</translation>
</message>
<message>
<location line="+76"/>
<source>Run in the background as a daemon and accept commands</source>
<translation>Als Hintergrunddienst starten und Befehle annehmen</translation>
</message>
<message>
<location line="+37"/>
<source>Use the test network</source>
<translation>Das Testnetz verwenden</translation>
</message>
<message>
<location line="-112"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation>Eingehende Verbindungen annehmen (Standard: 1, wenn nicht -proxy oder -connect)</translation>
</message>
<message>
<location line="-80"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=bitcoinrpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
</source>
<translation>%s, Sie müssen den Wert rpcpasswort in dieser Konfigurationsdatei angeben:
%s
Es wird empfohlen das folgende Zufallspasswort zu verwenden:
rpcuser=bitcoinrpc
rpcpassword=%s
(Sie müssen sich dieses Passwort nicht merken!)
Der Benutzername und das Passwort dürfen NICHT identisch sein.
Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer.
Es wird ebenfalls empfohlen alertnotify anzugeben, um im Problemfall benachrichtig zu werden;
zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
</translation>
</message>
<message>
<location line="+17"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation>Beim Einrichten des abzuhörenden RPC-Ports %u für IPv6 ist ein Fehler aufgetreten, es wird auf IPv4 zurückgegriffen: %s</translation>
</message>
<message>
<location line="+3"/>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation>An die angegebene Adresse binden und immer abhören. Für IPv6 [Host]:Port-Schreibweise verwenden</translation>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. Bitcoin is probably already running.</source>
<translation>Datenverzeichnis %s kann nicht gesperrt werden. Evtl. wurde Bitcoin bereits gestartet.</translation>
</message>
<message>
<location line="+3"/>
<source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation>Fehler: Die Transaktion wurde abgelehnt! Dies kann passieren, wenn einige Bitcoins aus Ihrer Brieftasche bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die Bitcoins dort ausgegeben haben und dies daher in der derzeit aktiven Brieftasche nicht vermerkt ist.</translation>
</message>
<message>
<location line="+4"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
<translation>Fehler: Diese Transaktion benötigt aufgrund ihres Betrags, ihrer Komplexität oder der Nutzung kürzlich erhaltener Zahlungen eine Transaktionsgebühr in Höhe von mindestens %s!</translation>
</message>
<message>
<location line="+3"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation>Kommando ausführen wenn ein relevanter Alarm empfangen wird (%s im Kommando wird durch die Nachricht ersetzt)</translation>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Kommando ausführen wenn sich eine Transaktion der Briefrasche verändert (%s im Kommando wird durch die TxID ersetzt)</translation>
</message>
<message>
<location line="+11"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation>Maximale Größe von "high-priority/low-fee"-Transaktionen in Byte festlegen (Standard: 27000)</translation>
</message>
<message>
<location line="+6"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation>Dies ist eine Vorab-Testversion - Verwendung auf eigene Gefahr - nicht für Mining- oder Handelsanwendungen nutzen!</translation>
</message>
<message>
<location line="+5"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation>Warnung: -paytxfee ist auf einen sehr hohen Wert festgelegt! Dies ist die Gebühr die beim Senden einer Transaktion fällig wird.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation>Warnung: Angezeigte Transaktionen sind evtl. nicht korrekt! Sie oder die anderen Knoten müssen unter Umständen (den Client) aktualisieren.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
<translation>Warnung: Bitte korrigieren Sie die Datums- und Uhrzeiteinstellungen Ihres Computers, da Bitcoin ansonsten nicht ordnungsgemäß funktionieren wird!</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation>Warnung: Lesen von wallet.dat fehlgeschlagen! Alle Schlüssel wurden korrekt gelesen, Transaktionsdaten bzw. Adressbucheinträge fehlen aber möglicherweise oder sind inkorrekt.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation>Warnung: wallet.dat beschädigt, Rettung erfolgreich! Original wallet.dat wurde als wallet.{Zeitstempel}.dat in %s gespeichert. Falls Ihr Kontostand oder Transaktionen nicht korrekt sind, sollten Sie von einer Datensicherung wiederherstellen.</translation>
</message>
<message>
<location line="+14"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation>Versucht private Schlüssel aus einer beschädigten wallet.dat wiederherzustellen</translation>
</message>
<message>
<location line="+2"/>
<source>Block creation options:</source>
<translation>Blockerzeugungsoptionen:</translation>
</message>
<message>
<location line="+5"/>
<source>Connect only to the specified node(s)</source>
<translation>Nur mit dem/den angegebenen Knoten verbinden</translation>
</message>
<message>
<location line="+3"/>
<source>Corrupted block database detected</source>
<translation>Beschädigte Blockdatenbank erkannt</translation>
</message>
<message>
<location line="+1"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation>Eigene IP-Adresse erkennen (Standard: 1, wenn abgehört wird und nicht -externalip)</translation>
</message>
<message>
<location line="+1"/>
<source>Do you want to rebuild the block database now?</source>
<translation>Möchten Sie die Blockdatenbank nun neu aufbauen?</translation>
</message>
<message>
<location line="+2"/>
<source>Error initializing block database</source>
<translation>Fehler beim Initialisieren der Blockdatenbank</translation>
</message>
<message>
<location line="+1"/>
<source>Error initializing wallet database environment %s!</source>
<translation>Fehler beim Initialisieren der Brieftaschen-Datenbankumgebung %s!</translation>
</message>
<message>
<location line="+1"/>
<source>Error loading block database</source>
<translation>Fehler beim Laden der Blockdatenbank</translation>
</message>
<message>
<location line="+4"/>
<source>Error opening block database</source>
<translation>Fehler beim Öffnen der Blockdatenbank</translation>
</message>
<message>
<location line="+2"/>
<source>Error: Disk space is low!</source>
<translation>Fehler: Zu wenig freier Laufwerksspeicherplatz!</translation>
</message>
<message>
<location line="+1"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation>Fehler: Brieftasche gesperrt, Transaktion kann nicht erstellt werden!</translation>
</message>
<message>
<location line="+1"/>
<source>Error: system error: </source>
<translation>Fehler: Systemfehler: </translation>
</message>
<message>
<location line="+1"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation>Fehler, es konnte kein Port abgehört werden. Wenn dies so gewünscht wird -listen=0 verwenden.</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to read block info</source>
<translation>Lesen der Blockinformationen fehlgeschlagen</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to read block</source>
<translation>Lesen des Blocks fehlgeschlagen</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to sync block index</source>
<translation>Synchronisation des Blockindex fehlgeschlagen</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block index</source>
<translation>Schreiben des Blockindex fehlgeschlagen</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block info</source>
<translation>Schreiben der Blockinformationen fehlgeschlagen</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block</source>
<translation>Schreiben des Blocks fehlgeschlagen</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write file info</source>
<translation>Schreiben der Dateiinformationen fehlgeschlagen</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write to coin database</source>
<translation>Schreiben in die Münzendatenbank fehlgeschlagen</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write transaction index</source>
<translation>Schreiben des Transaktionsindex fehlgeschlagen</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write undo data</source>
<translation>Schreiben der Rücksetzdaten fehlgeschlagen</translation>
</message>
<message>
<location line="+2"/>
<source>Find peers using DNS lookup (default: 1 unless -connect)</source>
<translation>Gegenstellen via DNS-Namensauflösung finden (Standard: 1, außer bei -connect)</translation>
</message>
<message>
<location line="+1"/>
<source>Generate coins (default: 0)</source>
<translation>Bitcoins generieren (Standard: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 288, 0 = all)</source>
<translation>Wieviele Blöcke sollen beim Starten geprüft werden (Standard: 288, 0 = alle)</translation>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-4, default: 3)</source>
<translation>Wie gründlich soll die Blockprüfung sein (0-4, Standard: 3)</translation>
</message>
<message>
<location line="+19"/>
<source>Not enough file descriptors available.</source>
<translation>Nicht genügend File-Deskriptoren verfügbar.</translation>
</message>
<message>
<location line="+8"/>
<source>Rebuild block chain index from current blk000??.dat files</source>
<translation>Blockkettenindex aus aktuellen Dateien blk000??.dat wiederaufbauen</translation>
</message>
<message>
<location line="+16"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation>Maximale Anzahl an Threads zur Verarbeitung von RPC-Anfragen festlegen (Standard: 4)</translation>
</message>
<message>
<location line="+26"/>
<source>Verifying blocks...</source>
<translation>Verifiziere Blöcke...</translation>
</message>
<message>
<location line="+1"/>
<source>Verifying wallet...</source>
<translation>Verifiziere Brieftasche...</translation>
</message>
<message>
<location line="-69"/>
<source>Imports blocks from external blk000??.dat file</source>
<translation>Blöcke aus externer Datei blk000??.dat importieren</translation>
</message>
<message>
<location line="-76"/>
<source>Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)</source>
<translation>Maximale Anzahl an Skript-Verifizierungs-Threads festlegen (bis zu 16, 0 = automatisch, <0 = soviele Kerne frei lassen, Standard: 0)</translation>
</message>
<message>
<location line="+77"/>
<source>Information</source>
<translation>Hinweis</translation>
</message>
<message>
<location line="+3"/>
<source>Invalid -tor address: '%s'</source>
<translation>Ungültige Adresse in -tor: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -minrelaytxfee=<amount>: '%s'</source>
<translation>Ungültiger Betrag für -minrelaytxfee=<amount>: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -mintxfee=<amount>: '%s'</source>
<translation>Ungültiger Betrag für -mintxfee=<amount>: '%s'</translation>
</message>
<message>
<location line="+8"/>
<source>Maintain a full transaction index (default: 0)</source>
<translation>Einen vollständigen Transaktionsindex pflegen (Standard: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation>Maximale Größe, <n> * 1000 Byte, des Empfangspuffers pro Verbindung (Standard: 5000)</translation>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation>Maximale Größe, <n> * 1000 Byte, des Sendepuffers pro Verbindung (Standard: 1000)</translation>
</message>
<message>
<location line="+2"/>
<source>Only accept block chain matching built-in checkpoints (default: 1)</source>
<translation>Blockkette nur akzeptieren, wenn sie mit den integrierten Prüfpunkten übereinstimmt (Standard: 1)</translation>
</message>
<message>
<location line="+1"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation>Verbinde nur zu Knoten des Netztyps <net> (IPv4, IPv6 oder Tor)</translation>
</message>
<message>
<location line="+2"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation>Ausgabe zusätzlicher Debugginginformationen. Beinhaltet alle anderen "-debug*"-Parameter</translation>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation>Ausgabe zusätzlicher Netzwerk-Debugginginformationen</translation>
</message>
<message>
<location line="+2"/>
<source>Prepend debug output with timestamp</source>
<translation>Der Debugausgabe einen Zeitstempel voranstellen</translation>
</message>
<message>
<location line="+5"/>
<source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
<translation>SSL-Optionen: (siehe Bitcoin-Wiki für SSL-Installationsanweisungen)</translation>
</message>
<message>
<location line="+1"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation>SOCKS-Version des Proxies festlegen (4-5, Standard: 5)</translation>
</message>
<message>
<location line="+3"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Rückverfolgungs- und Debuginformationen an die Konsole senden anstatt sie in die Datei debug.log zu schreiben</translation>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation>Rückverfolgungs- und Debuginformationen an den Debugger senden</translation>
</message>
<message>
<location line="+5"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation>Maximale Blockgröße in Byte festlegen (Standard: 250000)</translation>
</message>
<message>
<location line="+1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation>Minimale Blockgröße in Byte festlegen (Standard: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation>Verkleinere Datei debug.log beim Start des Clients (Standard: 1, wenn kein -debug)</translation>
</message>
<message>
<location line="+1"/>
<source>Signing transaction failed</source>
<translation>Signierung der Transaktion fehlgeschlagen</translation>
</message>
<message>
<location line="+2"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation>Verbindungstimeout in Millisekunden festlegen (Standard: 5000)</translation>
</message>
<message>
<location line="+4"/>
<source>System error: </source>
<translation>Systemfehler: </translation>
</message>
<message>
<location line="+4"/>
<source>Transaction amount too small</source>
<translation>Transaktionsbetrag zu gering</translation>
</message>
<message>
<location line="+1"/>
<source>Transaction amounts must be positive</source>
<translation>Transaktionsbeträge müssen positiv sein</translation>
</message>
<message>
<location line="+1"/>
<source>Transaction too large</source>
<translation>Transaktion zu groß</translation>
</message>
<message>
<location line="+7"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation>UPnP verwenden, um die Portweiterleitung einzurichten (Standard: 0)</translation>
</message>
<message>
<location line="+1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation>UPnP verwenden, um die Portweiterleitung einzurichten (Standard: 1, wenn abgehört wird)</translation>
</message>
<message>
<location line="+1"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation>Proxy verwenden, um versteckte Tor-Dienste zu erreichen (Standard: identisch mit -proxy)</translation>
</message>
<message>
<location line="+2"/>
<source>Username for JSON-RPC connections</source>
<translation>Benutzername für JSON-RPC-Verbindungen</translation>
</message>
<message>
<location line="+4"/>
<source>Warning</source>
<translation>Warnung</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation>Warnung: Diese Version is veraltet, Aktualisierung erforderlich!</translation>
</message>
<message>
<location line="+1"/>
<source>You need to rebuild the databases using -reindex to change -txindex</source>
<translation>Sie müssen die Datenbank mit Hilfe von -reindex neu aufbauen, um -txindex zu verändern.</translation>
</message>
<message>
<location line="+1"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat beschädigt, Rettung fehlgeschlagen</translation>
</message>
<message>
<location line="-50"/>
<source>Password for JSON-RPC connections</source>
<translation>Passwort für JSON-RPC-Verbindungen</translation>
</message>
<message>
<location line="-67"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation>JSON-RPC-Verbindungen von der angegebenen IP-Adresse erlauben</translation>
</message>
<message>
<location line="+76"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation>Sende Befehle an Knoten <ip> (Standard: 127.0.0.1)</translation>
</message>
<message>
<location line="-120"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation>Kommando ausführen wenn der beste Block wechselt (%s im Kommando wird durch den Hash des Blocks ersetzt)</translation>
</message>
<message>
<location line="+147"/>
<source>Upgrade wallet to latest format</source>
<translation>Brieftasche auf das neueste Format aktualisieren</translation>
</message>
<message>
<location line="-21"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation>Größe des Schlüsselpools festlegen auf <n> (Standard: 100)</translation>
</message>
<message>
<location line="-12"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation>Blockkette erneut nach fehlenden Transaktionen der Brieftasche durchsuchen</translation>
</message>
<message>
<location line="+35"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation>OpenSSL (https) für JSON-RPC-Verbindungen verwenden</translation>
</message>
<message>
<location line="-26"/>
<source>Server certificate file (default: server.cert)</source>
<translation>Serverzertifikat (Standard: server.cert)</translation>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation>Privater Serverschlüssel (Standard: server.pem)</translation>
</message>
<message>
<location line="-151"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation>Akzeptierte Chiffren (Standard: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation>
</message>
<message>
<location line="+165"/>
<source>This help message</source>
<translation>Dieser Hilfetext</translation>
</message>
<message>
<location line="+6"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation>Kann auf diesem Computer nicht an %s binden (von bind zurückgegebener Fehler %d, %s)</translation>
</message>
<message>
<location line="-91"/>
<source>Connect through socks proxy</source>
<translation>Verbindung über SOCKS-Proxy herstellen</translation>
</message>
<message>
<location line="-10"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation>Erlaube DNS-Namensauflösung für -addnode, -seednode und -connect</translation>
</message>
<message>
<location line="+55"/>
<source>Loading addresses...</source>
<translation>Lade Adressen...</translation>
</message>
<message>
<location line="-35"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation>Fehler beim Laden von wallet.dat: Brieftasche beschädigt</translation>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
<translation>Fehler beim Laden von wallet.dat: Brieftasche benötigt neuere Version von Bitcoin</translation>
</message>
<message>
<location line="+93"/>
<source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
<translation>Brieftasche musste neu geschrieben werden: Starten Sie Bitcoin zur Fertigstellung neu</translation>
</message>
<message>
<location line="-95"/>
<source>Error loading wallet.dat</source>
<translation>Fehler beim Laden von wallet.dat (Brieftasche)</translation>
</message>
<message>
<location line="+28"/>
<source>Invalid -proxy address: '%s'</source>
<translation>Ungültige Adresse in -proxy: '%s'</translation>
</message>
<message>
<location line="+56"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Unbekannter Netztyp in -onlynet angegeben: '%s'</translation>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation>Unbekannte Proxyversion in -socks angefordert: %i</translation>
</message>
<message>
<location line="-96"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation>Kann Adresse in -bind nicht auflösen: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation>Kann Adresse in -externalip nicht auflösen: '%s'</translation>
</message>
<message>
<location line="+44"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation>Ungültiger Betrag für -paytxfee=<amount>: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount</source>
<translation>Ungültiger Betrag</translation>
</message>
<message>
<location line="-6"/>
<source>Insufficient funds</source>
<translation>Unzureichender Kontostand</translation>
</message>
<message>
<location line="+10"/>
<source>Loading block index...</source>
<translation>Lade Blockindex...</translation>
</message>
<message>
<location line="-57"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation>Mit dem Knoten verbinden und versuchen die Verbindung aufrecht zu halten</translation>
</message>
<message>
<location line="-25"/>
<source>Unable to bind to %s on this computer. Bitcoin is probably already running.</source>
<translation>Kann auf diesem Computer nicht an %s binden. Evtl. wurde Bitcoin bereits gestartet.</translation>
</message>
<message>
<location line="+64"/>
<source>Fee per KB to add to transactions you send</source>
<translation>Gebühr pro KB, die gesendeten Transaktionen hinzugefügt wird</translation>
</message>
<message>
<location line="+19"/>
<source>Loading wallet...</source>
<translation>Lade Brieftasche...</translation>
</message>
<message>
<location line="-52"/>
<source>Cannot downgrade wallet</source>
<translation>Brieftasche kann nicht auf eine ältere Version herabgestuft werden</translation>
</message>
<message>
<location line="+3"/>
<source>Cannot write default address</source>
<translation>Standardadresse kann nicht geschrieben werden</translation>
</message>
<message>
<location line="+64"/>
<source>Rescanning...</source>
<translation>Durchsuche erneut...</translation>
</message>
<message>
<location line="-57"/>
<source>Done loading</source>
<translation>Laden abgeschlossen</translation>
</message>
<message>
<location line="+82"/>
<source>To use the %s option</source>
<translation>Zur Nutzung der %s Option</translation>
</message>
<message>
<location line="-74"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
<message>
<location line="-31"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation>Sie müssen den Wert rpcpassword=<passwort> in der Konfigurationsdatei angeben:
%s
Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer.</translation>
</message>
</context>
</TS> | mit |
braz/mojito-helloworld | node_modules/mojito/node_modules/yui/axis-numeric/axis-numeric-debug.js | 5535 | YUI.add('axis-numeric', function (Y, NAME) {
/**
* Provides functionality for drawing a numeric axis for use with a chart.
*
* @module charts
* @submodule axis-numeric
*/
Y_Lang = Y.Lang;
/**
* NumericAxis draws a numeric axis.
*
* @class NumericAxis
* @constructor
* @extends Axis
* @uses NumericImpl
* @param {Object} config (optional) Configuration parameters.
* @submodule axis-numeric
*/
Y.NumericAxis = Y.Base.create("numericAxis", Y.Axis, [Y.NumericImpl], {
/**
* Calculates and returns a value based on the number of labels and the index of
* the current label.
*
* @method getLabelByIndex
* @param {Number} i Index of the label.
* @param {Number} l Total number of labels.
* @return String
* @private
*/
_getLabelByIndex: function(i, l)
{
var min = this.get("minimum"),
max = this.get("maximum"),
increm = (max - min)/(l-1),
label,
roundingMethod = this.get("roundingMethod");
l -= 1;
//respect the min and max. calculate all other labels.
if(i === 0)
{
label = min;
}
else if(i === l)
{
label = max;
}
else
{
label = (i * increm);
if(roundingMethod === "niceNumber")
{
label = this._roundToNearest(label, increm);
}
label += min;
}
return parseFloat(label);
},
/**
* Calculates points based off the majorUnit count or distance of the Axis.
*
* @method _getPoints
* @param {Object} startPoint An object literal containing the x and y coordinates of the first
* point on the axis.
* @param {Number} len The number of points on an axis.
* @param {Number} edgeOffset The distance from the start of the axis and the point.
* @param {Number} majorUnitDistance The distance between points on an axis.
* @param {String} direction Indicates whether the axis is horizontal or vertical.
* @return Array
* @private
*/
_getPoints: function(startPoint, len, edgeOffset, majorUnitDistance, direction)
{
var points = Y.NumericAxis.superclass._getPoints.apply(this, arguments);
if(direction === "vertical")
{
points.reverse();
}
return points;
},
/**
* Calculates the position of ticks and labels based on an array of specified label values. Returns
* an object containing an array of values to be used for labels and an array of objects containing
* x and y coordinates for each label.
*
* @method _getDataFromLabelValues
* @param {Object} startPoint An object containing the x and y coordinates for the start of the axis.
* @param {Array} labelValues An array containing values to be used for determining the number and
* position of labels and ticks on the axis.
* @param {Number} edgeOffset The distance, in pixels, on either edge of the axis.
* @param {Number} layoutLength The length, in pixels, of the axis. If the axis is vertical, the length
* is equal to the height. If the axis is horizontal, the length is equal to the width.
* @return Object
* @private
*/
_getDataFromLabelValues: function(startPoint, labelValues, edgeOffset, layoutLength, direction)
{
var points = [],
labelValue,
i,
len = labelValues.length,
staticCoord,
dynamicCoord,
constantVal,
newPoint,
max = this.get("maximum"),
min = this.get("minimum"),
values = [],
scaleFactor = (layoutLength - (edgeOffset * 2)) / (max - min);
if(direction === "vertical")
{
staticCoord = "x";
dynamicCoord = "y";
}
else
{
staticCoord = "y";
dynamicCoord = "x";
}
constantVal = startPoint[staticCoord];
for(i = 0; i < len; i = i + 1)
{
labelValue = labelValues[i];
if(Y.Lang.isNumber(labelValue) && labelValue >= min && labelValue <= max)
{
newPoint = {};
newPoint[staticCoord] = constantVal;
newPoint[dynamicCoord] = (layoutLength - edgeOffset) - (labelValue - min) * scaleFactor;
points.push(newPoint);
values.push(labelValue);
}
}
return {
points: points,
values: values
};
},
/**
* Checks to see if data extends beyond the range of the axis. If so,
* that data will need to be hidden. This method is internal, temporary and subject
* to removal in the future.
*
* @method _hasDataOverflow
* @protected
* @return Boolean
*/
_hasDataOverflow: function()
{
var roundingMethod,
min,
max;
if(this.get("setMin") || this.get("setMax"))
{
return true;
}
roundingMethod = this.get("roundingMethod");
min = this._actualMinimum;
max = this._actualMaximum;
if(Y_Lang.isNumber(roundingMethod) &&
((Y_Lang.isNumber(max) && max > this._dataMaximum) || (Y_Lang.isNumber(min) && min < this._dataMinimum)))
{
return true;
}
return false;
}
});
}, '3.10.3', {"requires": ["axis", "axis-numeric-base"]});
| mit |
olszak94/DevAAC | DevAAC/Models/Account.php | 4378 | <?php
/**
* DevAAC
*
* Automatic Account Creator by developers.pl for TFS 1.0
*
*
* LICENSE: 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 DevAAC
* @author Daniel Speichert <daniel@speichert.pl>
* @author Wojciech Guziak <wojciech@guziak.net>
* @copyright 2014 Developers.pl
* @license http://opensource.org/licenses/MIT MIT
* @version master
* @link https://github.com/DevelopersPL/DevAAC
*/
namespace DevAAC\Models;
use DevAAC\Helpers\DateTime;
// https://github.com/illuminate/database/blob/master/Eloquent/Model.php
// https://github.com/otland/forgottenserver/blob/master/schema.sql
/**
* @SWG\Model(required="['name','password','email']")
*/
class Account extends \Illuminate\Database\Eloquent\Model {
/**
* @SWG\Property(name="id", type="integer")
* @SWG\Property(name="name", type="string")
* @SWG\Property(name="password", type="SHA1 hash")
* @SWG\Property(name="type", type="integer")
* @SWG\Property(name="premdays", type="integer")
* @SWG\Property(name="lastday", type="integer")
* @SWG\Property(name="email", type="string")
* @SWG\Property(name="creation", type="DateTime::ISO8601")
*/
public $timestamps = false;
protected $guarded = array('id');
protected $attributes = array(
'type' => 1,
'premdays' => 0,
'lastday' => 0
);
public function getCreationAttribute()
{
$date = new DateTime();
$date->setTimestamp($this->attributes['creation']);
return $date;
}
public function setCreationAttribute($d)
{
if($d instanceof \DateTime)
$this->attributes['creation'] = $d->getTimestamp();
elseif((int) $d != (string) $d) { // it's not a UNIX timestamp
$dt = new DateTime($d);
$this->attributes['creation'] = $dt->getTimestamp();
} else // it is a UNIX timestamp
$this->attributes['creation'] = $d;
}
public function players()
{
return $this->hasMany('DevAAC\Models\Player');
}
public function setPasswordAttribute($pass)
{
if( !filter_var($pass, FILTER_VALIDATE_REGEXP,
array("options" => array("regexp" => "/^[0-9a-f]{40}$/i"))) )
$pass = sha1($pass);
$this->attributes['password'] = $pass;
}
public function comparePassword($pass)
{
return $this->password === sha1($pass);
}
public function isGod()
{
return $this->type >= ACCOUNT_TYPE_GOD;
}
public function isGameMaster()
{
return $this->type >= ACCOUNT_TYPE_GAMEMASTER;
}
public function isSeniorTutor()
{
return $this->type >= ACCOUNT_TYPE_SENIORTUTOR;
}
public function isTutor()
{
return $this->type >= ACCOUNT_TYPE_TUTOR;
}
public function ban()
{
return $this->hasOne('DevAAC\Models\AccountBan');
}
public function banHistory()
{
return $this->hasMany('DevAAC\Models\AccountBanHistory');
}
public function houses()
{
return $this->hasManyThrough('DevAAC\Models\House', 'DevAAC\Models\Player', 'account_id', 'owner');
}
public function houseBids()
{
return $this->hasManyThrough('DevAAC\Models\House', 'DevAAC\Models\Player', 'account_id', 'highest_bidder');
}
}
| mit |
sigaind/cupon | vendor/sonata-project/admin-bundle/Sonata/AdminBundle/Security/Handler/AclSecurityHandler.php | 8472 | <?php
/*
* This file is part of the Sonata project.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\AdminBundle\Security\Handler;
use Symfony\Component\Security\Core\SecurityContextInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException;
use Symfony\Component\Security\Acl\Model\MutableAclProviderInterface;
use Symfony\Component\Security\Acl\Model\AclInterface;
use Symfony\Component\Security\Acl\Domain\ObjectIdentity;
use Symfony\Component\Security\Acl\Model\ObjectIdentityInterface;
use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity;
use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity;
use Symfony\Component\Security\Acl\Exception\AclNotFoundException;
use Symfony\Component\Security\Acl\Exception\NotAllAclsFoundException;
use Sonata\AdminBundle\Admin\AdminInterface;
class AclSecurityHandler implements AclSecurityHandlerInterface
{
protected $securityContext;
protected $aclProvider;
protected $superAdminRoles;
protected $adminPermissions;
protected $objectPermissions;
protected $maskBuilderClass;
/**
* @param \Symfony\Component\Security\Core\SecurityContextInterface $securityContext
* @param \Symfony\Component\Security\Acl\Model\MutableAclProviderInterface $aclProvider
* @param string $maskBuilderClass
* @param array $superAdminRoles
*/
public function __construct(SecurityContextInterface $securityContext, MutableAclProviderInterface $aclProvider, $maskBuilderClass, array $superAdminRoles)
{
$this->securityContext = $securityContext;
$this->aclProvider = $aclProvider;
$this->maskBuilderClass = $maskBuilderClass;
$this->superAdminRoles = $superAdminRoles;
}
/**
* {@inheritDoc}
*/
public function setAdminPermissions(array $permissions)
{
$this->adminPermissions = $permissions;
}
/**
* {@inheritDoc}
*/
public function getAdminPermissions()
{
return $this->adminPermissions;
}
/**
* {@inheritDoc}
*/
public function setObjectPermissions(array $permissions)
{
$this->objectPermissions = $permissions;
}
/**
* {@inheritDoc}
*/
public function getObjectPermissions()
{
return $this->objectPermissions;
}
/**
* {@inheritDoc}
*/
public function isGranted(AdminInterface $admin, $attributes, $object = null)
{
if (!is_array($attributes)) {
$attributes = array($attributes);
}
try {
return $this->securityContext->isGranted($this->superAdminRoles) || $this->securityContext->isGranted($attributes, $object);
} catch (AuthenticationCredentialsNotFoundException $e) {
return false;
} catch (\Exception $e) {
throw $e;
}
}
/**
* {@inheritDoc}
*/
public function getBaseRole(AdminInterface $admin)
{
return 'ROLE_' . str_replace('.', '_', strtoupper($admin->getCode())) . '_%s';
}
/**
* {@inheritDoc}
*/
public function buildSecurityInformation(AdminInterface $admin)
{
$baseRole = $this->getBaseRole($admin);
$results = array();
foreach ($admin->getSecurityInformation() as $role => $permissions) {
$results[sprintf($baseRole, $role)] = $permissions;
}
return $results;
}
/**
* {@inheritDoc}
*/
public function createObjectSecurity(AdminInterface $admin, $object)
{
// retrieving the ACL for the object identity
$objectIdentity = ObjectIdentity::fromDomainObject($object);
$acl = $this->getObjectAcl($objectIdentity);
if (is_null($acl)) {
$acl = $this->createAcl($objectIdentity);
}
// retrieving the security identity of the currently logged-in user
$user = $this->securityContext->getToken()->getUser();
$securityIdentity = UserSecurityIdentity::fromAccount($user);
$this->addObjectOwner($acl, $securityIdentity);
$this->addObjectClassAces($acl, $this->buildSecurityInformation($admin));
$this->updateAcl($acl);
}
/**
* {@inheritDoc}
*/
public function deleteObjectSecurity(AdminInterface $admin, $object)
{
$objectIdentity = ObjectIdentity::fromDomainObject($object);
$this->deleteAcl($objectIdentity);
}
/**
* {@inheritDoc}
*/
public function getObjectAcl(ObjectIdentityInterface $objectIdentity)
{
try {
$acl = $this->aclProvider->findAcl($objectIdentity);
} catch (AclNotFoundException $e) {
return null;
}
return $acl;
}
/**
* {@inheritDoc}
*/
public function findObjectAcls(array $oids, array $sids = array())
{
try {
$acls = $this->aclProvider->findAcls($oids, $sids);
} catch (\Exception $e) {
if ($e instanceof NotAllAclsFoundException) {
$acls = $e->getPartialResult();
} elseif ($e instanceof AclNotFoundException) {
// if only one oid, this error is thrown
$acls = new \SplObjectStorage();
} else {
throw $e;
}
}
return $acls;
}
/**
* {@inheritDoc}
*/
public function addObjectOwner(AclInterface $acl, UserSecurityIdentity $securityIdentity = null)
{
if (false === $this->findClassAceIndexByUsername($acl, $securityIdentity->getUsername())) {
// only add if not already exists
$acl->insertObjectAce($securityIdentity, constant("$this->maskBuilderClass::MASK_OWNER"));
}
}
/**
* {@inheritDoc}
*/
public function addObjectClassAces(AclInterface $acl, array $roleInformation = array())
{
$builder = new $this->maskBuilderClass();
foreach ($roleInformation as $role => $permissions) {
$aceIndex = $this->findClassAceIndexByRole($acl, $role);
$hasRole = false;
foreach ($permissions as $permission) {
// add only the object permissions
if (in_array($permission, $this->getObjectPermissions())) {
$builder->add($permission);
$hasRole = true;
}
}
if ($hasRole) {
if ($aceIndex === false) {
$acl->insertClassAce(new RoleSecurityIdentity($role), $builder->get());
} else {
$acl->updateClassAce($aceIndex, $builder->get());
}
$builder->reset();
} elseif ($aceIndex !== false) {
$acl->deleteClassAce($aceIndex);
}
}
}
/**
* {@inheritDoc}
*/
public function createAcl(ObjectIdentityInterface $objectIdentity)
{
return $this->aclProvider->createAcl($objectIdentity);
}
/**
* {@inheritDoc}
*/
public function updateAcl(AclInterface $acl)
{
$this->aclProvider->updateAcl($acl);
}
/**
* {@inheritDoc}
*/
public function deleteAcl(ObjectIdentityInterface $objectIdentity)
{
$this->aclProvider->deleteAcl($objectIdentity);
}
/**
* {@inheritDoc}
*/
public function findClassAceIndexByRole(AclInterface $acl, $role)
{
foreach ($acl->getClassAces() as $index => $entry) {
if ($entry->getSecurityIdentity() instanceof RoleSecurityIdentity && $entry->getSecurityIdentity()->getRole() === $role) {
return $index;
}
}
return false;
}
/**
* {@inheritDoc}
*/
public function findClassAceIndexByUsername(AclInterface $acl, $username)
{
foreach ($acl->getClassAces() as $index => $entry) {
if ($entry->getSecurityIdentity() instanceof UserSecurityIdentity && $entry->getSecurityIdentity()->getUsername() === $username) {
return $index;
}
}
return false;
}
} | mit |
timrobinson/NPackage | src/UnitTests/Properties/AssemblyInfo.cs | 1394 | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("UnitTests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("UnitTests")]
[assembly: AssemblyCopyright("Copyright © 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("8c5a9ad3-ba5a-49f4-a519-11364ce1e4d7")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| mit |
ld-test/gimlet-cocktail | gimlet/logger.lua | 499 | local ft
ft = function(t)
return os.date("%F %T", t)
end
local Logger
Logger = function(log)
return function(p)
local start = p.utils.now()
log:write(string.format("%s - Started %s %s\n", ft(start), p.request.method, p.request.url_path))
p = coroutine.yield()
return log:write(string.format("%s - Completed %s %s (%d) in %.4f seconds\n", ft(p.utils.now()), p.request.method, p.request.url_path, p.response:status(), p.utils.now() - start))
end
end
return {
Logger = Logger
}
| mit |
jeremyrussell/ionic | js/angular/controller/sideMenuController.js | 12690 | IonicModule
.controller('$ionicSideMenus', [
'$scope',
'$attrs',
'$ionicSideMenuDelegate',
'$ionicPlatform',
'$ionicBody',
'$ionicHistory',
'$ionicScrollDelegate',
function($scope, $attrs, $ionicSideMenuDelegate, $ionicPlatform, $ionicBody, $ionicHistory, $ionicScrollDelegate) {
var self = this;
var rightShowing, leftShowing, isDragging;
var startX, lastX, offsetX, isAsideExposed;
var enableMenuWithBackViews = true;
self.$scope = $scope;
self.initialize = function(options) {
self.left = options.left;
self.right = options.right;
self.setContent(options.content);
self.dragThresholdX = options.dragThresholdX || 10;
$ionicHistory.registerHistory(self.$scope);
};
/**
* Set the content view controller if not passed in the constructor options.
*
* @param {object} content
*/
self.setContent = function(content) {
if (content) {
self.content = content;
self.content.onDrag = function(e) {
self._handleDrag(e);
};
self.content.endDrag = function(e) {
self._endDrag(e);
};
}
};
self.isOpenLeft = function() {
return self.getOpenAmount() > 0;
};
self.isOpenRight = function() {
return self.getOpenAmount() < 0;
};
/**
* Toggle the left menu to open 100%
*/
self.toggleLeft = function(shouldOpen) {
if (isAsideExposed || !self.left.isEnabled) return;
var openAmount = self.getOpenAmount();
if (arguments.length === 0) {
shouldOpen = openAmount <= 0;
}
self.content.enableAnimation();
if (!shouldOpen) {
self.openPercentage(0);
} else {
self.openPercentage(100);
}
};
/**
* Toggle the right menu to open 100%
*/
self.toggleRight = function(shouldOpen) {
if (isAsideExposed || !self.right.isEnabled) return;
var openAmount = self.getOpenAmount();
if (arguments.length === 0) {
shouldOpen = openAmount >= 0;
}
self.content.enableAnimation();
if (!shouldOpen) {
self.openPercentage(0);
} else {
self.openPercentage(-100);
}
};
self.toggle = function(side) {
if (side == 'right') {
self.toggleRight();
} else {
self.toggleLeft();
}
};
/**
* Close all menus.
*/
self.close = function() {
self.openPercentage(0);
};
/**
* @return {float} The amount the side menu is open, either positive or negative for left (positive), or right (negative)
*/
self.getOpenAmount = function() {
return self.content && self.content.getTranslateX() || 0;
};
/**
* @return {float} The ratio of open amount over menu width. For example, a
* menu of width 100 open 50 pixels would be open 50% or a ratio of 0.5. Value is negative
* for right menu.
*/
self.getOpenRatio = function() {
var amount = self.getOpenAmount();
if (amount >= 0) {
return amount / self.left.width;
}
return amount / self.right.width;
};
self.isOpen = function() {
return self.getOpenAmount() !== 0;
};
/**
* @return {float} The percentage of open amount over menu width. For example, a
* menu of width 100 open 50 pixels would be open 50%. Value is negative
* for right menu.
*/
self.getOpenPercentage = function() {
return self.getOpenRatio() * 100;
};
/**
* Open the menu with a given percentage amount.
* @param {float} percentage The percentage (positive or negative for left/right) to open the menu.
*/
self.openPercentage = function(percentage) {
var p = percentage / 100;
if (self.left && percentage >= 0) {
self.openAmount(self.left.width * p);
} else if (self.right && percentage < 0) {
var maxRight = self.right.width;
self.openAmount(self.right.width * p);
}
// add the CSS class "menu-open" if the percentage does not
// equal 0, otherwise remove the class from the body element
$ionicBody.enableClass((percentage !== 0), 'menu-open');
freezeAllScrolls(false);
};
function freezeAllScrolls(shouldFreeze) {
if (shouldFreeze && !self.isScrollFreeze) {
$ionicScrollDelegate.freezeAllScrolls(shouldFreeze);
} else if (!shouldFreeze && self.isScrollFreeze) {
$ionicScrollDelegate.freezeAllScrolls(false);
}
self.isScrollFreeze = shouldFreeze;
}
/**
* Open the menu the given pixel amount.
* @param {float} amount the pixel amount to open the menu. Positive value for left menu,
* negative value for right menu (only one menu will be visible at a time).
*/
self.openAmount = function(amount) {
var maxLeft = self.left && self.left.width || 0;
var maxRight = self.right && self.right.width || 0;
// Check if we can move to that side, depending if the left/right panel is enabled
if (!(self.left && self.left.isEnabled) && amount > 0) {
self.content.setTranslateX(0);
return;
}
if (!(self.right && self.right.isEnabled) && amount < 0) {
self.content.setTranslateX(0);
return;
}
if (leftShowing && amount > maxLeft) {
self.content.setTranslateX(maxLeft);
return;
}
if (rightShowing && amount < -maxRight) {
self.content.setTranslateX(-maxRight);
return;
}
self.content.setTranslateX(amount);
if (amount >= 0) {
leftShowing = true;
rightShowing = false;
if (amount > 0) {
// Push the z-index of the right menu down
self.right && self.right.pushDown && self.right.pushDown();
// Bring the z-index of the left menu up
self.left && self.left.bringUp && self.left.bringUp();
}
} else {
rightShowing = true;
leftShowing = false;
// Bring the z-index of the right menu up
self.right && self.right.bringUp && self.right.bringUp();
// Push the z-index of the left menu down
self.left && self.left.pushDown && self.left.pushDown();
}
};
/**
* Given an event object, find the final resting position of this side
* menu. For example, if the user "throws" the content to the right and
* releases the touch, the left menu should snap open (animated, of course).
*
* @param {Event} e the gesture event to use for snapping
*/
self.snapToRest = function(e) {
// We want to animate at the end of this
self.content.enableAnimation();
isDragging = false;
// Check how much the panel is open after the drag, and
// what the drag velocity is
var ratio = self.getOpenRatio();
if (ratio === 0) {
// Just to be safe
self.openPercentage(0);
return;
}
var velocityThreshold = 0.3;
var velocityX = e.gesture.velocityX;
var direction = e.gesture.direction;
// Going right, less than half, too slow (snap back)
if (ratio > 0 && ratio < 0.5 && direction == 'right' && velocityX < velocityThreshold) {
self.openPercentage(0);
}
// Going left, more than half, too slow (snap back)
else if (ratio > 0.5 && direction == 'left' && velocityX < velocityThreshold) {
self.openPercentage(100);
}
// Going left, less than half, too slow (snap back)
else if (ratio < 0 && ratio > -0.5 && direction == 'left' && velocityX < velocityThreshold) {
self.openPercentage(0);
}
// Going right, more than half, too slow (snap back)
else if (ratio < 0.5 && direction == 'right' && velocityX < velocityThreshold) {
self.openPercentage(-100);
}
// Going right, more than half, or quickly (snap open)
else if (direction == 'right' && ratio >= 0 && (ratio >= 0.5 || velocityX > velocityThreshold)) {
self.openPercentage(100);
}
// Going left, more than half, or quickly (span open)
else if (direction == 'left' && ratio <= 0 && (ratio <= -0.5 || velocityX > velocityThreshold)) {
self.openPercentage(-100);
}
// Snap back for safety
else {
self.openPercentage(0);
}
};
self.enableMenuWithBackViews = function(val) {
if (arguments.length) {
enableMenuWithBackViews = !!val;
}
return enableMenuWithBackViews;
};
self.isAsideExposed = function() {
return !!isAsideExposed;
};
self.exposeAside = function(shouldExposeAside) {
if (!(self.left && self.left.isEnabled) && !(self.right && self.right.isEnabled)) return;
self.close();
isAsideExposed = shouldExposeAside;
if (self.left && self.left.isEnabled) {
// set the left marget width if it should be exposed
// otherwise set false so there's no left margin
self.content.setMarginLeft(isAsideExposed ? self.left.width : 0);
} else if (self.right && self.right.isEnabled) {
self.content.setMarginRight(isAsideExposed ? self.right.width : 0);
}
self.$scope.$emit('$ionicExposeAside', isAsideExposed);
};
self.activeAsideResizing = function(isResizing) {
$ionicBody.enableClass(isResizing, 'aside-resizing');
};
// End a drag with the given event
self._endDrag = function(e) {
freezeAllScrolls(false);
if (isAsideExposed) return;
if (isDragging) {
self.snapToRest(e);
}
startX = null;
lastX = null;
offsetX = null;
};
// Handle a drag event
self._handleDrag = function(e) {
if (isAsideExposed || !$scope.dragContent) return;
// If we don't have start coords, grab and store them
if (!startX) {
startX = e.gesture.touches[0].pageX;
lastX = startX;
} else {
// Grab the current tap coords
lastX = e.gesture.touches[0].pageX;
}
// Calculate difference from the tap points
if (!isDragging && Math.abs(lastX - startX) > self.dragThresholdX) {
// if the difference is greater than threshold, start dragging using the current
// point as the starting point
startX = lastX;
isDragging = true;
// Initialize dragging
self.content.disableAnimation();
offsetX = self.getOpenAmount();
}
if (isDragging) {
self.openAmount(offsetX + (lastX - startX));
freezeAllScrolls(true);
}
};
self.canDragContent = function(canDrag) {
if (arguments.length) {
$scope.dragContent = !!canDrag;
}
return $scope.dragContent;
};
self.edgeThreshold = 25;
self.edgeThresholdEnabled = false;
self.edgeDragThreshold = function(value) {
if (arguments.length) {
if (isNumber(value) && value > 0) {
self.edgeThreshold = value;
self.edgeThresholdEnabled = true;
} else {
self.edgeThresholdEnabled = !!value;
}
}
return self.edgeThresholdEnabled;
};
self.isDraggableTarget = function(e) {
//Only restrict edge when sidemenu is closed and restriction is enabled
var shouldOnlyAllowEdgeDrag = self.edgeThresholdEnabled && !self.isOpen();
var startX = e.gesture.startEvent && e.gesture.startEvent.center &&
e.gesture.startEvent.center.pageX;
var dragIsWithinBounds = !shouldOnlyAllowEdgeDrag ||
startX <= self.edgeThreshold ||
startX >= self.content.element.offsetWidth - self.edgeThreshold;
var backView = $ionicHistory.backView();
var menuEnabled = enableMenuWithBackViews ? true : !backView;
if (!menuEnabled) {
var currentView = $ionicHistory.currentView() || {};
return backView.historyId !== currentView.historyId;
}
return ($scope.dragContent || self.isOpen()) &&
dragIsWithinBounds &&
!e.gesture.srcEvent.defaultPrevented &&
menuEnabled &&
!e.target.tagName.match(/input|textarea|select|object|embed/i) &&
!e.target.isContentEditable &&
!(e.target.dataset ? e.target.dataset.preventScroll : e.target.getAttribute('data-prevent-scroll') == 'true');
};
$scope.sideMenuContentTranslateX = 0;
var deregisterBackButtonAction = noop;
var closeSideMenu = angular.bind(self, self.close);
$scope.$watch(function() {
return self.getOpenAmount() !== 0;
}, function(isOpen) {
deregisterBackButtonAction();
if (isOpen) {
deregisterBackButtonAction = $ionicPlatform.registerBackButtonAction(
closeSideMenu,
PLATFORM_BACK_BUTTON_PRIORITY_SIDE_MENU
);
}
});
var deregisterInstance = $ionicSideMenuDelegate._registerInstance(
self, $attrs.delegateHandle, function() {
return $ionicHistory.isActiveScope($scope);
}
);
$scope.$on('$destroy', function() {
deregisterInstance();
deregisterBackButtonAction();
self.$scope = null;
if (self.content) {
self.content.element = null;
self.content = null;
}
// ensure scrolls are unfrozen
freezeAllScrolls(false);
});
self.initialize({
left: {
width: 275
},
right: {
width: 275
}
});
}]);
| mit |
fichter/libpbrpc | src/pbrpc/ControllerRPC.hh | 1150 | #ifndef __ControllerRPC_HH_INCLUDED_
#define __ControllerRPC_HH_INCLUDED_
#include <string>
#include <google/protobuf/service.h>
#include <pbrpc.pb.h>
namespace pbrpc {
using ::std::string;
using ::google::protobuf::RpcController;
using ::google::protobuf::Closure;
using ::pbrpc::Error;
class ControllerRPC : public RpcController {
public:
ControllerRPC(void) {Reset();}
virtual ~ControllerRPC() {}
void Reset() {_failed = false;}
bool Failed() const {return _failed;}
string ErrorText() const {return _message;}
void SetFailed(const string &reason) {
_failed = true;
_message = reason;
}
void AppendFailed(const string &reason) {
_message += reason;
}
// get the Error object
Error ErrorObj(void) const {
Error error;
error.set_message(ErrorText());
return error;
}
// not in use
void StartCancel() {}
bool IsCanceled() const { return false; };
void NotifyOnCancel(Closure *callback) {};
private:
bool _failed;
string _message;
};
}
#endif //__ControllerRPC_HH_INCLUDED_
| mit |
anhstudios/swganh | data/scripts/templates/object/mobile/shared_purbole_elder.py | 434 | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Creature()
result.template = "object/mobile/shared_purbole_elder.iff"
result.attribute_template_id = 9
result.stfName("monster_name","purbole")
#### BEGIN MODIFICATIONS ####
#### END MODIFICATIONS ####
return result | mit |
DimitriMikadze/laravel-angular-cms | gulpfile.js | 1518 | var elixir = require('laravel-elixir');
require('laravel-elixir-ng-annotate');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Sass
| file for our application, as well as publishing vendor resources.
|
*/
var jsPlugins = [
'../dep/angular/angular.min.js',
'../dep/angular-ui-router/release/angular-ui-router.min.js',
'../dep/angular-resource/angular-resource.min.js',
'../dep/textAngular/dist/textAngular-rangy.min.js',
'../dep/textAngular/dist/textAngular-sanitize.min.js',
'../dep/textAngular/dist/textAngular.min.js'
];
var cssPlugins = [
'../dep/bootstrap/dist/css/bootstrap-paper.min.css',
'../dep/animate-css/animate-css.min.css',
'../dep/textAngular/dist/textAngular.css',
'../dep/font-awesome/css/font-awesome.min.css'
];
var appScripts = [
'admin/app/**/*.modules.js',
'admin/app/**/*.js'
];
var appSass = [
'admin/bundle.scss'
];
elixir(function(mix) {
mix.styles(cssPlugins, 'public/admin/css/dep.css');
mix.sass(appSass, 'public/admin/css/app.min.css');
mix.annotate(appScripts, 'public/admin/js/annotated.js');
mix.scripts(jsPlugins, 'public/admin/js/dep.js');
mix.scripts('../../../public/admin/js/annotated.js', 'public/admin/js/app.min.js');
}); | mit |
gree/flare-tools | lib/flare/test/cluster.rb | 4212 | # -*- coding: utf-8; -*-
# Authors:: Kiyoshi Ikehara <kiyoshi.ikehara@gree.net>
# Copyright:: Copyright (C) GREE, Inc. 2011.
# License:: MIT-style
require 'uri'
require 'flare/tools'
require 'flare/test/daemon'
require 'flare/test/node'
#
module Flare
module Test
# == Description
#
class Cluster
include Flare::Tools::Common
def initialize(name, option = {})
if ENV.has_key?("FLARE_INDEX_DB") && !option.has_key?("index-db")
option["index-db"] = ENV["FLARE_INDEX_DB"]
end
if option.has_key?("index-db")
uri = URI.parse(option["index-db"])
if uri.scheme == "zookeeper"
z = ::Zookeeper.new("#{uri.host}:#{uri.port}")
Flare::Tools::ZkUtil.clear_nodemap z, uri.path
z.close
end
end
daemon = Daemon.instance
@indexport = daemon.assign_port
@workdir = Dir.pwd+"/work"
@datadir = [@workdir, "#{name}.#{@indexport}"].join('/')
@nodes = {}
@indexname = "localhost"
@index_pid = daemon.invoke_flarei(name, {
'server-name' => @indexname,
'server-port' => @indexport,
'data-dir' => @datadir,
}.merge(option))
@flare_xml = [@datadir, "flare.xml"].join('/')
sleep 1
end
def indexname
@indexname
end
def indexport
@indexport
end
def create_node(name, config = {}, executable = Daemon::Flared)
daemon = Daemon.instance
serverport = daemon.assign_port
datadir = [@datadir, "#{name}.#{serverport}"].join('.')
servername = "localhost"
pid = daemon.invoke_flared(name, {
'index-server-name' => @indexname,
'index-server-port' => @indexport,
'server-name' => servername,
'server-port' => serverport,
'data-dir' => datadir,
}.merge(config), executable)
hostname_port = "#{servername}:#{serverport}"
node = @nodes[hostname_port] = Node.new(hostname_port, pid)
node
end
def shutdown
daemon = Daemon.instance
daemon.shutdown
end
def shutdown_node(node)
daemon = Daemon.instance
daemon.shutdown_flared(node.pid)
end
def nodes
@nodes.values
end
def wait_for_ready
Flare::Tools::IndexServer.open(indexname, indexport, 10) do |s|
wait_for_servers(s)
end
end
def prepare_master_and_slaves(nodes, partition = 0)
Flare::Tools::IndexServer.open(indexname, indexport, 10) do |s|
slaves = nodes.dup
master = slaves.shift
# master
s.set_role(master.hostname, master.port, 'master', 1, partition)
wait_for_master_construction(s, "#{master.hostname}:#{master.port}", 10)
s.set_state(master.hostname, master.port, 'active')
# slave
slaves.each do |n|
s.set_role(n.hostname, n.port, 'slave', 1, partition)
wait_for_slave_construction(s, "#{n.hostname}:#{n.port}", 10, true)
end
end
end
def prepare_data(node, prefix, count)
Flare::Tools::Node.open(node.hostname, node.port, 10) do |n|
fmt = "#{prefix}%010.10d"
(0...count).each do |i|
n.set(fmt % i, "All your base are belong to us.")
end
end
end
def clear_data(node)
Flare::Tools::Node.open(node.hostname, node.port, 10) do |n|
n.flush_all
end
end
def exist?(node)
return Flare::Tools::IndexServer.open(indexname, indexport, 10) do |s|
nodes_stats = s.stats_nodes
nodes_stats.has_key? node
end
end
def index
open(@flare_xml) do |f|
f.read
end
end
end
end
end
| mit |
hpautonomy/jsWhatever | src/js/repeater.js | 1799 | /*
* Copyright 2013-2017 Hewlett Packard Enterprise Development Company, L.P.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
*/
/**
* @module js-whatever/js/repeater
*/
define([
'underscore'
], function(_) {
'use strict';
/**
* @name module:js-whatever/js/repeater.Repeater
* @desc Wrapper around setTimeout that allows for the control of the timeout
* @param {function} f The function to be called
* @param {number} interval The number of milliseconds between invocations of f
* @constructor
*/
function Repeater(f, interval) {
this.f = f;
this.interval = interval;
this.timeout = null;
this.update = _.bind(this.update, this);
}
_.extend(Repeater.prototype, /** @lends module:js-whatever/js/repeater.Repeater.prototype */{
/**
* @desc Stops the timeout
* @returns {Repeater} this
*/
stop: function() {
if(this.timeout !== null) {
clearTimeout(this.timeout);
this.timeout = null;
}
return this;
},
/**
* @desc Starts the timeout. If it has already started, this will reset the timeout
* @returns {Repeater} this
*/
start: function() {
this.stop();
this.timeout = _.delay(this.update, this.interval);
return this;
},
/**
* @desc Calls the provided function
* @returns {Repeater} this
*/
update: function() {
this.f();
if(this.timeout !== null) {
this.start();
}
return this;
}
});
return Repeater;
});
| mit |
lammas/frak-1.x | src/scene/components/PerspectiveCamera.js | 2928 | /** Camera component providing perspective projection */
var PerspectiveCamera=CameraComponent.extend({
init: function(fov, aspect, near, far) {
if(!fov) fov=45.0;
if(!near) near=0.3;
if(!far) far=1000.0;
if(!aspect) aspect=4/3;
this.fov=fov;
this.aspect=aspect;
this.near=near;
this.far=far;
// View matrix is stored in column-major order as follows:
// | vx ux -nx -ex |
// | vy uy -ny -ey |
// | vz uz -nz -ez |
// | 0 0 0 1 |
//
// v - cross(u, n)
// u - Up vector
// n - Look direction vector
// e - Eye position vector
var lookAt=mat4.create();
mat4.lookAt(lookAt, [0.0, 0.0, -100.0], [0.0, 0.0, 0.0], [0.0, 1.0, 0.0]);
this._super(lookAt, this.calculatePerspective());
this.camera.near = this.near;
this.camera.far = this.far;
},
type: function() {
return "PerspectiveCamera";
},
onStart: function(context, engine) {
if(!this.aspect) {
this.setAspectRatio(context.canvas.width/context.canvas.height);
}
this._super(context, engine);
},
/** Sets the camera's near and far clipping planes. */
setClipPlanes: function(near, far) {
this.near = near;
this.far = far;
this.camera.near = this.near;
this.camera.far = this.far;
this.camera.projectionMatrix = this.calculatePerspective();
},
/** Sets the camera aspect ration and updates the perspective projection matrix.
@param aspect The new aspect radio (width/height). */
setAspectRatio: function(aspect) {
this.aspect=aspect;
this.camera.projectionMatrix=this.calculatePerspective();
},
/** Sets the camera vertical field of view (in degrees) */
setVerticalFieldOfView: function(fov) {
this.fov=fov;
this.camera.projectionMatrix=this.calculatePerspective();
},
/** Sets the camera horizontal field of view (in degrees) */
setHorizontalFieldOfView: function(fov) {
fov = fov * (Math.PI*2.0)/360.0;
var hpx = Math.tan(fov/2.0);
var vpx = hpx / this.aspect;
this.fov = Math.atan(vpx) * 2.0 * 180.0/Math.PI;
this.camera.projectionMatrix=this.calculatePerspective();
},
/** Returns the current vertical field of view in degrees.
@return The current vertical field of view in degrees {float} */
getVerticalFieldOfView: function() {
return this.camera.getFieldOfView()*180.0/Math.PI;
},
/** Returns the current horizontal field of view in degrees.
@return The current vertical field of view in degrees {float} */
getHorizontalFieldOfView: function() {
var vpx = Math.tan(this.camera.getFieldOfView() * 0.5);
var hpx = this.aspect * vpx;
var fovx = Math.atan(hpx) * 2.0;
return fovx * 180.0/Math.PI;
},
/** Calculates projection matrix based on fov, aspect ratio and near/far clipping planes */
calculatePerspective: function() {
var perspective=mat4.create();
var aspect=this.aspect;
if(!aspect) aspect=1.0;
mat4.perspective(perspective, this.fov*(Math.PI*2.0)/360.0, aspect, this.near, this.far);
return perspective;
}
}); | mit |
georghinkel/ttc2017smartGrids | solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Informative/InfAssets/impl/InfAssetsPackageImpl.java | 131866 | /**
*/
package gluemodel.CIM.IEC61970.Informative.InfAssets.impl;
import gluemodel.CIM.CIMPackage;
import gluemodel.CIM.IEC61968.AssetModels.AssetModelsPackage;
import gluemodel.CIM.IEC61968.AssetModels.impl.AssetModelsPackageImpl;
import gluemodel.CIM.IEC61968.Assets.AssetsPackage;
import gluemodel.CIM.IEC61968.Assets.impl.AssetsPackageImpl;
import gluemodel.CIM.IEC61968.Common.CommonPackage;
import gluemodel.CIM.IEC61968.Common.impl.CommonPackageImpl;
import gluemodel.CIM.IEC61968.Customers.CustomersPackage;
import gluemodel.CIM.IEC61968.Customers.impl.CustomersPackageImpl;
import gluemodel.CIM.IEC61968.IEC61968Package;
import gluemodel.CIM.IEC61968.LoadControl.LoadControlPackage;
import gluemodel.CIM.IEC61968.LoadControl.impl.LoadControlPackageImpl;
import gluemodel.CIM.IEC61968.Metering.MeteringPackage;
import gluemodel.CIM.IEC61968.Metering.impl.MeteringPackageImpl;
import gluemodel.CIM.IEC61968.PaymentMetering.PaymentMeteringPackage;
import gluemodel.CIM.IEC61968.PaymentMetering.impl.PaymentMeteringPackageImpl;
import gluemodel.CIM.IEC61968.WiresExt.WiresExtPackage;
import gluemodel.CIM.IEC61968.WiresExt.impl.WiresExtPackageImpl;
import gluemodel.CIM.IEC61968.Work.WorkPackage;
import gluemodel.CIM.IEC61968.Work.impl.WorkPackageImpl;
import gluemodel.CIM.IEC61968.impl.IEC61968PackageImpl;
import gluemodel.CIM.IEC61970.Contingency.ContingencyPackage;
import gluemodel.CIM.IEC61970.Contingency.impl.ContingencyPackageImpl;
import gluemodel.CIM.IEC61970.ControlArea.ControlAreaPackage;
import gluemodel.CIM.IEC61970.ControlArea.impl.ControlAreaPackageImpl;
import gluemodel.CIM.IEC61970.Core.CorePackage;
import gluemodel.CIM.IEC61970.Core.impl.CorePackageImpl;
import gluemodel.CIM.IEC61970.Domain.DomainPackage;
import gluemodel.CIM.IEC61970.Domain.impl.DomainPackageImpl;
import gluemodel.CIM.IEC61970.Equivalents.EquivalentsPackage;
import gluemodel.CIM.IEC61970.Equivalents.impl.EquivalentsPackageImpl;
import gluemodel.CIM.IEC61970.Generation.GenerationDynamics.GenerationDynamicsPackage;
import gluemodel.CIM.IEC61970.Generation.GenerationDynamics.impl.GenerationDynamicsPackageImpl;
import gluemodel.CIM.IEC61970.Generation.Production.ProductionPackage;
import gluemodel.CIM.IEC61970.Generation.Production.impl.ProductionPackageImpl;
import gluemodel.CIM.IEC61970.IEC61970Package;
import gluemodel.CIM.IEC61970.Informative.EnergyScheduling.EnergySchedulingPackage;
import gluemodel.CIM.IEC61970.Informative.EnergyScheduling.impl.EnergySchedulingPackageImpl;
import gluemodel.CIM.IEC61970.Informative.Financial.FinancialPackage;
import gluemodel.CIM.IEC61970.Informative.Financial.impl.FinancialPackageImpl;
import gluemodel.CIM.IEC61970.Informative.InfAssetModels.InfAssetModelsPackage;
import gluemodel.CIM.IEC61970.Informative.InfAssetModels.impl.InfAssetModelsPackageImpl;
import gluemodel.CIM.IEC61970.Informative.InfAssets.InfAssetsFactory;
import gluemodel.CIM.IEC61970.Informative.InfAssets.InfAssetsPackage;
import gluemodel.CIM.IEC61970.Informative.InfCommon.InfCommonPackage;
import gluemodel.CIM.IEC61970.Informative.InfCommon.impl.InfCommonPackageImpl;
import gluemodel.CIM.IEC61970.Informative.InfCore.InfCorePackage;
import gluemodel.CIM.IEC61970.Informative.InfCore.impl.InfCorePackageImpl;
import gluemodel.CIM.IEC61970.Informative.InfCustomers.InfCustomersPackage;
import gluemodel.CIM.IEC61970.Informative.InfCustomers.impl.InfCustomersPackageImpl;
import gluemodel.CIM.IEC61970.Informative.InfERPSupport.InfERPSupportPackage;
import gluemodel.CIM.IEC61970.Informative.InfERPSupport.impl.InfERPSupportPackageImpl;
import gluemodel.CIM.IEC61970.Informative.InfGMLSupport.InfGMLSupportPackage;
import gluemodel.CIM.IEC61970.Informative.InfGMLSupport.impl.InfGMLSupportPackageImpl;
import gluemodel.CIM.IEC61970.Informative.InfLoadControl.InfLoadControlPackage;
import gluemodel.CIM.IEC61970.Informative.InfLoadControl.impl.InfLoadControlPackageImpl;
import gluemodel.CIM.IEC61970.Informative.InfLocations.InfLocationsPackage;
import gluemodel.CIM.IEC61970.Informative.InfLocations.impl.InfLocationsPackageImpl;
import gluemodel.CIM.IEC61970.Informative.InfMetering.InfMeteringPackage;
import gluemodel.CIM.IEC61970.Informative.InfMetering.impl.InfMeteringPackageImpl;
import gluemodel.CIM.IEC61970.Informative.InfOperations.InfOperationsPackage;
import gluemodel.CIM.IEC61970.Informative.InfOperations.impl.InfOperationsPackageImpl;
import gluemodel.CIM.IEC61970.Informative.InfPaymentMetering.InfPaymentMeteringPackage;
import gluemodel.CIM.IEC61970.Informative.InfPaymentMetering.impl.InfPaymentMeteringPackageImpl;
import gluemodel.CIM.IEC61970.Informative.InfTypeAsset.InfTypeAssetPackage;
import gluemodel.CIM.IEC61970.Informative.InfTypeAsset.impl.InfTypeAssetPackageImpl;
import gluemodel.CIM.IEC61970.Informative.InfWork.InfWorkPackage;
import gluemodel.CIM.IEC61970.Informative.InfWork.impl.InfWorkPackageImpl;
import gluemodel.CIM.IEC61970.Informative.MarketOperations.MarketOperationsPackage;
import gluemodel.CIM.IEC61970.Informative.MarketOperations.impl.MarketOperationsPackageImpl;
import gluemodel.CIM.IEC61970.Informative.Reservation.ReservationPackage;
import gluemodel.CIM.IEC61970.Informative.Reservation.impl.ReservationPackageImpl;
import gluemodel.CIM.IEC61970.LoadModel.LoadModelPackage;
import gluemodel.CIM.IEC61970.LoadModel.impl.LoadModelPackageImpl;
import gluemodel.CIM.IEC61970.Meas.MeasPackage;
import gluemodel.CIM.IEC61970.Meas.impl.MeasPackageImpl;
import gluemodel.CIM.IEC61970.OperationalLimits.OperationalLimitsPackage;
import gluemodel.CIM.IEC61970.OperationalLimits.impl.OperationalLimitsPackageImpl;
import gluemodel.CIM.IEC61970.Outage.OutagePackage;
import gluemodel.CIM.IEC61970.Outage.impl.OutagePackageImpl;
import gluemodel.CIM.IEC61970.Protection.ProtectionPackage;
import gluemodel.CIM.IEC61970.Protection.impl.ProtectionPackageImpl;
import gluemodel.CIM.IEC61970.SCADA.SCADAPackage;
import gluemodel.CIM.IEC61970.SCADA.impl.SCADAPackageImpl;
import gluemodel.CIM.IEC61970.StateVariables.StateVariablesPackage;
import gluemodel.CIM.IEC61970.StateVariables.impl.StateVariablesPackageImpl;
import gluemodel.CIM.IEC61970.Topology.TopologyPackage;
import gluemodel.CIM.IEC61970.Topology.impl.TopologyPackageImpl;
import gluemodel.CIM.IEC61970.Wires.WiresPackage;
import gluemodel.CIM.IEC61970.Wires.impl.WiresPackageImpl;
import gluemodel.CIM.IEC61970.impl.IEC61970PackageImpl;
import gluemodel.CIM.PackageDependencies.PackageDependenciesPackage;
import gluemodel.CIM.PackageDependencies.impl.PackageDependenciesPackageImpl;
import gluemodel.CIM.impl.CIMPackageImpl;
import gluemodel.COSEM.COSEMObjects.COSEMObjectsPackage;
import gluemodel.COSEM.COSEMObjects.impl.COSEMObjectsPackageImpl;
import gluemodel.COSEM.COSEMPackage;
import gluemodel.COSEM.Datatypes.DatatypesPackage;
import gluemodel.COSEM.Datatypes.impl.DatatypesPackageImpl;
import gluemodel.COSEM.InterfaceClasses.InterfaceClassesPackage;
import gluemodel.COSEM.InterfaceClasses.impl.InterfaceClassesPackageImpl;
import gluemodel.COSEM.impl.COSEMPackageImpl;
import gluemodel.GluemodelPackage;
import gluemodel.impl.GluemodelPackageImpl;
import gluemodel.substationStandard.Dataclasses.DataclassesPackage;
import gluemodel.substationStandard.Dataclasses.impl.DataclassesPackageImpl;
import gluemodel.substationStandard.Enumerations.EnumerationsPackage;
import gluemodel.substationStandard.Enumerations.impl.EnumerationsPackageImpl;
import gluemodel.substationStandard.LNNodes.DomainLNs.DomainLNsPackage;
import gluemodel.substationStandard.LNNodes.DomainLNs.impl.DomainLNsPackageImpl;
import gluemodel.substationStandard.LNNodes.LNGroupA.LNGroupAPackage;
import gluemodel.substationStandard.LNNodes.LNGroupA.impl.LNGroupAPackageImpl;
import gluemodel.substationStandard.LNNodes.LNGroupC.LNGroupCPackage;
import gluemodel.substationStandard.LNNodes.LNGroupC.impl.LNGroupCPackageImpl;
import gluemodel.substationStandard.LNNodes.LNGroupM.LNGroupMPackage;
import gluemodel.substationStandard.LNNodes.LNGroupM.impl.LNGroupMPackageImpl;
import gluemodel.substationStandard.LNNodes.LNGroupP.LNGroupPPackage;
import gluemodel.substationStandard.LNNodes.LNGroupP.impl.LNGroupPPackageImpl;
import gluemodel.substationStandard.LNNodes.LNGroupR.LNGroupRPackage;
import gluemodel.substationStandard.LNNodes.LNGroupR.impl.LNGroupRPackageImpl;
import gluemodel.substationStandard.LNNodes.LNGroupT.LNGroupTPackage;
import gluemodel.substationStandard.LNNodes.LNGroupT.impl.LNGroupTPackageImpl;
import gluemodel.substationStandard.LNNodes.LNGroupX.LNGroupXPackage;
import gluemodel.substationStandard.LNNodes.LNGroupX.impl.LNGroupXPackageImpl;
import gluemodel.substationStandard.LNNodes.LNGroupY.LNGroupYPackage;
import gluemodel.substationStandard.LNNodes.LNGroupY.impl.LNGroupYPackageImpl;
import gluemodel.substationStandard.LNNodes.LNGroupZ.LNGroupZPackage;
import gluemodel.substationStandard.LNNodes.LNGroupZ.impl.LNGroupZPackageImpl;
import gluemodel.substationStandard.SubstationStandardPackage;
import gluemodel.substationStandard.impl.SubstationStandardPackageImpl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class InfAssetsPackageImpl extends EPackageImpl implements InfAssetsPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass orgAssetRoleEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass shuntCompensatorInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass potentialTransformerInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass ductInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass docAssetRoleEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass mountingPointEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass svcInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass financialInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass shuntImpedanceInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass cabinetEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass comEquipmentInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass breakerInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass generatorAssetEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass electricalInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass windingInsulationEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass conductorAssetEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass transformerAssetEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass assetPropertyCurveEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass powerRatingEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass assetInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass jointInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass mountingConnectionEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass substationInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass protectionEquipmentInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass surgeProtectorInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass undergroundStructureInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass procedureEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass mediumEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass structureInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass factsDeviceInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass switchInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass procedureDataSetEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass streetlightInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass dimensionsInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass workEquipmentInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass currentTransformerInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass structureSupportInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass electricalAssetEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass failureEventEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass recloserInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass towerInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass testDataSetEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass specificationEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass compositeSwitchInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass facilityEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass faultIndicatorInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass reliabilityInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass transformerObservationEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass toolInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass ductBankInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass vehicleInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass bushingInsulationPFEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass bushingInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass assetAssetRoleEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass poleInfoEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass tapChangerAssetEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum poleBaseKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum shuntImpedanceLocalControlKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum jointFillKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum procedureKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum streetlightLampKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum shuntImpedanceControlKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum failureIsolationMethodKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum undergroundStructureKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum substationFunctionKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum coolingKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum polePreservativeKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum poleTreatmentKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum faultIndicatorResetKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum factsDeviceKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum structureSupportKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum vehicleUsageKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum regulationBranchKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum towerConstructionKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum bushingInsulationPfTestKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum bushingInsulationKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum compositeSwitchKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum structureMaterialKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum mediumKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum anchorKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum jointConfigurationKindEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum facilityKindEEnum = null;
/**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
* <p>Note: the correct way to create the package is via the static
* factory method {@link #init init()}, which also performs
* initialization of the package, or returns the registered package,
* if one already exists.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see gluemodel.CIM.IEC61970.Informative.InfAssets.InfAssetsPackage#eNS_URI
* @see #init()
* @generated
*/
private InfAssetsPackageImpl() {
super(eNS_URI, InfAssetsFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link InfAssetsPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @generated
*/
public static InfAssetsPackage init() {
if (isInited) return (InfAssetsPackage)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI);
// Obtain or create and register package
InfAssetsPackageImpl theInfAssetsPackage = (InfAssetsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof InfAssetsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new InfAssetsPackageImpl());
isInited = true;
// Obtain or create and register interdependencies
GluemodelPackageImpl theGluemodelPackage = (GluemodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GluemodelPackage.eNS_URI) instanceof GluemodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GluemodelPackage.eNS_URI) : GluemodelPackage.eINSTANCE);
COSEMPackageImpl theCOSEMPackage = (COSEMPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(COSEMPackage.eNS_URI) instanceof COSEMPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(COSEMPackage.eNS_URI) : COSEMPackage.eINSTANCE);
DatatypesPackageImpl theDatatypesPackage = (DatatypesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DatatypesPackage.eNS_URI) instanceof DatatypesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DatatypesPackage.eNS_URI) : DatatypesPackage.eINSTANCE);
InterfaceClassesPackageImpl theInterfaceClassesPackage = (InterfaceClassesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InterfaceClassesPackage.eNS_URI) instanceof InterfaceClassesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InterfaceClassesPackage.eNS_URI) : InterfaceClassesPackage.eINSTANCE);
COSEMObjectsPackageImpl theCOSEMObjectsPackage = (COSEMObjectsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(COSEMObjectsPackage.eNS_URI) instanceof COSEMObjectsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(COSEMObjectsPackage.eNS_URI) : COSEMObjectsPackage.eINSTANCE);
CIMPackageImpl theCIMPackage = (CIMPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CIMPackage.eNS_URI) instanceof CIMPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CIMPackage.eNS_URI) : CIMPackage.eINSTANCE);
IEC61970PackageImpl theIEC61970Package = (IEC61970PackageImpl)(EPackage.Registry.INSTANCE.getEPackage(IEC61970Package.eNS_URI) instanceof IEC61970PackageImpl ? EPackage.Registry.INSTANCE.getEPackage(IEC61970Package.eNS_URI) : IEC61970Package.eINSTANCE);
OperationalLimitsPackageImpl theOperationalLimitsPackage = (OperationalLimitsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(OperationalLimitsPackage.eNS_URI) instanceof OperationalLimitsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(OperationalLimitsPackage.eNS_URI) : OperationalLimitsPackage.eINSTANCE);
EnergySchedulingPackageImpl theEnergySchedulingPackage = (EnergySchedulingPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EnergySchedulingPackage.eNS_URI) instanceof EnergySchedulingPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EnergySchedulingPackage.eNS_URI) : EnergySchedulingPackage.eINSTANCE);
InfERPSupportPackageImpl theInfERPSupportPackage = (InfERPSupportPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InfERPSupportPackage.eNS_URI) instanceof InfERPSupportPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InfERPSupportPackage.eNS_URI) : InfERPSupportPackage.eINSTANCE);
InfAssetModelsPackageImpl theInfAssetModelsPackage = (InfAssetModelsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InfAssetModelsPackage.eNS_URI) instanceof InfAssetModelsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InfAssetModelsPackage.eNS_URI) : InfAssetModelsPackage.eINSTANCE);
InfGMLSupportPackageImpl theInfGMLSupportPackage = (InfGMLSupportPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InfGMLSupportPackage.eNS_URI) instanceof InfGMLSupportPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InfGMLSupportPackage.eNS_URI) : InfGMLSupportPackage.eINSTANCE);
InfCorePackageImpl theInfCorePackage = (InfCorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InfCorePackage.eNS_URI) instanceof InfCorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InfCorePackage.eNS_URI) : InfCorePackage.eINSTANCE);
MarketOperationsPackageImpl theMarketOperationsPackage = (MarketOperationsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(MarketOperationsPackage.eNS_URI) instanceof MarketOperationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(MarketOperationsPackage.eNS_URI) : MarketOperationsPackage.eINSTANCE);
InfOperationsPackageImpl theInfOperationsPackage = (InfOperationsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InfOperationsPackage.eNS_URI) instanceof InfOperationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InfOperationsPackage.eNS_URI) : InfOperationsPackage.eINSTANCE);
InfWorkPackageImpl theInfWorkPackage = (InfWorkPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InfWorkPackage.eNS_URI) instanceof InfWorkPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InfWorkPackage.eNS_URI) : InfWorkPackage.eINSTANCE);
InfPaymentMeteringPackageImpl theInfPaymentMeteringPackage = (InfPaymentMeteringPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InfPaymentMeteringPackage.eNS_URI) instanceof InfPaymentMeteringPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InfPaymentMeteringPackage.eNS_URI) : InfPaymentMeteringPackage.eINSTANCE);
InfCommonPackageImpl theInfCommonPackage = (InfCommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InfCommonPackage.eNS_URI) instanceof InfCommonPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InfCommonPackage.eNS_URI) : InfCommonPackage.eINSTANCE);
InfLocationsPackageImpl theInfLocationsPackage = (InfLocationsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InfLocationsPackage.eNS_URI) instanceof InfLocationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InfLocationsPackage.eNS_URI) : InfLocationsPackage.eINSTANCE);
FinancialPackageImpl theFinancialPackage = (FinancialPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(FinancialPackage.eNS_URI) instanceof FinancialPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(FinancialPackage.eNS_URI) : FinancialPackage.eINSTANCE);
ReservationPackageImpl theReservationPackage = (ReservationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ReservationPackage.eNS_URI) instanceof ReservationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ReservationPackage.eNS_URI) : ReservationPackage.eINSTANCE);
InfMeteringPackageImpl theInfMeteringPackage = (InfMeteringPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InfMeteringPackage.eNS_URI) instanceof InfMeteringPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InfMeteringPackage.eNS_URI) : InfMeteringPackage.eINSTANCE);
InfCustomersPackageImpl theInfCustomersPackage = (InfCustomersPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InfCustomersPackage.eNS_URI) instanceof InfCustomersPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InfCustomersPackage.eNS_URI) : InfCustomersPackage.eINSTANCE);
InfLoadControlPackageImpl theInfLoadControlPackage = (InfLoadControlPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InfLoadControlPackage.eNS_URI) instanceof InfLoadControlPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InfLoadControlPackage.eNS_URI) : InfLoadControlPackage.eINSTANCE);
InfTypeAssetPackageImpl theInfTypeAssetPackage = (InfTypeAssetPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InfTypeAssetPackage.eNS_URI) instanceof InfTypeAssetPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InfTypeAssetPackage.eNS_URI) : InfTypeAssetPackage.eINSTANCE);
MeasPackageImpl theMeasPackage = (MeasPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(MeasPackage.eNS_URI) instanceof MeasPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(MeasPackage.eNS_URI) : MeasPackage.eINSTANCE);
GenerationDynamicsPackageImpl theGenerationDynamicsPackage = (GenerationDynamicsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GenerationDynamicsPackage.eNS_URI) instanceof GenerationDynamicsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GenerationDynamicsPackage.eNS_URI) : GenerationDynamicsPackage.eINSTANCE);
ProductionPackageImpl theProductionPackage = (ProductionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ProductionPackage.eNS_URI) instanceof ProductionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ProductionPackage.eNS_URI) : ProductionPackage.eINSTANCE);
SCADAPackageImpl theSCADAPackage = (SCADAPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SCADAPackage.eNS_URI) instanceof SCADAPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SCADAPackage.eNS_URI) : SCADAPackage.eINSTANCE);
WiresPackageImpl theWiresPackage = (WiresPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WiresPackage.eNS_URI) instanceof WiresPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(WiresPackage.eNS_URI) : WiresPackage.eINSTANCE);
CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE);
StateVariablesPackageImpl theStateVariablesPackage = (StateVariablesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(StateVariablesPackage.eNS_URI) instanceof StateVariablesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(StateVariablesPackage.eNS_URI) : StateVariablesPackage.eINSTANCE);
EquivalentsPackageImpl theEquivalentsPackage = (EquivalentsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EquivalentsPackage.eNS_URI) instanceof EquivalentsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EquivalentsPackage.eNS_URI) : EquivalentsPackage.eINSTANCE);
DomainPackageImpl theDomainPackage = (DomainPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DomainPackage.eNS_URI) instanceof DomainPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DomainPackage.eNS_URI) : DomainPackage.eINSTANCE);
LoadModelPackageImpl theLoadModelPackage = (LoadModelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LoadModelPackage.eNS_URI) instanceof LoadModelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LoadModelPackage.eNS_URI) : LoadModelPackage.eINSTANCE);
ProtectionPackageImpl theProtectionPackage = (ProtectionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ProtectionPackage.eNS_URI) instanceof ProtectionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ProtectionPackage.eNS_URI) : ProtectionPackage.eINSTANCE);
OutagePackageImpl theOutagePackage = (OutagePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(OutagePackage.eNS_URI) instanceof OutagePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(OutagePackage.eNS_URI) : OutagePackage.eINSTANCE);
ControlAreaPackageImpl theControlAreaPackage = (ControlAreaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ControlAreaPackage.eNS_URI) instanceof ControlAreaPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ControlAreaPackage.eNS_URI) : ControlAreaPackage.eINSTANCE);
ContingencyPackageImpl theContingencyPackage = (ContingencyPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ContingencyPackage.eNS_URI) instanceof ContingencyPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ContingencyPackage.eNS_URI) : ContingencyPackage.eINSTANCE);
TopologyPackageImpl theTopologyPackage = (TopologyPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TopologyPackage.eNS_URI) instanceof TopologyPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TopologyPackage.eNS_URI) : TopologyPackage.eINSTANCE);
PackageDependenciesPackageImpl thePackageDependenciesPackage = (PackageDependenciesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(PackageDependenciesPackage.eNS_URI) instanceof PackageDependenciesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PackageDependenciesPackage.eNS_URI) : PackageDependenciesPackage.eINSTANCE);
IEC61968PackageImpl theIEC61968Package = (IEC61968PackageImpl)(EPackage.Registry.INSTANCE.getEPackage(IEC61968Package.eNS_URI) instanceof IEC61968PackageImpl ? EPackage.Registry.INSTANCE.getEPackage(IEC61968Package.eNS_URI) : IEC61968Package.eINSTANCE);
MeteringPackageImpl theMeteringPackage = (MeteringPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(MeteringPackage.eNS_URI) instanceof MeteringPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(MeteringPackage.eNS_URI) : MeteringPackage.eINSTANCE);
WiresExtPackageImpl theWiresExtPackage = (WiresExtPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WiresExtPackage.eNS_URI) instanceof WiresExtPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(WiresExtPackage.eNS_URI) : WiresExtPackage.eINSTANCE);
CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof CommonPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE);
AssetModelsPackageImpl theAssetModelsPackage = (AssetModelsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(AssetModelsPackage.eNS_URI) instanceof AssetModelsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(AssetModelsPackage.eNS_URI) : AssetModelsPackage.eINSTANCE);
PaymentMeteringPackageImpl thePaymentMeteringPackage = (PaymentMeteringPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(PaymentMeteringPackage.eNS_URI) instanceof PaymentMeteringPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PaymentMeteringPackage.eNS_URI) : PaymentMeteringPackage.eINSTANCE);
CustomersPackageImpl theCustomersPackage = (CustomersPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CustomersPackage.eNS_URI) instanceof CustomersPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CustomersPackage.eNS_URI) : CustomersPackage.eINSTANCE);
LoadControlPackageImpl theLoadControlPackage = (LoadControlPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LoadControlPackage.eNS_URI) instanceof LoadControlPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LoadControlPackage.eNS_URI) : LoadControlPackage.eINSTANCE);
AssetsPackageImpl theAssetsPackage = (AssetsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(AssetsPackage.eNS_URI) instanceof AssetsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(AssetsPackage.eNS_URI) : AssetsPackage.eINSTANCE);
WorkPackageImpl theWorkPackage = (WorkPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WorkPackage.eNS_URI) instanceof WorkPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(WorkPackage.eNS_URI) : WorkPackage.eINSTANCE);
SubstationStandardPackageImpl theSubstationStandardPackage = (SubstationStandardPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SubstationStandardPackage.eNS_URI) instanceof SubstationStandardPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SubstationStandardPackage.eNS_URI) : SubstationStandardPackage.eINSTANCE);
DomainLNsPackageImpl theDomainLNsPackage = (DomainLNsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DomainLNsPackage.eNS_URI) instanceof DomainLNsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DomainLNsPackage.eNS_URI) : DomainLNsPackage.eINSTANCE);
LNGroupPPackageImpl theLNGroupPPackage = (LNGroupPPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LNGroupPPackage.eNS_URI) instanceof LNGroupPPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LNGroupPPackage.eNS_URI) : LNGroupPPackage.eINSTANCE);
LNGroupRPackageImpl theLNGroupRPackage = (LNGroupRPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LNGroupRPackage.eNS_URI) instanceof LNGroupRPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LNGroupRPackage.eNS_URI) : LNGroupRPackage.eINSTANCE);
LNGroupCPackageImpl theLNGroupCPackage = (LNGroupCPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LNGroupCPackage.eNS_URI) instanceof LNGroupCPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LNGroupCPackage.eNS_URI) : LNGroupCPackage.eINSTANCE);
LNGroupAPackageImpl theLNGroupAPackage = (LNGroupAPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LNGroupAPackage.eNS_URI) instanceof LNGroupAPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LNGroupAPackage.eNS_URI) : LNGroupAPackage.eINSTANCE);
LNGroupMPackageImpl theLNGroupMPackage = (LNGroupMPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LNGroupMPackage.eNS_URI) instanceof LNGroupMPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LNGroupMPackage.eNS_URI) : LNGroupMPackage.eINSTANCE);
LNGroupXPackageImpl theLNGroupXPackage = (LNGroupXPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LNGroupXPackage.eNS_URI) instanceof LNGroupXPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LNGroupXPackage.eNS_URI) : LNGroupXPackage.eINSTANCE);
LNGroupTPackageImpl theLNGroupTPackage = (LNGroupTPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LNGroupTPackage.eNS_URI) instanceof LNGroupTPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LNGroupTPackage.eNS_URI) : LNGroupTPackage.eINSTANCE);
LNGroupYPackageImpl theLNGroupYPackage = (LNGroupYPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LNGroupYPackage.eNS_URI) instanceof LNGroupYPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LNGroupYPackage.eNS_URI) : LNGroupYPackage.eINSTANCE);
LNGroupZPackageImpl theLNGroupZPackage = (LNGroupZPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LNGroupZPackage.eNS_URI) instanceof LNGroupZPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LNGroupZPackage.eNS_URI) : LNGroupZPackage.eINSTANCE);
DataclassesPackageImpl theDataclassesPackage = (DataclassesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DataclassesPackage.eNS_URI) instanceof DataclassesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DataclassesPackage.eNS_URI) : DataclassesPackage.eINSTANCE);
EnumerationsPackageImpl theEnumerationsPackage = (EnumerationsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EnumerationsPackage.eNS_URI) instanceof EnumerationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EnumerationsPackage.eNS_URI) : EnumerationsPackage.eINSTANCE);
// Load packages
theGluemodelPackage.loadPackage();
// Fix loaded packages
theInfAssetsPackage.fixPackageContents();
theGluemodelPackage.fixPackageContents();
theCOSEMPackage.fixPackageContents();
theDatatypesPackage.fixPackageContents();
theInterfaceClassesPackage.fixPackageContents();
theCOSEMObjectsPackage.fixPackageContents();
theCIMPackage.fixPackageContents();
theIEC61970Package.fixPackageContents();
theOperationalLimitsPackage.fixPackageContents();
theEnergySchedulingPackage.fixPackageContents();
theInfERPSupportPackage.fixPackageContents();
theInfAssetModelsPackage.fixPackageContents();
theInfGMLSupportPackage.fixPackageContents();
theInfCorePackage.fixPackageContents();
theMarketOperationsPackage.fixPackageContents();
theInfOperationsPackage.fixPackageContents();
theInfWorkPackage.fixPackageContents();
theInfPaymentMeteringPackage.fixPackageContents();
theInfCommonPackage.fixPackageContents();
theInfLocationsPackage.fixPackageContents();
theFinancialPackage.fixPackageContents();
theReservationPackage.fixPackageContents();
theInfMeteringPackage.fixPackageContents();
theInfCustomersPackage.fixPackageContents();
theInfLoadControlPackage.fixPackageContents();
theInfTypeAssetPackage.fixPackageContents();
theMeasPackage.fixPackageContents();
theGenerationDynamicsPackage.fixPackageContents();
theProductionPackage.fixPackageContents();
theSCADAPackage.fixPackageContents();
theWiresPackage.fixPackageContents();
theCorePackage.fixPackageContents();
theStateVariablesPackage.fixPackageContents();
theEquivalentsPackage.fixPackageContents();
theDomainPackage.fixPackageContents();
theLoadModelPackage.fixPackageContents();
theProtectionPackage.fixPackageContents();
theOutagePackage.fixPackageContents();
theControlAreaPackage.fixPackageContents();
theContingencyPackage.fixPackageContents();
theTopologyPackage.fixPackageContents();
thePackageDependenciesPackage.fixPackageContents();
theIEC61968Package.fixPackageContents();
theMeteringPackage.fixPackageContents();
theWiresExtPackage.fixPackageContents();
theCommonPackage.fixPackageContents();
theAssetModelsPackage.fixPackageContents();
thePaymentMeteringPackage.fixPackageContents();
theCustomersPackage.fixPackageContents();
theLoadControlPackage.fixPackageContents();
theAssetsPackage.fixPackageContents();
theWorkPackage.fixPackageContents();
theSubstationStandardPackage.fixPackageContents();
theDomainLNsPackage.fixPackageContents();
theLNGroupPPackage.fixPackageContents();
theLNGroupRPackage.fixPackageContents();
theLNGroupCPackage.fixPackageContents();
theLNGroupAPackage.fixPackageContents();
theLNGroupMPackage.fixPackageContents();
theLNGroupXPackage.fixPackageContents();
theLNGroupTPackage.fixPackageContents();
theLNGroupYPackage.fixPackageContents();
theLNGroupZPackage.fixPackageContents();
theDataclassesPackage.fixPackageContents();
theEnumerationsPackage.fixPackageContents();
// Mark meta-data to indicate it can't be changed
theInfAssetsPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(InfAssetsPackage.eNS_URI, theInfAssetsPackage);
return theInfAssetsPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getOrgAssetRole() {
if (orgAssetRoleEClass == null) {
orgAssetRoleEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(1);
}
return orgAssetRoleEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getOrgAssetRole_ErpOrganisation() {
return (EReference)getOrgAssetRole().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getOrgAssetRole_Asset() {
return (EReference)getOrgAssetRole().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getOrgAssetRole_PercentOwnership() {
return (EAttribute)getOrgAssetRole().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getShuntCompensatorInfo() {
if (shuntCompensatorInfoEClass == null) {
shuntCompensatorInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(4);
}
return shuntCompensatorInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getShuntCompensatorInfo_ShuntImpedanceInfo() {
return (EReference)getShuntCompensatorInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntCompensatorInfo_MaxPowerLoss() {
return (EAttribute)getShuntCompensatorInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPotentialTransformerInfo() {
if (potentialTransformerInfoEClass == null) {
potentialTransformerInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(5);
}
return potentialTransformerInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPotentialTransformerInfo_SecondaryRatio() {
return (EReference)getPotentialTransformerInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPotentialTransformerInfo_NominalRatio() {
return (EReference)getPotentialTransformerInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPotentialTransformerInfo_AccuracyClass() {
return (EAttribute)getPotentialTransformerInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPotentialTransformerInfo_PrimaryRatio() {
return (EReference)getPotentialTransformerInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPotentialTransformerInfo_PtClass() {
return (EAttribute)getPotentialTransformerInfo().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPotentialTransformerInfo_TertiaryRatio() {
return (EReference)getPotentialTransformerInfo().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getDuctInfo() {
if (ductInfoEClass == null) {
ductInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(7);
}
return ductInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getDuctInfo_YCoord() {
return (EAttribute)getDuctInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getDuctInfo_XCoord() {
return (EAttribute)getDuctInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getDuctInfo_CableInfos() {
return (EReference)getDuctInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getDuctInfo_DuctBankInfo() {
return (EReference)getDuctInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getDocAssetRole() {
if (docAssetRoleEClass == null) {
docAssetRoleEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(8);
}
return docAssetRoleEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getDocAssetRole_Asset() {
return (EReference)getDocAssetRole().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getDocAssetRole_Document() {
return (EReference)getDocAssetRole().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getMountingPoint() {
if (mountingPointEClass == null) {
mountingPointEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(10);
}
return mountingPointEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getMountingPoint_XCoord() {
return (EAttribute)getMountingPoint().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getMountingPoint_OverheadConductors() {
return (EReference)getMountingPoint().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getMountingPoint_Connections() {
return (EReference)getMountingPoint().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getMountingPoint_PhaseCode() {
return (EAttribute)getMountingPoint().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getMountingPoint_YCoord() {
return (EAttribute)getMountingPoint().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getSVCInfo() {
if (svcInfoEClass == null) {
svcInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(11);
}
return svcInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSVCInfo_CapacitiveRating() {
return (EAttribute)getSVCInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSVCInfo_InductiveRating() {
return (EAttribute)getSVCInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getFinancialInfo() {
if (financialInfoEClass == null) {
financialInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(12);
}
return financialInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFinancialInfo_CostType() {
return (EAttribute)getFinancialInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFinancialInfo_CostDescription() {
return (EAttribute)getFinancialInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFinancialInfo_Account() {
return (EAttribute)getFinancialInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFinancialInfo_PlantTransferDateTime() {
return (EAttribute)getFinancialInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFinancialInfo_WarrantyEndDateTime() {
return (EAttribute)getFinancialInfo().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFinancialInfo_ActualPurchaseCost() {
return (EAttribute)getFinancialInfo().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFinancialInfo_PurchaseDateTime() {
return (EAttribute)getFinancialInfo().getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFinancialInfo_PurchaseOrderNumber() {
return (EAttribute)getFinancialInfo().getEStructuralFeatures().get(7);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFinancialInfo_FinancialValue() {
return (EAttribute)getFinancialInfo().getEStructuralFeatures().get(8);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFinancialInfo_Quantity() {
return (EAttribute)getFinancialInfo().getEStructuralFeatures().get(9);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFinancialInfo_ValueDateTime() {
return (EAttribute)getFinancialInfo().getEStructuralFeatures().get(10);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getFinancialInfo_Asset() {
return (EReference)getFinancialInfo().getEStructuralFeatures().get(11);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getShuntImpedanceInfo() {
if (shuntImpedanceInfoEClass == null) {
shuntImpedanceInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(13);
}
return shuntImpedanceInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_LowVoltageOverride() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_CellSize() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_HighVoltageOverride() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_RegBranchKind() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_NormalOpen() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getShuntImpedanceInfo_ShuntCompensatorInfos() {
return (EReference)getShuntImpedanceInfo().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_RegBranchEnd() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_VRegLineLine() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(7);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_SwitchOperationCycle() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(8);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_LocalOffLevel() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(9);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_SensingPhaseCode() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(10);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_LocalControlKind() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(11);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_BranchDirect() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(12);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_MaxSwitchOperationCount() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(13);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_LocalOverride() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(14);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_LocalOnLevel() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(15);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_RegBranch() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(16);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getShuntImpedanceInfo_ControlKind() {
return (EAttribute)getShuntImpedanceInfo().getEStructuralFeatures().get(17);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getCabinet() {
if (cabinetEClass == null) {
cabinetEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(14);
}
return cabinetEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getComEquipmentInfo() {
if (comEquipmentInfoEClass == null) {
comEquipmentInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(15);
}
return comEquipmentInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getComEquipmentInfo_DeviceFunctions() {
return (EReference)getComEquipmentInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getBreakerInfo() {
if (breakerInfoEClass == null) {
breakerInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(16);
}
return breakerInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getBreakerInfo_PhaseTrip() {
return (EAttribute)getBreakerInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getGeneratorAsset() {
if (generatorAssetEClass == null) {
generatorAssetEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(17);
}
return generatorAssetEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getElectricalInfo() {
if (electricalInfoEClass == null) {
electricalInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(19);
}
return electricalInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_WireCount() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_IsConnected() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_Frequency() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_B0() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getElectricalInfo_ElectricalAssetModels() {
return (EReference)getElectricalInfo().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_R0() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_Bil() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_PhaseCount() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(7);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_X0() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(8);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_G0() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(9);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_PhaseCode() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(10);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_RatedCurrent() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(11);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getElectricalInfo_ElectricalAssets() {
return (EReference)getElectricalInfo().getEStructuralFeatures().get(12);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_X() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(13);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_R() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(14);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_RatedApparentPower() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(15);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_G() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(16);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_B() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(17);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalInfo_RatedVoltage() {
return (EAttribute)getElectricalInfo().getEStructuralFeatures().get(18);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getElectricalInfo_ElectricalTypeAssets() {
return (EReference)getElectricalInfo().getEStructuralFeatures().get(19);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getWindingInsulation() {
if (windingInsulationEClass == null) {
windingInsulationEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(21);
}
return windingInsulationEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getWindingInsulation_InsulationResistance() {
return (EAttribute)getWindingInsulation().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWindingInsulation_ToWinding() {
return (EReference)getWindingInsulation().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWindingInsulation_Ground() {
return (EReference)getWindingInsulation().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWindingInsulation_TransformerObservation() {
return (EReference)getWindingInsulation().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWindingInsulation_Status() {
return (EReference)getWindingInsulation().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getWindingInsulation_LeakageReactance() {
return (EAttribute)getWindingInsulation().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWindingInsulation_FromWinding() {
return (EReference)getWindingInsulation().getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getWindingInsulation_InsulationPFStatus() {
return (EAttribute)getWindingInsulation().getEStructuralFeatures().get(7);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getConductorAsset() {
if (conductorAssetEClass == null) {
conductorAssetEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(23);
}
return conductorAssetEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getConductorAsset_GroundingMethod() {
return (EAttribute)getConductorAsset().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getConductorAsset_CircuitSection() {
return (EReference)getConductorAsset().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getConductorAsset_ConductorSegment() {
return (EReference)getConductorAsset().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getConductorAsset_Insulated() {
return (EAttribute)getConductorAsset().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getConductorAsset_IsHorizontal() {
return (EAttribute)getConductorAsset().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getTransformerAsset() {
if (transformerAssetEClass == null) {
transformerAssetEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(25);
}
return transformerAssetEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getTransformerAsset_PowerRatings() {
return (EReference)getTransformerAsset().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getTransformerAsset_TransformerObservations() {
return (EReference)getTransformerAsset().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTransformerAsset_ReconditionedDateTime() {
return (EAttribute)getTransformerAsset().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getTransformerAsset_TransformerAssetModel() {
return (EReference)getTransformerAsset().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getTransformerAsset_TransformerInfo() {
return (EReference)getTransformerAsset().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getAssetPropertyCurve() {
if (assetPropertyCurveEClass == null) {
assetPropertyCurveEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(26);
}
return assetPropertyCurveEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getAssetPropertyCurve_Specification() {
return (EReference)getAssetPropertyCurve().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getAssetPropertyCurve_Assets() {
return (EReference)getAssetPropertyCurve().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPowerRating() {
if (powerRatingEClass == null) {
powerRatingEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(27);
}
return powerRatingEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPowerRating_CoolingKind() {
return (EAttribute)getPowerRating().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPowerRating_PowerRating() {
return (EAttribute)getPowerRating().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPowerRating_TransformerAssets() {
return (EReference)getPowerRating().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPowerRating_Stage() {
return (EAttribute)getPowerRating().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getAssetInfo() {
if (assetInfoEClass == null) {
assetInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(28);
}
return assetInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getAssetInfo_Asset() {
return (EReference)getAssetInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getAssetInfo_TypeAsset() {
return (EReference)getAssetInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getAssetInfo_AssetModel() {
return (EReference)getAssetInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getAssetInfo_DimensionsInfo() {
return (EReference)getAssetInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getJointInfo() {
if (jointInfoEClass == null) {
jointInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(30);
}
return jointInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getJointInfo_FillKind() {
return (EAttribute)getJointInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getJointInfo_ConfigurationKind() {
return (EAttribute)getJointInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getJointInfo_Insulation() {
return (EAttribute)getJointInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getMountingConnection() {
if (mountingConnectionEClass == null) {
mountingConnectionEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(31);
}
return mountingConnectionEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getMountingConnection_StructureInfos() {
return (EReference)getMountingConnection().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getMountingConnection_MountingPoints() {
return (EReference)getMountingConnection().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getSubstationInfo() {
if (substationInfoEClass == null) {
substationInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(32);
}
return substationInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSubstationInfo_Function() {
return (EAttribute)getSubstationInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getProtectionEquipmentInfo() {
if (protectionEquipmentInfoEClass == null) {
protectionEquipmentInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(34);
}
return protectionEquipmentInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getProtectionEquipmentInfo_PhaseTrip() {
return (EAttribute)getProtectionEquipmentInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getProtectionEquipmentInfo_GroundTrip() {
return (EAttribute)getProtectionEquipmentInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getSurgeProtectorInfo() {
if (surgeProtectorInfoEClass == null) {
surgeProtectorInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(36);
}
return surgeProtectorInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSurgeProtectorInfo_NominalDesignVoltage() {
return (EAttribute)getSurgeProtectorInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSurgeProtectorInfo_MaxCurrentRating() {
return (EAttribute)getSurgeProtectorInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSurgeProtectorInfo_MaxContinousOperatingVoltage() {
return (EAttribute)getSurgeProtectorInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSurgeProtectorInfo_MaxEnergyAbsorption() {
return (EAttribute)getSurgeProtectorInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getUndergroundStructureInfo() {
if (undergroundStructureInfoEClass == null) {
undergroundStructureInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(38);
}
return undergroundStructureInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getUndergroundStructureInfo_Material() {
return (EAttribute)getUndergroundStructureInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getUndergroundStructureInfo_HasVentilation() {
return (EAttribute)getUndergroundStructureInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getUndergroundStructureInfo_SealingWarrantyExpiresDate() {
return (EAttribute)getUndergroundStructureInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getUndergroundStructureInfo_Kind() {
return (EAttribute)getUndergroundStructureInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getProcedure() {
if (procedureEClass == null) {
procedureEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(40);
}
return procedureEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getProcedure_Kind() {
return (EAttribute)getProcedure().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getProcedure_SequenceNumber() {
return (EAttribute)getProcedure().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getProcedure_Limits() {
return (EReference)getProcedure().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getProcedure_CompatibleUnits() {
return (EReference)getProcedure().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getProcedure_ProcedureDataSets() {
return (EReference)getProcedure().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getProcedure_ProcedureValues() {
return (EReference)getProcedure().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getProcedure_CorporateCode() {
return (EAttribute)getProcedure().getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getProcedure_Instruction() {
return (EAttribute)getProcedure().getEStructuralFeatures().get(7);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getMedium() {
if (mediumEClass == null) {
mediumEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(42);
}
return mediumEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getMedium_VolumeSpec() {
return (EAttribute)getMedium().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getMedium_Kind() {
return (EAttribute)getMedium().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getMedium_Assets() {
return (EReference)getMedium().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getMedium_Specification() {
return (EReference)getMedium().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getStructureInfo() {
if (structureInfoEClass == null) {
structureInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(43);
}
return structureInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getStructureInfo_StructureSupportInfos() {
return (EReference)getStructureInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStructureInfo_WeedRemovedDate() {
return (EAttribute)getStructureInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStructureInfo_FumigantName() {
return (EAttribute)getStructureInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStructureInfo_FumigantAppliedDate() {
return (EAttribute)getStructureInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStructureInfo_RemoveWeed() {
return (EAttribute)getStructureInfo().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStructureInfo_Height() {
return (EAttribute)getStructureInfo().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStructureInfo_MaterialKind() {
return (EAttribute)getStructureInfo().getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStructureInfo_RatedVoltage() {
return (EAttribute)getStructureInfo().getEStructuralFeatures().get(7);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getStructureInfo_MountingConnections() {
return (EReference)getStructureInfo().getEStructuralFeatures().get(8);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getFACTSDeviceInfo() {
if (factsDeviceInfoEClass == null) {
factsDeviceInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(44);
}
return factsDeviceInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFACTSDeviceInfo_Kind() {
return (EAttribute)getFACTSDeviceInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getSwitchInfo() {
if (switchInfoEClass == null) {
switchInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(45);
}
return switchInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSwitchInfo_Gang() {
return (EAttribute)getSwitchInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSwitchInfo_PoleCount() {
return (EAttribute)getSwitchInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSwitchInfo_InterruptingRating() {
return (EAttribute)getSwitchInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSwitchInfo_DielectricStrength() {
return (EAttribute)getSwitchInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSwitchInfo_LoadBreak() {
return (EAttribute)getSwitchInfo().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSwitchInfo_MinimumCurrent() {
return (EAttribute)getSwitchInfo().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSwitchInfo_WithstandCurrent() {
return (EAttribute)getSwitchInfo().getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSwitchInfo_MakingCapacity() {
return (EAttribute)getSwitchInfo().getEStructuralFeatures().get(7);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSwitchInfo_Remote() {
return (EAttribute)getSwitchInfo().getEStructuralFeatures().get(8);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getProcedureDataSet() {
if (procedureDataSetEClass == null) {
procedureDataSetEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(46);
}
return procedureDataSetEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getProcedureDataSet_CompletedDateTime() {
return (EAttribute)getProcedureDataSet().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getProcedureDataSet_MeasurementValues() {
return (EReference)getProcedureDataSet().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getProcedureDataSet_TransformerObservations() {
return (EReference)getProcedureDataSet().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getProcedureDataSet_Properties() {
return (EReference)getProcedureDataSet().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getProcedureDataSet_Procedure() {
return (EReference)getProcedureDataSet().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getStreetlightInfo() {
if (streetlightInfoEClass == null) {
streetlightInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(48);
}
return streetlightInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStreetlightInfo_LightRating() {
return (EAttribute)getStreetlightInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStreetlightInfo_ArmLength() {
return (EAttribute)getStreetlightInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getStreetlightInfo_Pole() {
return (EReference)getStreetlightInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStreetlightInfo_LampKind() {
return (EAttribute)getStreetlightInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getDimensionsInfo() {
if (dimensionsInfoEClass == null) {
dimensionsInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(49);
}
return dimensionsInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getDimensionsInfo_Orientation() {
return (EAttribute)getDimensionsInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getDimensionsInfo_Locations() {
return (EReference)getDimensionsInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getDimensionsInfo_SizeWidth() {
return (EAttribute)getDimensionsInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getDimensionsInfo_Specifications() {
return (EReference)getDimensionsInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getDimensionsInfo_SizeDepth() {
return (EAttribute)getDimensionsInfo().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getDimensionsInfo_SizeDiameter() {
return (EAttribute)getDimensionsInfo().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getDimensionsInfo_AssetInfos() {
return (EReference)getDimensionsInfo().getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getDimensionsInfo_SizeLength() {
return (EAttribute)getDimensionsInfo().getEStructuralFeatures().get(7);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getWorkEquipmentInfo() {
if (workEquipmentInfoEClass == null) {
workEquipmentInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(50);
}
return workEquipmentInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWorkEquipmentInfo_Crew() {
return (EReference)getWorkEquipmentInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWorkEquipmentInfo_Usages() {
return (EReference)getWorkEquipmentInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getCurrentTransformerInfo() {
if (currentTransformerInfoEClass == null) {
currentTransformerInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(51);
}
return currentTransformerInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCurrentTransformerInfo_AccuracyClass() {
return (EAttribute)getCurrentTransformerInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCurrentTransformerInfo_CtClass() {
return (EAttribute)getCurrentTransformerInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getCurrentTransformerInfo_MaxRatio() {
return (EReference)getCurrentTransformerInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getCurrentTransformerInfo_PrimaryRatio() {
return (EReference)getCurrentTransformerInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCurrentTransformerInfo_CoreBurden() {
return (EAttribute)getCurrentTransformerInfo().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCurrentTransformerInfo_PrimaryFlsRating() {
return (EAttribute)getCurrentTransformerInfo().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCurrentTransformerInfo_AccuracyLimit() {
return (EAttribute)getCurrentTransformerInfo().getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCurrentTransformerInfo_KneePointCurrent() {
return (EAttribute)getCurrentTransformerInfo().getEStructuralFeatures().get(7);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getCurrentTransformerInfo_TertiaryRatio() {
return (EReference)getCurrentTransformerInfo().getEStructuralFeatures().get(8);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getCurrentTransformerInfo_NominalRatio() {
return (EReference)getCurrentTransformerInfo().getEStructuralFeatures().get(9);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCurrentTransformerInfo_Usage() {
return (EAttribute)getCurrentTransformerInfo().getEStructuralFeatures().get(10);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCurrentTransformerInfo_SecondaryFlsRating() {
return (EAttribute)getCurrentTransformerInfo().getEStructuralFeatures().get(11);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCurrentTransformerInfo_TertiaryFlsRating() {
return (EAttribute)getCurrentTransformerInfo().getEStructuralFeatures().get(12);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCurrentTransformerInfo_CoreCount() {
return (EAttribute)getCurrentTransformerInfo().getEStructuralFeatures().get(13);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCurrentTransformerInfo_KneePointVoltage() {
return (EAttribute)getCurrentTransformerInfo().getEStructuralFeatures().get(14);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getCurrentTransformerInfo_SecondaryRatio() {
return (EReference)getCurrentTransformerInfo().getEStructuralFeatures().get(15);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getStructureSupportInfo() {
if (structureSupportInfoEClass == null) {
structureSupportInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(52);
}
return structureSupportInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStructureSupportInfo_AnchorKind() {
return (EAttribute)getStructureSupportInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStructureSupportInfo_Kind() {
return (EAttribute)getStructureSupportInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStructureSupportInfo_Size() {
return (EAttribute)getStructureSupportInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getStructureSupportInfo_SecuredStructure() {
return (EReference)getStructureSupportInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStructureSupportInfo_AnchorRodCount() {
return (EAttribute)getStructureSupportInfo().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStructureSupportInfo_Length() {
return (EAttribute)getStructureSupportInfo().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStructureSupportInfo_AnchorRodLength() {
return (EAttribute)getStructureSupportInfo().getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStructureSupportInfo_Direction() {
return (EAttribute)getStructureSupportInfo().getEStructuralFeatures().get(7);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getElectricalAsset() {
if (electricalAssetEClass == null) {
electricalAssetEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(54);
}
return electricalAssetEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalAsset_PhaseCode() {
return (EAttribute)getElectricalAsset().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getElectricalAsset_IsConnected() {
return (EAttribute)getElectricalAsset().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getElectricalAsset_ConductingEquipment() {
return (EReference)getElectricalAsset().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getElectricalAsset_ElectricalInfos() {
return (EReference)getElectricalAsset().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getFailureEvent() {
if (failureEventEClass == null) {
failureEventEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(55);
}
return failureEventEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFailureEvent_FailureIsolationMethod() {
return (EAttribute)getFailureEvent().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFailureEvent_CorporateCode() {
return (EAttribute)getFailureEvent().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFailureEvent_FaultLocatingMethod() {
return (EAttribute)getFailureEvent().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFailureEvent_Location() {
return (EAttribute)getFailureEvent().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getRecloserInfo() {
if (recloserInfoEClass == null) {
recloserInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(57);
}
return recloserInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getRecloserInfo_PhaseTripRating() {
return (EAttribute)getRecloserInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getRecloserInfo_GroundTripNormalEnabled() {
return (EAttribute)getRecloserInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getRecloserInfo_GroundTripRating() {
return (EAttribute)getRecloserInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getRecloserInfo_RecloseLockoutCount() {
return (EAttribute)getRecloserInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getRecloserInfo_GroundTripCapable() {
return (EAttribute)getRecloserInfo().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getTowerInfo() {
if (towerInfoEClass == null) {
towerInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(58);
}
return towerInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTowerInfo_ConstructionKind() {
return (EAttribute)getTowerInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getTestDataSet() {
if (testDataSetEClass == null) {
testDataSetEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(60);
}
return testDataSetEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTestDataSet_SpecimenToLabDateTime() {
return (EAttribute)getTestDataSet().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTestDataSet_SpecimenID() {
return (EAttribute)getTestDataSet().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTestDataSet_Conclusion() {
return (EAttribute)getTestDataSet().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getSpecification() {
if (specificationEClass == null) {
specificationEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(61);
}
return specificationEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getSpecification_AssetProperites() {
return (EReference)getSpecification().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getSpecification_ReliabilityInfos() {
return (EReference)getSpecification().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getSpecification_Ratings() {
return (EReference)getSpecification().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getSpecification_QualificationRequirements() {
return (EReference)getSpecification().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getSpecification_AssetPropertyCurves() {
return (EReference)getSpecification().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getSpecification_DimensionsInfos() {
return (EReference)getSpecification().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getSpecification_Mediums() {
return (EReference)getSpecification().getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getCompositeSwitchInfo() {
if (compositeSwitchInfoEClass == null) {
compositeSwitchInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(63);
}
return compositeSwitchInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCompositeSwitchInfo_Kind() {
return (EAttribute)getCompositeSwitchInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCompositeSwitchInfo_InitOpMode() {
return (EAttribute)getCompositeSwitchInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCompositeSwitchInfo_Gang() {
return (EAttribute)getCompositeSwitchInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCompositeSwitchInfo_SwitchStateCount() {
return (EAttribute)getCompositeSwitchInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCompositeSwitchInfo_InterruptingRating() {
return (EAttribute)getCompositeSwitchInfo().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCompositeSwitchInfo_Remote() {
return (EAttribute)getCompositeSwitchInfo().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getFacility() {
if (facilityEClass == null) {
facilityEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(64);
}
return facilityEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFacility_Kind() {
return (EAttribute)getFacility().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getFaultIndicatorInfo() {
if (faultIndicatorInfoEClass == null) {
faultIndicatorInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(65);
}
return faultIndicatorInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFaultIndicatorInfo_ResetKind() {
return (EAttribute)getFaultIndicatorInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getReliabilityInfo() {
if (reliabilityInfoEClass == null) {
reliabilityInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(66);
}
return reliabilityInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getReliabilityInfo_MomFailureRate() {
return (EAttribute)getReliabilityInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getReliabilityInfo_Assets() {
return (EReference)getReliabilityInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getReliabilityInfo_MTTR() {
return (EAttribute)getReliabilityInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getReliabilityInfo_Specification() {
return (EReference)getReliabilityInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getTransformerObservation() {
if (transformerObservationEClass == null) {
transformerObservationEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(67);
}
return transformerObservationEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTransformerObservation_OilIFT() {
return (EAttribute)getTransformerObservation().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTransformerObservation_HotSpotTemp() {
return (EAttribute)getTransformerObservation().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTransformerObservation_OilDielectricStrength() {
return (EAttribute)getTransformerObservation().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getTransformerObservation_TransformerAsset() {
return (EReference)getTransformerObservation().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTransformerObservation_TopOilTemp() {
return (EAttribute)getTransformerObservation().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTransformerObservation_PumpVibration() {
return (EAttribute)getTransformerObservation().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTransformerObservation_BushingTemp() {
return (EAttribute)getTransformerObservation().getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTransformerObservation_WaterContent() {
return (EAttribute)getTransformerObservation().getEStructuralFeatures().get(7);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getTransformerObservation_Transformer() {
return (EReference)getTransformerObservation().getEStructuralFeatures().get(8);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getTransformerObservation_ProcedureDataSets() {
return (EReference)getTransformerObservation().getEStructuralFeatures().get(9);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTransformerObservation_FreqResp() {
return (EAttribute)getTransformerObservation().getEStructuralFeatures().get(10);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTransformerObservation_FurfuralDP() {
return (EAttribute)getTransformerObservation().getEStructuralFeatures().get(11);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getTransformerObservation_BushingInsultationPFs() {
return (EReference)getTransformerObservation().getEStructuralFeatures().get(12);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTransformerObservation_OilLevel() {
return (EAttribute)getTransformerObservation().getEStructuralFeatures().get(13);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTransformerObservation_OilColor() {
return (EAttribute)getTransformerObservation().getEStructuralFeatures().get(14);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getTransformerObservation_WindingInsulationPFs() {
return (EReference)getTransformerObservation().getEStructuralFeatures().get(15);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getTransformerObservation_Status() {
return (EReference)getTransformerObservation().getEStructuralFeatures().get(16);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTransformerObservation_Dga() {
return (EAttribute)getTransformerObservation().getEStructuralFeatures().get(17);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTransformerObservation_OilNeutralizationNumber() {
return (EAttribute)getTransformerObservation().getEStructuralFeatures().get(18);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getToolInfo() {
if (toolInfoEClass == null) {
toolInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(68);
}
return toolInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getToolInfo_Crew() {
return (EReference)getToolInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getToolInfo_LastCalibrationDate() {
return (EAttribute)getToolInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getDuctBankInfo() {
if (ductBankInfoEClass == null) {
ductBankInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(69);
}
return ductBankInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getDuctBankInfo_DuctInfos() {
return (EReference)getDuctBankInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getDuctBankInfo_CircuitCount() {
return (EAttribute)getDuctBankInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getVehicleInfo() {
if (vehicleInfoEClass == null) {
vehicleInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(70);
}
return vehicleInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getVehicleInfo_UsageKind() {
return (EAttribute)getVehicleInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getVehicleInfo_OdometerReadDateTime() {
return (EAttribute)getVehicleInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getVehicleInfo_Crew() {
return (EReference)getVehicleInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getVehicleInfo_OdometerReading() {
return (EAttribute)getVehicleInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getBushingInsulationPF() {
if (bushingInsulationPFEClass == null) {
bushingInsulationPFEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(71);
}
return bushingInsulationPFEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getBushingInsulationPF_BushingInfo() {
return (EReference)getBushingInsulationPF().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getBushingInsulationPF_Status() {
return (EReference)getBushingInsulationPF().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getBushingInsulationPF_TestKind() {
return (EAttribute)getBushingInsulationPF().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getBushingInsulationPF_TransformerObservation() {
return (EReference)getBushingInsulationPF().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getBushingInfo() {
if (bushingInfoEClass == null) {
bushingInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(73);
}
return bushingInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getBushingInfo_C2PowerFactor() {
return (EAttribute)getBushingInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getBushingInfo_BushingInsulationPFs() {
return (EReference)getBushingInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getBushingInfo_C2Capacitance() {
return (EAttribute)getBushingInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getBushingInfo_C1Capacitance() {
return (EAttribute)getBushingInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getBushingInfo_Terminal() {
return (EReference)getBushingInfo().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getBushingInfo_C1PowerFactor() {
return (EAttribute)getBushingInfo().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getBushingInfo_InsulationKind() {
return (EAttribute)getBushingInfo().getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getAssetAssetRole() {
if (assetAssetRoleEClass == null) {
assetAssetRoleEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(76);
}
return assetAssetRoleEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getAssetAssetRole_ToAsset() {
return (EReference)getAssetAssetRole().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getAssetAssetRole_FromAsset() {
return (EReference)getAssetAssetRole().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPoleInfo() {
if (poleInfoEClass == null) {
poleInfoEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(77);
}
return poleInfoEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPoleInfo_TreatedDateTime() {
return (EAttribute)getPoleInfo().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPoleInfo_BreastBlock() {
return (EAttribute)getPoleInfo().getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPoleInfo_Classification() {
return (EAttribute)getPoleInfo().getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPoleInfo_PreservativeKind() {
return (EAttribute)getPoleInfo().getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPoleInfo_JpaReference() {
return (EAttribute)getPoleInfo().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPoleInfo_BaseKind() {
return (EAttribute)getPoleInfo().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPoleInfo_Diameter() {
return (EAttribute)getPoleInfo().getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPoleInfo_Streetlights() {
return (EReference)getPoleInfo().getEStructuralFeatures().get(7);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPoleInfo_TreatmentKind() {
return (EAttribute)getPoleInfo().getEStructuralFeatures().get(8);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPoleInfo_Construction() {
return (EAttribute)getPoleInfo().getEStructuralFeatures().get(9);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPoleInfo_Length() {
return (EAttribute)getPoleInfo().getEStructuralFeatures().get(10);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPoleInfo_SpeciesType() {
return (EAttribute)getPoleInfo().getEStructuralFeatures().get(11);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getTapChangerAsset() {
if (tapChangerAssetEClass == null) {
tapChangerAssetEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(80);
}
return tapChangerAssetEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getTapChangerAsset_TapChangerAssetModel() {
return (EReference)getTapChangerAsset().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getPoleBaseKind() {
if (poleBaseKindEEnum == null) {
poleBaseKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(0);
}
return poleBaseKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getShuntImpedanceLocalControlKind() {
if (shuntImpedanceLocalControlKindEEnum == null) {
shuntImpedanceLocalControlKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(2);
}
return shuntImpedanceLocalControlKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getJointFillKind() {
if (jointFillKindEEnum == null) {
jointFillKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(3);
}
return jointFillKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getProcedureKind() {
if (procedureKindEEnum == null) {
procedureKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(6);
}
return procedureKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getStreetlightLampKind() {
if (streetlightLampKindEEnum == null) {
streetlightLampKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(9);
}
return streetlightLampKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getShuntImpedanceControlKind() {
if (shuntImpedanceControlKindEEnum == null) {
shuntImpedanceControlKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(18);
}
return shuntImpedanceControlKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getFailureIsolationMethodKind() {
if (failureIsolationMethodKindEEnum == null) {
failureIsolationMethodKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(20);
}
return failureIsolationMethodKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getUndergroundStructureKind() {
if (undergroundStructureKindEEnum == null) {
undergroundStructureKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(22);
}
return undergroundStructureKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getSubstationFunctionKind() {
if (substationFunctionKindEEnum == null) {
substationFunctionKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(24);
}
return substationFunctionKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getCoolingKind() {
if (coolingKindEEnum == null) {
coolingKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(29);
}
return coolingKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getPolePreservativeKind() {
if (polePreservativeKindEEnum == null) {
polePreservativeKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(33);
}
return polePreservativeKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getPoleTreatmentKind() {
if (poleTreatmentKindEEnum == null) {
poleTreatmentKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(35);
}
return poleTreatmentKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getFaultIndicatorResetKind() {
if (faultIndicatorResetKindEEnum == null) {
faultIndicatorResetKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(37);
}
return faultIndicatorResetKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getFACTSDeviceKind() {
if (factsDeviceKindEEnum == null) {
factsDeviceKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(39);
}
return factsDeviceKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getStructureSupportKind() {
if (structureSupportKindEEnum == null) {
structureSupportKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(41);
}
return structureSupportKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getVehicleUsageKind() {
if (vehicleUsageKindEEnum == null) {
vehicleUsageKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(47);
}
return vehicleUsageKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getRegulationBranchKind() {
if (regulationBranchKindEEnum == null) {
regulationBranchKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(53);
}
return regulationBranchKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getTowerConstructionKind() {
if (towerConstructionKindEEnum == null) {
towerConstructionKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(56);
}
return towerConstructionKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getBushingInsulationPfTestKind() {
if (bushingInsulationPfTestKindEEnum == null) {
bushingInsulationPfTestKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(59);
}
return bushingInsulationPfTestKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getBushingInsulationKind() {
if (bushingInsulationKindEEnum == null) {
bushingInsulationKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(62);
}
return bushingInsulationKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getCompositeSwitchKind() {
if (compositeSwitchKindEEnum == null) {
compositeSwitchKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(72);
}
return compositeSwitchKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getStructureMaterialKind() {
if (structureMaterialKindEEnum == null) {
structureMaterialKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(74);
}
return structureMaterialKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getMediumKind() {
if (mediumKindEEnum == null) {
mediumKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(75);
}
return mediumKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getAnchorKind() {
if (anchorKindEEnum == null) {
anchorKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(78);
}
return anchorKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getJointConfigurationKind() {
if (jointConfigurationKindEEnum == null) {
jointConfigurationKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(79);
}
return jointConfigurationKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getFacilityKind() {
if (facilityKindEEnum == null) {
facilityKindEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(InfAssetsPackage.eNS_URI).getEClassifiers().get(81);
}
return facilityKindEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public InfAssetsFactory getInfAssetsFactory() {
return (InfAssetsFactory)getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isFixed = false;
/**
* Fixes up the loaded package, to make it appear as if it had been programmatically built.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void fixPackageContents() {
if (isFixed) return;
isFixed = true;
fixEClassifiers();
}
/**
* Sets the instance class on the given classifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void fixInstanceClass(EClassifier eClassifier) {
if (eClassifier.getInstanceClassName() == null) {
eClassifier.setInstanceClassName("gluemodel.CIM.IEC61970.Informative.InfAssets." + eClassifier.getName());
setGeneratedClassName(eClassifier);
}
}
} //InfAssetsPackageImpl
| mit |
sergejey/majordomo | modules/terminals/terminals.class.php | 14254 | <?php
/**
* Terminals
*
* Terminals
*
* @package MajorDoMo
* @author Serge Dzheigalo <jey@tut.by> http://smartliving.ru/
* @version 0.3
*/
//
//
class terminals extends module
{
/**
* terminals
*
* Module class constructor
*
* @access private
*/
function __construct()
{
$this->name = "terminals";
$this->title = "<#LANG_MODULE_TERMINALS#>";
$this->module_category = "<#LANG_SECTION_SETTINGS#>";
$this->checkInstalled();
$this->serverip = getLocalIp();
}
/**
* saveParams
*
* Saving module parameters
*
* @access public
*/
function saveParams($data = 1)
{
$data = array();
if (IsSet($this->id)) {
$data["id"] = $this->id;
}
if (IsSet($this->view_mode)) {
$data["view_mode"] = $this->view_mode;
}
if (IsSet($this->edit_mode)) {
$data["edit_mode"] = $this->edit_mode;
}
if (IsSet($this->tab)) {
$data["tab"] = $this->tab;
}
return parent::saveParams($data);
}
/**
* getParams
*
* Getting module parameters from query string
*
* @access public
*/
function getParams($data = 1)
{
global $id;
global $mode;
global $view_mode;
global $edit_mode;
global $tab;
if (isset($id)) {
$this->id = $id;
}
if (isset($mode)) {
$this->mode = $mode;
}
if (isset($view_mode)) {
$this->view_mode = $view_mode;
}
if (isset($edit_mode)) {
$this->edit_mode = $edit_mode;
}
if (isset($tab)) {
$this->tab = $tab;
}
}
/**
* Run
*
* Description
*
* @access public
*/
function run()
{
global $session;
$out = array();
if ($this->action == 'admin') {
$this->admin($out);
} else {
$this->usual($out);
}
if (IsSet($this->owner->action)) {
$out['PARENT_ACTION'] = $this->owner->action;
}
if (IsSet($this->owner->name)) {
$out['PARENT_NAME'] = $this->owner->name;
}
$out['VIEW_MODE'] = $this->view_mode;
$out['EDIT_MODE'] = $this->edit_mode;
$out['MODE'] = $this->mode;
$out['ACTION'] = $this->action;
$out['TAB'] = $this->tab;
if ($this->single_rec) {
$out['SINGLE_REC'] = 1;
}
$this->data = $out;
$p = new parser(DIR_TEMPLATES . $this->name . "/" . $this->name . ".html", $this->data, $this);
$this->result = $p->result;
}
/**
* BackEnd
*
* Module backend
*
* @access public
*/
function admin(&$out)
{
if (isset($this->data_source) && !$_GET['data_source'] && !$_POST['data_source']) {
$out['SET_DATASOURCE'] = 1;
}
if ($this->data_source == 'terminals' || $this->data_source == '') {
if ($this->view_mode == '' || $this->view_mode == 'search_terminals') {
$this->search_terminals($out);
}
if ($this->view_mode == 'edit_terminals') {
$this->edit_terminals($out, $this->id);
}
if ($this->view_mode == 'delete_terminals') {
$this->delete_terminals($this->id);
$this->redirect("?");
}
}
}
/**
* FrontEnd
*
* Module frontend
*
* @access public
*/
function usual(&$out)
{
$this->admin($out);
}
/**
* terminals search
*
* @access public
*/
function search_terminals(&$out)
{
require(DIR_MODULES . $this->name . '/terminals_search.inc.php');
}
/**
* terminals edit/add
*
* @access public
*/
function edit_terminals(&$out, $id)
{
require(DIR_MODULES . $this->name . '/terminals_edit.inc.php');
}
/**
* terminals delete record
*
* @access public
*/
function delete_terminals($id)
{
if ($rec = getTerminalByID($id)) {
SQLExec('DELETE FROM `terminals` WHERE `ID` = ' . $rec['ID']);
}
}
function terminalSayByCache($terminal_rec, $cached_filename, $level)
{
$min_level = getGlobal('ThisComputer.minMsgLevel');
if ($terminal_rec['MIN_MSG_LEVEL']) {
$min_level = (int)processTitle($terminal_rec['MIN_MSG_LEVEL']);
}
if ($level < $min_level) {
return false;
}
if ($terminal_rec['MAJORDROID_API'] || $terminal_rec['PLAYER_TYPE'] == 'ghn') {
return;
}
if ($terminal_rec['CANPLAY'] && $terminal_rec['PLAYER_TYPE'] != '') {
if (preg_match('/\/cms\/cached.+/', $cached_filename, $m)) {
$server_ip = getLocalIp();
if (!$server_ip) {
DebMes("Server IP not found", 'terminals');
return false;
} else {
$cached_filename = 'http://' . $server_ip . $m[0];
}
} else {
DebMes("Unknown file path format: " . $cached_filename, 'terminals');
return false;
}
DebMes("Playing cached to " . $terminal_rec['TITLE'] . ' (level ' . $level . '): ' . $cached_filename, 'terminals');
playMedia($cached_filename, $terminal_rec['TITLE']);
}
}
function terminalSay($terminal_rec, $message, $level)
{
$asking = 0;
if ($level === 'ask') {
$level = 9999;
$asking = 1;
}
$min_level = getGlobal('ThisComputer.minMsgLevel');
if ($terminal_rec['MIN_MSG_LEVEL']) {
$min_level = (int)processTitle($terminal_rec['MIN_MSG_LEVEL']);
}
if ($level < $min_level) {
return false;
}
DebMes("Saying to " . $terminal_rec['TITLE'] . ' (level ' . $level . '): ' . $message, 'terminals');
include_once DIR_MODULES . 'terminals/tts_addon.class.php';
$addon_file = DIR_MODULES . 'terminals/tts/' . $terminal_rec['TTS_TYPE'] . '.addon.php';
if (file_exists($addon_file)) {
include_once($addon_file);
$tts = new $terminal_rec['TTS_TYPE']($terminal_rec);
if ($asking) {
$result = $tts->ask($message, $level);
} else {
$result = $tts->say($message, $level);
}
} else {
DebMes("Could not find $addon_file", 'terminals');
}
return $result;
}
/**
* terminals subscription events
*
* @access public
*/
function processSubscription($event, $details = '')
{
$this->getConfig();
DebMes("Processing $event: " . json_encode($details, JSON_UNESCAPED_UNICODE), 'terminals');
if ($event == 'SAY') {
$terminals = SQLSelect("SELECT * FROM terminals WHERE CANTTS=1 AND TTS_TYPE!=''");
foreach ($terminals as $terminal_rec) {
$this->terminalSay($terminal_rec, $details['message'], $details['level']);
}
} elseif ($event == 'SAYTO' || $event == 'ASK') {
$terminal_rec = array();
if ($details['destination']) {
if (!$terminal_rec = getTerminalsByName($details['destination'], 1)[0]) {
$terminal_rec = getTerminalsByHost($details['destination'], 1)[0];
}
}
if (!$terminal_rec['ID']) {
return false;
}
if ($event == 'ASK') {
$details['level'] = 'ask';
}
$this->terminalSay($terminal_rec, $details['message'], $details['level']);
} elseif ($event == 'SAY_CACHED_READY') {
$filename = $details['filename'];
if (!file_exists($filename)) return false;
if ($details['event']) {
$source_event = $details['event'];
} else {
$source_event = 'SAY';
}
if ($source_event == 'SAY') {
$terminals = SQLSelect("SELECT * FROM terminals WHERE CANTTS=1");
foreach ($terminals as $terminal_rec) {
//$this->terminalSayByCache($terminal_rec, $filename, $details['level']);
$this->terminalSayByCacheQueue($terminal_rec, $details['level'], $filename, $details['message']);
}
} elseif ($source_event == 'SAYTO' || $source_event == 'ASK') {
$terminal_rec = array();
if ($details['destination']) {
if (!$terminal_rec = getTerminalsByName($details['destination'], 1)[0]) {
$terminal_rec = getTerminalsByHost($details['destination'], 1)[0];
}
}
if (!$terminal_rec['ID']) {
return false;
}
if ($source_event == 'ASK') {
$details['level'] = 9999;
}
//$this->terminalSayByCache($terminal_rec, $filename, $details['level']);
$this->terminalSayByCacheQueue($terminal_rec, $details['level'], $filename, $details['message']);
}
} elseif ($event == 'HOURLY') {
// check terminals
$terminals = SQLSelect("SELECT * FROM terminals WHERE IS_ONLINE=0 AND HOST!=''");
foreach ($terminals as $terminal) {
if (ping($terminal['HOST'])) {
$terminal['LATEST_ACTIVITY'] = date('Y-m-d H:i:s');
$terminal['IS_ONLINE'] = 1;
SQLUpdate('terminals', $terminal);
}
}
SQLExec('UPDATE terminals SET IS_ONLINE=0 WHERE LATEST_ACTIVITY < (NOW() - INTERVAL 90 MINUTE)'); //
} elseif ($event == 'SAYREPLY') {
}
}
/**
* очередь сообщений
*
* @access public
*/
function terminalSayByCacheQueue($terminal_rec, $level, $cached_filename, $message)
{
$min_level = getGlobal('ThisComputer.minMsgLevel');
if ($terminal_rec['MIN_MSG_LEVEL']) {
$min_level = (int)processTitle($terminal_rec['MIN_MSG_LEVEL']);
}
if ($level < $min_level) {
return false;
}
DebMes("Saying cached to " . $terminal_rec['TITLE'] . ' (level ' . $level . '): ' . $message . " (file: $cached_filename)", 'terminals');
$result = false;
include_once DIR_MODULES . 'terminals/tts_addon.class.php';
$addon_file = DIR_MODULES . 'terminals/tts/' . $terminal_rec['TTS_TYPE'] . '.addon.php';
if (file_exists($addon_file)) {
include_once($addon_file);
$tts = new $terminal_rec['TTS_TYPE']($terminal_rec);
$result = $tts->sayCached($message, $level, $cached_filename);
} else {
DebMes("Could not find $addon_file", 'terminals');
}
return $result;
}
/**
* Install
*
* Module installation routine
*
* @access private
*/
function install($parent_name = "")
{
subscribeToEvent($this->name, 'SAY', '', 0);
subscribeToEvent($this->name, 'SAYREPLY', '', 0);
subscribeToEvent($this->name, 'SAYTO', '', 0);
subscribeToEvent($this->name, 'ASK', '', 0);
subscribeToEvent($this->name, 'SAY_CACHED_READY', 0);
subscribeToEvent($this->name, 'HOURLY');
parent::install($parent_name);
}
/**
* Uninstall
*
* Module uninstall routine
*
* @access public
*/
function uninstall()
{
SQLDropTable('terminals');
unsubscribeFromEvent($this->name, 'SAY');
unsubscribeFromEvent($this->name, 'SAYTO');
unsubscribeFromEvent($this->name, 'ASK');
unsubscribeFromEvent($this->name, 'SAYREPLY');
unsubscribeFromEvent($this->name, 'SAY_CACHED_READY');
unsubscribeFromEvent($this->name, 'HOURLY');
parent::uninstall();
}
/**
* dbInstall
*
* Database installation routine
*
* @access private
*/
function dbInstall($data)
{
/*
terminals - Terminals
*/
$data = <<<EOD
terminals: ID int(10) unsigned NOT NULL auto_increment
terminals: NAME varchar(255) NOT NULL DEFAULT ''
terminals: HOST varchar(255) NOT NULL DEFAULT ''
terminals: TITLE varchar(255) NOT NULL DEFAULT ''
terminals: CANPLAY int(3) NOT NULL DEFAULT '0'
terminals: CANTTS int(3) NOT NULL DEFAULT '0'
terminals: MIN_MSG_LEVEL varchar(255) NOT NULL DEFAULT ''
terminals: TTS_TYPE char(20) NOT NULL DEFAULT ''
terminals: PLAYER_TYPE char(20) NOT NULL DEFAULT ''
terminals: PLAYER_PORT varchar(255) NOT NULL DEFAULT ''
terminals: PLAYER_USERNAME varchar(255) NOT NULL DEFAULT ''
terminals: PLAYER_PASSWORD varchar(255) NOT NULL DEFAULT ''
terminals: PLAYER_CONTROL_ADDRESS varchar(255) NOT NULL DEFAULT ''
terminals: IS_ONLINE int(3) NOT NULL DEFAULT '0'
terminals: MAJORDROID_API int(3) NOT NULL DEFAULT '0'
terminals: LATEST_REQUEST varchar(255) NOT NULL DEFAULT ''
terminals: LATEST_REQUEST_TIME datetime
terminals: LATEST_ACTIVITY datetime
terminals: LINKED_OBJECT varchar(255) NOT NULL DEFAULT ''
terminals: LEVEL_LINKED_PROPERTY varchar(255) NOT NULL DEFAULT ''
terminals: LOCATION_ID int(5) NOT NULL DEFAULT '0'
EOD;
parent::dbInstall($data);
$terminals = SQLSelect("SELECT * FROM terminals WHERE TTS_TYPE='' AND CANTTS=1");
foreach ($terminals as $terminal) {
if ($terminal['MAJORDROID_API']) {
$terminal['TTS_TYPE'] = 'majordroid';
} else {
$terminal['TTS_TYPE'] = 'mediaplayer';
}
SQLUpdate('terminals', $terminal);
}
}
// --------------------------------------------------------------------
}
/*
*
* TW9kdWxlIGNyZWF0ZWQgTWFyIDI3LCAyMDA5IHVzaW5nIFNlcmdlIEouIHdpemFyZCAoQWN0aXZlVW5pdCBJbmMgd3d3LmFjdGl2ZXVuaXQuY29tKQ==
*
*/
?>
| mit |
jackmagic313/azure-sdk-for-net | sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyVaultPipeline.cs | 356 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using Azure.Core.Pipeline;
namespace Azure.Security.KeyVault
{
internal partial class KeyVaultPipeline
{
public KeyVaultPipeline(ClientDiagnostics clientDiagnostics)
{
Diagnostics = clientDiagnostics;
}
}
}
| mit |
facelessuser/sublime-markdown-popups | st3/mdpopups/pygments/lexers/iolang.py | 1890 | # -*- coding: utf-8 -*-
"""
pygments.lexers.iolang
~~~~~~~~~~~~~~~~~~~~~~
Lexers for the Io language.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from ..lexer import RegexLexer
from ..token import Text, Comment, Operator, Keyword, Name, String, \
Number
__all__ = ['IoLexer']
class IoLexer(RegexLexer):
"""
For `Io <http://iolanguage.com/>`_ (a small, prototype-based
programming language) source.
.. versionadded:: 0.10
"""
name = 'Io'
filenames = ['*.io']
aliases = ['io']
mimetypes = ['text/x-iosrc']
tokens = {
'root': [
(r'\n', Text),
(r'\s+', Text),
# Comments
(r'//(.*?)\n', Comment.Single),
(r'#(.*?)\n', Comment.Single),
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
(r'/\+', Comment.Multiline, 'nestedcomment'),
# DoubleQuotedString
(r'"(\\\\|\\"|[^"])*"', String),
# Operators
(r'::=|:=|=|\(|\)|;|,|\*|-|\+|>|<|@|!|/|\||\^|\.|%|&|\[|\]|\{|\}',
Operator),
# keywords
(r'(clone|do|doFile|doString|method|for|if|else|elseif|then)\b',
Keyword),
# constants
(r'(nil|false|true)\b', Name.Constant),
# names
(r'(Object|list|List|Map|args|Sequence|Coroutine|File)\b',
Name.Builtin),
('[a-zA-Z_]\w*', Name),
# numbers
(r'(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float),
(r'\d+', Number.Integer)
],
'nestedcomment': [
(r'[^+/]+', Comment.Multiline),
(r'/\+', Comment.Multiline, '#push'),
(r'\+/', Comment.Multiline, '#pop'),
(r'[+/]', Comment.Multiline),
]
}
| mit |
cryogen/gameteki | server/game/cards/06.4-TRW/SerAxellFlorent.js | 927 | const DrawCard = require('../../drawcard.js');
class SerAxellFlorent extends DrawCard {
setupCardAbilities(ability) {
this.reaction({
when: {
afterChallenge: ({challenge}) => challenge.winner === this.controller && challenge.isParticipating(this)
},
cost: ability.costs.discardGold(),
target: {
activePromptTitle: 'Select a character',
cardCondition: card => card.location === 'play area' && card.getType() === 'character' && card.attachments.size() === 0
},
handler: context => {
context.target.controller.kneelCard(context.target);
this.game.addMessage('{0} discards 1 gold from {1} to kneel {2}',
this.controller, this, context.target);
}
});
}
}
SerAxellFlorent.code = '06067';
module.exports = SerAxellFlorent;
| mit |
Injac/IoTHelpers | IoTHelpers/I2c/Devices/Adxl345Accelerometer.cs | 5606 | using IoTHelpers.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Windows.Devices.I2c;
namespace IoTHelpers.I2c.Devices
{
public struct Acceleration
{
public double X { get; internal set; }
public double Y { get; internal set; }
public double Z { get; internal set; }
};
public class Adxl345Accelerometer : I2cDeviceBase
{
// Address Constants
public const byte DefaultI2cAddress = 0x53; /* 7-bit I2C address of the ADXL345 with SDO pulled low */
private const byte ACCEL_REG_POWER_CONTROL = 0x2D; /* Address of the Power Control register */
private const byte ACCEL_REG_DATA_FORMAT = 0x31; /* Address of the Data Format register */
private const byte ACCEL_REG_X = 0x32; /* Address of the X Axis data register */
private const byte ACCEL_REG_Y = 0x34; /* Address of the Y Axis data register */
private const byte ACCEL_REG_Z = 0x36; /* Address of the Z Axis data register */
private const int ACCEL_RES = 1024; /* The ADXL345 has 10 bit resolution giving 1024 unique values */
private const int ACCEL_DYN_RANGE_G = 8; /* The ADXL345 had a total dynamic range of 8G, since we're configuring it to +-4G */
private const int UNITS_PER_G = ACCEL_RES / ACCEL_DYN_RANGE_G; /* Ratio of raw int values to G units */
private Timer timer;
private Acceleration lastAcceleration = new Acceleration();
public Acceleration CurrentAcceleration { get; private set; } = new Acceleration();
public bool RaiseEventsOnUIThread { get; set; } = false;
private TimeSpan readInterval = TimeSpan.FromMilliseconds(100);
public TimeSpan ReadInterval
{
get { return readInterval; }
set
{
readInterval = value;
if (timer != null)
timer.Change((int)readInterval.TotalMilliseconds, (int)readInterval.TotalMilliseconds);
}
}
public event EventHandler AccelerationChanged;
public Adxl345Accelerometer(int slaveAddress = DefaultI2cAddress, I2cBusSpeed busSpeed = I2cBusSpeed.FastMode, I2cSharingMode sharingMode = I2cSharingMode.Shared, string i2cControllerName = RaspberryPiI2cControllerName)
: base(slaveAddress, busSpeed, sharingMode, i2cControllerName)
{ }
protected override Task InitializeSensorAsync()
{
/*
* Initialize the accelerometer:
*
* For this device, we create 2-byte write buffers:
* The first byte is the register address we want to write to.
* The second byte is the contents that we want to write to the register.
*/
var writeBuf_DataFormat = new byte[] { ACCEL_REG_DATA_FORMAT, 0x01 }; /* 0x01 sets range to +- 4Gs */
var writeBuf_PowerControl = new byte[] { ACCEL_REG_POWER_CONTROL, 0x08 }; /* 0x08 puts the accelerometer into measurement mode */
/* Write the register settings */
Device.Write(writeBuf_DataFormat);
Device.Write(writeBuf_PowerControl);
/* Now that everything is initialized, create a timer so we read data every 100mS */
timer = new Timer(ReadSensor, null, 0, (int)readInterval.TotalMilliseconds);
return Task.FromResult<object>(null);
}
private void ReadSensor(object state)
{
CurrentAcceleration = this.ReadAcceleration();
if (CurrentAcceleration.X != lastAcceleration.X || CurrentAcceleration.Y != lastAcceleration.Y || CurrentAcceleration.Z != lastAcceleration.Z)
RaiseEventHelper.CheckRaiseEventOnUIThread(this, AccelerationChanged, RaiseEventsOnUIThread);
lastAcceleration = CurrentAcceleration;
}
private Acceleration ReadAcceleration()
{
var regAddrBuf = new byte[] { ACCEL_REG_X }; /* Register address we want to read from */
var readBuf = new byte[6]; /* We read 6 bytes sequentially to get all 3 two-byte axes registers in one read */
/*
* Read from the accelerometer
* We call WriteRead() so we first write the address of the X-Axis I2C register, then read all 3 axes
*/
Device.WriteRead(regAddrBuf, readBuf);
/*
* In order to get the raw 16-bit data values, we need to concatenate two 8-bit bytes from the I2C read for each axis.
* We accomplish this by using the BitConverter class.
*/
var accelerationRawX = BitConverter.ToInt16(readBuf, 0);
var accelerationRawY = BitConverter.ToInt16(readBuf, 2);
var accelerationRawZ = BitConverter.ToInt16(readBuf, 4);
/* Convert raw values to G's */
var accel = new Acceleration
{
X = (double)accelerationRawX / UNITS_PER_G,
Y = (double)accelerationRawY / UNITS_PER_G,
Z = (double)accelerationRawZ / UNITS_PER_G
};
return accel;
}
public override void Dispose()
{
if (timer != null)
timer.Dispose();
base.Dispose();
}
}
}
| mit |
Jigsaw-Code/go-tun2socks | core/handler.go | 762 | package core
import (
"net"
)
// TCPConnHandler handles TCP connections comming from TUN.
type TCPConnHandler interface {
// Handle handles the conn for target.
Handle(conn net.Conn, target *net.TCPAddr) error
}
// UDPConnHandler handles UDP connections comming from TUN.
type UDPConnHandler interface {
// Connect connects the proxy server. Note that target can be nil.
Connect(conn UDPConn, target *net.UDPAddr) error
// ReceiveTo will be called when data arrives from TUN.
ReceiveTo(conn UDPConn, data []byte, addr *net.UDPAddr) error
}
var tcpConnHandler TCPConnHandler
var udpConnHandler UDPConnHandler
func RegisterTCPConnHandler(h TCPConnHandler) {
tcpConnHandler = h
}
func RegisterUDPConnHandler(h UDPConnHandler) {
udpConnHandler = h
}
| mit |
gemini-testing/gemini | test/unit/browser/existing-browser.js | 1658 | 'use strict';
const _ = require('lodash');
const wd = require('wd');
const Promise = require('bluebird');
const ExistingBrowser = require('lib/browser/existing-browser');
describe('browser/existing-browser', () => {
const sandbox = sinon.sandbox.create();
let wdRemote;
const mkExistingBrowser = (opts) => {
opts = _.defaults(opts || {}, {
sessionId: '100500',
config: {},
calibration: {}
});
return new ExistingBrowser(opts.sessionId, opts.config, opts.calibration);
};
beforeEach(() => {
wdRemote = {
configureHttp: sinon.stub().returns(Promise.resolve()),
attach: sinon.stub().returns(Promise.resolve())
};
sandbox.stub(wd, 'promiseRemote');
wd.promiseRemote.returns(wdRemote);
});
afterEach(() => sandbox.restore());
describe('attach', () => {
it('should attach the browser with the specified session id', () => {
return mkExistingBrowser({sessionId: '100500'})
.attach()
.then(() => assert.calledWith(wdRemote.attach, '100500'));
});
it('should set http timeout for all requests', () => {
return mkExistingBrowser({config: {httpTimeout: 100500}})
.attach()
.then(() => assert.calledWithMatch(wdRemote.configureHttp, {timeout: 100500}));
});
it('should return promise with ExistingBrowser instance', () => {
const browser = mkExistingBrowser().attach();
return assert.eventually.instanceOf(browser, ExistingBrowser);
});
});
});
| mit |
Muktaranibiswas/ftflo2_laravel | resources/views/ecommerce_page/main-content/overview.blade.php | 16098 | <div class="col-md-6">
<!-- Begin: life time stats -->
<div class="portlet light">
<div class="portlet-title">
<div class="caption">
<i class="icon-bar-chart font-green-sharp"></i>
<span class="caption-subject font-green-sharp bold uppercase">Overview</span>
<span class="caption-helper">weekly stats...</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse">
</a>
<a href="#portlet-config" data-toggle="modal" class="config">
</a>
<a href="javascript:;" class="reload">
</a>
<a href="javascript:;" class="remove">
</a>
</div>
</div>
<div class="portlet-body">
<div class="tabbable-line">
<ul class="nav nav-tabs">
<li class="active">
<a href="#overview_1" data-toggle="tab">
Top Selling </a>
</li>
<li>
<a href="#overview_2" data-toggle="tab">
Most Viewed </a>
</li>
<li>
<a href="#overview_3" data-toggle="tab">
Customers </a>
</li>
<li class="dropdown">
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
Orders <i class="fa fa-angle-down"></i>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="#overview_4" tabindex="-1" data-toggle="tab">
Latest 10 Orders </a>
</li>
<li>
<a href="#overview_4" tabindex="-1" data-toggle="tab">
Pending Orders </a>
</li>
<li>
<a href="#overview_4" tabindex="-1" data-toggle="tab">
Completed Orders </a>
</li>
<li>
<a href="#overview_4" tabindex="-1" data-toggle="tab">
Rejected Orders </a>
</li>
</ul>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="overview_1">
<div class="table-responsive">
<table class="table table-hover table-light">
<thead>
<tr class="uppercase">
<th>
Product Name
</th>
<th>
Price
</th>
<th>
Sold
</th>
<th>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="javascript:;">
Apple iPhone 4s - 16GB - Black </a>
</td>
<td>
$625.50
</td>
<td>
809
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Samsung Galaxy S III SGH-I747 - 16GB </a>
</td>
<td>
$915.50
</td>
<td>
6709
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Motorola Droid 4 XT894 - 16GB - Black </a>
</td>
<td>
$878.50
</td>
<td>
784
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Regatta Luca 3 in 1 Jacket </a>
</td>
<td>
$25.50
</td>
<td>
1245
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Samsung Galaxy Note 3 </a>
</td>
<td>
$925.50
</td>
<td>
21245
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Inoval Digital Pen </a>
</td>
<td>
$125.50
</td>
<td>
1245
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Metronic - Responsive Admin + Frontend Theme </a>
</td>
<td>
$20.00
</td>
<td>
11190
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="overview_2">
<div class="table-responsive">
<table class="table table-hover table-light">
<thead>
<tr class="uppercase">
<th>
Product Name
</th>
<th>
Price
</th>
<th>
Views
</th>
<th>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="javascript:;">
Metronic - Responsive Admin + Frontend Theme </a>
</td>
<td>
$20.00
</td>
<td>
11190
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Regatta Luca 3 in 1 Jacket </a>
</td>
<td>
$25.50
</td>
<td>
1245
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Apple iPhone 4s - 16GB - Black </a>
</td>
<td>
$625.50
</td>
<td>
809
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Samsung Galaxy S III SGH-I747 - 16GB </a>
</td>
<td>
$915.50
</td>
<td>
6709
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Motorola Droid 4 XT894 - 16GB - Black </a>
</td>
<td>
$878.50
</td>
<td>
784
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Samsung Galaxy Note 3 </a>
</td>
<td>
$925.50
</td>
<td>
21245
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Inoval Digital Pen </a>
</td>
<td>
$125.50
</td>
<td>
1245
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="overview_3">
<div class="table-responsive">
<table class="table table-hover table-light">
<thead>
<tr>
<th>
Customer Name
</th>
<th>
Total Orders
</th>
<th>
Total Amount
</th>
<th>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="javascript:;">
David Wilson </a>
</td>
<td>
3
</td>
<td>
$625.50
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Amanda Nilson </a>
</td>
<td>
4
</td>
<td>
$12625.50
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Jhon Doe </a>
</td>
<td>
2
</td>
<td>
$125.00
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Bill Chang </a>
</td>
<td>
45
</td>
<td>
$12,125.70
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Paul Strong </a>
</td>
<td>
1
</td>
<td>
$890.85
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Jane Hilson </a>
</td>
<td>
5
</td>
<td>
$239.85
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Patrick Walker </a>
</td>
<td>
2
</td>
<td>
$1239.85
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="overview_4">
<div class="table-responsive">
<table class="table table-hover table-light">
<thead>
<tr class="uppercase">
<th>
Customer Name
</th>
<th>
Date
</th>
<th>
Amount
</th>
<th>
Status
</th>
<th>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="javascript:;">
David Wilson </a>
</td>
<td>
3 Jan, 2013
</td>
<td>
$625.50
</td>
<td>
<span class="label label-sm label-warning">
Pending </span>
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Amanda Nilson </a>
</td>
<td>
13 Feb, 2013
</td>
<td>
$12625.50
</td>
<td>
<span class="label label-sm label-warning">
Pending </span>
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Jhon Doe </a>
</td>
<td>
20 Mar, 2013
</td>
<td>
$125.00
</td>
<td>
<span class="label label-sm label-success">
Success </span>
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Bill Chang </a>
</td>
<td>
29 May, 2013
</td>
<td>
$12,125.70
</td>
<td>
<span class="label label-sm label-info">
In Process </span>
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Paul Strong </a>
</td>
<td>
1 Jun, 2013
</td>
<td>
$890.85
</td>
<td>
<span class="label label-sm label-success">
Success </span>
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Jane Hilson </a>
</td>
<td>
5 Aug, 2013
</td>
<td>
$239.85
</td>
<td>
<span class="label label-sm label-danger">
Canceled </span>
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
<tr>
<td>
<a href="javascript:;">
Patrick Walker </a>
</td>
<td>
6 Aug, 2013
</td>
<td>
$1239.85
</td>
<td>
<span class="label label-sm label-success">
Success </span>
</td>
<td>
<a href="javascript:;" class="btn default btn-xs green-stripe">
View </a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End: life time stats -->
</div>
| mit |
nicholasgriffintn/Accelerated-Mobile-Pages | templates/design-manager/design-3/single.php | 1142 | <?php global $redux_builder_amp; ?>
<!doctype html>
<html amp <?php echo AMP_HTML_Utils::build_attributes_string( $this->get( 'html_tag_attributes' ) ); ?>>
<head>
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://cdn.ampproject.org">
<?php do_action( 'amp_post_template_head', $this ); ?>
<style amp-custom>
<?php $this->load_parts( array( 'style' ) ); ?>
<?php do_action( 'amp_post_template_css', $this ); ?>
</style>
</head>
<body <?php ampforwp_body_class('design_3_wrapper');?> >
<?php do_action('ampforwp_body_beginning', $this); ?>
<?php $this->load_parts( array( 'header-bar' ) ); ?>
<?php do_action( 'ampforwp_after_header', $this ); ?>
<main>
<article class="amp-wp-article">
<?php do_action('ampforwp_post_before_design_elements') ?>
<?php $this->load_parts( apply_filters( 'ampforwp_design_elements', array( 'empty-filter' ) ) ); ?>
<?php do_action('ampforwp_post_after_design_elements') ?>
</article>
</main>
<?php do_action( 'amp_post_template_above_footer', $this ); ?>
<?php $this->load_parts( array( 'footer' ) ); ?>
<?php do_action( 'amp_post_template_footer', $this ); ?>
</body>
</html> | mit |
rbkloss/BealNetwork-DCC | server/main.cc | 318 | #include <cstdio>
#ifndef __linux__
#include "stdafx.h"
#endif
#include "TP3Server.h"
int main(int argc, char*argv[]) {
if (argc < 2) {
argv[1] = (char*) "27015";
/*printf("Usage:%s port\n", argv[0]);
return 0;*/
}
TP3Server server(argv[1]);
printf("Server: Server Started\n");
server.run();
return 0;
} | mit |
plumer/codana | tomcat_files/8.0.0/TesterDigestAuthenticatorPerformance.java | 8884 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.apache.catalina.authenticator;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicInteger;
import javax.servlet.http.HttpServletResponse;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
import org.apache.catalina.Context;
import org.apache.catalina.connector.Request;
import org.apache.catalina.core.StandardContext;
import org.apache.catalina.filters.TesterHttpServletResponse;
import org.apache.catalina.startup.TesterMapRealm;
import org.apache.catalina.util.ConcurrentMessageDigest;
import org.apache.catalina.util.MD5Encoder;
import org.apache.tomcat.util.descriptor.web.LoginConfig;
public class TesterDigestAuthenticatorPerformance {
private static String USER = "user";
private static String PWD = "pwd";
private static String ROLE = "role";
private static String METHOD = "GET";
private static String URI = "/protected";
private static String CONTEXT_PATH = "/foo";
private static String CLIENT_AUTH_HEADER = "authorization";
private static String REALM = "TestRealm";
private static String QOP = "auth";
private static final AtomicInteger nonceCount = new AtomicInteger(0);
private DigestAuthenticator authenticator = new DigestAuthenticator();
@Test
public void testSimple() throws Exception {
doTest(4, 1000000);
}
public void doTest(int threadCount, int requestCount) throws Exception {
TesterRunnable runnables[] = new TesterRunnable[threadCount];
Thread threads[] = new Thread[threadCount];
String nonce = authenticator.generateNonce(new TesterDigestRequest());
// Create the runnables & threads
for (int i = 0; i < threadCount; i++) {
runnables[i] =
new TesterRunnable(authenticator, nonce, requestCount);
threads[i] = new Thread(runnables[i]);
}
long start = System.currentTimeMillis();
// Start the threads
for (int i = 0; i < threadCount; i++) {
threads[i].start();
}
// Wait for the threads to finish
for (int i = 0; i < threadCount; i++) {
threads[i].join();
}
double wallTime = System.currentTimeMillis() - start;
// Gather the results...
double totalTime = 0;
int totalSuccess = 0;
for (int i = 0; i < threadCount; i++) {
System.out.println("Thread: " + i + " Success: " +
runnables[i].getSuccess());
totalSuccess = totalSuccess + runnables[i].getSuccess();
totalTime = totalTime + runnables[i].getTime();
}
System.out.println("Average time per request (user): " +
totalTime/(threadCount * requestCount));
System.out.println("Average time per request (wall): " +
wallTime/(threadCount * requestCount));
assertEquals(requestCount * threadCount, totalSuccess);
}
@Before
public void setUp() throws Exception {
ConcurrentMessageDigest.init("MD5");
// Configure the Realm
TesterMapRealm realm = new TesterMapRealm();
realm.addUser(USER, PWD);
realm.addUserRole(USER, ROLE);
// Add the Realm to the Context
Context context = new StandardContext();
context.setName(CONTEXT_PATH);
context.setRealm(realm);
// Configure the Login config
LoginConfig config = new LoginConfig();
config.setRealmName(REALM);
context.setLoginConfig(config);
// Make the Context and Realm visible to the Authenticator
authenticator.setContainer(context);
authenticator.setNonceCountWindowSize(8 * 1024);
authenticator.start();
}
private static class TesterRunnable implements Runnable {
private String nonce;
private int requestCount;
private int success = 0;
private long time = 0;
private TesterDigestRequest request;
private HttpServletResponse response;
private DigestAuthenticator authenticator;
private static final String A1 = USER + ":" + REALM + ":" + PWD;
private static final String A2 = METHOD + ":" + CONTEXT_PATH + URI;
private static final String MD5A1 = MD5Encoder.encode(
ConcurrentMessageDigest.digest("MD5", A1.getBytes()));
private static final String MD5A2 = MD5Encoder.encode(
ConcurrentMessageDigest.digest("MD5", A2.getBytes()));
// All init code should be in here. run() needs to be quick
public TesterRunnable(DigestAuthenticator authenticator,
String nonce, int requestCount) throws Exception {
this.authenticator = authenticator;
this.nonce = nonce;
this.requestCount = requestCount;
request = new TesterDigestRequest();
request.setContext(authenticator.context);
response = new TesterHttpServletResponse();
}
@Override
public void run() {
long start = System.currentTimeMillis();
for (int i = 0; i < requestCount; i++) {
try {
request.setAuthHeader(buildDigestResponse(nonce));
if (authenticator.authenticate(request, response)) {
success++;
}
// Clear out authenticated user ready for next iteration
request.setUserPrincipal(null);
} catch (IOException ioe) {
// Ignore
}
}
time = System.currentTimeMillis() - start;
}
public int getSuccess() {
return success;
}
public long getTime() {
return time;
}
private String buildDigestResponse(String nonce) {
String ncString = String.format("%1$08x",
Integer.valueOf(nonceCount.incrementAndGet()));
String cnonce = "cnonce";
String response = MD5A1 + ":" + nonce + ":" + ncString + ":" +
cnonce + ":" + QOP + ":" + MD5A2;
String md5response = MD5Encoder.encode(
ConcurrentMessageDigest.digest("MD5", response.getBytes()));
StringBuilder auth = new StringBuilder();
auth.append("Digest username=\"");
auth.append(USER);
auth.append("\", realm=\"");
auth.append(REALM);
auth.append("\", nonce=\"");
auth.append(nonce);
auth.append("\", uri=\"");
auth.append(CONTEXT_PATH + URI);
auth.append("\", opaque=\"");
auth.append(authenticator.getOpaque());
auth.append("\", response=\"");
auth.append(md5response);
auth.append("\"");
auth.append(", qop=");
auth.append(QOP);
auth.append(", nc=");
auth.append(ncString);
auth.append(", cnonce=\"");
auth.append(cnonce);
auth.append("\"");
return auth.toString();
}
}
private static class TesterDigestRequest extends Request {
private String authHeader = null;
@Override
public String getRemoteAddr() {
return "127.0.0.1";
}
public void setAuthHeader(String authHeader) {
this.authHeader = authHeader;
}
@Override
public String getHeader(String name) {
if (CLIENT_AUTH_HEADER.equalsIgnoreCase(name)) {
return authHeader;
} else {
return super.getHeader(name);
}
}
@Override
public String getMethod() {
return METHOD;
}
@Override
public String getQueryString() {
return null;
}
@Override
public String getRequestURI() {
return CONTEXT_PATH + URI;
}
}
}
| mit |
yads/netrunnerdb | src/AppBundle/Command/CreateClientCommand.php | 2520 | <?php
namespace AppBundle\Command;
use AppBundle\Entity\Client;
use FOS\OAuthServerBundle\Entity\ClientManager;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class CreateClientCommand extends ContainerAwareCommand
{
/** @var ClientManager $clientManager */
private $clientManager;
public function __construct(ClientManager $clientManager)
{
parent::__construct();
$this->clientManager = $clientManager;
}
protected function configure()
{
$this
->setName('app:oauth-server:client:create')
->setDescription('Creates a new client')
->addOption(
'redirect-uri',
null,
InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
'Sets redirect uri for client. Use this option multiple times to set multiple redirect URIs.',
null
)
->addOption(
'grant-type',
null,
InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
'Sets allowed grant type for client. Use this option multiple times to set multiple grant types..',
null
)
->addOption(
'client-name',
null,
InputOption::VALUE_REQUIRED,
'Sets the displayed name of the client',
null
)
->setHelp(
<<<EOT
The <info>%command.name%</info>command creates a new client.
<info>php %command.full_name% [--redirect-uri=...] [--grant-type=...] name</info>
EOT
);
}
protected function execute(InputInterface $input, OutputInterface $output)
{
/** @var Client $client */
$client = $this->clientManager->createClient();
$client->setRedirectUris($input->getOption('redirect-uri'));
$client->setAllowedGrantTypes($input->getOption('grant-type'));
$client->setName($input->getOption('client-name'));
$this->clientManager->updateClient($client);
$output->writeln(
sprintf(
'Added a new client with public id <info>%s</info>, secret <info>%s</info>',
$client->getPublicId(),
$client->getSecret()
)
);
}
}
| mit |
KattMingMing/vscode | src/vs/editor/common/model/model.ts | 3875 | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import URI from 'vs/base/common/uri';
import {
IModel, ITextModelCreationOptions
} from 'vs/editor/common/editorCommon';
import { EditableTextModel } from 'vs/editor/common/model/editableTextModel';
import { TextModel } from 'vs/editor/common/model/textModel';
import { IDisposable } from 'vs/base/common/lifecycle';
import { LanguageIdentifier } from 'vs/editor/common/modes';
import { IRawTextSource, RawTextSource } from 'vs/editor/common/model/textSource';
import * as textModelEvents from 'vs/editor/common/model/textModelEvents';
// The hierarchy is:
// Model -> EditableTextModel -> TextModelWithDecorations -> TextModelWithTrackedRanges -> TextModelWithMarkers -> TextModelWithTokens -> TextModel
var MODEL_ID = 0;
export class Model extends EditableTextModel implements IModel {
public onDidChangeDecorations(listener: (e: textModelEvents.IModelDecorationsChangedEvent) => void): IDisposable {
return this._eventEmitter.addListener(textModelEvents.TextModelEventType.ModelDecorationsChanged, listener);
}
public onDidChangeOptions(listener: (e: textModelEvents.IModelOptionsChangedEvent) => void): IDisposable {
return this._eventEmitter.addListener(textModelEvents.TextModelEventType.ModelOptionsChanged, listener);
}
public onWillDispose(listener: () => void): IDisposable {
return this._eventEmitter.addListener(textModelEvents.TextModelEventType.ModelDispose, listener);
}
public onDidChangeLanguage(listener: (e: textModelEvents.IModelLanguageChangedEvent) => void): IDisposable {
return this._eventEmitter.addListener(textModelEvents.TextModelEventType.ModelLanguageChanged, listener);
}
public onDidChangeLanguageConfiguration(listener: (e: textModelEvents.IModelLanguageConfigurationChangedEvent) => void): IDisposable {
return this._eventEmitter.addListener(textModelEvents.TextModelEventType.ModelLanguageConfigurationChanged, listener);
}
public static createFromString(text: string, options: ITextModelCreationOptions = TextModel.DEFAULT_CREATION_OPTIONS, languageIdentifier: LanguageIdentifier = null, uri: URI = null): Model {
return new Model(RawTextSource.fromString(text), options, languageIdentifier, uri);
}
public readonly id: string;
private readonly _associatedResource: URI;
private _attachedEditorCount: number;
constructor(rawTextSource: IRawTextSource, creationOptions: ITextModelCreationOptions, languageIdentifier: LanguageIdentifier, associatedResource: URI = null) {
super(rawTextSource, creationOptions, languageIdentifier);
// Generate a new unique model id
MODEL_ID++;
this.id = '$model' + MODEL_ID;
if (typeof associatedResource === 'undefined' || associatedResource === null) {
this._associatedResource = URI.parse('inmemory://model/' + MODEL_ID);
} else {
this._associatedResource = associatedResource;
}
this._attachedEditorCount = 0;
}
public destroy(): void {
this.dispose();
}
public dispose(): void {
this._isDisposing = true;
this._eventEmitter.emit(textModelEvents.TextModelEventType.ModelDispose);
super.dispose();
this._isDisposing = false;
}
public onBeforeAttached(): void {
this._attachedEditorCount++;
// Warm up tokens for the editor
this._warmUpTokens();
}
public onBeforeDetached(): void {
this._attachedEditorCount--;
}
protected _shouldAutoTokenize(): boolean {
return this.isAttachedToEditor();
}
public isAttachedToEditor(): boolean {
return this._attachedEditorCount > 0;
}
public get uri(): URI {
return this._associatedResource;
}
}
| mit |
CracKerMe/sh-job | src/components/mobile/toast/index.js | 1217 | /**
* Created by 于士博 on 2017/7/25.
* QQ: 491387425
* weChat: 491387425
* 组件 toast的 js代码
*
*/
import Vue from 'vue'
// 创建toast实例
const ToastConstructor = Vue.extend(require('./toast.vue'))
// 移除DOM的方法
let removeDom = event => {
event.target.parentNode.removeChild(event.target)
}
// 给子实例的原型添加关闭的方法 本质上是移除DOM节点
ToastConstructor.prototype.close = function () {
this.visible = false
this.$el.addEventListener('transitionend', removeDom)
}
const Toast = (options = {}) => {
// 新建一个toast组件的子实例挂载到一个新创建的div上
let instance = new ToastConstructor().$mount(document.createElement('div'))
let duration = options.duration || 2500
instance.message = typeof options === 'string' ? options : options.message
instance.position = options.position || 'middle'
// 将新建的实例的DOM节点添加到document中
document.body.appendChild(instance.$el)
instance.visible = true
// 更新DOM 定时器触发close的方法删除该DOM节点
Vue.nextTick(() => {
instance.timer = setTimeout(function () {
instance.close()
}, duration)
})
return instance
}
export default Toast
| mit |
arkency/rails_event_store | contrib/ruby_event_store-rom/lib/ruby_event_store/rom/event_repository.rb | 3228 | # frozen_string_literal: true
module RubyEventStore
module ROM
class EventRepository
def initialize(rom:, serializer:)
@serializer = serializer
@events = Repositories::Events.new(rom)
@stream_entries = Repositories::StreamEntries.new(rom)
@unit_of_work = UnitOfWork.new(rom.gateways.fetch(:default))
end
def append_to_stream(records, stream, expected_version)
serialized_records = records.map { |record| record.serialize(@serializer) }
event_ids = records.map(&:event_id)
handle_unique_violation do
@unit_of_work.call do |changesets|
changesets << @events.create_changeset(serialized_records)
changesets << @stream_entries.create_changeset(
event_ids,
stream,
@stream_entries.resolve_version(stream, expected_version)
)
end
end
self
end
def link_to_stream(event_ids, stream, expected_version)
validate_event_ids(event_ids)
handle_unique_violation do
@unit_of_work.call do |changesets|
changesets << @stream_entries.create_changeset(
event_ids,
stream,
@stream_entries.resolve_version(stream, expected_version)
)
end
end
self
end
def position_in_stream(event_id, stream)
@stream_entries.position_in_stream(event_id, stream)
end
def global_position(event_id)
@events.global_position(event_id)
end
def event_in_stream?(event_id, stream)
@stream_entries.event_in_stream?(event_id, stream)
end
def delete_stream(stream)
@stream_entries.delete(stream)
end
def has_event?(event_id)
@events.exist?(event_id)
rescue Sequel::DatabaseError => doh
raise doh unless doh.message =~ /PG::InvalidTextRepresentation.*uuid/
false
end
def last_stream_event(stream)
@events.last_stream_event(stream, @serializer)
end
def read(specification)
@events.read(specification, @serializer)
end
def count(specification)
@events.count(specification)
end
def update_messages(records)
validate_event_ids(records.map(&:event_id))
@unit_of_work.call do |changesets|
serialized_records = records.map { |record| record.serialize(@serializer) }
changesets << @events.update_changeset(serialized_records)
end
end
def streams_of(event_id)
@stream_entries
.streams_of(event_id)
.map { |name| Stream.new(name) }
end
private
def validate_event_ids(event_ids)
@events
.find_nonexistent_pks(event_ids)
.each { |id| raise EventNotFound, id }
end
def handle_unique_violation
yield
rescue ::ROM::SQL::UniqueConstraintError, Sequel::UniqueConstraintViolation => doh
raise ::RubyEventStore::EventDuplicatedInStream if IndexViolationDetector.new.detect(doh.message)
raise ::RubyEventStore::WrongExpectedEventVersion
end
end
end
end
| mit |
insionng/makross | i18n/conf/i18ntest.go | 646 | package main
import (
"fmt"
"github.com/insionng/macross"
"github.com/macross-contrib/i18n"
)
func main() {
m := macross.Classic()
m.Use(i18n.I18n(i18n.Options{
Directory: "locale",
DefaultLang: "zh-CN",
Langs: []string{"en-US", "zh-CN"},
Names: []string{"English", "简体中文"},
Redirect: true,
}))
m.Get("/", func(self *macross.Context) error {
return self.String("current language is " + self.Language())
})
// Use in handler.
m.Get("/trans", func(self *macross.Context) error {
return self.String(fmt.Sprintf("hello %s", self.Tr("world")))
})
fmt.Println("Listen on 9999")
m.Listen(9999)
}
| mit |
UselessToucan/osu | osu.Game/Rulesets/Mods/ModPerfect.cs | 1090 | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Mods
{
public abstract class ModPerfect : ModFailCondition
{
public override string Name => "Perfect";
public override string Acronym => "PF";
public override IconUsage? Icon => OsuIcon.ModPerfect;
public override ModType Type => ModType.DifficultyIncrease;
public override double ScoreMultiplier => 1;
public override string Description => "SS or quit.";
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModSuddenDeath)).ToArray();
protected override bool FailCondition(HealthProcessor healthProcessor, JudgementResult result)
=> result.Type.AffectsAccuracy()
&& result.Type != result.Judgement.MaxResult;
}
}
| mit |
RabadanLab/Pegasus | resources/hsqldb-2.2.7/hsqldb/src/org/hsqldb/test/TestTextTable.java | 19659 | /* 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.test;
import java.io.IOException;
import java.io.PrintStream;
import java.sql.SQLException;
import org.hsqldb.lib.FileUtil;
/** test various text table features
*
* @author frank.schoenheit@sun.com
*/
public class TestTextTable extends TestBase {
java.sql.Statement m_statement;
java.sql.Connection m_connection;
private class TextTableDescriptor {
private String m_name;
private String m_columnSpec;
private String m_separator;
private String m_separatorSpec;
private Object[][] m_data;
public TextTableDescriptor(String name, String columnSpec,
String separator, String separatorSpec,
Object[][] data) {
m_name = name;
m_columnSpec = columnSpec;
m_separator = separator;
m_separatorSpec = separatorSpec;
m_data = data;
}
public final String getName() {
return m_name;
}
public final String getColumnSpec() {
return m_columnSpec;
}
public final String getSeparator() {
return m_separator;
}
public final String getSeparatorSpec() {
return m_separatorSpec;
}
public final Object[][] getData() {
return m_data;
}
public final Object[][] appendRowData(Object[] rowData) {
Object[][] newData = new Object[m_data.length + 1][rowData.length];
for (int row = 0; row < m_data.length; ++row) {
newData[row] = m_data[row];
}
newData[m_data.length] = rowData;
m_data = newData;
return m_data;
}
/**
* creates a text file as described by this instance
*/
private void createTextFile() {
PrintStream textFile = null;
try {
String completeFileName = m_name + ".csv";
textFile = new PrintStream(
FileUtil.getFileUtil().openOutputStreamElement(
completeFileName));
new java.io.File(completeFileName).deleteOnExit();
} catch (IOException ex) {
fail(ex.toString());
}
for (int row = 0; row < m_data.length; ++row) {
StringBuffer buf = new StringBuffer();
int colCount = m_data[row].length;
for (int col = 0; col < colCount; ++col) {
buf.append(m_data[row][col].toString());
if (col + 1 != colCount) {
buf.append(m_separator);
}
}
textFile.println(buf.toString());
}
textFile.close();
}
private String getDataSourceSpec() {
return m_name + ".csv;encoding=UTF-8;fs=" + m_separatorSpec;
}
private void createTable(java.sql.Connection connection)
throws SQLException {
String createTable = "DROP TABLE \"" + m_name + "\" IF EXISTS;";
createTable += "CREATE TEXT TABLE \"" + m_name + "\" ( "
+ m_columnSpec + " );";
connection.createStatement().execute(createTable);
boolean test = isReadOnly(m_name);
String setTableSource = "SET TABLE \"" + m_name + "\" SOURCE \""
+ getDataSourceSpec() + "\"";
connection.createStatement().execute(setTableSource);
}
}
;
TextTableDescriptor m_products = new TextTableDescriptor("products",
"ID INTEGER PRIMARY KEY, \"name\" VARCHAR(20)", "\t", "\\t",
new Object[][] {
new Object[] {
new Integer(1), "Apples"
}, new Object[] {
new Integer(2), "Oranges"
}
});
TextTableDescriptor m_customers = new TextTableDescriptor("customers",
"ID INTEGER PRIMARY KEY," + "\"name\" VARCHAR(50),"
+ "\"address\" VARCHAR(50)," + "\"city\" VARCHAR(50),"
+ "\"postal\" VARCHAR(50)", ";", "\\semi", new Object[][] {
new Object[] {
new Integer(1), "Food, Inc.", "Down Under", "Melbourne", "509"
}, new Object[] {
new Integer(2), "Simply Delicious", "Down Under", "Melbourne",
"518"
}, new Object[] {
new Integer(3), "Pure Health", "10 Fish St.", "San Francisco",
"94107"
}
});
/** Creates a new instance of TestTextTable */
public TestTextTable(String testName) {
super(testName, null, false, false);
}
/**
* sets up all text files for the test database
*/
private void setupTextFiles() {
m_products.createTextFile();
m_customers.createTextFile();
}
/**
* creates the database tables needed for the test
*/
private void setupDatabase() {
try {
m_connection = newConnection();
m_statement = m_connection.createStatement();
m_products.createTable(m_connection);
m_customers.createTable(m_connection);
} catch (SQLException ex) {
fail(ex.toString());
}
}
public void setUp() {
super.setUp();
setupTextFiles();
setupDatabase();
}
protected void tearDown() {
executeStatement("SHUTDOWN");
super.tearDown();
}
/**
* returns the data source definition for a given text table
*/
private String getDataSourceSpec(String tableName) {
String spec = null;
try {
java.sql.ResultSet results = m_statement.executeQuery(
"SELECT DATA_SOURCE_DEFINTION FROM INFORMATION_SCHEMA.SYSTEM_TEXTTABLES "
+ "WHERE TABLE_NAME='" + tableName + "'");
results.next();
spec = results.getString(1);
} catch (SQLException ex) {
fail("getDataSourceSpec(" + tableName + ") failed: "
+ ex.toString());
}
return spec;
}
/**
* determines whether a given table is currently read-only
*/
private boolean isReadOnly(String tableName) {
boolean isReadOnly = true;
try {
java.sql.ResultSet systemTables = m_statement.executeQuery(
"SELECT READ_ONLY FROM INFORMATION_SCHEMA.SYSTEM_TABLES "
+ "WHERE TABLE_NAME='" + m_products.getName() + "'");
systemTables.next();
isReadOnly = systemTables.getBoolean(1);
} catch (SQLException ex) {
fail("isReadOnly(" + tableName + ") failed: " + ex.toString());
}
return isReadOnly;
}
/**
* checks different field separators
*/
private void checkSeparators() {
String[][] separators = new String[][] {
// special separators
new String[] {
";", "\\semi"
}, new String[] {
"\"", "\\quote"
}, new String[] {
" ", "\\space"
}, new String[] {
"'", "\\apos"
},
//new String[] { "\n", "\\n" },
// doesn't work as expected - seems I don't understand how this is intended to work?
new String[] {
"\t", "\\t"
}, new String[] {
"\\", "\\"
},
// some arbitrary separators which need not to be escaped
new String[] {
".", "."
}, new String[] {
"-", "-"
}, new String[] {
"#", "#"
}, new String[] {
",", ","
}
// unicode character
//new String[] { "\u1234", "\\u1234" }
// doesn't work. How do I specify in a FileOutputStream which encoding to use when writing
// strings?
};
for (int i = 0; i < separators.length; ++i) {
String separator = separators[i][0];
String separatorSpec = separators[i][1];
// create the file
String tableName = "customers_" + i;
TextTableDescriptor tempCustomersDesc =
new TextTableDescriptor(tableName,
m_customers.getColumnSpec(),
separator, separatorSpec,
m_customers.getData());
tempCustomersDesc.createTextFile();
try {
tempCustomersDesc.createTable(m_connection);
} catch (Throwable t) {
fail("checkSeparators: separator '" + separatorSpec
+ "' doesn't work: " + t.toString());
}
executeStatement("SET TABLE \"" + tableName + "\" SOURCE OFF");
executeStatement("DROP TABLE \"" + tableName + "\"");
}
}
/**
* verifies the content of a given table is as expected
* @param tableName
* the name of the table whose content is to check
* @param expectedValues
* the values expected in the table
*/
private void verifyTableContent(String tableName,
Object[][] expectedValues) {
String selectStmt = "SELECT * FROM \"" + tableName + "\" ORDER BY ID";
try {
java.sql.ResultSet results = m_statement.executeQuery(selectStmt);
int row = 0;
while (results.next()) {
row = results.getRow();
Object[] expectedRowContent = expectedValues[row - 1];
for (int col = 0; col < expectedRowContent.length; ++col) {
Object expectedValue = expectedRowContent[col];
Object foundValue = results.getObject(col + 1);
assertEquals("table " + tableName + ", row " + row
+ ", column " + col + ":", expectedValue,
foundValue);
}
}
// finally ensure that there are not more rows in the table than expected
assertEquals("table " + tableName + "'s row count: ",
expectedValues.length, row);
} catch (junit.framework.AssertionFailedError e) {
throw e;
} catch (Throwable t) {
fail("verifyTableContent(" + tableName + ") failed with "
+ t.toString());
}
}
/**
* executes a given m_statement
*
* <p>Basically, this method calls <code>m_statement.execute(sql)</code>,
* but wraps any <code>SQLException</code>s into a JUnit error.
*/
private void executeStatement(String sql) {
try {
m_statement.execute(sql);
} catch (SQLException ex) {
fail(ex.toString());
}
}
/**
* verifies the initial content of the "products" text table, plus a simple insertion
*/
private void verifyInitialContent() {
verifyTableContent(m_products.getName(), m_products.getData());
verifyTableContent(m_customers.getName(), m_customers.getData());
}
/**
* does some very basic insertion tests
*/
private void checkInsertions() {
// check whether inserting a value succeeds
executeStatement("INSERT INTO \"" + m_products.getName()
+ "\" VALUES ( 3, 'Pears' )");
verifyTableContent(m_products.getName(),
m_products.appendRowData(new Object[] {
new Integer(3), "Pears"
}));
// check whether the PK constraint works
try {
m_statement.execute("INSERT INTO \"" + m_products.getName()
+ "\" VALUES ( 1, 'Green Apples' )");
fail("PKs do not work as expected.");
} catch (SQLException e) {}
}
/**
* verifies whether implicit and explicit dis/connections from/to the text table source work
* as expected
*/
private void checkSourceConnection() {
String sqlSetTable = "SET TABLE \"" + m_products.getName() + "\"";
// preconditions for the following tests
assertEquals(
"internal error: retrieving the data source does not work properly at all.",
m_products.getDataSourceSpec(),
getDataSourceSpec(m_products.getName()));
assertFalse("internal error: table should not be read-only, initially",
isReadOnly(m_products.getName()));
// disconnect, see if the table behaves well afterwards
executeStatement(sqlSetTable + " SOURCE OFF");
assertEquals(
"Disconnecting a text table should not reset the table source.",
m_products.getDataSourceSpec(),
getDataSourceSpec(m_products.getName()));
assertTrue(
"Disconnecting from the table source should put the table into read-only mode.",
isReadOnly(m_products.getName()));
try {
java.sql.ResultSet tableContent =
m_statement.executeQuery("SELECT * FROM \""
+ m_products.getName() + "\"");
assertFalse("A disconnected table should be empty.",
tableContent.next());
} catch (SQLException ex) {
fail("Selecting from a disconnected table should return an empty result set.");
}
// reconnect, see if the table works as expected then
executeStatement(sqlSetTable + " SOURCE ON");
verifyTableContent(m_products.getName(), m_products.getData());
// check whether dis-/reconnecting a readonly table preserves the readonly-ness
executeStatement(sqlSetTable + " READONLY TRUE");
assertTrue("Setting the table to read-only failed.",
isReadOnly(m_products.getName()));
executeStatement(sqlSetTable + " SOURCE OFF");
assertTrue("Still, a disconnected table should be read-only.",
isReadOnly(m_products.getName()));
executeStatement(sqlSetTable + " SOURCE ON");
assertTrue(
"A reconnected readonly table should preserve its readonly-ness.",
isReadOnly(m_products.getName()));
executeStatement(sqlSetTable + " READONLY FALSE");
assertFalse("Unable to reset the readonly-ness.",
isReadOnly(m_products.getName()));
// check whether setting an invalid data source sets the table to readonly, by
// preserving the data source
try {
// create a malformed file
String fileName = "malformed.csv";
PrintStream textFile = new PrintStream(
FileUtil.getFileUtil().openOutputStreamElement(fileName));
textFile.println("not a number;some text");
textFile.close();
new java.io.File(fileName).deleteOnExit();
// try setting it as source
String newDataSourceSpec = fileName + ";encoding=UTF-8;fs=\\semi";
try {
m_statement.execute(sqlSetTable + " SOURCE \""
+ newDataSourceSpec + "\"");
fail("a malformed data source was accepted silently.");
} catch (java.sql.SQLException es) { /* that's expected here */
}
/*
// new - a malformed data source assignment by user should not survive
// and should revert to the existing one
assertTrue(
"A table with an invalid data source should fall back to read-only.",
isReadOnly(m_products.getName()));
assertEquals(
"A data source which cannot be set should nonetheless be remembered.",
newDataSourceSpec, getDataSourceSpec(m_products.getName()));
*/
// the data source spec should even survive a shutdown
executeStatement("SHUTDOWN");
m_connection = newConnection();
m_statement = m_connection.createStatement();
/*
assertEquals(
"A data source pointing to a mailformed file should survive a database shutdown.",
newDataSourceSpec, getDataSourceSpec(m_products.getName()));
assertTrue(
"After shutdown and DB-reconnect, the table with a malformed source should be read-only, again.",
isReadOnly(m_products.getName()));
*/
// reconnect after fixing the file
textFile = new PrintStream(
FileUtil.getFileUtil().openOutputStreamElement(fileName));
textFile.println("1;some text");
textFile.close();
executeStatement(sqlSetTable + " SOURCE ON");
assertFalse(
"The file was fixed, reconnect was successful, so the table shouldn't be read-only.",
isReadOnly(m_products.getName()));
// finally re-create the proper version of the table for any further tests
m_products.createTextFile();
m_products.createTable(m_connection);
verifyTableContent(m_products.getName(), m_products.getData());
} catch (junit.framework.AssertionFailedError e) {
throw e;
} catch (Throwable t) {
fail("checkSourceConnection: unable to check invalid data sources, error: "
+ t.toString());
}
}
/**
* basic tests for text files
*/
public void testTextFiles() {
verifyInitialContent();
checkInsertions();
checkSeparators();
checkSourceConnection();
}
public static void main(String[] argv) {
runWithResult(TestTextTable.class, "testTextFiles");
}
}
| mit |
hpi-swt2/workshop-portal | app/assets/javascripts/emails.js | 1410 | // Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
jQuery(function() {
$('#send-emails-clipboard').click(function () {
var recipients = $('#email_recipients')
if(recipients.val().length > 0) {
recipients.select();
try {
document.execCommand('copy');
} catch (err) {
console.log('Unable to copy emails to the clipboard');
}
}
});
$('.email-template.list-group-item').click(function (e) {
e.preventDefault();
var subject = $(this).children('.template-subject')[0].innerHTML;
var content = $(this).children('.template-content')[0].innerHTML;
var hide_recipients = $(this).children('.template-hide_recipients')[0].innerHTML == "true";
$('#email_subject').val(subject);
$('#email_content').val(content);
var show_recipients_button = $('#email_hide_recipients_false');
var hide_recipients_button = $('#email_hide_recipients_true');
show_recipients_button.attr('checked', !hide_recipients);
show_recipients_button.parent().toggleClass('active', !hide_recipients);
hide_recipients_button.attr('checked', hide_recipients);
hide_recipients_button.parent().toggleClass('active', hide_recipients);
});
}); | mit |
asrar7787/Test-Frontools | node_modules/caniuse-lite/data/features/webvtt.js | 808 | module.exports={A:{A:{"1":"B A","2":"J C G E TB"},B:{"1":"D X g H L"},C:{"2":"3 RB F I J C G E B A D X g H L M N O P Q R S PB OB","66":"T U V W t Y Z","129":"1 2 a b c d e f K h i j k l m n o p q v w x y z s r"},D:{"1":"1 2 7 9 N O P Q R S T U V W t Y Z a b c d e f K h i j k l m n o p q v w x y z s r DB SB AB BB","2":"F I J C G E B A D X g H L M"},E:{"1":"J C G E B A FB GB HB IB JB","2":"6 F I CB EB"},F:{"1":"H L M N O P Q R S T U V W t Y Z a b c d e f K h i j k l m n o p q","2":"0 4 5 E A D KB LB MB NB QB"},G:{"1":"G A WB XB YB ZB aB bB","2":"6 8 u UB VB"},H:{"2":"cB"},I:{"1":"r hB iB","2":"3 F dB eB fB gB u"},J:{"1":"B","2":"C"},K:{"1":"K","2":"0 4 5 B A D"},L:{"1":"7"},M:{"1":"s"},N:{"1":"A","2":"B"},O:{"2":"jB"},P:{"1":"F I"},Q:{"1":"kB"},R:{"1":"lB"}},B:5,C:"WebVTT - Web Video Text Tracks"};
| mit |
Acbentle/terrain474 | src/org/sunflow/system/Memory.java | 507 | package org.sunflow.system;
public final class Memory {
public static final String sizeof(int[] array) {
return bytesToString(array == null ? 0 : 4 * array.length);
}
public static final String bytesToString(long bytes) {
if (bytes < 1024)
return String.format("%db", bytes);
if (bytes < 1024 * 1024)
return String.format("%dKb", (bytes + 512) >>> 10);
return String.format("%dMb", (bytes + 512 * 1024) >>> 20);
}
} | mit |
jeffmiller00/FantasyDraft | test/controllers/positions_controller_test.rb | 1075 | require 'test_helper'
class PositionsControllerTest < ActionController::TestCase
setup do
@position = positions(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:positions)
end
test "should get new" do
get :new
assert_response :success
end
test "should create position" do
assert_difference('Position.count') do
post :create, position: { name: @position.name }
end
assert_redirected_to position_path(assigns(:position))
end
test "should show position" do
get :show, id: @position
assert_response :success
end
test "should get edit" do
get :edit, id: @position
assert_response :success
end
test "should update position" do
patch :update, id: @position, position: { name: @position.name }
assert_redirected_to position_path(assigns(:position))
end
test "should destroy position" do
assert_difference('Position.count', -1) do
delete :destroy, id: @position
end
assert_redirected_to positions_path
end
end
| mit |
navalev/azure-sdk-for-java | sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/CbsAuthorizationType.java | 1014 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.core.amqp.implementation;
import com.azure.core.amqp.ClaimsBasedSecurityNode;
/**
* An enumeration of supported authorization methods with the {@link ClaimsBasedSecurityNode}.
*/
public enum CbsAuthorizationType {
/**
* Authorize with CBS through a shared access signature.
*/
SHARED_ACCESS_SIGNATURE("servicebus.windows.net:sastoken"),
/**
* Authorize with CBS using a JSON web token.
*
* This is used in the case where Azure Active Directory is used for authentication and the authenticated user
* wants to authorize with Azure Event Hubs.
*/
JSON_WEB_TOKEN("jwt");
private final String scheme;
CbsAuthorizationType(String scheme) {
this.scheme = scheme;
}
/**
* Gets the token type scheme.
*
* @return The token type scheme.
*/
public String getTokenType() {
return scheme;
}
}
| mit |
peppelakappa/clipocket | shell.py | 2584 | '''
The MIT License (MIT)
Copyright (c) 2014 PeppeLaKappa
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.
'''
import parser
import os
def cpShell(pocketDict, entries):
for i in range(0, entries):
print("{}) {}".format(i,pocketDict[i]["resolved_title"]))
prompt = input("\nclipocket> ")
prompt = prompt.split(" ")
if len(prompt) > 2 or len(prompt) < 2 and prompt[0] is not "clear":
if prompt[0] == "exit":
exit()
elif prompt[0] == "clear":
os.system("clear")
return
else:
cpHelp()
return
command = prompt[0]
argument = prompt[1]
if command == "help":
cpHelp()
elif command == "read":
cpRead(argument, pocketDict)
elif command == "done":
cpDone()
elif command == "rm":
cpRm()
elif command == "star":
cpStar()
def cpHelp():
print("\nCLIPocket command reference:\n\tread: read a post\n\tdone: mark as read\n\trm: delete an entry\n\tstar: star an entry\n\tclear: clear the screen\n\texit: quit clipocket\n")
def cpDone():
print("Not implemented yet :(")
def cpRm():
print("Not implemented yet :(")
def cpStar():
print("Not implemented yet :(")
def cpRead(index, pocketDict):
if index == 0:
print("Syntax:\n\tread [entry-number]")
return "error"
else:
title = pocketDict[int(index)]["resolved_title"]
url = pocketDict[int(index)]["resolved_url"]
parser.createManPage(title, url)
| mit |
brucewar/poem | Infrastructure/BackEnd/node_modules/oss-client/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDNotation.js | 1688 | // Generated by CoffeeScript 1.6.1
(function() {
var XMLDTDNotation, _;
_ = require('underscore');
module.exports = XMLDTDNotation = (function() {
function XMLDTDNotation(parent, name, value) {
this.stringify = parent.stringify;
if (name == null) {
throw new Error("Missing notation name");
}
if (!value.pubID && !value.sysID) {
throw new Error("Public or system identifiers are required for an external entity");
}
this.name = this.stringify.eleName(name);
if (value.pubID != null) {
this.pubID = this.stringify.dtdPubID(value.pubID);
}
if (value.sysID != null) {
this.sysID = this.stringify.dtdSysID(value.sysID);
}
}
XMLDTDNotation.prototype.toString = function(options, level) {
var indent, newline, pretty, r, space;
pretty = (options != null ? options.pretty : void 0) || false;
indent = (options != null ? options.indent : void 0) || ' ';
newline = (options != null ? options.newline : void 0) || '\n';
level || (level = 0);
space = new Array(level + 1).join(indent);
r = '';
if (pretty) {
r += space;
}
r += '<!NOTATION ' + this.name;
if (this.pubID && this.sysID) {
r += ' PUBLIC "' + this.pubID + '" "' + this.sysID + '"';
} else if (this.pubID) {
r += ' PUBLIC "' + this.pubID + '"';
} else if (this.sysID) {
r += ' SYSTEM "' + this.sysID + '"';
}
r += '>';
if (pretty) {
r += newline;
}
return r;
};
return XMLDTDNotation;
})();
}).call(this);
| mit |
gonshi/boombox.js | Gruntfile.js | 2762 | (function () {
var project = {
name: 'boombox.js'
};
module.exports = function (grunt) {
// enviroment
project.dir = grunt.file.findup('../' + project.name);
grunt.log.ok('[environment] project name:', project.name);
grunt.log.ok('[environment] project directory:', project.dir);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: {
src: ['docs', 'report']
},
exec: {
spec_foundation: {
command: 'beez-foundation -c spec/foundation/spec.js -a ' + project.name + ':' + project.dir,
stdout: true,
stderr: true
},
},
jshint: {
src: ['boombox.js'],
options: {
jshintrc: '.jshintrc',
jshintignore: ".jshintignore"
}
},
mkdir: {
docs: {
options: {
mode: 0755,
create: ['docs']
}
}
},
jsdoc : {
dist : {
src: ['boombox.js'],
options: {
lenient: true,
recurse: true,
private: true,
destination: 'docs',
configure: '.jsdoc3.json'
}
}
},
uglify: {
options: {
sourceMap: 'boombox.min.map',
preserveComments: 'some'
},
default: {
files: {
'boombox.min.js': ['boombox.js']
}
}
},
plato: {
default: {
files: {
'report': ['boombox.js']
}
}
}
});
// These plugins provide necessary tasks.
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// task: foundation
grunt.registerTask('foundation', [
'exec:spec_foundation'
]);
// task: build
grunt.registerTask('build', [
'jshint',
'uglify:default'
]);
// task: docs
grunt.registerTask('docs', [
'mkdir:docs',
'plato',
'jsdoc'
]);
// task: defulat
grunt.registerTask('default', [
'clean',
'docs',
'build'
]);
};
})(this);
| mit |
nelsonsilva/ShareJS | webclient/ace.js | 3424 | (function() {
var Range, applyToShareJS;
Range = require("ace/range").Range;
applyToShareJS = function(editorDoc, delta, doc) {
var getStartOffsetPosition, pos, text;
getStartOffsetPosition = function(range) {
var i, line, lines, offset, _len;
lines = editorDoc.getLines(0, range.start.row);
offset = 0;
for (i = 0, _len = lines.length; i < _len; i++) {
line = lines[i];
offset += i < range.start.row ? line.length : range.start.column;
}
return offset + range.start.row;
};
pos = getStartOffsetPosition(delta.range);
switch (delta.action) {
case 'insertText':
doc.insert(pos, delta.text);
break;
case 'removeText':
doc.del(pos, delta.text.length);
break;
case 'insertLines':
text = delta.lines.join('\n') + '\n';
doc.insert(pos, text);
break;
case 'removeLines':
text = delta.lines.join('\n') + '\n';
doc.del(pos, text.length);
break;
default:
throw new Error("unknown action: " + delta.action);
}
};
window.sharejs.extendDoc('attach_ace', function(editor, keepEditorContents) {
var check, doc, docListener, editorDoc, editorListener, offsetToPos, suppress;
if (!this.provides['text']) {
throw new Error('Only text documents can be attached to ace');
}
doc = this;
editorDoc = editor.getSession().getDocument();
editorDoc.setNewLineMode('unix');
check = function() {
return window.setTimeout(function() {
var editorText, otText;
editorText = editorDoc.getValue();
otText = doc.getText();
if (editorText !== otText) {
console.error("Text does not match!");
console.error("editor: " + editorText);
return console.error("ot: " + otText);
}
}, 0);
};
if (keepEditorContents) {
doc.del(0, doc.getText().length);
doc.insert(0, editorDoc.getValue());
} else {
editorDoc.setValue(doc.getText());
}
check();
suppress = false;
editorListener = function(change) {
if (suppress) return;
applyToShareJS(editorDoc, change.data, doc);
return check();
};
editorDoc.on('change', editorListener);
docListener = function(op) {
suppress = true;
applyToDoc(editorDoc, op);
suppress = false;
return check();
};
offsetToPos = function(offset) {
var line, lines, row, _len;
lines = editorDoc.getAllLines();
row = 0;
for (row = 0, _len = lines.length; row < _len; row++) {
line = lines[row];
if (offset <= line.length) break;
offset -= lines[row].length + 1;
}
return {
row: row,
column: offset
};
};
doc.on('insert', function(pos, text) {
suppress = true;
editorDoc.insert(offsetToPos(pos), text);
suppress = false;
return check();
});
doc.on('delete', function(pos, text) {
var range;
suppress = true;
range = Range.fromPoints(offsetToPos(pos), offsetToPos(pos + text.length));
editorDoc.remove(range);
suppress = false;
return check();
});
doc.detach_ace = function() {
doc.removeListener('remoteop', docListener);
editorDoc.removeListener('change', editorListener);
return delete doc.detach_ace;
};
});
}).call(this);
| mit |
flupzor/bijgeschaafd | news/es.py | 1784 | from elasticsearch import Elasticsearch, helpers
class ESObjectList(object):
"""
Very simple wrapper around elastic search and django models
which creates a object list of django orm objects, which
have been found using elastic search.
This object list can then be used as input for the django paginator.
"""
def __init__(self, query, results, model):
self.query = query
self.results = results
self.model = model
@classmethod
def search(cls, index, query, model):
"""
:param index str elastic search index.
:param query dict elastic search query, following query dsl.
:param results dict results as returned by elasticsearch.Elasticsearch
:param model The django ORM class which should be used to find the results
in the database.
"""
client = Elasticsearch()
results = client.search(index=index, body=query)
return cls(query, results, model)
def count(self):
return self.results['hits']['total']
def __len__(self):
return self.count()
def __getitem__(self, index):
_from = self.query['from']
if isinstance(index, slice):
assert index.start >= _from
assert index.stop >= _from
assert index.stop <= _from + self.query['size']
_start = index.start - _from
_stop = index.stop - _from
_step = index.step
pks = [result['_id'] for result in self.results['hits']['hits'][_start:_stop:_step]]
return self.model.objects.filter(pk__in=pks)
index_in_result = index - _from
pk = self.results['hits']['hits'][index_in_result]['_id']
return self.model.objects.get(pk=pk)
| mit |
CodeSequence/sanmyaku | gulp/tasks/default.js | 151 | 'use strict';
var config = require('../config');
var gulp = require('gulp');
gulp.task('default', [config.defaultgulp], function() {
}); | mit |
egovernment/eregistrations-demo | node_modules/dbjs/_setup/notify/on-value-turn.js | 3373 | 'use strict';
var notifyMultiple = require('./item')
, notifyProperty = require('./property')
, hasOwnProperty = Object.prototype.hasOwnProperty
, notifyDesc, notifyDescDescendants, notifyItem
, notifyItemDescendants, notifyTurnedProperty, notifyTurnedItem;
notifyDescDescendants = function (obj, desc, nu, old, dbEvent, postponed) {
if (!obj.hasOwnProperty('__descendants__')) return postponed;
obj.__descendants__._plainForEach_(function (obj) {
if (obj.hasOwnProperty('__descriptors__')) {
if (hasOwnProperty.call(obj.__descriptors__, desc._sKey_)) return;
}
postponed = notifyTurnedProperty(obj, desc, nu, old, dbEvent, postponed);
postponed = notifyDescDescendants(obj, desc, nu, old, dbEvent, postponed);
});
return postponed;
};
notifyTurnedProperty = function (obj, desc, nu, old, dbEvent, postponed) {
var nuValid, oldValid;
if (desc._reverse_) return postponed;
if (desc.nested) return postponed;
if (desc.multiple) return postponed;
if (nu === desc.type) nuValid = true;
else if (desc.type.isPrototypeOf(nu)) nuValid = true;
if (old === desc.type) oldValid = true;
else if (desc.type.isPrototypeOf(old)) oldValid = true;
if (nuValid === oldValid) return postponed;
return notifyProperty(obj, desc._sKey_, nuValid ? desc._value_ : null,
oldValid ? desc._value_ : null, null, null, dbEvent, postponed);
};
notifyDesc = function (desc, nu, old, dbEvent, postponed) {
postponed = notifyTurnedProperty(desc.object, desc, nu, old,
dbEvent, postponed);
return notifyDescDescendants(desc.object, desc, nu, old,
dbEvent, postponed);
};
notifyItemDescendants = function (obj, item, nu, old, dbEvent, postponed) {
if (!obj.hasOwnProperty('__descendants__')) return postponed;
obj.__descendants__._plainForEach_(function (obj) {
if (obj.hasOwnProperty('__multiples__')) {
if (hasOwnProperty.call(obj.__multiples__, item._pSKey_)) {
if (hasOwnProperty.call(obj.__multiples__[item._pSKey_], item._sKey_)) {
return;
}
}
}
postponed = notifyTurnedItem(obj, item, nu, old, dbEvent, postponed);
postponed = notifyItemDescendants(obj, item, nu, old, dbEvent, postponed);
});
return postponed;
};
notifyTurnedItem = function (obj, item, nu, old, dbEvent, postponed) {
var desc = obj._getDescriptor_(item._pSKey_), nuValid, oldValid;
if (desc._reverse_) return postponed;
if (desc.nested) return postponed;
if (!desc.multiple) return postponed;
if (nu === desc.type) nuValid = true;
else if (desc.type.isPrototypeOf(nu)) nuValid = true;
if (old === desc.type) oldValid = true;
else if (desc.type.isPrototypeOf(old)) oldValid = true;
if (nuValid === oldValid) return postponed;
return notifyMultiple(obj, item._pSKey_, item._sKey_, item.key, nuValid,
null, dbEvent, postponed);
};
notifyItem = function (item, nu, old, dbEvent, postponed) {
postponed = notifyTurnedItem(item.object, item, nu, old,
dbEvent, postponed);
return notifyItemDescendants(item.object, item, nu, old,
dbEvent, postponed);
};
module.exports = function (obj, nu, old, dbEvent, postponed) {
if (!obj.hasOwnProperty('__assignments__')) return postponed;
obj.__assignments__._plainForEach_(function (obj) {
if (obj._kind_ === 'descriptor') {
postponed = notifyDesc(obj, nu, old, dbEvent, postponed);
return;
}
postponed = notifyItem(obj, nu, old, dbEvent, postponed);
});
return postponed;
};
| mit |
egovernment/eregistrations-demo | node_modules/observable-array/test/is-observable-array.js | 584 | 'use strict';
var ee = require('event-emitter')
, ObservableValue = require('observable-value')
, ObservableArray = require('../create')(Array);
module.exports = function (t, a) {
var x = {};
a(t(), false, "Undefined");
a(t(null), false, "Null");
a(t('raz'), false, "String");
a(t({}), false, "Object");
a(t(new ObservableValue()), false, "Observable value");
a(t(ee({})), false, "Event emitter");
a(t([]), false, "Array");
a(t(function () {}), false, "Function");
a(t(ee(x)), false, "Emitter");
a(t(new ObservableArray()), true, "Observable Array");
};
| mit |
anhstudios/swganh | data/scripts/templates/object/draft_schematic/space/booster/shared_booster_mk5.py | 454 | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Intangible()
result.template = "object/draft_schematic/space/booster/shared_booster_mk5.iff"
result.attribute_template_id = -1
result.stfName("string_id_table","")
#### BEGIN MODIFICATIONS ####
#### END MODIFICATIONS ####
return result | mit |
christopher-henderson/Go | src/strings/builder_test.go | 6086 | // Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package strings_test
import (
"bytes"
"runtime"
. "strings"
"testing"
)
func check(t *testing.T, b *Builder, want string) {
t.Helper()
got := b.String()
if got != want {
t.Errorf("String: got %#q; want %#q", got, want)
return
}
if n := b.Len(); n != len(got) {
t.Errorf("Len: got %d; but len(String()) is %d", n, len(got))
}
}
func TestBuilder(t *testing.T) {
var b Builder
check(t, &b, "")
n, err := b.WriteString("hello")
if err != nil || n != 5 {
t.Errorf("WriteString: got %d,%s; want 5,nil", n, err)
}
check(t, &b, "hello")
if err = b.WriteByte(' '); err != nil {
t.Errorf("WriteByte: %s", err)
}
check(t, &b, "hello ")
n, err = b.WriteString("world")
if err != nil || n != 5 {
t.Errorf("WriteString: got %d,%s; want 5,nil", n, err)
}
check(t, &b, "hello world")
}
func TestBuilderString(t *testing.T) {
var b Builder
b.WriteString("alpha")
check(t, &b, "alpha")
s1 := b.String()
b.WriteString("beta")
check(t, &b, "alphabeta")
s2 := b.String()
b.WriteString("gamma")
check(t, &b, "alphabetagamma")
s3 := b.String()
// Check that subsequent operations didn't change the returned strings.
if want := "alpha"; s1 != want {
t.Errorf("first String result is now %q; want %q", s1, want)
}
if want := "alphabeta"; s2 != want {
t.Errorf("second String result is now %q; want %q", s2, want)
}
if want := "alphabetagamma"; s3 != want {
t.Errorf("third String result is now %q; want %q", s3, want)
}
}
func TestBuilderReset(t *testing.T) {
var b Builder
check(t, &b, "")
b.WriteString("aaa")
s := b.String()
check(t, &b, "aaa")
b.Reset()
check(t, &b, "")
// Ensure that writing after Reset doesn't alter
// previously returned strings.
b.WriteString("bbb")
check(t, &b, "bbb")
if want := "aaa"; s != want {
t.Errorf("previous String result changed after Reset: got %q; want %q", s, want)
}
}
func TestBuilderGrow(t *testing.T) {
for _, growLen := range []int{0, 100, 1000, 10000, 100000} {
var b Builder
b.Grow(growLen)
p := bytes.Repeat([]byte{'a'}, growLen)
allocs := numAllocs(func() { b.Write(p) })
if allocs > 0 {
t.Errorf("growLen=%d: allocation occurred during write", growLen)
}
if b.String() != string(p) {
t.Errorf("growLen=%d: bad data written after Grow", growLen)
}
}
}
func TestBuilderWrite2(t *testing.T) {
const s0 = "hello 世界"
for _, tt := range []struct {
name string
fn func(b *Builder) (int, error)
n int
want string
}{
{
"Write",
func(b *Builder) (int, error) { return b.Write([]byte(s0)) },
len(s0),
s0,
},
{
"WriteRune",
func(b *Builder) (int, error) { return b.WriteRune('a') },
1,
"a",
},
{
"WriteRuneWide",
func(b *Builder) (int, error) { return b.WriteRune('世') },
3,
"世",
},
{
"WriteString",
func(b *Builder) (int, error) { return b.WriteString(s0) },
len(s0),
s0,
},
} {
t.Run(tt.name, func(t *testing.T) {
var b Builder
n, err := tt.fn(&b)
if err != nil {
t.Fatalf("first call: got %s", err)
}
if n != tt.n {
t.Errorf("first call: got n=%d; want %d", n, tt.n)
}
check(t, &b, tt.want)
n, err = tt.fn(&b)
if err != nil {
t.Fatalf("second call: got %s", err)
}
if n != tt.n {
t.Errorf("second call: got n=%d; want %d", n, tt.n)
}
check(t, &b, tt.want+tt.want)
})
}
}
func TestBuilderWriteByte(t *testing.T) {
var b Builder
if err := b.WriteByte('a'); err != nil {
t.Error(err)
}
if err := b.WriteByte(0); err != nil {
t.Error(err)
}
check(t, &b, "a\x00")
}
func TestBuilderAllocs(t *testing.T) {
var b Builder
b.Grow(5)
var s string
allocs := numAllocs(func() {
b.WriteString("hello")
s = b.String()
})
if want := "hello"; s != want {
t.Errorf("String: got %#q; want %#q", s, want)
}
if allocs > 0 {
t.Fatalf("got %d alloc(s); want 0", allocs)
}
// Issue 23382; verify that copyCheck doesn't force the
// Builder to escape and be heap allocated.
n := testing.AllocsPerRun(10000, func() {
var b Builder
b.Grow(5)
b.WriteString("abcde")
_ = b.String()
})
if n != 1 {
t.Errorf("Builder allocs = %v; want 1", n)
}
}
func numAllocs(fn func()) uint64 {
defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1))
var m1, m2 runtime.MemStats
runtime.ReadMemStats(&m1)
fn()
runtime.ReadMemStats(&m2)
return m2.Mallocs - m1.Mallocs
}
func TestBuilderCopyPanic(t *testing.T) {
tests := []struct {
name string
fn func()
wantPanic bool
}{
{
name: "String",
wantPanic: false,
fn: func() {
var a Builder
a.WriteByte('x')
b := a
_ = b.String() // appease vet
},
},
{
name: "Len",
wantPanic: false,
fn: func() {
var a Builder
a.WriteByte('x')
b := a
b.Len()
},
},
{
name: "Reset",
wantPanic: false,
fn: func() {
var a Builder
a.WriteByte('x')
b := a
b.Reset()
b.WriteByte('y')
},
},
{
name: "Write",
wantPanic: true,
fn: func() {
var a Builder
a.Write([]byte("x"))
b := a
b.Write([]byte("y"))
},
},
{
name: "WriteByte",
wantPanic: true,
fn: func() {
var a Builder
a.WriteByte('x')
b := a
b.WriteByte('y')
},
},
{
name: "WriteString",
wantPanic: true,
fn: func() {
var a Builder
a.WriteString("x")
b := a
b.WriteString("y")
},
},
{
name: "WriteRune",
wantPanic: true,
fn: func() {
var a Builder
a.WriteRune('x')
b := a
b.WriteRune('y')
},
},
{
name: "Grow",
wantPanic: true,
fn: func() {
var a Builder
a.Grow(1)
b := a
b.Grow(2)
},
},
}
for _, tt := range tests {
didPanic := make(chan bool)
go func() {
defer func() { didPanic <- recover() != nil }()
tt.fn()
}()
if got := <-didPanic; got != tt.wantPanic {
t.Errorf("%s: panicked = %v; want %v", tt.name, got, tt.wantPanic)
}
}
}
| mit |
klimser/model | library/Model/Cluster/Schema/Table/Link/OneToOne.php | 90 | <?php
namespace Model\Cluster\Schema\Table\Link;
class OneToOne extends AbstractLink
{}
| mit |
tpruvot/fullcalendar | src/common/Grid.events.js | 28430 |
/* Event-rendering and event-interaction methods for the abstract Grid class
----------------------------------------------------------------------------------------------------------------------*/
Grid.mixin({
mousedOverSeg: null, // the segment object the user's mouse is over. null if over nothing
isDraggingSeg: false, // is a segment being dragged? boolean
isResizingSeg: false, // is a segment being resized? boolean
segs: null, // the event segments currently rendered in the grid
// Renders the given events onto the grid
renderEvents: function(events) {
var segs = this.eventsToSegs(events);
var bgSegs = [];
var fgSegs = [];
var i, seg;
for (i = 0; i < segs.length; i++) {
seg = segs[i];
if (isBgEvent(seg.event)) {
bgSegs.push(seg);
}
else {
fgSegs.push(seg);
}
}
// Render each different type of segment.
// Each function may return a subset of the segs, segs that were actually rendered.
bgSegs = this.renderBgSegs(bgSegs) || bgSegs;
fgSegs = this.renderFgSegs(fgSegs) || fgSegs;
this.segs = bgSegs.concat(fgSegs);
},
// Unrenders all events currently rendered on the grid
destroyEvents: function() {
this.triggerSegMouseout(); // trigger an eventMouseout if user's mouse is over an event
this.destroyFgSegs();
this.destroyBgSegs();
this.segs = null;
},
// Retrieves all rendered segment objects currently rendered on the grid
getEventSegs: function() {
return this.segs || [];
},
/* Foreground Segment Rendering
------------------------------------------------------------------------------------------------------------------*/
// Renders foreground event segments onto the grid. May return a subset of segs that were rendered.
renderFgSegs: function(segs) {
// subclasses must implement
},
// Unrenders all currently rendered foreground segments
destroyFgSegs: function() {
// subclasses must implement
},
// Renders and assigns an `el` property for each foreground event segment.
// Only returns segments that successfully rendered.
// A utility that subclasses may use.
renderFgSegEls: function(segs, disableResizing) {
var view = this.view;
var html = '';
var renderedSegs = [];
var i;
if (segs.length) { // don't build an empty html string
// build a large concatenation of event segment HTML
for (i = 0; i < segs.length; i++) {
html += this.fgSegHtml(segs[i], disableResizing);
}
// Grab individual elements from the combined HTML string. Use each as the default rendering.
// Then, compute the 'el' for each segment. An el might be null if the eventRender callback returned false.
$(html).each(function(i, node) {
var seg = segs[i];
var el = view.resolveEventEl(seg.event, $(node));
if (el) {
el.data('fc-seg', seg); // used by handlers
seg.el = el;
renderedSegs.push(seg);
}
});
}
return renderedSegs;
},
// Generates the HTML for the default rendering of a foreground event segment. Used by renderFgSegEls()
fgSegHtml: function(seg, disableResizing) {
// subclasses should implement
},
/* Background Segment Rendering
------------------------------------------------------------------------------------------------------------------*/
// Renders the given background event segments onto the grid.
// Returns a subset of the segs that were actually rendered.
renderBgSegs: function(segs) {
return this.renderFill('bgEvent', segs);
},
// Unrenders all the currently rendered background event segments
destroyBgSegs: function() {
this.destroyFill('bgEvent');
},
// Renders a background event element, given the default rendering. Called by the fill system.
bgEventSegEl: function(seg, el) {
return this.view.resolveEventEl(seg.event, el); // will filter through eventRender
},
// Generates an array of classNames to be used for the default rendering of a background event.
// Called by the fill system.
bgEventSegClasses: function(seg) {
var event = seg.event;
var source = event.source || {};
return [ 'fc-bgevent' ].concat(
event.className,
source.className || []
);
},
// Generates a semicolon-separated CSS string to be used for the default rendering of a background event.
// Called by the fill system.
// TODO: consolidate with getEventSkinCss?
bgEventSegStyles: function(seg) {
var view = this.view;
var event = seg.event;
var source = event.source || {};
var eventColor = event.color;
var sourceColor = source.color;
var optionColor = view.opt('eventColor');
var backgroundColor =
event.backgroundColor ||
eventColor ||
source.backgroundColor ||
sourceColor ||
view.opt('eventBackgroundColor') ||
optionColor;
if (backgroundColor) {
return 'background-color:' + backgroundColor;
}
return '';
},
// Generates an array of classNames to be used for the rendering business hours overlay. Called by the fill system.
businessHoursSegClasses: function(seg) {
return [ 'fc-nonbusiness', 'fc-bgevent' ];
},
/* Handlers
------------------------------------------------------------------------------------------------------------------*/
// Attaches event-element-related handlers to the container element and leverage bubbling
bindSegHandlers: function() {
var _this = this;
var view = this.view;
$.each(
{
mouseenter: function(seg, ev) {
_this.triggerSegMouseover(seg, ev);
},
mouseleave: function(seg, ev) {
_this.triggerSegMouseout(seg, ev);
},
click: function(seg, ev) {
return view.trigger('eventClick', this, seg.event, ev); // can return `false` to cancel
},
mousedown: function(seg, ev) {
if ($(ev.target).is('.fc-resizer') && view.isEventResizable(seg.event)) {
_this.segResizeMousedown(seg, ev);
}
else if (view.isEventDraggable(seg.event)) {
_this.segDragMousedown(seg, ev);
}
}
},
function(name, func) {
// attach the handler to the container element and only listen for real event elements via bubbling
_this.el.on(name, '.fc-event-container > *', function(ev) {
var seg = $(this).data('fc-seg'); // grab segment data. put there by View::renderEvents
// only call the handlers if there is not a drag/resize in progress
if (seg && !_this.isDraggingSeg && !_this.isResizingSeg) {
return func.call(this, seg, ev); // `this` will be the event element
}
});
}
);
},
// Updates internal state and triggers handlers for when an event element is moused over
triggerSegMouseover: function(seg, ev) {
if (!this.mousedOverSeg) {
this.mousedOverSeg = seg;
this.view.trigger('eventMouseover', seg.el[0], seg.event, ev);
}
},
// Updates internal state and triggers handlers for when an event element is moused out.
// Can be given no arguments, in which case it will mouseout the segment that was previously moused over.
triggerSegMouseout: function(seg, ev) {
ev = ev || {}; // if given no args, make a mock mouse event
if (this.mousedOverSeg) {
seg = seg || this.mousedOverSeg; // if given no args, use the currently moused-over segment
this.mousedOverSeg = null;
this.view.trigger('eventMouseout', seg.el[0], seg.event, ev);
}
},
/* Event Dragging
------------------------------------------------------------------------------------------------------------------*/
// Called when the user does a mousedown on an event, which might lead to dragging.
// Generic enough to work with any type of Grid.
segDragMousedown: function(seg, ev) {
var _this = this;
var view = this.view;
var el = seg.el;
var event = seg.event;
var dropLocation;
if (view.name == 'year') {
var td = $(el).closest('td.fc-year-monthly-td');
var tds = td.closest('table').find('.fc-year-monthly-td');
var offset = tds.index(td);
view.dayGrid = view.dayGrids[offset];
}
// A clone of the original element that will move with the mouse
var mouseFollower = new MouseFollower(seg.el, {
parentEl: view.el,
opacity: view.opt('dragOpacity'),
revertDuration: view.opt('dragRevertDuration'),
zIndex: 2 // one above the .fc-view
});
// Tracks mouse movement over the *view's* coordinate map. Allows dragging and dropping between subcomponents
// of the view.
var dragListener = new DragListener(view.coordMap, {
distance: 5,
scroll: view.opt('dragScroll'),
listenStart: function(ev) {
mouseFollower.hide(); // don't show until we know this is a real drag
mouseFollower.start(ev);
},
dragStart: function(ev) {
_this.triggerSegMouseout(seg, ev); // ensure a mouseout on the manipulated event has been reported
_this.isDraggingSeg = true;
view.hideEvent(event); // hide all event segments. our mouseFollower will take over
view.trigger('eventDragStart', el[0], event, ev, {}); // last argument is jqui dummy
},
cellOver: function(cell, isOrig) {
var origCell = seg.cell || dragListener.origCell; // starting cell could be forced (DayGrid.limit)
dropLocation = _this.computeEventDrop(origCell, cell, event);
if (dropLocation) {
if (view.renderDrag(dropLocation, seg)) { // have the subclass render a visual indication
mouseFollower.hide(); // if the subclass is already using a mock event "helper", hide our own
}
else {
mouseFollower.show();
}
if (isOrig) {
dropLocation = null; // needs to have moved cells to be a valid drop
}
}
else {
// have the helper follow the mouse (no snapping) with a warning-style cursor
mouseFollower.show();
disableCursor();
}
},
cellOut: function() { // called before mouse moves to a different cell OR moved out of all cells
dropLocation = null;
view.destroyDrag(); // unrender whatever was done in renderDrag
mouseFollower.show(); // show in case we are moving out of all cells
enableCursor();
},
dragStop: function(ev) {
// do revert animation if hasn't changed. calls a callback when finished (whether animation or not)
mouseFollower.stop(!dropLocation, function() {
_this.isDraggingSeg = false;
view.destroyDrag();
view.showEvent(event);
view.trigger('eventDragStop', el[0], event, ev, {}); // last argument is jqui dummy
if (dropLocation) {
view.reportEventDrop(event, dropLocation, el, ev);
}
});
enableCursor();
},
listenStop: function() {
mouseFollower.stop(); // put in listenStop in case there was a mousedown but the drag never started
}
});
dragListener.mousedown(ev); // start listening, which will eventually lead to a dragStart
},
// Given the cell an event drag began, and the cell event was dropped, calculates the new start/end/allDay
// values for the event. Subclasses may override and set additional properties to be used by renderDrag.
// A falsy returned value indicates an invalid drop.
computeEventDrop: function(startCell, endCell, event) {
var dragStart = startCell.start;
var dragEnd = endCell.start;
var delta;
var newStart;
var newEnd;
var newAllDay;
var dropLocation;
if (dragStart.hasTime() === dragEnd.hasTime()) {
delta = diffDayTime(dragEnd, dragStart);
newStart = event.start.clone().add(delta);
if (event.end === null) { // do we need to compute an end?
newEnd = null;
}
else {
newEnd = event.end.clone().add(delta);
}
newAllDay = event.allDay; // keep it the same
}
else {
// if switching from day <-> timed, start should be reset to the dropped date, and the end cleared
newStart = dragEnd.clone();
newEnd = null; // end should be cleared
newAllDay = !dragEnd.hasTime();
}
dropLocation = {
start: newStart,
end: newEnd,
allDay: newAllDay
};
if (!this.view.calendar.isEventRangeAllowed(dropLocation, event)) {
return null;
}
return dropLocation;
},
/* External Element Dragging
------------------------------------------------------------------------------------------------------------------*/
// Called when a jQuery UI drag is initiated anywhere in the DOM
documentDragStart: function(ev, ui) {
var view = this.view;
var el;
var accept;
if (view.opt('droppable')) { // only listen if this setting is on
el = $(ev.target);
// Test that the dragged element passes the dropAccept selector or filter function.
// FYI, the default is "*" (matches all)
accept = view.opt('dropAccept');
if ($.isFunction(accept) ? accept.call(el[0], el) : el.is(accept)) {
this.startExternalDrag(el, ev, ui);
}
}
},
// Called when a jQuery UI drag starts and it needs to be monitored for cell dropping
startExternalDrag: function(el, ev, ui) {
var _this = this;
var meta = getDraggedElMeta(el); // extra data about event drop, including possible event to create
var dragListener;
var dropLocation; // a null value signals an unsuccessful drag
// listener that tracks mouse movement over date-associated pixel regions
dragListener = new DragListener(this.coordMap, {
cellOver: function(cell) {
dropLocation = _this.computeExternalDrop(cell, meta);
if (dropLocation) {
_this.renderDrag(dropLocation); // called without a seg parameter
}
else { // invalid drop cell
disableCursor();
}
},
cellOut: function() {
dropLocation = null; // signal unsuccessful
_this.destroyDrag();
enableCursor();
}
});
// gets called, only once, when jqui drag is finished
$(document).one('dragstop', function(ev, ui) {
_this.destroyDrag();
enableCursor();
if (dropLocation) { // element was dropped on a valid date/time cell
_this.view.reportExternalDrop(meta, dropLocation, el, ev, ui);
}
});
dragListener.startDrag(ev); // start listening immediately
},
// Given a cell to be dropped upon, and misc data associated with the jqui drag (guaranteed to be a plain object),
// returns start/end dates for the event that would result from the hypothetical drop. end might be null.
// Returning a null value signals an invalid drop cell.
computeExternalDrop: function(cell, meta) {
var dropLocation = {
start: cell.start.clone(),
end: null
};
// if dropped on an all-day cell, and element's metadata specified a time, set it
if (meta.startTime && !dropLocation.start.hasTime()) {
dropLocation.start.time(meta.startTime);
}
if (meta.duration) {
dropLocation.end = dropLocation.start.clone().add(meta.duration);
}
if (!this.view.calendar.isExternalDropRangeAllowed(dropLocation, meta.eventProps)) {
return null;
}
return dropLocation;
},
/* Drag Rendering (for both events and an external elements)
------------------------------------------------------------------------------------------------------------------*/
// Renders a visual indication of an event or external element being dragged.
// `dropLocation` contains hypothetical start/end/allDay values the event would have if dropped. end can be null.
// `seg` is the internal segment object that is being dragged. If dragging an external element, `seg` is null.
// A truthy returned value indicates this method has rendered a helper element.
renderDrag: function(dropLocation, seg) {
// subclasses must implement
},
// Unrenders a visual indication of an event or external element being dragged
destroyDrag: function() {
// subclasses must implement
},
/* Resizing
------------------------------------------------------------------------------------------------------------------*/
// Called when the user does a mousedown on an event's resizer, which might lead to resizing.
// Generic enough to work with any type of Grid.
segResizeMousedown: function(seg, ev) {
var _this = this;
var view = this.view;
var calendar = view.calendar;
var el = seg.el;
var event = seg.event;
var start = event.start;
var oldEnd = calendar.getEventEnd(event);
var newEnd; // falsy if invalid resize
var dragListener;
function destroy() { // resets the rendering to show the original event
_this.destroyEventResize();
view.showEvent(event);
enableCursor();
}
// Tracks mouse movement over the *grid's* coordinate map
dragListener = new DragListener(this.coordMap, {
distance: 5,
scroll: view.opt('dragScroll'),
dragStart: function(ev) {
_this.triggerSegMouseout(seg, ev); // ensure a mouseout on the manipulated event has been reported
_this.isResizingSeg = true;
view.trigger('eventResizeStart', el[0], event, ev, {}); // last argument is jqui dummy
},
cellOver: function(cell) {
newEnd = cell.end;
if (!newEnd.isAfter(start)) { // was end moved before start?
newEnd = start.clone().add( // make the event span a single slot
diffDayTime(cell.end, cell.start) // assumes all slot durations are the same
);
}
if (newEnd.isSame(oldEnd)) {
newEnd = null;
}
else if (!calendar.isEventRangeAllowed({ start: start, end: newEnd }, event)) {
newEnd = null;
disableCursor();
}
else {
_this.renderEventResize({ start: start, end: newEnd }, seg);
if (view.name == 'year') {
$.each(view.dayGrids, function(offset, dayGrid) {
if (dayGrid !== _this) {
dayGrid.destroyEventResize();
dayGrid.renderEventResize({ start: start, end: newEnd }, seg);
}
});
}
view.hideEvent(event);
}
},
cellOut: function() { // called before mouse moves to a different cell OR moved out of all cells
newEnd = null;
destroy();
},
dragStop: function(ev) {
_this.isResizingSeg = false;
destroy();
view.trigger('eventResizeStop', el[0], event, ev, {}); // last argument is jqui dummy
if (newEnd) { // valid date to resize to?
view.reportEventResize(event, newEnd, el, ev);
}
}
});
dragListener.mousedown(ev); // start listening, which will eventually lead to a dragStart
},
// Renders a visual indication of an event being resized.
// `range` has the updated dates of the event. `seg` is the original segment object involved in the drag.
renderEventResize: function(range, seg) {
// subclasses must implement
},
// Unrenders a visual indication of an event being resized.
destroyEventResize: function() {
// subclasses must implement
},
/* Rendering Utils
------------------------------------------------------------------------------------------------------------------*/
// Compute the text that should be displayed on an event's element.
// `range` can be the Event object itself, or something range-like, with at least a `start`.
// The `timeFormat` options and the grid's default format is used, but `formatStr` can override.
getEventTimeText: function(range, formatStr) {
formatStr = formatStr || this.eventTimeFormat;
if (range.end && this.displayEventEnd) {
return this.view.formatRange(range, formatStr);
}
else {
return range.start.format(formatStr);
}
},
// Generic utility for generating the HTML classNames for an event segment's element
getSegClasses: function(seg, isDraggable, isResizable) {
var event = seg.event;
var classes = [
'fc-event',
seg.isStart ? 'fc-start' : 'fc-not-start',
seg.isEnd ? 'fc-end' : 'fc-not-end'
].concat(
event.className,
event.source ? event.source.className : []
);
if (isDraggable) {
classes.push('fc-draggable');
}
if (isResizable) {
classes.push('fc-resizable');
}
return classes;
},
// Utility for generating a CSS string with all the event skin-related properties
getEventSkinCss: function(event) {
var view = this.view;
var source = event.source || {};
var eventColor = event.color;
var sourceColor = source.color;
var optionColor = view.opt('eventColor');
var backgroundColor =
event.backgroundColor ||
eventColor ||
source.backgroundColor ||
sourceColor ||
view.opt('eventBackgroundColor') ||
optionColor;
var borderColor =
event.borderColor ||
eventColor ||
source.borderColor ||
sourceColor ||
view.opt('eventBorderColor') ||
optionColor;
var textColor =
event.textColor ||
source.textColor ||
view.opt('eventTextColor');
var statements = [];
if (backgroundColor) {
statements.push('background-color:' + backgroundColor);
}
if (borderColor) {
statements.push('border-color:' + borderColor);
}
if (textColor) {
statements.push('color:' + textColor);
}
return statements.join(';');
},
/* Converting events -> ranges -> segs
------------------------------------------------------------------------------------------------------------------*/
// Converts an array of event objects into an array of event segment objects.
// A custom `rangeToSegsFunc` may be given for arbitrarily slicing up events.
// Doesn't guarantee an order for the resulting array.
eventsToSegs: function(events, rangeToSegsFunc) {
var eventRanges = this.eventsToRanges(events);
var segs = [];
var i;
for (i = 0; i < eventRanges.length; i++) {
segs.push.apply(
segs,
this.eventRangeToSegs(eventRanges[i], rangeToSegsFunc)
);
}
return segs;
},
// Converts an array of events into an array of "range" objects.
// A "range" object is a plain object with start/end properties denoting the time it covers. Also an event property.
// For "normal" events, this will be identical to the event's start/end, but for "inverse-background" events,
// will create an array of ranges that span the time *not* covered by the given event.
// Doesn't guarantee an order for the resulting array.
eventsToRanges: function(events) {
var _this = this;
var eventsById = groupEventsById(events);
var ranges = [];
// group by ID so that related inverse-background events can be rendered together
$.each(eventsById, function(id, eventGroup) {
if (eventGroup.length) {
ranges.push.apply(
ranges,
isInverseBgEvent(eventGroup[0]) ?
_this.eventsToInverseRanges(eventGroup) :
_this.eventsToNormalRanges(eventGroup)
);
}
});
return ranges;
},
// Converts an array of "normal" events (not inverted rendering) into a parallel array of ranges
eventsToNormalRanges: function(events) {
var calendar = this.view.calendar;
var ranges = [];
var i, event;
var eventStart, eventEnd;
for (i = 0; i < events.length; i++) {
event = events[i];
// make copies and normalize by stripping timezone
eventStart = event.start.clone().stripZone();
eventEnd = calendar.getEventEnd(event).stripZone();
ranges.push({
event: event,
start: eventStart,
end: eventEnd,
eventStartMS: +eventStart,
eventDurationMS: eventEnd - eventStart
});
}
return ranges;
},
// Converts an array of events, with inverse-background rendering, into an array of range objects.
// The range objects will cover all the time NOT covered by the events.
eventsToInverseRanges: function(events) {
var view = this.view;
var viewStart = view.start.clone().stripZone(); // normalize timezone
var viewEnd = view.end.clone().stripZone(); // normalize timezone
var normalRanges = this.eventsToNormalRanges(events); // will give us normalized dates we can use w/o copies
var inverseRanges = [];
var event0 = events[0]; // assign this to each range's `.event`
var start = viewStart; // the end of the previous range. the start of the new range
var i, normalRange;
// ranges need to be in order. required for our date-walking algorithm
normalRanges.sort(compareNormalRanges);
for (i = 0; i < normalRanges.length; i++) {
normalRange = normalRanges[i];
// add the span of time before the event (if there is any)
if (normalRange.start > start) { // compare millisecond time (skip any ambig logic)
inverseRanges.push({
event: event0,
start: start,
end: normalRange.start
});
}
start = normalRange.end;
}
// add the span of time after the last event (if there is any)
if (start < viewEnd) { // compare millisecond time (skip any ambig logic)
inverseRanges.push({
event: event0,
start: start,
end: viewEnd
});
}
return inverseRanges;
},
// Slices the given event range into one or more segment objects.
// A `rangeToSegsFunc` custom slicing function can be given.
eventRangeToSegs: function(eventRange, rangeToSegsFunc) {
var segs;
var i, seg;
if (rangeToSegsFunc) {
segs = rangeToSegsFunc(eventRange);
}
else {
segs = this.rangeToSegs(eventRange); // defined by the subclass
}
for (i = 0; i < segs.length; i++) {
seg = segs[i];
seg.event = eventRange.event;
seg.eventStartMS = eventRange.eventStartMS;
seg.eventDurationMS = eventRange.eventDurationMS;
}
return segs;
}
});
/* Utilities
----------------------------------------------------------------------------------------------------------------------*/
function isBgEvent(event) { // returns true if background OR inverse-background
var rendering = getEventRendering(event);
return rendering === 'background' || rendering === 'inverse-background';
}
function isInverseBgEvent(event) {
return getEventRendering(event) === 'inverse-background';
}
function getEventRendering(event) {
return firstDefined((event.source || {}).rendering, event.rendering);
}
function groupEventsById(events) {
var eventsById = {};
var i, event;
for (i = 0; i < events.length; i++) {
event = events[i];
(eventsById[event._id] || (eventsById[event._id] = [])).push(event);
}
return eventsById;
}
// A cmp function for determining which non-inverted "ranges" (see above) happen earlier
function compareNormalRanges(range1, range2) {
return range1.eventStartMS - range2.eventStartMS; // earlier ranges go first
}
// A cmp function for determining which segments should take visual priority
// DOES NOT WORK ON INVERTED BACKGROUND EVENTS because they have no eventStartMS/eventDurationMS
function compareSegs(seg1, seg2) {
return seg1.eventStartMS - seg2.eventStartMS || // earlier events go first
seg2.eventDurationMS - seg1.eventDurationMS || // tie? longer events go first
seg2.event.allDay - seg1.event.allDay || // tie? put all-day events first (booleans cast to 0/1)
(seg1.event.title || '').localeCompare(seg2.event.title); // tie? alphabetically by title
}
fc.compareSegs = compareSegs; // export
/* External-Dragging-Element Data
----------------------------------------------------------------------------------------------------------------------*/
// Require all HTML5 data-* attributes used by FullCalendar to have this prefix.
// A value of '' will query attributes like data-event. A value of 'fc' will query attributes like data-fc-event.
fc.dataAttrPrefix = '';
// Given a jQuery element that might represent a dragged FullCalendar event, returns an intermediate data structure
// to be used for Event Object creation.
// A defined `.eventProps`, even when empty, indicates that an event should be created.
function getDraggedElMeta(el) {
var prefix = fc.dataAttrPrefix;
var eventProps; // properties for creating the event, not related to date/time
var startTime; // a Duration
var duration;
var stick;
if (prefix) { prefix += '-'; }
eventProps = el.data(prefix + 'event') || null;
if (eventProps) {
if (typeof eventProps === 'object') {
eventProps = $.extend({}, eventProps); // make a copy
}
else { // something like 1 or true. still signal event creation
eventProps = {};
}
// pluck special-cased date/time properties
startTime = eventProps.start;
if (startTime == null) { startTime = eventProps.time; } // accept 'time' as well
duration = eventProps.duration;
stick = eventProps.stick;
delete eventProps.start;
delete eventProps.time;
delete eventProps.duration;
delete eventProps.stick;
}
// fallback to standalone attribute values for each of the date/time properties
if (startTime == null) { startTime = el.data(prefix + 'start'); }
if (startTime == null) { startTime = el.data(prefix + 'time'); } // accept 'time' as well
if (duration == null) { duration = el.data(prefix + 'duration'); }
if (stick == null) { stick = el.data(prefix + 'stick'); }
// massage into correct data types
startTime = startTime != null ? moment.duration(startTime) : null;
duration = duration != null ? moment.duration(duration) : null;
stick = Boolean(stick);
return { eventProps: eventProps, startTime: startTime, duration: duration, stick: stick };
}
| mit |