code
stringlengths 3
1.04M
| repo_name
stringlengths 5
109
| path
stringlengths 6
306
| language
stringclasses 1
value | license
stringclasses 15
values | size
int64 3
1.04M
|
---|---|---|---|---|---|
/*
* 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.ignite.ml.preprocessing.imputer;
import org.apache.ignite.ml.math.functions.IgniteBiFunction;
/**
* Preprocessing function that makes imputing.
*
* @param <K> Type of a key in {@code upstream} data.
* @param <V> Type of a value in {@code upstream} data.
*/
public class ImputerPreprocessor<K, V> implements IgniteBiFunction<K, V, double[]> {
/** */
private static final long serialVersionUID = 6887800576392623469L;
/** Filling values. */
private final double[] imputingValues;
/** Base preprocessor. */
private final IgniteBiFunction<K, V, double[]> basePreprocessor;
/**
* Constructs a new instance of imputing preprocessor.
*
* @param basePreprocessor Base preprocessor.
*/
public ImputerPreprocessor(double[] imputingValues,
IgniteBiFunction<K, V, double[]> basePreprocessor) {
this.imputingValues = imputingValues;
this.basePreprocessor = basePreprocessor;
}
/**
* Applies this preprocessor.
*
* @param k Key.
* @param v Value.
* @return Preprocessed row.
*/
@Override public double[] apply(K k, V v) {
double[] res = basePreprocessor.apply(k, v);
assert res.length == imputingValues.length;
for (int i = 0; i < res.length; i++) {
if (Double.valueOf(res[i]).equals(Double.NaN))
res[i] = imputingValues[i];
}
return res;
}
}
| voipp/ignite | modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/imputer/ImputerPreprocessor.java | Java | apache-2.0 | 2,255 |
/*
* Copyright (c) 2008-2013, Hazelcast, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hazelcast.core;
import junit.framework.TestCase;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@RunWith(com.hazelcast.util.RandomBlockJUnit4ClassRunner.class)
public class IMapAsyncTest {
private final String key = "key";
private final String value1 = "value1";
private final String value2 = "value2";
@BeforeClass
@AfterClass
public static void init() throws Exception {
Hazelcast.shutdownAll();
}
@Test
public void testGetAsync() throws Exception {
IMap<String, String> map = Hazelcast.getMap("map:test:getAsync");
map.put(key, value1);
Future<String> f1 = map.getAsync(key);
TestCase.assertEquals(value1, f1.get());
}
@Test
public void testPutAsync() throws Exception {
IMap<String, String> map = Hazelcast.getMap("map:test:putAsync");
Future<String> f1 = map.putAsync(key, value1);
String f1Val = f1.get();
TestCase.assertNull(f1Val);
Future<String> f2 = map.putAsync(key, value2);
String f2Val = f2.get();
TestCase.assertEquals(value1, f2Val);
}
@Test
public void testRemoveAsync() throws Exception {
IMap<String, String> map = Hazelcast.getMap("map:test:removeAsync");
// populate map
map.put(key, value1);
Future<String> f1 = map.removeAsync(key);
TestCase.assertEquals(value1, f1.get());
}
@Test
public void testRemoveAsyncWithImmediateTimeout() throws Exception {
final IMap<String, String> map = Hazelcast.getMap("map:test:removeAsync:timeout");
// populate map
map.put(key, value1);
final CountDownLatch latch = new CountDownLatch(1);
new Thread(new Runnable() {
public void run() {
map.lock(key);
latch.countDown();
}
}).start();
assertTrue(latch.await(20, TimeUnit.SECONDS));
Future<String> f1 = map.removeAsync(key);
try {
assertEquals(value1, f1.get(0L, TimeUnit.SECONDS));
} catch (TimeoutException e) {
// expected
return;
}
TestCase.fail("Failed to throw TimeoutException with zero timeout");
}
@Test
public void testRemoveAsyncWithNonExistantKey() throws Exception {
IMap<String, String> map = Hazelcast.getMap("map:test:removeAsync:nonexistant");
Future<String> f1 = map.removeAsync(key);
TestCase.assertNull(f1.get());
}
}
| health-and-care-developer-network/health-and-care-developer-network | library/hazelcast/2.5/hazelcast-2.5-source/hazelcast/src/test/java/com/hazelcast/core/IMapAsyncTest.java | Java | apache-2.0 | 3,450 |
/*
* Licensed to ElasticSearch and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. ElasticSearch 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.elasticsearch.index.query;
import org.elasticsearch.common.xcontent.XContentBuilder;
import java.io.IOException;
/**
*
*/
public class SpanFirstQueryBuilder extends BaseQueryBuilder implements SpanQueryBuilder, BoostableQueryBuilder<SpanFirstQueryBuilder> {
public static final String NAME = "span_first";
private final SpanQueryBuilder matchBuilder;
private final int end;
private float boost = -1;
public SpanFirstQueryBuilder(SpanQueryBuilder matchBuilder, int end) {
this.matchBuilder = matchBuilder;
this.end = end;
}
public SpanFirstQueryBuilder boost(float boost) {
this.boost = boost;
return this;
}
@Override
protected void doXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject(NAME);
builder.field("match");
matchBuilder.toXContent(builder, params);
builder.field("end", end);
if (boost != -1) {
builder.field("boost", boost);
}
builder.endObject();
}
}
| jprante/elasticsearch-client | elasticsearch-client-search/src/main/java/org/elasticsearch/index/query/SpanFirstQueryBuilder.java | Java | apache-2.0 | 1,877 |
/*
* Copyright 2017 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.kie.workbench.common.screens.library.client.screens.assets;
import elemental2.dom.HTMLElement;
import org.guvnor.common.services.project.model.WorkspaceProject;
import org.jboss.errai.ui.client.local.spi.TranslationService;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.kie.workbench.common.screens.library.api.LibraryService;
import org.kie.workbench.common.screens.library.client.util.LibraryPlaces;
import org.kie.workbench.common.services.shared.project.KieModule;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.uberfire.ext.widgets.common.client.common.BusyIndicatorView;
import org.uberfire.mocks.CallerMock;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
public class AssetsScreenTest {
private AssetsScreen assetsScreen;
@Mock
private AssetsScreen.View view;
@Mock
private LibraryPlaces libraryPlaces;
@Mock
private EmptyAssetsScreen emptyAssetsScreen;
@Mock
private PopulatedAssetsScreen populatedAssetsScreen;
@Mock
private InvalidProjectScreen invalidProjectScreen;
@Mock
private TranslationService ts;
@Mock
private BusyIndicatorView busyIndicatorView;
@Mock
private LibraryService libraryService;
private WorkspaceProject workspaceProject;
@Before
public void setUp() {
workspaceProject = mock(WorkspaceProject.class);
doReturn(mock(KieModule.class)).when(workspaceProject).getMainModule();
when(libraryPlaces.getActiveWorkspaceContext()).thenReturn(workspaceProject);
EmptyAssetsView emptyView = mock(EmptyAssetsView.class);
PopulatedAssetsView populatedView = mock(PopulatedAssetsView.class);
InvalidProjectView invalidProjectView = mock(InvalidProjectView.class);
HTMLElement emptyElement = mock(HTMLElement.class);
HTMLElement populatedElement = mock(HTMLElement.class);
HTMLElement invalidProjectElement = mock(HTMLElement.class);
when(emptyAssetsScreen.getView()).thenReturn(emptyView);
when(emptyView.getElement()).thenReturn(emptyElement);
when(populatedAssetsScreen.getView()).thenReturn(populatedView);
when(populatedView.getElement()).thenReturn(populatedElement);
when(invalidProjectScreen.getView()).thenReturn(invalidProjectView);
when(invalidProjectView.getElement()).thenReturn(invalidProjectElement);
this.assetsScreen = new AssetsScreen(view,
libraryPlaces,
emptyAssetsScreen,
populatedAssetsScreen,
invalidProjectScreen,
ts,
busyIndicatorView,
new CallerMock<>(libraryService));
}
@Test
public void testShowEmptyScreenAssets() {
when(libraryService.hasAssets(any(WorkspaceProject.class))).thenReturn(false);
this.assetsScreen.init();
verify(emptyAssetsScreen,
times(1)).getView();
verify(populatedAssetsScreen,
never()).getView();
verify(view).setContent(emptyAssetsScreen.getView().getElement());
}
@Test
public void testShowPopulatedScreenAssets() {
when(libraryService.hasAssets(any(WorkspaceProject.class))).thenReturn(true);
this.assetsScreen.init();
verify(emptyAssetsScreen,
never()).getView();
verify(populatedAssetsScreen,
times(1)).getView();
verify(view).setContent(populatedAssetsScreen.getView().getElement());
}
@Test
public void testSetContentNotCalledWhenAlreadyDisplayed() throws Exception {
try {
testShowEmptyScreenAssets();
} catch (AssertionError ae) {
throw new AssertionError("Precondition failed. Could not set empty asset screen.", ae);
}
HTMLElement emptyElement = emptyAssetsScreen.getView().getElement();
emptyElement.parentNode = mock(HTMLElement.class);
reset(view);
assetsScreen.init();
verify(view, never()).setContent(any());
}
@Test
public void testInvalidProject() throws Exception {
reset(workspaceProject);
doReturn(null).when(workspaceProject).getMainModule();
assetsScreen.init();
verify(view).setContent(invalidProjectScreen.getView().getElement());
verify(libraryService, never()).hasAssets(any(WorkspaceProject.class));
}
} | etirelli/kie-wb-common | kie-wb-common-screens/kie-wb-common-library/kie-wb-common-library-client/src/test/java/org/kie/workbench/common/screens/library/client/screens/assets/AssetsScreenTest.java | Java | apache-2.0 | 5,601 |
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.apps.iosched.provider;
import com.google.android.apps.iosched.provider.ScheduleContract.Blocks;
import com.google.android.apps.iosched.provider.ScheduleContract.Notes;
import com.google.android.apps.iosched.provider.ScheduleContract.Rooms;
import com.google.android.apps.iosched.provider.ScheduleContract.SearchSuggest;
import com.google.android.apps.iosched.provider.ScheduleContract.Sessions;
import com.google.android.apps.iosched.provider.ScheduleContract.Speakers;
import com.google.android.apps.iosched.provider.ScheduleContract.Tracks;
import com.google.android.apps.iosched.provider.ScheduleContract.Vendors;
import com.google.android.apps.iosched.provider.ScheduleDatabase.SessionsSearchColumns;
import com.google.android.apps.iosched.provider.ScheduleDatabase.SessionsSpeakers;
import com.google.android.apps.iosched.provider.ScheduleDatabase.SessionsTracks;
import com.google.android.apps.iosched.provider.ScheduleDatabase.Tables;
import com.google.android.apps.iosched.provider.ScheduleDatabase.VendorsSearchColumns;
import com.google.android.apps.iosched.util.NotesExporter;
import com.google.android.apps.iosched.util.SelectionBuilder;
import android.app.Activity;
import android.app.SearchManager;
import android.content.ContentProvider;
import android.content.ContentProviderOperation;
import android.content.ContentProviderResult;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.content.OperationApplicationException;
import android.content.UriMatcher;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.database.sqlite.SQLiteDatabase;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import android.provider.BaseColumns;
import android.provider.OpenableColumns;
import android.util.Log;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import net.bespokesystems.android.apps.wicsa2011.de.service.SyncService;
/**
* Provider that stores {@link ScheduleContract} data. Data is usually inserted
* by {@link SyncService}, and queried by various {@link Activity} instances.
*/
public class ScheduleProvider extends ContentProvider {
private static final String TAG = "ScheduleProvider";
private static final boolean LOGV = Log.isLoggable(TAG, Log.VERBOSE);
private ScheduleDatabase mOpenHelper;
private static final UriMatcher sUriMatcher = buildUriMatcher();
private static final int BLOCKS = 100;
private static final int BLOCKS_BETWEEN = 101;
private static final int BLOCKS_ID = 102;
private static final int BLOCKS_ID_SESSIONS = 103;
private static final int TRACKS = 200;
private static final int TRACKS_ID = 201;
private static final int TRACKS_ID_SESSIONS = 202;
private static final int TRACKS_ID_VENDORS = 203;
private static final int ROOMS = 300;
private static final int ROOMS_ID = 301;
private static final int ROOMS_ID_SESSIONS = 302;
private static final int SESSIONS = 400;
private static final int SESSIONS_STARRED = 401;
private static final int SESSIONS_SEARCH = 402;
private static final int SESSIONS_AT = 403;
private static final int SESSIONS_ID = 404;
private static final int SESSIONS_ID_SPEAKERS = 405;
private static final int SESSIONS_ID_TRACKS = 406;
private static final int SESSIONS_ID_NOTES = 407;
private static final int SPEAKERS = 500;
private static final int SPEAKERS_ID = 501;
private static final int SPEAKERS_ID_SESSIONS = 502;
private static final int VENDORS = 600;
private static final int VENDORS_STARRED = 601;
private static final int VENDORS_SEARCH = 603;
private static final int VENDORS_ID = 604;
private static final int NOTES = 700;
private static final int NOTES_EXPORT = 701;
private static final int NOTES_ID = 702;
private static final int SEARCH_SUGGEST = 800;
private static final String MIME_XML = "text/xml";
/**
* Build and return a {@link UriMatcher} that catches all {@link Uri}
* variations supported by this {@link ContentProvider}.
*/
private static UriMatcher buildUriMatcher() {
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH);
final String authority = ScheduleContract.CONTENT_AUTHORITY;
matcher.addURI(authority, "blocks", BLOCKS);
matcher.addURI(authority, "blocks/between/*/*", BLOCKS_BETWEEN);
matcher.addURI(authority, "blocks/*", BLOCKS_ID);
matcher.addURI(authority, "blocks/*/sessions", BLOCKS_ID_SESSIONS);
matcher.addURI(authority, "tracks", TRACKS);
matcher.addURI(authority, "tracks/*", TRACKS_ID);
matcher.addURI(authority, "tracks/*/sessions", TRACKS_ID_SESSIONS);
matcher.addURI(authority, "tracks/*/vendors", TRACKS_ID_VENDORS);
matcher.addURI(authority, "rooms", ROOMS);
matcher.addURI(authority, "rooms/*", ROOMS_ID);
matcher.addURI(authority, "rooms/*/sessions", ROOMS_ID_SESSIONS);
matcher.addURI(authority, "sessions", SESSIONS);
matcher.addURI(authority, "sessions/starred", SESSIONS_STARRED);
matcher.addURI(authority, "sessions/search/*", SESSIONS_SEARCH);
matcher.addURI(authority, "sessions/at/*", SESSIONS_AT);
matcher.addURI(authority, "sessions/*", SESSIONS_ID);
matcher.addURI(authority, "sessions/*/speakers", SESSIONS_ID_SPEAKERS);
matcher.addURI(authority, "sessions/*/tracks", SESSIONS_ID_TRACKS);
matcher.addURI(authority, "sessions/*/notes", SESSIONS_ID_NOTES);
matcher.addURI(authority, "speakers", SPEAKERS);
matcher.addURI(authority, "speakers/*", SPEAKERS_ID);
matcher.addURI(authority, "speakers/*/sessions", SPEAKERS_ID_SESSIONS);
matcher.addURI(authority, "vendors", VENDORS);
matcher.addURI(authority, "vendors/starred", VENDORS_STARRED);
matcher.addURI(authority, "vendors/search/*", VENDORS_SEARCH);
matcher.addURI(authority, "vendors/*", VENDORS_ID);
matcher.addURI(authority, "notes", NOTES);
matcher.addURI(authority, "notes/export", NOTES_EXPORT);
matcher.addURI(authority, "notes/*", NOTES_ID);
matcher.addURI(authority, "search_suggest_query", SEARCH_SUGGEST);
return matcher;
}
@Override
public boolean onCreate() {
final Context context = getContext();
mOpenHelper = new ScheduleDatabase(context);
return true;
}
/** {@inheritDoc} */
@Override
public String getType(Uri uri) {
final int match = sUriMatcher.match(uri);
switch (match) {
case BLOCKS:
return Blocks.CONTENT_TYPE;
case BLOCKS_BETWEEN:
return Blocks.CONTENT_TYPE;
case BLOCKS_ID:
return Blocks.CONTENT_ITEM_TYPE;
case BLOCKS_ID_SESSIONS:
return Sessions.CONTENT_TYPE;
case TRACKS:
return Tracks.CONTENT_TYPE;
case TRACKS_ID:
return Tracks.CONTENT_ITEM_TYPE;
case TRACKS_ID_SESSIONS:
return Sessions.CONTENT_TYPE;
case TRACKS_ID_VENDORS:
return Vendors.CONTENT_TYPE;
case ROOMS:
return Rooms.CONTENT_TYPE;
case ROOMS_ID:
return Rooms.CONTENT_ITEM_TYPE;
case ROOMS_ID_SESSIONS:
return Sessions.CONTENT_TYPE;
case SESSIONS:
return Sessions.CONTENT_TYPE;
case SESSIONS_STARRED:
return Sessions.CONTENT_TYPE;
case SESSIONS_SEARCH:
return Sessions.CONTENT_TYPE;
case SESSIONS_AT:
return Sessions.CONTENT_TYPE;
case SESSIONS_ID:
return Sessions.CONTENT_ITEM_TYPE;
case SESSIONS_ID_SPEAKERS:
return Speakers.CONTENT_TYPE;
case SESSIONS_ID_TRACKS:
return Tracks.CONTENT_TYPE;
case SESSIONS_ID_NOTES:
return Notes.CONTENT_TYPE;
case SPEAKERS:
return Speakers.CONTENT_TYPE;
case SPEAKERS_ID:
return Speakers.CONTENT_ITEM_TYPE;
case SPEAKERS_ID_SESSIONS:
return Sessions.CONTENT_TYPE;
case VENDORS:
return Vendors.CONTENT_TYPE;
case VENDORS_STARRED:
return Vendors.CONTENT_TYPE;
case VENDORS_SEARCH:
return Vendors.CONTENT_TYPE;
case VENDORS_ID:
return Vendors.CONTENT_ITEM_TYPE;
case NOTES:
return Notes.CONTENT_TYPE;
case NOTES_EXPORT:
return MIME_XML;
case NOTES_ID:
return Notes.CONTENT_ITEM_TYPE;
default:
throw new UnsupportedOperationException("Unknown uri: " + uri);
}
}
/** {@inheritDoc} */
@Override
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
String sortOrder) {
if (LOGV) Log.v(TAG, "query(uri=" + uri + ", proj=" + Arrays.toString(projection) + ")");
final SQLiteDatabase db = mOpenHelper.getReadableDatabase();
final int match = sUriMatcher.match(uri);
switch (match) {
default: {
// Most cases are handled with simple SelectionBuilder
final SelectionBuilder builder = buildExpandedSelection(uri, match);
return builder.where(selection, selectionArgs).query(db, projection, sortOrder);
}
case NOTES_EXPORT: {
// Provide query values for file attachments
final String[] columns = { OpenableColumns.DISPLAY_NAME, OpenableColumns.SIZE };
final MatrixCursor cursor = new MatrixCursor(columns, 1);
cursor.addRow(new String[] { "notes.xml", null });
return cursor;
}
case SEARCH_SUGGEST: {
final SelectionBuilder builder = new SelectionBuilder();
// Adjust incoming query to become SQL text match
selectionArgs[0] = selectionArgs[0] + "%";
builder.table(Tables.SEARCH_SUGGEST);
builder.where(selection, selectionArgs);
builder.map(SearchManager.SUGGEST_COLUMN_QUERY,
SearchManager.SUGGEST_COLUMN_TEXT_1);
projection = new String[] { BaseColumns._ID, SearchManager.SUGGEST_COLUMN_TEXT_1,
SearchManager.SUGGEST_COLUMN_QUERY };
final String limit = uri.getQueryParameter(SearchManager.SUGGEST_PARAMETER_LIMIT);
return builder.query(db, projection, null, null, SearchSuggest.DEFAULT_SORT, limit);
}
}
}
/** {@inheritDoc} */
@Override
public Uri insert(Uri uri, ContentValues values) {
if (LOGV) Log.v(TAG, "insert(uri=" + uri + ", values=" + values.toString() + ")");
final SQLiteDatabase db = mOpenHelper.getWritableDatabase();
final int match = sUriMatcher.match(uri);
switch (match) {
case BLOCKS: {
db.insertOrThrow(Tables.BLOCKS, null, values);
return Blocks.buildBlockUri(values.getAsString(Blocks.BLOCK_ID));
}
case TRACKS: {
db.insertOrThrow(Tables.TRACKS, null, values);
return Tracks.buildTrackUri(values.getAsString(Tracks.TRACK_ID));
}
case ROOMS: {
db.insertOrThrow(Tables.ROOMS, null, values);
return Rooms.buildRoomUri(values.getAsString(Rooms.ROOM_ID));
}
case SESSIONS: {
db.insertOrThrow(Tables.SESSIONS, null, values);
return Sessions.buildSessionUri(values.getAsString(Sessions.SESSION_ID));
}
case SESSIONS_ID_SPEAKERS: {
db.insertOrThrow(Tables.SESSIONS_SPEAKERS, null, values);
return Speakers.buildSpeakerUri(values.getAsString(SessionsSpeakers.SPEAKER_ID));
}
case SESSIONS_ID_TRACKS: {
db.insertOrThrow(Tables.SESSIONS_TRACKS, null, values);
return Tracks.buildTrackUri(values.getAsString(SessionsTracks.TRACK_ID));
}
case SESSIONS_ID_NOTES: {
final String sessionId = Sessions.getSessionId(uri);
values.put(Notes.SESSION_ID, sessionId);
final long noteId = db.insertOrThrow(Tables.NOTES, null, values);
return ContentUris.withAppendedId(Notes.CONTENT_URI, noteId);
}
case SPEAKERS: {
db.insertOrThrow(Tables.SPEAKERS, null, values);
return Speakers.buildSpeakerUri(values.getAsString(Speakers.SPEAKER_ID));
}
case VENDORS: {
db.insertOrThrow(Tables.VENDORS, null, values);
return Vendors.buildVendorUri(values.getAsString(Vendors.VENDOR_ID));
}
case NOTES: {
final long noteId = db.insertOrThrow(Tables.NOTES, null, values);
return ContentUris.withAppendedId(Notes.CONTENT_URI, noteId);
}
case SEARCH_SUGGEST: {
db.insertOrThrow(Tables.SEARCH_SUGGEST, null, values);
return SearchSuggest.CONTENT_URI;
}
default: {
throw new UnsupportedOperationException("Unknown uri: " + uri);
}
}
}
/** {@inheritDoc} */
@Override
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
if (LOGV) Log.v(TAG, "update(uri=" + uri + ", values=" + values.toString() + ")");
final SQLiteDatabase db = mOpenHelper.getWritableDatabase();
final SelectionBuilder builder = buildSimpleSelection(uri);
return builder.where(selection, selectionArgs).update(db, values);
}
/** {@inheritDoc} */
@Override
public int delete(Uri uri, String selection, String[] selectionArgs) {
if (LOGV) Log.v(TAG, "delete(uri=" + uri + ")");
final SQLiteDatabase db = mOpenHelper.getWritableDatabase();
final SelectionBuilder builder = buildSimpleSelection(uri);
return builder.where(selection, selectionArgs).delete(db);
}
/**
* Apply the given set of {@link ContentProviderOperation}, executing inside
* a {@link SQLiteDatabase} transaction. All changes will be rolled back if
* any single one fails.
*/
@Override
public ContentProviderResult[] applyBatch(ArrayList<ContentProviderOperation> operations)
throws OperationApplicationException {
final SQLiteDatabase db = mOpenHelper.getWritableDatabase();
db.beginTransaction();
try {
final int numOperations = operations.size();
final ContentProviderResult[] results = new ContentProviderResult[numOperations];
for (int i = 0; i < numOperations; i++) {
results[i] = operations.get(i).apply(this, results, i);
}
db.setTransactionSuccessful();
return results;
} finally {
db.endTransaction();
}
}
/**
* Build a simple {@link SelectionBuilder} to match the requested
* {@link Uri}. This is usually enough to support {@link #insert},
* {@link #update}, and {@link #delete} operations.
*/
private SelectionBuilder buildSimpleSelection(Uri uri) {
final SelectionBuilder builder = new SelectionBuilder();
final int match = sUriMatcher.match(uri);
switch (match) {
case BLOCKS: {
return builder.table(Tables.BLOCKS);
}
case BLOCKS_ID: {
final String blockId = Blocks.getBlockId(uri);
return builder.table(Tables.BLOCKS)
.where(Blocks.BLOCK_ID + "=?", blockId);
}
case TRACKS: {
return builder.table(Tables.TRACKS);
}
case TRACKS_ID: {
final String trackId = Tracks.getTrackId(uri);
return builder.table(Tables.TRACKS)
.where(Tracks.TRACK_ID + "=?", trackId);
}
case ROOMS: {
return builder.table(Tables.ROOMS);
}
case ROOMS_ID: {
final String roomId = Rooms.getRoomId(uri);
return builder.table(Tables.ROOMS)
.where(Rooms.ROOM_ID + "=?", roomId);
}
case SESSIONS: {
return builder.table(Tables.SESSIONS);
}
case SESSIONS_ID: {
final String sessionId = Sessions.getSessionId(uri);
return builder.table(Tables.SESSIONS)
.where(Sessions.SESSION_ID + "=?", sessionId);
}
case SESSIONS_ID_SPEAKERS: {
final String sessionId = Sessions.getSessionId(uri);
return builder.table(Tables.SESSIONS_SPEAKERS)
.where(Sessions.SESSION_ID + "=?", sessionId);
}
case SESSIONS_ID_TRACKS: {
final String sessionId = Sessions.getSessionId(uri);
return builder.table(Tables.SESSIONS_TRACKS)
.where(Sessions.SESSION_ID + "=?", sessionId);
}
case SPEAKERS: {
return builder.table(Tables.SPEAKERS);
}
case SPEAKERS_ID: {
final String speakerId = Speakers.getSpeakerId(uri);
return builder.table(Tables.SPEAKERS)
.where(Speakers.SPEAKER_ID + "=?", speakerId);
}
case VENDORS: {
return builder.table(Tables.VENDORS);
}
case VENDORS_ID: {
final String vendorId = Vendors.getVendorId(uri);
return builder.table(Tables.VENDORS)
.where(Vendors.VENDOR_ID + "=?", vendorId);
}
case NOTES: {
return builder.table(Tables.NOTES);
}
case NOTES_ID: {
final String noteId = uri.getPathSegments().get(1);
return builder.table(Tables.NOTES)
.where(Notes._ID + "=?", noteId);
}
case SEARCH_SUGGEST: {
return builder.table(Tables.SEARCH_SUGGEST);
}
default: {
throw new UnsupportedOperationException("Unknown uri: " + uri);
}
}
}
/**
* Build an advanced {@link SelectionBuilder} to match the requested
* {@link Uri}. This is usually only used by {@link #query}, since it
* performs table joins useful for {@link Cursor} data.
*/
private SelectionBuilder buildExpandedSelection(Uri uri, int match) {
final SelectionBuilder builder = new SelectionBuilder();
switch (match) {
case BLOCKS: {
return builder.table(Tables.BLOCKS);
}
case BLOCKS_BETWEEN: {
final List<String> segments = uri.getPathSegments();
final String startTime = segments.get(2);
final String endTime = segments.get(3);
return builder.table(Tables.BLOCKS)
.map(Blocks.SESSIONS_COUNT, Subquery.BLOCK_SESSIONS_COUNT)
.map(Blocks.CONTAINS_STARRED, Subquery.BLOCK_CONTAINS_STARRED)
.where(Blocks.BLOCK_START + ">=?", startTime)
.where(Blocks.BLOCK_START + "<=?", endTime);
}
case BLOCKS_ID: {
final String blockId = Blocks.getBlockId(uri);
return builder.table(Tables.BLOCKS)
.map(Blocks.SESSIONS_COUNT, Subquery.BLOCK_SESSIONS_COUNT)
.map(Blocks.CONTAINS_STARRED, Subquery.BLOCK_CONTAINS_STARRED)
.where(Blocks.BLOCK_ID + "=?", blockId);
}
case BLOCKS_ID_SESSIONS: {
final String blockId = Blocks.getBlockId(uri);
return builder.table(Tables.SESSIONS_JOIN_BLOCKS_ROOMS)
.map(Blocks.SESSIONS_COUNT, Subquery.BLOCK_SESSIONS_COUNT)
.map(Blocks.CONTAINS_STARRED, Subquery.BLOCK_CONTAINS_STARRED)
.mapToTable(Sessions._ID, Tables.SESSIONS)
.mapToTable(Sessions.SESSION_ID, Tables.SESSIONS)
.mapToTable(Sessions.BLOCK_ID, Tables.SESSIONS)
.mapToTable(Sessions.ROOM_ID, Tables.SESSIONS)
.where(Qualified.SESSIONS_BLOCK_ID + "=?", blockId);
}
case TRACKS: {
return builder.table(Tables.TRACKS)
.map(Tracks.SESSIONS_COUNT, Subquery.TRACK_SESSIONS_COUNT)
.map(Tracks.VENDORS_COUNT, Subquery.TRACK_VENDORS_COUNT);
}
case TRACKS_ID: {
final String trackId = Tracks.getTrackId(uri);
return builder.table(Tables.TRACKS)
.where(Tracks.TRACK_ID + "=?", trackId);
}
case TRACKS_ID_SESSIONS: {
final String trackId = Tracks.getTrackId(uri);
return builder.table(Tables.SESSIONS_TRACKS_JOIN_SESSIONS_BLOCKS_ROOMS)
.mapToTable(Sessions._ID, Tables.SESSIONS)
.mapToTable(Sessions.SESSION_ID, Tables.SESSIONS)
.mapToTable(Sessions.BLOCK_ID, Tables.SESSIONS)
.mapToTable(Sessions.ROOM_ID, Tables.SESSIONS)
.where(Qualified.SESSIONS_TRACKS_TRACK_ID + "=?", trackId);
}
case TRACKS_ID_VENDORS: {
final String trackId = Tracks.getTrackId(uri);
return builder.table(Tables.VENDORS_JOIN_TRACKS)
.mapToTable(Vendors._ID, Tables.VENDORS)
.mapToTable(Vendors.TRACK_ID, Tables.VENDORS)
.where(Qualified.VENDORS_TRACK_ID + "=?", trackId);
}
case ROOMS: {
return builder.table(Tables.ROOMS);
}
case ROOMS_ID: {
final String roomId = Rooms.getRoomId(uri);
return builder.table(Tables.ROOMS)
.where(Rooms.ROOM_ID + "=?", roomId);
}
case ROOMS_ID_SESSIONS: {
final String roomId = Rooms.getRoomId(uri);
return builder.table(Tables.SESSIONS_JOIN_BLOCKS_ROOMS)
.mapToTable(Sessions._ID, Tables.SESSIONS)
.mapToTable(Sessions.BLOCK_ID, Tables.SESSIONS)
.mapToTable(Sessions.ROOM_ID, Tables.SESSIONS)
.where(Qualified.SESSIONS_ROOM_ID + "=?", roomId);
}
case SESSIONS: {
return builder.table(Tables.SESSIONS_JOIN_BLOCKS_ROOMS)
.mapToTable(Sessions._ID, Tables.SESSIONS)
.mapToTable(Sessions.BLOCK_ID, Tables.SESSIONS)
.mapToTable(Sessions.ROOM_ID, Tables.SESSIONS);
}
case SESSIONS_STARRED: {
return builder.table(Tables.SESSIONS_JOIN_BLOCKS_ROOMS)
.mapToTable(Sessions._ID, Tables.SESSIONS)
.mapToTable(Sessions.BLOCK_ID, Tables.SESSIONS)
.mapToTable(Sessions.ROOM_ID, Tables.SESSIONS)
.where(Sessions.STARRED + "=1");
}
case SESSIONS_SEARCH: {
final String query = Sessions.getSearchQuery(uri);
return builder.table(Tables.SESSIONS_SEARCH_JOIN_SESSIONS_BLOCKS_ROOMS)
.map(Sessions.SEARCH_SNIPPET, Subquery.SESSIONS_SNIPPET)
.mapToTable(Sessions._ID, Tables.SESSIONS)
.mapToTable(Sessions.SESSION_ID, Tables.SESSIONS)
.mapToTable(Sessions.BLOCK_ID, Tables.SESSIONS)
.mapToTable(Sessions.ROOM_ID, Tables.SESSIONS)
.where(SessionsSearchColumns.BODY + " MATCH ?", query);
}
case SESSIONS_AT: {
final List<String> segments = uri.getPathSegments();
final String time = segments.get(2);
return builder.table(Tables.SESSIONS_JOIN_BLOCKS_ROOMS)
.mapToTable(Sessions._ID, Tables.SESSIONS)
.mapToTable(Sessions.BLOCK_ID, Tables.SESSIONS)
.mapToTable(Sessions.ROOM_ID, Tables.SESSIONS)
.where(Sessions.BLOCK_START + "<=?", time)
.where(Sessions.BLOCK_END + ">=?", time);
}
case SESSIONS_ID: {
final String sessionId = Sessions.getSessionId(uri);
return builder.table(Tables.SESSIONS_JOIN_BLOCKS_ROOMS)
.mapToTable(Sessions._ID, Tables.SESSIONS)
.mapToTable(Sessions.BLOCK_ID, Tables.SESSIONS)
.mapToTable(Sessions.ROOM_ID, Tables.SESSIONS)
.where(Qualified.SESSIONS_SESSION_ID + "=?", sessionId);
}
case SESSIONS_ID_SPEAKERS: {
final String sessionId = Sessions.getSessionId(uri);
return builder.table(Tables.SESSIONS_SPEAKERS_JOIN_SPEAKERS)
.mapToTable(Speakers._ID, Tables.SPEAKERS)
.mapToTable(Speakers.SPEAKER_ID, Tables.SPEAKERS)
.where(Qualified.SESSIONS_SPEAKERS_SESSION_ID + "=?", sessionId);
}
case SESSIONS_ID_TRACKS: {
final String sessionId = Sessions.getSessionId(uri);
return builder.table(Tables.SESSIONS_TRACKS_JOIN_TRACKS)
.mapToTable(Tracks._ID, Tables.TRACKS)
.mapToTable(Tracks.TRACK_ID, Tables.TRACKS)
.where(Qualified.SESSIONS_TRACKS_SESSION_ID + "=?", sessionId);
}
case SESSIONS_ID_NOTES: {
final String sessionId = Sessions.getSessionId(uri);
return builder.table(Tables.NOTES)
.where(Notes.SESSION_ID + "=?", sessionId);
}
case SPEAKERS: {
return builder.table(Tables.SPEAKERS);
}
case SPEAKERS_ID: {
final String speakerId = Speakers.getSpeakerId(uri);
return builder.table(Tables.SPEAKERS)
.where(Speakers.SPEAKER_ID + "=?", speakerId);
}
case SPEAKERS_ID_SESSIONS: {
final String speakerId = Speakers.getSpeakerId(uri);
return builder.table(Tables.SESSIONS_SPEAKERS_JOIN_SESSIONS_BLOCKS_ROOMS)
.mapToTable(Sessions._ID, Tables.SESSIONS)
.mapToTable(Sessions.SESSION_ID, Tables.SESSIONS)
.mapToTable(Sessions.BLOCK_ID, Tables.SESSIONS)
.mapToTable(Sessions.ROOM_ID, Tables.SESSIONS)
.where(Qualified.SESSIONS_SPEAKERS_SPEAKER_ID + "=?", speakerId);
}
case VENDORS: {
return builder.table(Tables.VENDORS_JOIN_TRACKS)
.mapToTable(Vendors._ID, Tables.VENDORS)
.mapToTable(Vendors.TRACK_ID, Tables.VENDORS);
}
case VENDORS_STARRED: {
return builder.table(Tables.VENDORS_JOIN_TRACKS)
.mapToTable(Vendors._ID, Tables.VENDORS)
.mapToTable(Vendors.TRACK_ID, Tables.VENDORS)
.where(Vendors.STARRED + "=1");
}
case VENDORS_SEARCH: {
final String query = Vendors.getSearchQuery(uri);
return builder.table(Tables.VENDORS_SEARCH_JOIN_VENDORS_TRACKS)
.map(Vendors.SEARCH_SNIPPET, Subquery.VENDORS_SNIPPET)
.mapToTable(Vendors._ID, Tables.VENDORS)
.mapToTable(Vendors.VENDOR_ID, Tables.VENDORS)
.mapToTable(Vendors.TRACK_ID, Tables.VENDORS)
.where(VendorsSearchColumns.BODY + " MATCH ?", query);
}
case VENDORS_ID: {
final String vendorId = Vendors.getVendorId(uri);
return builder.table(Tables.VENDORS_JOIN_TRACKS)
.mapToTable(Vendors._ID, Tables.VENDORS)
.mapToTable(Vendors.TRACK_ID, Tables.VENDORS)
.where(Vendors.VENDOR_ID + "=?", vendorId);
}
case NOTES: {
return builder.table(Tables.NOTES);
}
case NOTES_ID: {
final long noteId = Notes.getNoteId(uri);
return builder.table(Tables.NOTES)
.where(Notes._ID + "=?", Long.toString(noteId));
}
default: {
throw new UnsupportedOperationException("Unknown uri: " + uri);
}
}
}
@Override
public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
final int match = sUriMatcher.match(uri);
switch (match) {
case NOTES_EXPORT: {
try {
final File notesFile = NotesExporter.writeExportedNotes(getContext());
return ParcelFileDescriptor
.open(notesFile, ParcelFileDescriptor.MODE_READ_ONLY);
} catch (IOException e) {
throw new FileNotFoundException("Unable to export notes: " + e.toString());
}
}
default: {
throw new UnsupportedOperationException("Unknown uri: " + uri);
}
}
}
private interface Subquery {
String BLOCK_SESSIONS_COUNT = "(SELECT COUNT(" + Qualified.SESSIONS_SESSION_ID + ") FROM "
+ Tables.SESSIONS + " WHERE " + Qualified.SESSIONS_BLOCK_ID + "="
+ Qualified.BLOCKS_BLOCK_ID + ")";
String BLOCK_CONTAINS_STARRED = "(SELECT MAX(" + Qualified.SESSIONS_STARRED + ") FROM "
+ Tables.SESSIONS + " WHERE " + Qualified.SESSIONS_BLOCK_ID + "="
+ Qualified.BLOCKS_BLOCK_ID + ")";
String TRACK_SESSIONS_COUNT = "(SELECT COUNT(" + Qualified.SESSIONS_TRACKS_SESSION_ID
+ ") FROM " + Tables.SESSIONS_TRACKS + " WHERE "
+ Qualified.SESSIONS_TRACKS_TRACK_ID + "=" + Qualified.TRACKS_TRACK_ID + ")";
String TRACK_VENDORS_COUNT = "(SELECT COUNT(" + Qualified.VENDORS_VENDOR_ID + ") FROM "
+ Tables.VENDORS + " WHERE " + Qualified.VENDORS_TRACK_ID + "="
+ Qualified.TRACKS_TRACK_ID + ")";
String SESSIONS_SNIPPET = "snippet(" + Tables.SESSIONS_SEARCH + ",'{','}','\u2026')";
String VENDORS_SNIPPET = "snippet(" + Tables.VENDORS_SEARCH + ",'{','}','\u2026')";
}
/**
* {@link ScheduleContract} fields that are fully qualified with a specific
* parent {@link Tables}. Used when needed to work around SQL ambiguity.
*/
private interface Qualified {
String SESSIONS_SESSION_ID = Tables.SESSIONS + "." + Sessions.SESSION_ID;
String SESSIONS_BLOCK_ID = Tables.SESSIONS + "." + Sessions.BLOCK_ID;
String SESSIONS_ROOM_ID = Tables.SESSIONS + "." + Sessions.ROOM_ID;
String SESSIONS_TRACKS_SESSION_ID = Tables.SESSIONS_TRACKS + "."
+ SessionsTracks.SESSION_ID;
String SESSIONS_TRACKS_TRACK_ID = Tables.SESSIONS_TRACKS + "."
+ SessionsTracks.TRACK_ID;
String SESSIONS_SPEAKERS_SESSION_ID = Tables.SESSIONS_SPEAKERS + "."
+ SessionsSpeakers.SESSION_ID;
String SESSIONS_SPEAKERS_SPEAKER_ID = Tables.SESSIONS_SPEAKERS + "."
+ SessionsSpeakers.SPEAKER_ID;
String VENDORS_VENDOR_ID = Tables.VENDORS + "." + Vendors.VENDOR_ID;
String VENDORS_TRACK_ID = Tables.VENDORS + "." + Vendors.TRACK_ID;
@SuppressWarnings("hiding")
String SESSIONS_STARRED = Tables.SESSIONS + "." + Sessions.STARRED;
String TRACKS_TRACK_ID = Tables.TRACKS + "." + Tracks.TRACK_ID;
String BLOCKS_BLOCK_ID = Tables.BLOCKS + "." + Blocks.BLOCK_ID;
}
}
| ghchinoy/wicsa2011 | src/com/google/android/apps/iosched/provider/ScheduleProvider.java | Java | apache-2.0 | 33,646 |
/*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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 com.amazonaws.services.inspector.model;
import com.amazonaws.AmazonServiceException;
/**
*
*/
public class NoSuchEntityException extends AmazonServiceException {
private static final long serialVersionUID = 1L;
/**
* Constructs a new NoSuchEntityException with the specified error message.
*
* @param message
* Describes the error encountered.
*/
public NoSuchEntityException(String message) {
super(message);
}
} | trasa/aws-sdk-java | aws-java-sdk-inspector/src/main/java/com/amazonaws/services/inspector/model/NoSuchEntityException.java | Java | apache-2.0 | 1,070 |
/*
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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 com.amazonaws.services.dataexchange.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/dataexchange-2017-07-25/DeleteEventAction" target="_top">AWS API
* Documentation</a>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DeleteEventActionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
* <p>
* The unique identifier for the event action.
* </p>
*/
private String eventActionId;
/**
* <p>
* The unique identifier for the event action.
* </p>
*
* @param eventActionId
* The unique identifier for the event action.
*/
public void setEventActionId(String eventActionId) {
this.eventActionId = eventActionId;
}
/**
* <p>
* The unique identifier for the event action.
* </p>
*
* @return The unique identifier for the event action.
*/
public String getEventActionId() {
return this.eventActionId;
}
/**
* <p>
* The unique identifier for the event action.
* </p>
*
* @param eventActionId
* The unique identifier for the event action.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeleteEventActionRequest withEventActionId(String eventActionId) {
setEventActionId(eventActionId);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getEventActionId() != null)
sb.append("EventActionId: ").append(getEventActionId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DeleteEventActionRequest == false)
return false;
DeleteEventActionRequest other = (DeleteEventActionRequest) obj;
if (other.getEventActionId() == null ^ this.getEventActionId() == null)
return false;
if (other.getEventActionId() != null && other.getEventActionId().equals(this.getEventActionId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEventActionId() == null) ? 0 : getEventActionId().hashCode());
return hashCode;
}
@Override
public DeleteEventActionRequest clone() {
return (DeleteEventActionRequest) super.clone();
}
}
| aws/aws-sdk-java | aws-java-sdk-dataexchange/src/main/java/com/amazonaws/services/dataexchange/model/DeleteEventActionRequest.java | Java | apache-2.0 | 3,714 |
/*******************************************************************************
* Copyright 2017 Xoriant Corporation.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
/*
* Doctor Appointment
* Appointment
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.api;
import io.swagger.client.ApiException;
import io.swagger.client.model.Payload;
import org.junit.Test;
import org.junit.Ignore;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for DefaultApi
*/
@Ignore
public class DefaultApiTest {
private final DefaultApi api = new DefaultApi();
/**
* Post new Doctor info
*
* endpoint for posting a newly created Doctor entity to the server
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void createDoctorTest() throws ApiException {
Payload payload = null;
api.createDoctor(payload);
// TODO: test validations
}
}
| XoriantOpenSource/swagger-blog-examples | swagger-blog-2/java-client/src/test/java/io/swagger/client/api/DefaultApiTest.java | Java | apache-2.0 | 1,849 |
/*
* =============================================================================
*
* Copyright (c) 2011-2016, The THYMELEAF team (http://www.thymeleaf.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* =============================================================================
*/
package org.thymeleaf.dialect.dialectwrapping;
import org.thymeleaf.context.ITemplateContext;
import org.thymeleaf.model.IModel;
import org.thymeleaf.processor.element.AbstractElementModelProcessor;
import org.thymeleaf.processor.element.IElementModelStructureHandler;
import org.thymeleaf.templatemode.TemplateMode;
public class ElementModelProcessor extends AbstractElementModelProcessor {
public ElementModelProcessor(final String dialectPrefix) {
super(TemplateMode.HTML, dialectPrefix, "div", true, null, false, 100);
}
@Override
protected void doProcess(final ITemplateContext context, final IModel model, final IElementModelStructureHandler structureHandler) {
}
}
| thymeleaf/thymeleaf-tests | src/test/java/org/thymeleaf/dialect/dialectwrapping/ElementModelProcessor.java | Java | apache-2.0 | 1,538 |
/*
* Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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 com.amazonaws.services.lightsail.model.transform;
import java.math.*;
import javax.annotation.Generated;
import com.amazonaws.services.lightsail.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;
import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;
/**
* DetachStaticIpResult JSON Unmarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DetachStaticIpResultJsonUnmarshaller implements Unmarshaller<DetachStaticIpResult, JsonUnmarshallerContext> {
public DetachStaticIpResult unmarshall(JsonUnmarshallerContext context) throws Exception {
DetachStaticIpResult detachStaticIpResult = new DetachStaticIpResult();
int originalDepth = context.getCurrentDepth();
String currentParentElement = context.getCurrentParentElement();
int targetDepth = originalDepth + 1;
JsonToken token = context.getCurrentToken();
if (token == null)
token = context.nextToken();
if (token == VALUE_NULL) {
return detachStaticIpResult;
}
while (true) {
if (token == null)
break;
if (token == FIELD_NAME || token == START_OBJECT) {
if (context.testExpression("operations", targetDepth)) {
context.nextToken();
detachStaticIpResult.setOperations(new ListUnmarshaller<Operation>(OperationJsonUnmarshaller.getInstance()).unmarshall(context));
}
} else if (token == END_ARRAY || token == END_OBJECT) {
if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {
if (context.getCurrentDepth() <= originalDepth)
break;
}
}
token = context.nextToken();
}
return detachStaticIpResult;
}
private static DetachStaticIpResultJsonUnmarshaller instance;
public static DetachStaticIpResultJsonUnmarshaller getInstance() {
if (instance == null)
instance = new DetachStaticIpResultJsonUnmarshaller();
return instance;
}
}
| jentfoo/aws-sdk-java | aws-java-sdk-lightsail/src/main/java/com/amazonaws/services/lightsail/model/transform/DetachStaticIpResultJsonUnmarshaller.java | Java | apache-2.0 | 2,855 |
package io.teknek.nibiru.transport.rpc;
import io.teknek.nibiru.transport.BaseResponse;
public class BlockingRpcResponse<T> implements BaseResponse {
private String exception;
private T rpcResult;
public BlockingRpcResponse(){
}
public String getException() {
return exception;
}
public void setException(String exception) {
this.exception = exception;
}
public T getRpcResult() {
return rpcResult;
}
public void setRpcResult(T rpcResult) {
this.rpcResult = rpcResult;
}
}
| edwardcapriolo/nibiru | src/main/java/io/teknek/nibiru/transport/rpc/BlockingRpcResponse.java | Java | apache-2.0 | 530 |
/*
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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 com.amazonaws.services.config.model.transform;
import java.util.List;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.config.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* DescribeConfigRulesRequestMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class DescribeConfigRulesRequestMarshaller {
private static final MarshallingInfo<List> CONFIGRULENAMES_BINDING = MarshallingInfo.builder(MarshallingType.LIST)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ConfigRuleNames").build();
private static final MarshallingInfo<String> NEXTTOKEN_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("NextToken").build();
private static final DescribeConfigRulesRequestMarshaller instance = new DescribeConfigRulesRequestMarshaller();
public static DescribeConfigRulesRequestMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(DescribeConfigRulesRequest describeConfigRulesRequest, ProtocolMarshaller protocolMarshaller) {
if (describeConfigRulesRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(describeConfigRulesRequest.getConfigRuleNames(), CONFIGRULENAMES_BINDING);
protocolMarshaller.marshall(describeConfigRulesRequest.getNextToken(), NEXTTOKEN_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
| aws/aws-sdk-java | aws-java-sdk-config/src/main/java/com/amazonaws/services/config/model/transform/DescribeConfigRulesRequestMarshaller.java | Java | apache-2.0 | 2,415 |
/*
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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 com.amazonaws.services.iotevents.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/iotevents-2018-07-27/GetDetectorModelAnalysisResults"
* target="_top">AWS API Documentation</a>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetDetectorModelAnalysisResultsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
* <p>
* The ID of the analysis result that you want to retrieve.
* </p>
*/
private String analysisId;
/**
* <p>
* The token that you can use to return the next set of results.
* </p>
*/
private String nextToken;
/**
* <p>
* The maximum number of results to be returned per request.
* </p>
*/
private Integer maxResults;
/**
* <p>
* The ID of the analysis result that you want to retrieve.
* </p>
*
* @param analysisId
* The ID of the analysis result that you want to retrieve.
*/
public void setAnalysisId(String analysisId) {
this.analysisId = analysisId;
}
/**
* <p>
* The ID of the analysis result that you want to retrieve.
* </p>
*
* @return The ID of the analysis result that you want to retrieve.
*/
public String getAnalysisId() {
return this.analysisId;
}
/**
* <p>
* The ID of the analysis result that you want to retrieve.
* </p>
*
* @param analysisId
* The ID of the analysis result that you want to retrieve.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetDetectorModelAnalysisResultsRequest withAnalysisId(String analysisId) {
setAnalysisId(analysisId);
return this;
}
/**
* <p>
* The token that you can use to return the next set of results.
* </p>
*
* @param nextToken
* The token that you can use to return the next set of results.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
* <p>
* The token that you can use to return the next set of results.
* </p>
*
* @return The token that you can use to return the next set of results.
*/
public String getNextToken() {
return this.nextToken;
}
/**
* <p>
* The token that you can use to return the next set of results.
* </p>
*
* @param nextToken
* The token that you can use to return the next set of results.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetDetectorModelAnalysisResultsRequest withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
* <p>
* The maximum number of results to be returned per request.
* </p>
*
* @param maxResults
* The maximum number of results to be returned per request.
*/
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
/**
* <p>
* The maximum number of results to be returned per request.
* </p>
*
* @return The maximum number of results to be returned per request.
*/
public Integer getMaxResults() {
return this.maxResults;
}
/**
* <p>
* The maximum number of results to be returned per request.
* </p>
*
* @param maxResults
* The maximum number of results to be returned per request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetDetectorModelAnalysisResultsRequest withMaxResults(Integer maxResults) {
setMaxResults(maxResults);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getAnalysisId() != null)
sb.append("AnalysisId: ").append(getAnalysisId()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken()).append(",");
if (getMaxResults() != null)
sb.append("MaxResults: ").append(getMaxResults());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetDetectorModelAnalysisResultsRequest == false)
return false;
GetDetectorModelAnalysisResultsRequest other = (GetDetectorModelAnalysisResultsRequest) obj;
if (other.getAnalysisId() == null ^ this.getAnalysisId() == null)
return false;
if (other.getAnalysisId() != null && other.getAnalysisId().equals(this.getAnalysisId()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
if (other.getMaxResults() == null ^ this.getMaxResults() == null)
return false;
if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAnalysisId() == null) ? 0 : getAnalysisId().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
return hashCode;
}
@Override
public GetDetectorModelAnalysisResultsRequest clone() {
return (GetDetectorModelAnalysisResultsRequest) super.clone();
}
}
| aws/aws-sdk-java | aws-java-sdk-iotevents/src/main/java/com/amazonaws/services/iotevents/model/GetDetectorModelAnalysisResultsRequest.java | Java | apache-2.0 | 7,053 |
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.api.ads.adwords.jaxws.v201809.cm;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
*
* Returns a list of CampaignSharedSets based on the given selector.
* @param selector the selector specifying the query
* @return a list of CampaignSharedSet entities that meet the criterion specified
* by the selector
* @throws ApiException
*
*
* <p>Java class for get element declaration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <element name="get">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="selector" type="{https://adwords.google.com/api/adwords/cm/v201809}Selector" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"selector"
})
@XmlRootElement(name = "get")
public class CampaignSharedSetServiceInterfaceget {
protected Selector selector;
/**
* Gets the value of the selector property.
*
* @return
* possible object is
* {@link Selector }
*
*/
public Selector getSelector() {
return selector;
}
/**
* Sets the value of the selector property.
*
* @param value
* allowed object is
* {@link Selector }
*
*/
public void setSelector(Selector value) {
this.selector = value;
}
}
| googleads/googleads-java-lib | modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201809/cm/CampaignSharedSetServiceInterfaceget.java | Java | apache-2.0 | 2,446 |
/**
* AET
*
* Copyright (C) 2013 Cognifide Limited
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* Copyright [2016] [http://bmp.lightbody.net/]
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
* the specific language governing permissions and limitations under the License.
*/
package org.browsermob.core.json;
import java.io.IOException;
import java.lang.reflect.Type;
import java.text.DateFormat;
import java.util.Date;
import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.SerializerProvider;
import org.codehaus.jackson.map.ser.ScalarSerializerBase;
public class ISO8601DateFormatter extends ScalarSerializerBase<Date> {
public final static ISO8601DateFormatter instance = new ISO8601DateFormatter();
public ISO8601DateFormatter() {
super(Date.class);
}
@Override
public void serialize(Date value, JsonGenerator jgen, SerializerProvider provider)
throws IOException, JsonGenerationException {
DateFormat df = (DateFormat) provider.getConfig().getDateFormat().clone();
jgen.writeString(df.format(value));
}
@Override
public JsonNode getSchema(SerializerProvider provider, Type typeHint)
throws JsonMappingException {
return createSchemaNode("string", true);
}
}
| Cognifide/AET | api/jobs-api/src/main/java/org/browsermob/core/json/ISO8601DateFormatter.java | Java | apache-2.0 | 2,315 |
package org.apache.lucene.index;
/*
* 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.
*/
import java.io.IOException;
import org.apache.lucene.analysis.tokenattributes.OffsetAttribute;
import org.apache.lucene.analysis.tokenattributes.PayloadAttribute;
import org.apache.lucene.codecs.TermVectorsWriter;
import org.apache.lucene.util.ByteBlockPool;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.RamUsageEstimator;
final class TermVectorsConsumerPerField extends TermsHashConsumerPerField {
final TermsHashPerField termsHashPerField;
final TermVectorsConsumer termsWriter;
final FieldInfo fieldInfo;
final DocumentsWriterPerThread.DocState docState;
final FieldInvertState fieldState;
boolean doVectors;
boolean doVectorPositions;
boolean doVectorOffsets;
boolean doVectorPayloads;
int maxNumPostings;
OffsetAttribute offsetAttribute;
PayloadAttribute payloadAttribute;
boolean hasPayloads; // if enabled, and we actually saw any for this field
public TermVectorsConsumerPerField(TermsHashPerField termsHashPerField, TermVectorsConsumer termsWriter, FieldInfo fieldInfo) {
this.termsHashPerField = termsHashPerField;
this.termsWriter = termsWriter;
this.fieldInfo = fieldInfo;
docState = termsHashPerField.docState;
fieldState = termsHashPerField.fieldState;
}
@Override
int getStreamCount() {
return 2;
}
@Override
boolean start(IndexableField[] fields, int count) {
doVectors = false;
doVectorPositions = false;
doVectorOffsets = false;
doVectorPayloads = false;
hasPayloads = false;
for(int i=0;i<count;i++) {
IndexableField field = fields[i];
if (field.fieldType().indexed()) {
if (field.fieldType().storeTermVectors()) {
doVectors = true;
doVectorPositions |= field.fieldType().storeTermVectorPositions();
doVectorOffsets |= field.fieldType().storeTermVectorOffsets();
if (doVectorPositions) {
doVectorPayloads |= field.fieldType().storeTermVectorPayloads();
} else if (field.fieldType().storeTermVectorPayloads()) {
// TODO: move this check somewhere else, and impl the other missing ones
throw new IllegalArgumentException("cannot index term vector payloads without term vector positions (field=\"" + field.name() + "\")");
}
} else {
if (field.fieldType().storeTermVectorOffsets()) {
throw new IllegalArgumentException("cannot index term vector offsets when term vectors are not indexed (field=\"" + field.name() + "\")");
}
if (field.fieldType().storeTermVectorPositions()) {
throw new IllegalArgumentException("cannot index term vector positions when term vectors are not indexed (field=\"" + field.name() + "\")");
}
if (field.fieldType().storeTermVectorPayloads()) {
throw new IllegalArgumentException("cannot index term vector payloads when term vectors are not indexed (field=\"" + field.name() + "\")");
}
}
} else {
if (field.fieldType().storeTermVectors()) {
throw new IllegalArgumentException("cannot index term vectors when field is not indexed (field=\"" + field.name() + "\")");
}
if (field.fieldType().storeTermVectorOffsets()) {
throw new IllegalArgumentException("cannot index term vector offsets when field is not indexed (field=\"" + field.name() + "\")");
}
if (field.fieldType().storeTermVectorPositions()) {
throw new IllegalArgumentException("cannot index term vector positions when field is not indexed (field=\"" + field.name() + "\")");
}
if (field.fieldType().storeTermVectorPayloads()) {
throw new IllegalArgumentException("cannot index term vector payloads when field is not indexed (field=\"" + field.name() + "\")");
}
}
}
if (doVectors) {
termsWriter.hasVectors = true;
if (termsHashPerField.bytesHash.size() != 0) {
// Only necessary if previous doc hit a
// non-aborting exception while writing vectors in
// this field:
termsHashPerField.reset();
}
}
// TODO: only if needed for performance
//perThread.postingsCount = 0;
return doVectors;
}
public void abort() {}
/** Called once per field per document if term vectors
* are enabled, to write the vectors to
* RAMOutputStream, which is then quickly flushed to
* the real term vectors files in the Directory. */ @Override
void finish() {
if (!doVectors || termsHashPerField.bytesHash.size() == 0) {
return;
}
termsWriter.addFieldToFlush(this);
}
void finishDocument() throws IOException {
assert docState.testPoint("TermVectorsTermsWriterPerField.finish start");
final int numPostings = termsHashPerField.bytesHash.size();
final BytesRef flushTerm = termsWriter.flushTerm;
assert numPostings >= 0;
if (numPostings > maxNumPostings)
maxNumPostings = numPostings;
// This is called once, after inverting all occurrences
// of a given field in the doc. At this point we flush
// our hash into the DocWriter.
assert termsWriter.vectorFieldsInOrder(fieldInfo);
TermVectorsPostingsArray postings = (TermVectorsPostingsArray) termsHashPerField.postingsArray;
final TermVectorsWriter tv = termsWriter.writer;
final int[] termIDs = termsHashPerField.sortPostings();
tv.startField(fieldInfo, numPostings, doVectorPositions, doVectorOffsets, hasPayloads);
final ByteSliceReader posReader = doVectorPositions ? termsWriter.vectorSliceReaderPos : null;
final ByteSliceReader offReader = doVectorOffsets ? termsWriter.vectorSliceReaderOff : null;
final ByteBlockPool termBytePool = termsHashPerField.termBytePool;
for(int j=0;j<numPostings;j++) {
final int termID = termIDs[j];
final int freq = postings.freqs[termID];
// Get BytesRef
termBytePool.setBytesRef(flushTerm, postings.textStarts[termID]);
tv.startTerm(flushTerm, freq);
if (doVectorPositions || doVectorOffsets) {
if (posReader != null) {
termsHashPerField.initReader(posReader, termID, 0);
}
if (offReader != null) {
termsHashPerField.initReader(offReader, termID, 1);
}
tv.addProx(freq, posReader, offReader);
}
tv.finishTerm();
}
tv.finishField();
termsHashPerField.reset();
fieldInfo.setStoreTermVectors();
}
@Override
void start(IndexableField f) {
if (doVectorOffsets) {
offsetAttribute = fieldState.attributeSource.addAttribute(OffsetAttribute.class);
} else {
offsetAttribute = null;
}
if (doVectorPayloads && fieldState.attributeSource.hasAttribute(PayloadAttribute.class)) {
payloadAttribute = fieldState.attributeSource.getAttribute(PayloadAttribute.class);
} else {
payloadAttribute = null;
}
}
void writeProx(TermVectorsPostingsArray postings, int termID) {
if (doVectorOffsets) {
int startOffset = fieldState.offset + offsetAttribute.startOffset();
int endOffset = fieldState.offset + offsetAttribute.endOffset();
termsHashPerField.writeVInt(1, startOffset - postings.lastOffsets[termID]);
termsHashPerField.writeVInt(1, endOffset - startOffset);
postings.lastOffsets[termID] = endOffset;
}
if (doVectorPositions) {
final BytesRef payload;
if (payloadAttribute == null) {
payload = null;
} else {
payload = payloadAttribute.getPayload();
}
final int pos = fieldState.position - postings.lastPositions[termID];
if (payload != null && payload.length > 0) {
termsHashPerField.writeVInt(0, (pos<<1)|1);
termsHashPerField.writeVInt(0, payload.length);
termsHashPerField.writeBytes(0, payload.bytes, payload.offset, payload.length);
hasPayloads = true;
} else {
termsHashPerField.writeVInt(0, pos<<1);
}
postings.lastPositions[termID] = fieldState.position;
}
}
@Override
void newTerm(final int termID) {
assert docState.testPoint("TermVectorsTermsWriterPerField.newTerm start");
TermVectorsPostingsArray postings = (TermVectorsPostingsArray) termsHashPerField.postingsArray;
postings.freqs[termID] = 1;
postings.lastOffsets[termID] = 0;
postings.lastPositions[termID] = 0;
writeProx(postings, termID);
}
@Override
void addTerm(final int termID) {
assert docState.testPoint("TermVectorsTermsWriterPerField.addTerm start");
TermVectorsPostingsArray postings = (TermVectorsPostingsArray) termsHashPerField.postingsArray;
postings.freqs[termID]++;
writeProx(postings, termID);
}
@Override
void skippingLongTerm() {}
@Override
ParallelPostingsArray createPostingsArray(int size) {
return new TermVectorsPostingsArray(size);
}
static final class TermVectorsPostingsArray extends ParallelPostingsArray {
public TermVectorsPostingsArray(int size) {
super(size);
freqs = new int[size];
lastOffsets = new int[size];
lastPositions = new int[size];
}
int[] freqs; // How many times this term occurred in the current doc
int[] lastOffsets; // Last offset we saw
int[] lastPositions; // Last position where this term occurred
@Override
ParallelPostingsArray newInstance(int size) {
return new TermVectorsPostingsArray(size);
}
@Override
void copyTo(ParallelPostingsArray toArray, int numToCopy) {
assert toArray instanceof TermVectorsPostingsArray;
TermVectorsPostingsArray to = (TermVectorsPostingsArray) toArray;
super.copyTo(toArray, numToCopy);
System.arraycopy(freqs, 0, to.freqs, 0, size);
System.arraycopy(lastOffsets, 0, to.lastOffsets, 0, size);
System.arraycopy(lastPositions, 0, to.lastPositions, 0, size);
}
@Override
int bytesPerPosting() {
return super.bytesPerPosting() + 3 * RamUsageEstimator.NUM_BYTES_INT;
}
}
}
| fogbeam/Heceta_solr | lucene/core/src/java/org/apache/lucene/index/TermVectorsConsumerPerField.java | Java | apache-2.0 | 10,979 |
/*
* Copyright 2011 Ning, Inc.
*
* Ning 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 com.mogwee.executors;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Factory that sets the name of each thread it creates to {@code [name]-[id]}.
* This makes debugging stack traces much easier.
*/
public class NamedThreadFactory implements ThreadFactory
{
private final AtomicInteger count = new AtomicInteger(0);
private final String name;
public NamedThreadFactory(String name)
{
this.name = name;
}
@Override
public Thread newThread(final Runnable runnable)
{
Thread thread = new Thread(runnable);
thread.setName(name + "-" + count.incrementAndGet());
return thread;
}
}
| twilliamson/mogwee-executors | src/main/java/com/mogwee/executors/NamedThreadFactory.java | Java | apache-2.0 | 1,331 |
/*
* Copyright 2013 the original author or authors.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.micromata.jira.rest.core.misc;
/**
* @author Christian Schulze
* @author Vitali Filippow
*/
public interface RestPathConstants {
// Common Stuff for Jersey Client
String AUTHORIZATION = "Authorization";
String BASIC = "Basic";
// REST Paths
String BASE_REST_PATH = "/rest/api/2";
String PROJECT = "/project";
String USER = "/user";
String SEARCH = "/search";
String ISSUE = "/issue";
String COMMENT = "/comment";
String VERSIONS = "/versions";
String COMPONENTS = "/components";
String ISSUETPYES = "/issuetype";
String STATUS = "/status";
String PRIORITY = "/priority";
String TRANSITIONS = "/transitions";
String WORKLOG = "/worklog";
String ATTACHMENTS = "/attachments";
String ATTACHMENT = "/attachment";
String ASSIGNABLE = "/assignable";
String FILTER = "/filter";
String FAVORITE = "/favourite";
String FIELD = "/field";
String META = "/meta";
String CREATEMETA = "/createmeta";
String MYPERMISSIONS = "/mypermissions";
String CONFIGURATION = "/configuration";
}
| micromata/jiraRestClient | src/main/java/de/micromata/jira/rest/core/misc/RestPathConstants.java | Java | apache-2.0 | 1,734 |
/*****************************************************************************
* Copyright (C) jparsec.org *
* ------------------------------------------------------------------------- *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
*****************************************************************************/
package org.jparsec.examples.sql.parser;
import static org.jparsec.examples.sql.parser.TerminalParser.phrase;
import static org.jparsec.examples.sql.parser.TerminalParser.term;
import java.util.List;
import java.util.function.BinaryOperator;
import java.util.function.UnaryOperator;
import org.jparsec.OperatorTable;
import org.jparsec.Parser;
import org.jparsec.Parsers;
import org.jparsec.examples.sql.ast.BetweenExpression;
import org.jparsec.examples.sql.ast.BinaryExpression;
import org.jparsec.examples.sql.ast.BinaryRelationalExpression;
import org.jparsec.examples.sql.ast.Expression;
import org.jparsec.examples.sql.ast.FullCaseExpression;
import org.jparsec.examples.sql.ast.FunctionExpression;
import org.jparsec.examples.sql.ast.LikeExpression;
import org.jparsec.examples.sql.ast.NullExpression;
import org.jparsec.examples.sql.ast.NumberExpression;
import org.jparsec.examples.sql.ast.Op;
import org.jparsec.examples.sql.ast.QualifiedName;
import org.jparsec.examples.sql.ast.QualifiedNameExpression;
import org.jparsec.examples.sql.ast.Relation;
import org.jparsec.examples.sql.ast.SimpleCaseExpression;
import org.jparsec.examples.sql.ast.StringExpression;
import org.jparsec.examples.sql.ast.TupleExpression;
import org.jparsec.examples.sql.ast.UnaryExpression;
import org.jparsec.examples.sql.ast.UnaryRelationalExpression;
import org.jparsec.examples.sql.ast.WildcardExpression;
import org.jparsec.functors.Pair;
/**
* Parser for expressions.
*
* @author Ben Yu
*/
public final class ExpressionParser {
static final Parser<Expression> NULL = term("null").<Expression>retn(NullExpression.instance);
static final Parser<Expression> NUMBER = TerminalParser.NUMBER.map(NumberExpression::new);
static final Parser<Expression> QUALIFIED_NAME = TerminalParser.QUALIFIED_NAME
.map(QualifiedNameExpression::new);
static final Parser<Expression> QUALIFIED_WILDCARD = TerminalParser.QUALIFIED_NAME
.followedBy(phrase(". *"))
.map(WildcardExpression::new);
static final Parser<Expression> WILDCARD =
term("*").<Expression>retn(new WildcardExpression(QualifiedName.of()))
.or(QUALIFIED_WILDCARD);
static final Parser<Expression> STRING = TerminalParser.STRING.map(StringExpression::new);
static Parser<Expression> functionCall(Parser<Expression> param) {
return Parsers.sequence(
TerminalParser.QUALIFIED_NAME, paren(param.sepBy(TerminalParser.term(","))),
FunctionExpression::new);
}
static Parser<Expression> tuple(Parser<Expression> expr) {
return paren(expr.sepBy(term(","))).map(TupleExpression::new);
}
static Parser<Expression> simpleCase(Parser<Expression> expr) {
return Parsers.sequence(
term("case").next(expr),
whenThens(expr, expr),
term("else").next(expr).optional().followedBy(term("end")),
SimpleCaseExpression::new);
}
static Parser<Expression> fullCase(Parser<Expression> cond, Parser<Expression> expr) {
return Parsers.sequence(
term("case").next(whenThens(cond, expr)),
term("else").next(expr).optional().followedBy(term("end")),
FullCaseExpression::new);
}
private static Parser<List<Pair<Expression, Expression>>> whenThens(
Parser<Expression> cond, Parser<Expression> expr) {
return Parsers.pair(term("when").next(cond), term("then").next(expr)).many1();
}
static <T> Parser<T> paren(Parser<T> parser) {
return parser.between(term("("), term(")"));
}
static Parser<Expression> arithmetic(Parser<Expression> atom) {
Parser.Reference<Expression> reference = Parser.newReference();
Parser<Expression> operand =
Parsers.or(paren(reference.lazy()), functionCall(reference.lazy()), atom);
Parser<Expression> parser = new OperatorTable<Expression>()
.infixl(binary("+", Op.PLUS), 10)
.infixl(binary("-", Op.MINUS), 10)
.infixl(binary("*", Op.MUL), 20)
.infixl(binary("/", Op.DIV), 20)
.infixl(binary("%", Op.MOD), 20)
.prefix(unary("-", Op.NEG), 50)
.build(operand);
reference.set(parser);
return parser;
}
static Parser<Expression> expression(Parser<Expression> cond) {
Parser.Reference<Expression> reference = Parser.newReference();
Parser<Expression> lazyExpr = reference.lazy();
Parser<Expression> atom = Parsers.or(
NUMBER, WILDCARD, QUALIFIED_NAME, simpleCase(lazyExpr), fullCase(cond, lazyExpr));
Parser<Expression> expression = arithmetic(atom).label("expression");
reference.set(expression);
return expression;
}
/************************** boolean expressions ****************************/
static Parser<Expression> compare(Parser<Expression> expr) {
return Parsers.or(
compare(expr, ">", Op.GT), compare(expr, ">=", Op.GE),
compare(expr, "<", Op.LT), compare(expr, "<=", Op.LE),
compare(expr, "=", Op.EQ), compare(expr, "<>", Op.NE),
nullCheck(expr), like(expr), between(expr));
}
static Parser<Expression> like(Parser<Expression> expr) {
return Parsers.sequence(
expr, Parsers.or(term("like").retn(true), phrase("not like").retn(false)),
expr, term("escape").next(expr).optional(),
LikeExpression::new);
}
static Parser<Expression> nullCheck(Parser<Expression> expr) {
return Parsers.sequence(
expr, phrase("is not").retn(Op.NOT).or(phrase("is").retn(Op.IS)), NULL,
BinaryExpression::new);
}
static Parser<Expression> logical(Parser<Expression> expr) {
Parser.Reference<Expression> ref = Parser.newReference();
Parser<Expression> parser = new OperatorTable<Expression>()
.prefix(unary("not", Op.NOT), 30)
.infixl(binary("and", Op.AND), 20)
.infixl(binary("or", Op.OR), 10)
.build(paren(ref.lazy()).or(expr)).label("logical expression");
ref.set(parser);
return parser;
}
static Parser<Expression> between(Parser<Expression> expr) {
return Parsers.sequence(
expr, Parsers.or(term("between").retn(true), phrase("not between").retn(false)),
expr, term("and").next(expr),
BetweenExpression::new);
}
static Parser<Expression> exists(Parser<Relation> relation) {
return term("exists").next(relation).map(e -> new UnaryRelationalExpression(e, Op.EXISTS));
}
static Parser<Expression> notExists(Parser<Relation> relation) {
return phrase("not exists").next(relation)
.map(e -> new UnaryRelationalExpression(e, Op.NOT_EXISTS));
}
static Parser<Expression> inRelation(Parser<Expression> expr, Parser<Relation> relation) {
return Parsers.sequence(
expr, Parsers.between(phrase("in ("), relation, term(")")),
(e, r) -> new BinaryRelationalExpression(e, Op.IN, r));
}
static Parser<Expression> notInRelation(Parser<Expression> expr, Parser<Relation> relation) {
return Parsers.sequence(
expr, Parsers.between(phrase("not in ("), relation, term(")")),
(e, r) -> new BinaryRelationalExpression(e, Op.NOT_IN, r));
}
static Parser<Expression> in(Parser<Expression> expr) {
return Parsers.sequence(
expr, term("in").next(tuple(expr)),
(e, t) -> new BinaryExpression(e, Op.IN, t));
}
static Parser<Expression> notIn(Parser<Expression> expr) {
return Parsers.sequence(
expr, phrase("not in").next(tuple(expr)),
(e, t) -> new BinaryExpression(e, Op.NOT_IN, t));
}
static Parser<Expression> condition(Parser<Expression> expr, Parser<Relation> rel) {
Parser<Expression> atom = Parsers.or(
compare(expr), in(expr), notIn(expr),
exists(rel), notExists(rel), inRelation(expr, rel), notInRelation(expr, rel));
return logical(atom);
}
/************************** utility methods ****************************/
private static Parser<Expression> compare(
Parser<Expression> operand, String name, Op op) {
return Parsers.sequence(
operand, term(name).retn(op), operand,
BinaryExpression::new);
}
private static Parser<BinaryOperator<Expression>> binary(String name, Op op) {
return term(name).retn((l, r) -> new BinaryExpression(l, op, r));
}
private static Parser<UnaryOperator<Expression>> unary(String name, Op op) {
return term(name).retn(e -> new UnaryExpression(op, e));
}
}
| jparsec/jparsec | jparsec-examples/src/main/java/org/jparsec/examples/sql/parser/ExpressionParser.java | Java | apache-2.0 | 9,523 |
/*
* Copyright 2004-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codehaus.groovy.grails.web.json;
import static org.codehaus.groovy.grails.web.json.JSONWriter.Mode.ARRAY;
import static org.codehaus.groovy.grails.web.json.JSONWriter.Mode.KEY;
import static org.codehaus.groovy.grails.web.json.JSONWriter.Mode.OBJECT;
import java.io.IOException;
import java.io.Writer;
/**
* A JSONWriter dedicated to create indented/pretty printed output.
*
* @author Siegfried Puchbauer
* @since 1.1
*/
public class PrettyPrintJSONWriter extends JSONWriter {
public static final String DEFAULT_INDENT_STR = " ";
public static final String NEWLINE;
static {
String nl = System.getProperty("line.separator");
NEWLINE = nl != null ? nl : "\n";
}
private int indentLevel = 0;
private final String indentStr;
public PrettyPrintJSONWriter(Writer w) {
this(w, DEFAULT_INDENT_STR);
}
public PrettyPrintJSONWriter(Writer w, String indentStr) {
super(w);
this.indentStr = indentStr;
}
private void newline() {
try {
writer.write(NEWLINE);
}
catch (IOException e) {
throw new JSONException(e);
}
}
private void indent() {
try {
for (int i = 0; i < indentLevel; i++) {
writer.write(indentStr);
}
}
catch (IOException e) {
throw new JSONException(e);
}
}
@Override
protected JSONWriter append(String s) {
if (s == null) {
throw new JSONException("Null pointer");
}
if (mode == OBJECT || mode == ARRAY) {
try {
if (comma && mode == ARRAY) {
comma();
}
if (mode == ARRAY) {
newline();
indent();
}
writer.write(s);
}
catch (IOException e) {
throw new JSONException(e);
}
if (mode == OBJECT) {
mode = KEY;
}
comma = true;
return this;
}
throw new JSONException("Value out of sequence.");
}
@Override
protected JSONWriter end(Mode m, char c) {
newline();
indent();
return super.end(m, c);
}
@Override
public JSONWriter array() {
super.array();
indentLevel++;
return this;
}
@Override
public JSONWriter endArray() {
indentLevel--;
super.endArray();
return this;
}
@Override
public JSONWriter object() {
super.object();
indentLevel++;
return this;
}
@Override
public JSONWriter endObject() {
indentLevel--;
super.endObject();
return this;
}
@Override
public JSONWriter key(String s) {
if (s == null) {
throw new JSONException("Null key.");
}
if (mode == KEY) {
try {
if (comma) {
comma();
}
newline();
indent();
writer.write(JSONObject.quote(s));
writer.write(": ");
comma = false;
mode = OBJECT;
return this;
}
catch (IOException e) {
throw new JSONException(e);
}
}
throw new JSONException("Misplaced key.");
}
}
| jeffbrown/grailsnolib | grails-web/src/main/groovy/org/codehaus/groovy/grails/web/json/PrettyPrintJSONWriter.java | Java | apache-2.0 | 4,112 |
/**
*/
package org.tud.inf.st.mbt.ocm.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.tud.inf.st.mbt.ocm.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class OcmFactoryImpl extends EFactoryImpl implements OcmFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static OcmFactory init() {
try {
OcmFactory theOcmFactory = (OcmFactory)EPackage.Registry.INSTANCE.getEFactory(OcmPackage.eNS_URI);
if (theOcmFactory != null) {
return theOcmFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new OcmFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public OcmFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case OcmPackage.OPERATIONAL_CONFIGURATION_MODEL: return createOperationalConfigurationModel();
case OcmPackage.STANDARD_CONFIGURATION_NODE: return createStandardConfigurationNode();
case OcmPackage.RECONFIGURATION_ACTION_NODE: return createReconfigurationActionNode();
case OcmPackage.TIMED_EDGE: return createTimedEdge();
case OcmPackage.EVENT_GUARDED_EDGE: return createEventGuardedEdge();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public OperationalConfigurationModel createOperationalConfigurationModel() {
OperationalConfigurationModelImpl operationalConfigurationModel = new OperationalConfigurationModelImpl();
return operationalConfigurationModel;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public StandardConfigurationNode createStandardConfigurationNode() {
StandardConfigurationNodeImpl standardConfigurationNode = new StandardConfigurationNodeImpl();
return standardConfigurationNode;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ReconfigurationActionNode createReconfigurationActionNode() {
ReconfigurationActionNodeImpl reconfigurationActionNode = new ReconfigurationActionNodeImpl();
return reconfigurationActionNode;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TimedEdge createTimedEdge() {
TimedEdgeImpl timedEdge = new TimedEdgeImpl();
return timedEdge;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EventGuardedEdge createEventGuardedEdge() {
EventGuardedEdgeImpl eventGuardedEdge = new EventGuardedEdgeImpl();
return eventGuardedEdge;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public OcmPackage getOcmPackage() {
return (OcmPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static OcmPackage getPackage() {
return OcmPackage.eINSTANCE;
}
} //OcmFactoryImpl
| paetti1988/qmate | MATE/org.tud.inf.st.mbt.emf/src-gen/org/tud/inf/st/mbt/ocm/impl/OcmFactoryImpl.java | Java | apache-2.0 | 3,466 |
/**
* Copyright (c) 2013-2019 Contributors to the Eclipse Foundation
*
* <p> See the NOTICE file distributed with this work for additional information regarding copyright
* ownership. All rights reserved. This program and the accompanying materials are made available
* under the terms of the Apache License, Version 2.0 which accompanies this distribution and is
* available at http://www.apache.org/licenses/LICENSE-2.0.txt
*/
package org.locationtech.geowave.core.store.util;
import java.util.Iterator;
import java.util.Map;
import org.locationtech.geowave.core.store.adapter.PersistentAdapterStore;
import org.locationtech.geowave.core.store.adapter.RowMergingDataAdapter;
import org.locationtech.geowave.core.store.adapter.RowMergingDataAdapter.RowTransform;
import org.locationtech.geowave.core.store.api.Index;
import org.locationtech.geowave.core.store.entities.GeoWaveRow;
import org.locationtech.geowave.core.store.operations.RowDeleter;
import org.locationtech.geowave.core.store.operations.RowWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class RewritingMergingEntryIterator<T> extends MergingEntryIterator<T> {
private static final Logger LOGGER = LoggerFactory.getLogger(RewritingMergingEntryIterator.class);
private final RowWriter writer;
private final RowDeleter deleter;
public RewritingMergingEntryIterator(
final PersistentAdapterStore adapterStore,
final Index index,
final Iterator<GeoWaveRow> scannerIt,
final Map<Short, RowMergingDataAdapter> mergingAdapters,
final RowWriter writer,
final RowDeleter deleter) {
super(adapterStore, index, scannerIt, null, null, mergingAdapters, null, null);
this.writer = writer;
this.deleter = deleter;
}
@Override
protected GeoWaveRow mergeSingleRowValues(
final GeoWaveRow singleRow,
final RowTransform rowTransform) {
if (singleRow.getFieldValues().length < 2) {
return singleRow;
}
deleter.delete(singleRow);
deleter.flush();
final GeoWaveRow merged = super.mergeSingleRowValues(singleRow, rowTransform);
writer.write(merged);
return merged;
}
}
| spohnan/geowave | core/store/src/main/java/org/locationtech/geowave/core/store/util/RewritingMergingEntryIterator.java | Java | apache-2.0 | 2,157 |
/*
* Copyright (C) 2019 Contentful GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.contentful.java.cma;
import com.contentful.java.cma.model.CMAArray;
import com.contentful.java.cma.model.CMATag;
import io.reactivex.Flowable;
import retrofit2.Response;
import retrofit2.http.GET;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.QueryMap;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import java.util.Map;
/**
* Spaces Service.
*/
interface ServiceContentTags {
@GET("/spaces/{space_id}/environments/{environment_id}/tags")
Flowable<CMAArray<CMATag>> fetchAll(
@Path("space_id") String spaceId,
@Path("environment_id") String environmentID,
@QueryMap Map<String, String> query
);
@PUT("/spaces/{space_id}/environments/{environment_id}/tags/{tag_id}")
Flowable<CMATag> create(
@Path("space_id") String spaceId,
@Path("environment_id") String environmentID,
@Path("tag_id") String tagId,
@Body CMATag tag);
@GET("/spaces/{space_id}/environments/{environment_id}/tags/{tag_id}")
Flowable<CMATag> fetchOne(
@Path("space_id") String spaceId,
@Path("environment_id") String environmentID,
@Path("tag_id") String tagId
);
@PUT("/spaces/{space_id}/environments/{environment_id}/tags/{tag_id}")
Flowable<CMATag> update(
@Path("space_id") String spaceId,
@Path("environment_id") String environmentID,
@Path("tag_id") String tagId,
@Body CMATag tag);
@DELETE("/spaces/{space_id}/environments/{environment_id}/tags/{tag_id}")
Flowable<Response<Void>> delete(
@Path("space_id") String spaceId,
@Path("environment_id") String environmentID,
@Path("tag_id") String tagId);
}
| contentful/contentful-management.java | src/main/java/com/contentful/java/cma/ServiceContentTags.java | Java | apache-2.0 | 2,309 |
/*
* Copyright (c) 2012. Piraso Alvin R. de Leon. All Rights Reserved.
*
* See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The Piraso 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.piraso.server.sql;
import org.piraso.server.AbstractContextLoggerBeanProcessor;
import javax.sql.DataSource;
/**
* Create a bean post processor which ensures that any bean instance of type {@link DataSource} will
* be wrap by a context logger aware instance.
*
*/
public class SQLContextLoggerBeanPostProcessor extends AbstractContextLoggerBeanProcessor<DataSource> {
public SQLContextLoggerBeanPostProcessor() {
super(DataSource.class);
}
@Override
public DataSource createProxy(DataSource o, String id) {
return SQLContextLogger.create(o, id);
}
}
| piraso/piraso-sql | context-logger/server/src/main/java/org/piraso/server/sql/SQLContextLoggerBeanPostProcessor.java | Java | apache-2.0 | 1,383 |
package org.lionsoul.jcseg.util;
import java.io.Serializable;
/**
* string buffer class
*
* @author chenxin<chenxin619315@gmail.com>
*/
public class IStringBuffer implements Serializable
{
private static final long serialVersionUID = 1L;
/**
* buffer char array.
*/
private char buff[];
private int count;
/**
* create a buffer with a default length 16
*/
public IStringBuffer()
{
this(16);
}
/**
* create a buffer with a specified length
*
* @param length
*/
public IStringBuffer( int length )
{
if ( length <= 0 ) {
throw new IllegalArgumentException("length <= 0");
}
buff = new char[length];
count = 0;
}
/**
* create a buffer with a specified string
*
* @param str
*/
public IStringBuffer( String str )
{
this(str.length()+16);
append(str);
}
/**
* resize the buffer
* this will have to copy the old chars from the old buffer to the new buffer
*
* @param length
*/
private void resizeTo( int length )
{
if ( length <= 0 )
throw new IllegalArgumentException("length <= 0");
if ( length != buff.length ) {
int len = ( length > buff.length ) ? buff.length : length;
//System.out.println("resize:"+length);
char[] obuff = buff;
buff = new char[length];
/*for ( int j = 0; j < len; j++ ) {
buff[j] = obuff[j];
}*/
System.arraycopy(obuff, 0, buff, 0, len);
}
}
/**
* append a string to the buffer
*
* @param str string to append to
*/
public IStringBuffer append( String str )
{
if ( str == null )
throw new NullPointerException();
//check the necessary to resize the buffer.
if ( count + str.length() > buff.length ) {
resizeTo( (count + str.length()) * 2 + 1 );
}
for ( int j = 0; j < str.length(); j++ ) {
buff[count++] = str.charAt(j);
}
return this;
}
/**
* append parts of the chars to the buffer
*
* @param chars
* @param start the start index
* @param length length of chars to append to
*/
public IStringBuffer append( char[] chars, int start, int length )
{
if ( chars == null )
throw new NullPointerException();
if ( start < 0 )
throw new IndexOutOfBoundsException();
if ( length <= 0 )
throw new IndexOutOfBoundsException();
if ( start + length > chars.length )
throw new IndexOutOfBoundsException();
//check the necessary to resize the buffer.
if ( count + length > buff.length ) {
resizeTo( (count + length) * 2 + 1 );
}
for ( int j = 0; j < length; j++ ) {
buff[count++] = chars[start+j];
}
return this;
}
/**
* append the rest of the chars to the buffer
*
* @param chars
* @param start the start index
* @return IStringBuffer
*
*/
public IStringBuffer append( char[] chars, int start )
{
append(chars, start, chars.length - start);
return this;
}
/**
* append some chars to the buffer
*
* @param chars
*/
public IStringBuffer append( char[] chars )
{
return append(chars, 0, chars.length);
}
/**
* append a char to the buffer
*
* @param c the char to append to
*/
public IStringBuffer append( char c )
{
if ( count == buff.length ) {
resizeTo( buff.length * 2 + 1 );
}
buff[count++] = c;
return this;
}
/**
* append a boolean value
*
* @param bool
*/
public IStringBuffer append(boolean bool)
{
String str = bool ? "true" : "false";
return append(str);
}
/**
* append a short value
*
* @param shortv
*/
public IStringBuffer append(short shortv)
{
return append(String.valueOf(shortv));
}
/**
* append a int value
*
* @param intv
*/
public IStringBuffer append(int intv)
{
return append(String.valueOf(intv));
}
/**
* append a long value
*
* @param longv
*/
public IStringBuffer append(long longv)
{
return append(String.valueOf(longv));
}
/**
* append a float value
*
* @param floatv
*/
public IStringBuffer append(float floatv)
{
return append(String.valueOf(floatv));
}
/**
* append a double value
*
* @param doublev
*/
public IStringBuffer append(double doublev)
{
return append(String.valueOf(doublev));
}
/**
* return the length of the buffer
*
* @return int the length of the buffer
*/
public int length()
{
return count;
}
/**
* set the length of the buffer
* actually it just override the count and the actual buffer
* has nothing changed
*
* @param length
*/
public int setLength(int length)
{
int oldCount = count;
count = length;
return oldCount;
}
/**
* get the char at a specified position in the buffer
*/
public char charAt( int idx )
{
if ( idx < 0 )
throw new IndexOutOfBoundsException("idx{"+idx+"} < 0");
if ( idx >= count )
throw new IndexOutOfBoundsException("idx{"+idx+"} >= buffer.length");
return buff[idx];
}
/**
* always return the last char
*
* @return char
*/
public char last()
{
if ( count == 0 ) {
throw new IndexOutOfBoundsException("Empty buffer");
}
return buff[count-1];
}
/**
* always return the first char
*
* @return char
*/
public char first()
{
if ( count == 0 ) {
throw new IndexOutOfBoundsException("Empty buffer");
}
return buff[0];
}
/**
* delete the char at the specified position
*/
public IStringBuffer deleteCharAt( int idx )
{
if ( idx < 0 )
throw new IndexOutOfBoundsException("idx < 0");
if ( idx >= count )
throw new IndexOutOfBoundsException("idx >= buffer.length");
//here we got a bug for j < count
//change over it to count - 1
//thanks for the feedback of xuyijun@gmail.com
//@date 2013-08-22
for ( int j = idx; j < count - 1; j++ ) {
buff[j] = buff[j+1];
}
count--;
return this;
}
/**
* set the char at the specified index
*
* @param idx
* @param chr
*/
public void set(int idx, char chr)
{
if ( idx < 0 )
throw new IndexOutOfBoundsException("idx < 0");
if ( idx >= count )
throw new IndexOutOfBoundsException("idx >= buffer.length");
buff[idx] = chr;
}
/**
* return the chars of the buffer
*
* @return char[]
*/
public char[] buffer()
{
return buff;
}
/**
* clear the buffer by reset the count to 0
*/
public IStringBuffer clear()
{
count = 0;
return this;
}
/**
* return the string of the current buffer
*
* @return String
* @see Object#toString()
*/
public String toString()
{
return new String(buff, 0, count);
}
}
| lionsoul2014/jcseg | jcseg-core/src/main/java/org/lionsoul/jcseg/util/IStringBuffer.java | Java | apache-2.0 | 7,966 |
package net.happybrackets.core.control;
import com.google.gson.Gson;
import de.sciss.net.OSCMessage;
import net.happybrackets.core.Device;
import net.happybrackets.core.OSCVocabulary;
import net.happybrackets.core.scheduling.HBScheduler;
import net.happybrackets.core.scheduling.ScheduledEventListener;
import net.happybrackets.core.scheduling.ScheduledObject;
import net.happybrackets.device.HB;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.*;
/**
* This class facilitates sending message values between sketches,
* devices, and a graphical environment.
* The values can be represented as sliders, text boxes, check boxes, and buttons
*
* A message can either be an integer, a double, a string, a boolean, a trigger or a complete class.
*
* Although similar to the send and receive objects in Max in that the name and type
* parameter of the {@link DynamicControl} determines message interconnection,
* DynamicControls also have an attribute called {@link ControlScope}, which dictates how far (in
* a topological sense) the object can reach in order to communicate with other
* DynamicControls. DynamicControls can be bound to different objects, the default being the class that instantiated it.
*
* <br>The classes are best accessed through {@link DynamicControlParent} abstractions
*
*/
public class DynamicControl implements ScheduledEventListener {
static Gson gson = new Gson();
// flag for testing
static boolean ignoreName = false;
private boolean isPersistentControl = false;
/**
* Set ignore name for testing
* @param ignore true to ignore
*/
static void setIgnoreName(boolean ignore){
ignoreName = true;
}
static int deviceSendId = 0; // we will use this to number all messages we send. They can be filtered at receiver by testing last message mapped
/**
* Define a list of target devices. Can be either device name or IP address
* If it is a device name, there will be a lookup of stored device names
*/
Set<String> targetDevices = new HashSet<>();
// we will map Message ID to device name. If the last ID is in this map, we will ignore message
static Map<String, Integer> messageIdMap = new Hashtable<>();
/**
* See if we will process a control message based on device name and message_id
* If the message_id is mapped against the device_name, ignore message, otherwise store mapping and return true;
* @param device_name the device name
* @param message_id the message_id
* @return true if we are going to process this message
*/
public static boolean enableProcessControlMessage(String device_name, int message_id){
boolean ret = true;
if (messageIdMap.containsKey(device_name)) {
if (messageIdMap.get(device_name) == message_id) {
ret = false;
}
}
if (ret){
messageIdMap.put(device_name, message_id);
}
return ret;
}
// The device name that set last message to this control
// A Null value will indicate that it was this device
String sendingDevice = null;
/**
* Get the name of the device that sent the message. If the message was local, will return this device name
* @return name of device that sent message
*/
public String getSendingDevice(){
String ret = sendingDevice;
if (ret == null) {
ret = deviceName;
}
return ret;
}
/**
* Define how we want the object displayed in the plugin
*/
public enum DISPLAY_TYPE {
DISPLAY_DEFAULT,
DISPLAY_HIDDEN,
DISPLAY_DISABLED,
DISPLAY_ENABLED_BUDDY,
DISPLAY_DISABLED_BUDDY
}
/**
* Return all mapped device addresses for this control
* @return returns the set of mapped targeted devices
*/
public Set<String> getTargetDeviceAddresses(){
return targetDevices;
}
@Override
public void doScheduledEvent(double scheduledTime, Object param) {
FutureControlMessage message = (FutureControlMessage) param;
this.objVal = message.controlValue;
this.executionTime = 0;
this.sendingDevice = message.sourceDevice;
notifyLocalListeners();
if (!message.localOnly) {
notifyValueSetListeners();
}
synchronized (futureMessageListLock) {
futureMessageList.remove(message);
}
}
/**
* Add one or more device names or addresses as strings to use in {@link ControlScope#TARGET} Message
* @param deviceNames device name or IP Address
*/
public synchronized void addTargetDevice(String... deviceNames){
for (String name:
deviceNames) {
targetDevices.add(name);
}
}
/**
* Remove all set target devices and replace with the those provided as arguments
* Adds device address as a string or device name to {@link ControlScope#TARGET} Message
* @param deviceNames device name or IP Address
*/
public synchronized void setTargetDevice(String... deviceNames){
targetDevices.clear();
addTargetDevice(deviceNames);
}
/**
* Remove all set target devices and replace with the those provided as arguments
* Adds device addresses to {@link ControlScope#TARGET} Message
* @param inetAddresses device name or IP Address
*/
public synchronized void setTargetDevice(InetAddress... inetAddresses){
targetDevices.clear();
addTargetDevice(inetAddresses);
}
/**
* Add one or more device {@link InetAddress} for use in {@link ControlScope#TARGET} Message
* @param inetAddresses the target addresses to add
*/
public void addTargetDevice(InetAddress... inetAddresses){
for (InetAddress address:
inetAddresses) {
targetDevices.add(address.getHostAddress());
}
}
/**
* Clear all devices as Targets
*/
public synchronized void clearTargetDevices(){
targetDevices.clear();
}
/**
* Remove one or more device names or addresses as a string.
* For use in {@link ControlScope#TARGET} Messages
* @param deviceNames device names or IP Addresses to remove
*/
public synchronized void removeTargetDevice(String... deviceNames){
for (String name:
deviceNames) {
targetDevices.remove(name);
}
}
/**
* Remove one or more {@link InetAddress} for use in {@link ControlScope#TARGET} Message
* @param inetAddresses the target addresses to remove
*/
public void removeTargetDevice(InetAddress... inetAddresses){
for (InetAddress address:
inetAddresses) {
targetDevices.remove(address.getHostAddress());
}
}
/**
* Create an Interface to listen to
*/
public interface DynamicControlListener {
void update(DynamicControl control);
}
public interface ControlScopeChangedListener {
void controlScopeChanged(ControlScope new_scope);
}
/**
* The way Create Messages are sent
*/
private enum CREATE_MESSAGE_ARGS {
DEVICE_NAME,
MAP_KEY,
CONTROL_NAME,
PARENT_SKETCH_NAME,
PARENT_SKETCH_ID,
CONTROL_TYPE,
OBJ_VAL,
MIN_VAL,
MAX_VAL,
CONTROL_SCOPE,
DISPLAY_TYPE_VAL
}
// Define the Arguments used in an Update message
private enum UPDATE_MESSAGE_ARGS {
DEVICE_NAME,
CONTROL_NAME,
CONTROL_TYPE,
MAP_KEY,
OBJ_VAL,
CONTROL_SCOPE,
DISPLAY_TYPE_VAL,
MIN_VALUE,
MAX_VALUE
}
// Define Global Message arguments
public enum NETWORK_TRANSMIT_MESSAGE_ARGS {
DEVICE_NAME,
CONTROL_NAME,
CONTROL_TYPE,
OBJ_VAL,
EXECUTE_TIME_MLILI_MS, // Most Significant Int of Milliseconds - stored as int
EXECUTE_TIME_MLILI_LS, // Least Significant Bit of Milliseconds - stored as int
EXECUTE_TIME_NANO, // Number on Nano Seconds - stored as int
MESSAGE_ID // we will increment an integer and send the message multiple times. We will ignore message if last message was this one
}
// Define Device Name Message arguments
private enum DEVICE_NAME_ARGS {
DEVICE_NAME
}
// Define where our first Array type global dynamic control message is in OSC
final static int OSC_TRANSMIT_ARRAY_ARG = NETWORK_TRANSMIT_MESSAGE_ARGS.MESSAGE_ID.ordinal() + 1;
// When an event is scheduled in the future, we will create one of these and schedule it
class FutureControlMessage{
/**
* Create a Future Control message
* @param source_device the source device name
* @param value the value to be executed
* @param execution_time the time the value needs to be executed
*/
public FutureControlMessage(String source_device, Object value, double execution_time){
sourceDevice = source_device;
controlValue = value;
executionTime = execution_time;
}
Object controlValue;
double executionTime;
boolean localOnly = false; // if we are local only, we will not sendValue changed listeners
String sourceDevice;
/// have a copy of our pending scheduled object in case we want to cancel it
ScheduledObject pendingSchedule = null;
}
static ControlMap controlMap = ControlMap.getInstance();
private static final Object controlMapLock = new Object();
private static int instanceCounter = 0; // we will use this to order the creation of our objects and give them a unique number on device
private final Object instanceCounterLock = new Object();
private final Object valueChangedLock = new Object();
private final String controlMapKey;
private List<DynamicControlListener> controlListenerList = new ArrayList<>();
private List<DynamicControlListener> globalControlListenerList = new ArrayList<>();
private List<ControlScopeChangedListener> controlScopeChangedList = new ArrayList<>();
private List<FutureControlMessage> futureMessageList = new ArrayList<>();
// This listener is only called when value on control set
private List<DynamicControlListener> valueSetListenerList = new ArrayList<>();
// Create Object to lock shared resources
private final Object controlScopeChangedLock = new Object();
private final Object controlListenerLock = new Object();
private final Object globalListenerLock = new Object();
private final Object valueSetListenerLock = new Object();
private final Object futureMessageListLock = new Object();
static boolean disableScheduler = false; // set flag if we are going to disable scheduler - eg, in GUI
/**
* Create the text we will display at the beginning of tooltip
* @param tooltipPrefix The starting text of the tooltip
* @return this object
*/
public DynamicControl setTooltipPrefix(String tooltipPrefix) {
this.tooltipPrefix = tooltipPrefix;
return this;
}
private String tooltipPrefix = "";
// The Object sketch that this control was created in
private Object parentSketch = null;
final int parentId;
private final String deviceName;
private String parentSketchName;
private ControlType controlType;
final String controlName;
private ControlScope controlScope = ControlScope.SKETCH;
private Object objVal = 0;
private Object maximumDisplayValue = 0;
private Object minimumDisplayValue = 0;
// This is the time we want to execute the control value
private double executionTime = 0;
DISPLAY_TYPE displayType = DISPLAY_TYPE.DISPLAY_DEFAULT; // Whether the control is displayType on control Screen
/**
* Set whether we disable setting all values in context of scheduler
* @param disabled set true to disable
*/
public static void setDisableScheduler(boolean disabled){
disableScheduler = disabled;
}
/**
* Whether we disable the control on the screen
* @return How we will disable control on screen
*/
public DISPLAY_TYPE getDisplayType(){
return displayType;
}
/**
* Set how we will display control object on the screen
* @param display_type how we will display control
* @return this
*/
public DynamicControl setDisplayType(DISPLAY_TYPE display_type){
displayType = display_type;
notifyValueSetListeners();
//notifyLocalListeners();
return this;
}
/**
* Returns the JVM execution time we last used when we set the value
* @return lastExecution time set
*/
public double getExecutionTime(){
return executionTime;
}
/**
* Convert a float or int into required number type based on control. If not a FLOAT or INT, will just return value
* @param control_type the control type
* @param source_value the value we want
* @return the converted value
*/
static private Object convertValue (ControlType control_type, Object source_value) {
Object ret = source_value;
// Convert if we are a float control
if (control_type == ControlType.FLOAT) {
if (source_value == null){
ret = 0.0;
}else if (source_value instanceof Integer) {
Integer i = (Integer) source_value;
double f = i.doubleValue();
ret = f;
}else if (source_value instanceof Double) {
Double d = (Double) source_value;
ret = d;
}else if (source_value instanceof Long) {
Long l = (Long) source_value;
double f = l.doubleValue();
ret = f;
} else if (source_value instanceof Float) {
double f = (Float) source_value;
ret = f;
} else if (source_value instanceof String) {
double f = Double.parseDouble((String)source_value);
ret = f;
}
// Convert if we are an int control
} else if (control_type == ControlType.INT) {
if (source_value == null){
ret = 0;
}else if (source_value instanceof Float) {
Float f = (Float) source_value;
Integer i = f.intValue();
ret = i;
}else if (source_value instanceof Double) {
Double d = (Double) source_value;
Integer i = d.intValue();
ret = i;
}else if (source_value instanceof Long) {
Long l = (Long) source_value;
Integer i = l.intValue();
ret = i;
}
// Convert if we are a BOOLEAN control
} else if (control_type == ControlType.BOOLEAN) {
if (source_value == null){
ret = 0;
}if (source_value instanceof Integer) {
Integer i = (Integer) source_value;
Boolean b = i != 0;
ret = b;
}else if (source_value instanceof Long) {
Long l = (Long) source_value;
Integer i = l.intValue();
Boolean b = i != 0;
ret = b;
}
// Convert if we are a TRIGGER control
}else if (control_type == ControlType.TRIGGER) {
if (source_value == null) {
ret = System.currentTimeMillis();
}
// Convert if we are a TEXT control
}else if (control_type == ControlType.TEXT) {
if (source_value == null) {
ret = "";
}
}
return ret;
}
/**
* Get the Sketch or class object linked to this control
* @return the parentSketch or Object
*/
public Object getParentSketch() {
return parentSketch;
}
/**
* This is a private constructor used to initialise constant attributes of this object
*
* @param parent_sketch the object calling - typically this
* @param control_type The type of control you want to create
* @param name The name we will give to differentiate between different controls in this class
* @param initial_value The initial value of the control
* @param display_type how we want to display the object
*
*/
private DynamicControl(Object parent_sketch, ControlType control_type, String name, Object initial_value, DISPLAY_TYPE display_type) {
if (parent_sketch == null){
parent_sketch = new Object();
}
displayType = display_type;
parentSketch = parent_sketch;
parentSketchName = parent_sketch.getClass().getName();
controlType = control_type;
controlName = name;
objVal = convertValue (control_type, initial_value);
parentId = parent_sketch.hashCode();
deviceName = Device.getDeviceName();
synchronized (instanceCounterLock) {
controlMapKey = Device.getDeviceName() + instanceCounter;
instanceCounter++;
}
}
/**
* Ascertain the Control Type based on the Value
* @param value the value we are obtaing a control value from
* @return a control type
*/
public static ControlType getControlType(Object value){
ControlType ret = ControlType.OBJECT;
if (value == null){
ret = ControlType.TRIGGER;
}
else if (value instanceof Float || value instanceof Double){
ret = ControlType.FLOAT;
}
else if (value instanceof Boolean){
ret = ControlType.BOOLEAN;
}
else if (value instanceof String){
ret = ControlType.TEXT;
}
else if (value instanceof Integer || value instanceof Long){
ret = ControlType.INT;
}
return ret;
}
/**
* A dynamic control that can be accessed from outside this sketch
* it is created with the sketch object that contains it along with the type
*
* @param name The name we will give to associate it with other DynamicControls with identical ControlScope and type.
* @param initial_value The initial value of the control
*/
public DynamicControl(String name, Object initial_value) {
this(new Object(), getControlType(initial_value), name, initial_value, DISPLAY_TYPE.DISPLAY_DEFAULT);
synchronized (controlMapLock) {
controlMap.addControl(this);
}
}
/**
* A dynamic control that can be accessed from outside this sketch
* it is created with the sketch object that contains it along with the type
*
* @param control_type The type of control message you want to send
* @param name The name we will give to associate it with other DynamicControls with identical ControlScope and type.
* @param initial_value The initial value of the control
*/
public DynamicControl(ControlType control_type, String name, Object initial_value) {
this(new Object(), control_type, name, initial_value, DISPLAY_TYPE.DISPLAY_DEFAULT);
synchronized (controlMapLock) {
controlMap.addControl(this);
}
}
/**
* A dynamic control that can be accessed from outside this sketch
* it is created with the sketch object that contains it along with the type
* @param parent_sketch the object calling - typically this, however, you can use any class object
* @param control_type The type of control message you want to send
* @param name The name we will give to associate it with other DynamicControls with identical ControlScope and type.
*/
public DynamicControl(Object parent_sketch, ControlType control_type, String name) {
this(parent_sketch, control_type, name, null, DISPLAY_TYPE.DISPLAY_DEFAULT);
synchronized (controlMapLock) {
controlMap.addControl(this);
}
}
/**
* A dynamic control that can be accessed from outside this sketch
* it is created with the sketch object that contains it along with the type
*
* @param control_type The type of control message you want to send
* @param name The name we will give to associate it with other DynamicControls with identical ControlScope and type.
*/
public DynamicControl(ControlType control_type, String name) {
this(new Object(), control_type, name, convertValue(control_type, null), DISPLAY_TYPE.DISPLAY_DEFAULT);
synchronized (controlMapLock) {
controlMap.addControl(this);
}
}
/**
* A dynamic control that can be accessed from outside this sketch
* it is created with the sketch object that contains it along with the type
*
* @param parent_sketch the object calling - typically this, however, you can use any class object
* @param control_type The type of control message you want to send
* @param name The name we will give to associate it with other DynamicControls with identical ControlScope and type.
* @param initial_value The initial value of the control
*/
public DynamicControl(Object parent_sketch, ControlType control_type, String name, Object initial_value) {
this(parent_sketch, control_type, name, initial_value, DISPLAY_TYPE.DISPLAY_DEFAULT);
synchronized (controlMapLock) {
controlMap.addControl(this);
}
}
/**
* Set this control as a persistentSimulation control so it does not get removed on reset
* @return this
*/
public DynamicControl setPersistentController(){
controlMap.addPersistentControl(this);
isPersistentControl = true;
return this;
}
/**
* See if control is a persistent control
* @return true if a simulator control
*/
public boolean isPersistentControl() {
return isPersistentControl;
}
/**
* A dynamic control that can be accessed from outside
* it is created with the sketch object that contains it along with the type
*
* @param parent_sketch the object calling - typically this, however, you can use any class object
* @param control_type The type of control message you want to send
* @param name The name we will give to associate it with other DynamicControls with identical ControlScope and type.
* @param initial_value The initial value of the control
* @param min_value The minimum display value of the control. Only used for display purposes
* @param max_value The maximum display value of the control. Only used for display purposes
*/
public DynamicControl(Object parent_sketch, ControlType control_type, String name, Object initial_value, Object min_value, Object max_value) {
this(parent_sketch, control_type, name, initial_value, DISPLAY_TYPE.DISPLAY_DEFAULT);
minimumDisplayValue = convertValue (control_type, min_value);
maximumDisplayValue = convertValue (control_type, max_value);
synchronized (controlMapLock) {
controlMap.addControl(this);
}
}
/**
* A dynamic control that can be accessed from outside
* it is created with the sketch object that contains it along with the type
*
* @param parent_sketch the object calling - typically this, however, you can use any class object
* @param control_type The type of control message you want to send
* @param name The name we will give to associate it with other DynamicControls with identical ControlScope and type.
* @param initial_value The initial value of the control
* @param min_value The minimum display value of the control. Only used for display purposes
* @param max_value The maximum display value of the control. Only used for display purposes
* @param display_type The way we want the control displayed
*/
public DynamicControl(Object parent_sketch, ControlType control_type, String name, Object initial_value, Object min_value, Object max_value, DISPLAY_TYPE display_type) {
this(parent_sketch, control_type, name, initial_value, display_type);
minimumDisplayValue = convertValue (control_type, min_value);
maximumDisplayValue = convertValue (control_type, max_value);
synchronized (controlMapLock) {
controlMap.addControl(this);
}
}
/**
* A dynamic control that can be accessed from outside
* it is created with the sketch object that contains it along with the type
*
* @param control_type The type of control message you want to send
* @param name The name we will give to associate it with other DynamicControls with identical ControlScope and type.
* @param initial_value The initial value of the control
* @param min_value The minimum display value of the control. Only used for display purposes
* @param max_value The maximum display value of the control. Only used for display purposes
*/
public DynamicControl(ControlType control_type, String name, Object initial_value, Object min_value, Object max_value) {
this(new Object(), control_type, name, initial_value, DISPLAY_TYPE.DISPLAY_DEFAULT);
minimumDisplayValue = convertValue (control_type, min_value);
maximumDisplayValue = convertValue (control_type, max_value);
synchronized (controlMapLock) {
controlMap.addControl(this);
}
}
/**
* Get the type of control we want
* @return The type of value this control is
*/
public ControlType getControlType(){
return controlType;
}
/**
* Get the scope of this control. Can be Sketch, Class, Device, or global
* @return The Scope
*/
public ControlScope getControlScope(){
return controlScope;
}
/**
* Changed the scope that the control has. It will update control map so the correct events will be generated based on its scope
* @param new_scope The new Control Scope
* @return this object
*/
public synchronized DynamicControl setControlScope(ControlScope new_scope)
{
ControlScope old_scope = controlScope;
if (old_scope != new_scope) {
controlScope = new_scope;
notifyValueSetListeners();
// prevent control scope from changing the value
//notifyLocalListeners();
notifyControlChangeListeners();
}
return this;
}
/**
* Get the Dynamic control based on Map key
*
* @param map_key the string that we are using as the key
* @return the Object associated with this control
*/
public static DynamicControl getControl(String map_key) {
DynamicControl ret = null;
synchronized (controlMapLock) {
ret = controlMap.getControl(map_key);
}
return ret;
}
/**
* Update the parameters of this control with another. This would have been caused by an object having other than SKETCH control scope
* If the parameters are changed, this object will notify it's listeners that a change has occurred
* @param mirror_control The control that we are copying from
* @return this object
*/
public DynamicControl updateControl(DynamicControl mirror_control){
if (mirror_control != null) {
// first check our scope and type are the same
boolean scope_matches = getControlScope() == mirror_control.getControlScope() && getControlType() == mirror_control.getControlType();
if (scope_matches)
{
// Now we need to check whether the scope matches us
if (getControlScope() == ControlScope.SKETCH)
{
scope_matches = this.parentSketch == mirror_control.parentSketch && this.parentSketch != null;
}
// Now we need to check whether the scope matches us
else if (getControlScope() == ControlScope.CLASS)
{
scope_matches = this.parentSketchName.equals(mirror_control.parentSketchName);
}
else if (getControlScope() == ControlScope.DEVICE){
scope_matches = this.deviceName.equals(mirror_control.deviceName);
}
else if (getControlScope() == ControlScope.TARGET){
// check if our mirror has this address
scope_matches = mirror_control.targetsThisDevice();
}
// Otherwise it must be global. We have a match
}
if (scope_matches) {
// do not use setters as we only want to generate one notifyLocalListeners
boolean changed = false;
if (mirror_control.executionTime <= 0.0) { // his needs to be done now
if (!objVal.equals(mirror_control.objVal)) {
//objVal = mirror_control.objVal; // let this get done inside the scheduleValue return
changed = true;
}
if (changed) {
scheduleValue(null, mirror_control.objVal, 0);
}
}
else
{
scheduleValue(null, mirror_control.objVal, mirror_control.executionTime);
}
}
}
return this;
}
/**
* Check whether this device is targeted by checking the loopback, localhost and devicenames
* @return
*/
private boolean targetsThisDevice() {
boolean ret = false;
String device_name = Device.getDeviceName();
String loopback = InetAddress.getLoopbackAddress().getHostAddress();
for (String device:
targetDevices) {
if (device_name.equalsIgnoreCase(device)){
return true;
}
if (device_name.equalsIgnoreCase(loopback)){
return true;
}
try {
if (InetAddress.getLocalHost().getHostAddress().equalsIgnoreCase(device)){
return true;
}
} catch (UnknownHostException e) {
//e.printStackTrace();
}
}
return ret;
}
/**
* Schedule this control to change its value in context of scheduler
* @param source_device the device name that was the source of this message - can be null
* @param value the value to send
* @param execution_time the time it needs to be executed
* @param local_only if true, will not send value changed to notifyValueSetListeners
*/
void scheduleValue(String source_device, Object value, double execution_time, boolean local_only){
// We need to convert the Object value into the exact type. EG, integer must be cast to boolean if that is thr control type
Object converted_value = convertValue(controlType, value);
if (disableScheduler || execution_time == 0){
this.objVal = converted_value;
this.executionTime = 0;
this.sendingDevice = source_device;
notifyLocalListeners();
if (!local_only) {
notifyValueSetListeners();
}
}
else {
FutureControlMessage message = new FutureControlMessage(source_device, converted_value, execution_time);
message.localOnly = local_only;
message.pendingSchedule = HBScheduler.getGlobalScheduler().addScheduledObject(execution_time, message, this);
synchronized (futureMessageListLock) {
futureMessageList.add(message);
}
}
}
/**
* Schedule this control to send a value to it's locallisteners at a scheduled time. Will also notify valueListeners (eg GUI controls)
* @param source_device the device name that was the source of this message - can be null
* @param value the value to send
* @param execution_time the time it needs to be executed
*/
void scheduleValue(String source_device, Object value, double execution_time) {
scheduleValue(source_device, value, execution_time, false);
}
/**
* Process the DynamicControl deviceName message and map device name to IPAddress
* We ignore our own device
* @param src_address The address of the device
* @param msg The OSC Message that has device name
*/
public static void processDeviceNameMessage(InetAddress src_address, OSCMessage msg) {
// do some error checking here
if (src_address != null) {
String device_name = (String) msg.getArg(DEVICE_NAME_ARGS.DEVICE_NAME.ordinal());
try {
if (!Device.getDeviceName().equalsIgnoreCase(device_name)) {
HB.HBInstance.addDeviceAddress(device_name, src_address);
}
}
catch(Exception ex){}
}
}
/**
* Process the DynamicControl deviceRequest message
* Send a deviceName back to src. Test that their name is mapped correctly
* If name is not mapped we will request from all devices globally
* @param src_address The address of the device
* @param msg The OSC Message that has device name
*/
public static void processRequestNameMessage(InetAddress src_address, OSCMessage msg) {
String device_name = (String) msg.getArg(DEVICE_NAME_ARGS.DEVICE_NAME.ordinal());
// ignore ourself
if (!Device.getDeviceName().equalsIgnoreCase(device_name)) {
// send them our message
OSCMessage nameMessage = buildDeviceNameMessage();
ControlMap.getInstance().sendGlobalDynamicControlMessage(nameMessage, null);
// See if we have them mapped the same
boolean address_changed = HB.HBInstance.addDeviceAddress(device_name, src_address);
if (address_changed){
// request all
postRequestNamesMessage();
}
}
}
/**
* Post a request device name message to other devices so we can target them specifically and update our map
*/
public static void postRequestNamesMessage(){
OSCMessage requestMessage = buildDeviceRequestNameMessage();
ControlMap.getInstance().sendGlobalDynamicControlMessage(requestMessage, null);
}
/**
* Build OSC Message that gives our device name
* @return OSC Message that has name
*/
public static OSCMessage buildDeviceNameMessage(){
return new OSCMessage(OSCVocabulary.DynamicControlMessage.DEVICE_NAME,
new Object[]{
Device.getDeviceName(),
});
}
/**
* Build OSC Message that requests devices send us their name
* @return OSC Message to request name
*/
public static OSCMessage buildDeviceRequestNameMessage(){
return new OSCMessage(OSCVocabulary.DynamicControlMessage.REQUEST_NAME,
new Object[]{
Device.getDeviceName(),
});
}
/**
* Convert two halves of a long stored integer values into a long value
* @param msi most significant integer
* @param lsi least significant integer
* @return a long value consisting of the concatenation of both int values
*/
public static long integersToLong(int msi, int lsi){
return (long) msi << 32 | lsi & 0xFFFFFFFFL;
}
/**
* Convert a long into two integers in an array of two integers
* @param l_value the Long values that needs to be encoded
* @return an array of two integers. ret[0] will be most significant integer while int [1] will be lease significant
*/
public static int [] longToIntegers (long l_value){
int msi = (int) (l_value >> 32); // this is most significant integer
int lsi = (int) l_value; // This is LSB that has been trimmed down;
return new int[]{msi, lsi};
}
// We will create a single array that we can cache the size of an array of ints for scheduled time
// This is used in numberIntsForScheduledTime
private static int [] intArrayCache = null;
/**
* Return the array size of Integers that would be required to encode a scheduled time
* @return the Array
*/
public static int numberIntsForScheduledTime(){
if (intArrayCache == null) {
intArrayCache = scheduleTimeToIntegers(0);
}
return intArrayCache.length;
}
/**
* Convert a SchedulerTime into integers in an array of three integers
* @param d_val the double values that needs to be encoded
* @return an array of three integers. ret[0] will be most significant integer while int [1] will be lease significant. int [2] is the number of nano seconds
*/
public static int [] scheduleTimeToIntegers (double d_val){
long lval = (long)d_val;
int msi = (int) (lval >> 32); // this is most significant integer
int lsi = (int) lval; // This is LSB that has been trimmed down;
double nano = d_val - lval;
nano *= 1000000;
int n = (int) nano;
return new int[]{msi, lsi, n};
}
/**
* Convert three integers to a double representing scheduler time
* @param msi the most significant value of millisecond value
* @param lsi the least significant value of millisecond value
* @param nano the number of nanoseconds
* @return a double representing the scheduler time
*/
public static double integersToScheduleTime(int msi, int lsi, int nano){
long milliseconds = integersToLong(msi, lsi);
double ret = milliseconds;
double nanoseconds = nano;
return ret + nanoseconds / 1000000d;
}
/**
* Process the {@link ControlScope#GLOBAL} or {@link ControlScope#TARGET} Message from an OSC Message. Examine buildUpdateMessage for parameters inside Message
* We will not process messages that have come from this device because they will be actioned through local listeners
* @param msg OSC message with new value
* @param controlScope the type of {@link ControlScope};
*/
public static void processOSCControlMessage(OSCMessage msg, ControlScope controlScope) {
String device_name = (String) msg.getArg(NETWORK_TRANSMIT_MESSAGE_ARGS.DEVICE_NAME.ordinal());
int message_id = (int)msg.getArg(NETWORK_TRANSMIT_MESSAGE_ARGS.MESSAGE_ID.ordinal());
// Make sure we ignore messages from this device
if (ignoreName || !device_name.equals(Device.getDeviceName())) {
if (enableProcessControlMessage(device_name, message_id)) {
String control_name = (String) msg.getArg(NETWORK_TRANSMIT_MESSAGE_ARGS.CONTROL_NAME.ordinal());
ControlType control_type = ControlType.values()[(int) msg.getArg(NETWORK_TRANSMIT_MESSAGE_ARGS.CONTROL_TYPE.ordinal())];
Object obj_val = msg.getArg(NETWORK_TRANSMIT_MESSAGE_ARGS.OBJ_VAL.ordinal());
Object ms_max = msg.getArg(NETWORK_TRANSMIT_MESSAGE_ARGS.EXECUTE_TIME_MLILI_MS.ordinal());
Object ms_min = msg.getArg(NETWORK_TRANSMIT_MESSAGE_ARGS.EXECUTE_TIME_MLILI_LS.ordinal());
Object nano = msg.getArg(NETWORK_TRANSMIT_MESSAGE_ARGS.EXECUTE_TIME_NANO.ordinal());
double execution_time = integersToScheduleTime((int) ms_max, (int) ms_min, (int) nano);
boolean data_converted = false; // we only want to do data conversion once
synchronized (controlMapLock) {
List<DynamicControl> named_controls = controlMap.getControlsByName(control_name);
for (DynamicControl named_control : named_controls) {
if (named_control.controlScope == controlScope && control_type.equals(named_control.controlType)) {
// we must NOT call setVal as this will generate a global series again.
// Just notifyListeners specific to this control but not globally
if (!data_converted) {
// we need to see if this is a boolean Object as OSC does not support that
if (control_type == ControlType.BOOLEAN) {
int osc_val = (int) obj_val;
Boolean bool_val = osc_val != 0;
obj_val = bool_val;
data_converted = true;
} else if (control_type == ControlType.OBJECT) {
if (!(obj_val instanceof String)) {
// This is not a Json Message
// We will need to get all the remaining OSC arguments after the schedule time and store that as ObjVal
int num_args = msg.getArgCount() - OSC_TRANSMIT_ARRAY_ARG;
Object[] restore_args = new Object[num_args];
for (int i = 0; i < num_args; i++) {
restore_args[i] = msg.getArg(OSC_TRANSMIT_ARRAY_ARG + i);
}
obj_val = restore_args;
data_converted = true;
}
}
}
// We need to schedule this value
named_control.scheduleValue(device_name, obj_val, execution_time);
}
}
}
}
}
}
/**
* Process the Update Message from an OSC Message. Examine buildUpdateMessage for parameters inside Message
* The message is directed as a specific control defined by the MAP_KEY parameter in the OSC Message
* @param msg OSC message with new value
*/
public static void processUpdateMessage(OSCMessage msg){
String map_key = (String) msg.getArg(UPDATE_MESSAGE_ARGS.MAP_KEY.ordinal());
String control_name = (String) msg.getArg(UPDATE_MESSAGE_ARGS.CONTROL_NAME.ordinal());
Object obj_val = msg.getArg(UPDATE_MESSAGE_ARGS.OBJ_VAL.ordinal());
ControlScope control_scope = ControlScope.values ()[(int) msg.getArg(UPDATE_MESSAGE_ARGS.CONTROL_SCOPE.ordinal())];
DISPLAY_TYPE display_type = DISPLAY_TYPE.DISPLAY_DEFAULT;
DynamicControl control = getControl(map_key);
if (control != null)
{
Object display_min = control.getMinimumDisplayValue();
Object display_max = control.getMaximumDisplayValue();
if (msg.getArgCount() > UPDATE_MESSAGE_ARGS.DISPLAY_TYPE_VAL.ordinal())
{
int osc_val = (int) msg.getArg(UPDATE_MESSAGE_ARGS.DISPLAY_TYPE_VAL.ordinal());
display_type = DISPLAY_TYPE.values ()[osc_val];
}
if (msg.getArgCount() > UPDATE_MESSAGE_ARGS.MAX_VALUE.ordinal()){
display_max = msg.getArg(UPDATE_MESSAGE_ARGS.MAX_VALUE.ordinal());
}
if (msg.getArgCount() > UPDATE_MESSAGE_ARGS.MIN_VALUE.ordinal()){
display_min = msg.getArg(UPDATE_MESSAGE_ARGS.MIN_VALUE.ordinal());
}
// do not use setters as we only want to generate one notifyLocalListeners
boolean changed = false;
boolean control_scope_changed = false;
if (control.displayType != display_type)
{
changed = true;
}
control.displayType = display_type;
obj_val = convertValue(control.controlType, obj_val);
display_max = convertValue(control.controlType, display_max);
display_min = convertValue(control.controlType, display_min);
if (!obj_val.equals(control.objVal) ||
!display_max.equals(control.maximumDisplayValue) ||
!display_min.equals(control.minimumDisplayValue)
) {
changed = true;
}
if (!control_scope.equals(control.controlScope)) {
control.controlScope = control_scope;
//control.executionTime = execution_time;
changed = true;
control_scope_changed = true;
}
if (changed) {
control.maximumDisplayValue = display_max;
control.minimumDisplayValue = display_min;
control.scheduleValue(null, obj_val, 0, true);
if (control.getControlScope() != ControlScope.UNIQUE){
control.objVal = obj_val;
control.notifyGlobalListeners();
}
}
if (control_scope_changed)
{
control.notifyControlChangeListeners();
}
}
}
/**
* Build OSC Message that specifies a removal of a control
* @return OSC Message to notify removal
*/
public OSCMessage buildRemoveMessage(){
return new OSCMessage(OSCVocabulary.DynamicControlMessage.DESTROY,
new Object[]{
deviceName,
controlMapKey
});
}
/**
* Return an object that can be sent by OSC based on control TYpe
* @param obj_val The object value we want to send
* @return the type we will actually send
*/
private Object OSCArgumentObject (Object obj_val){
Object ret = obj_val;
if (obj_val instanceof Boolean)
{
boolean b = (Boolean) obj_val;
return b? 1:0;
}
else if (obj_val instanceof Double){
String s = ((Double)obj_val).toString();
ret = s;
}
return ret;
}
/**
* Build OSC Message that specifies an update
* @return OSC Message To send to specific control
*/
public OSCMessage buildUpdateMessage(){
Object sendObjType = objVal;
if (controlType == ControlType.OBJECT){
sendObjType = objVal.toString();
}
return new OSCMessage(OSCVocabulary.DynamicControlMessage.UPDATE,
new Object[]{
deviceName,
controlName,
controlType.ordinal(),
controlMapKey,
OSCArgumentObject(sendObjType),
controlScope.ordinal(),
displayType.ordinal(),
OSCArgumentObject(minimumDisplayValue),
OSCArgumentObject(maximumDisplayValue),
});
}
/**
* Build OSC Message that specifies a Network update
* @return OSC Message directed to controls with same name, scope, but on different devices
*/
public OSCMessage buildNetworkSendMessage(){
deviceSendId++;
String OSC_MessageName = OSCVocabulary.DynamicControlMessage.GLOBAL;
// define the arguments for send time
int [] execution_args = scheduleTimeToIntegers(executionTime);
if (controlScope == ControlScope.TARGET){
OSC_MessageName = OSCVocabulary.DynamicControlMessage.TARGET;
}
if (controlType == ControlType.OBJECT){
/*
DEVICE_NAME,
CONTROL_NAME,
CONTROL_TYPE,
OBJ_VAL,
EXECUTE_TIME_MLILI_MS, // Most Significant Int of Milliseconds - stored as int
EXECUTE_TIME_MLILI_LS, // Least Significant Bit of Milliseconds - stored as int
EXECUTE_TIME_NANO // Number on Nano Seconds - stored as int
*/
// we need to see if we have a custom encode function
if (objVal instanceof CustomGlobalEncoder){
Object [] encode_data = ((CustomGlobalEncoder)objVal).encodeGlobalMessage();
int num_args = OSC_TRANSMIT_ARRAY_ARG + encode_data.length;
Object [] osc_args = new Object[num_args];
osc_args[0] = deviceName;
osc_args[1] = controlName;
osc_args[2] = controlType.ordinal();
osc_args[3] = 0; // by defining zero we are going to say this is NOT json
osc_args[4] = execution_args [0];
osc_args[5] = execution_args [1];
osc_args[6] = execution_args [2];
osc_args[7] = deviceSendId;
// now encode the object parameters
for (int i = 0; i < encode_data.length; i++){
osc_args[OSC_TRANSMIT_ARRAY_ARG + i] = encode_data[i];
}
return new OSCMessage(OSC_MessageName,
osc_args);
}
else
{
String jsonString = gson.toJson(objVal);
return new OSCMessage(OSC_MessageName,
new Object[]{
deviceName,
controlName,
controlType.ordinal(),
jsonString,
execution_args[0],
execution_args[1],
execution_args[2],
deviceSendId
});
}
}
else {
return new OSCMessage(OSC_MessageName,
new Object[]{
deviceName,
controlName,
controlType.ordinal(),
OSCArgumentObject(objVal),
execution_args[0],
execution_args[1],
execution_args[2],
deviceSendId
});
}
}
/**
* Build the OSC Message for a create message
* @return OSC Message required to create the object
*/
public OSCMessage buildCreateMessage() {
Object sendObjType = objVal;
if (controlType == ControlType.OBJECT){
sendObjType = objVal.toString();
}
return new OSCMessage(OSCVocabulary.DynamicControlMessage.CREATE,
new Object[]{
deviceName,
controlMapKey,
controlName,
parentSketchName,
parentId,
controlType.ordinal(),
OSCArgumentObject(sendObjType),
OSCArgumentObject(minimumDisplayValue),
OSCArgumentObject(maximumDisplayValue),
controlScope.ordinal(),
displayType.ordinal()
});
}
/**
* Create a DynamicControl based on OSC Message. This will keep OSC implementation inside this class
* The buildUpdateMessage shows how messages are constructed
* @param msg the OSC Message with the parameters to make Control
*/
public DynamicControl (OSCMessage msg)
{
deviceName = (String) msg.getArg(CREATE_MESSAGE_ARGS.DEVICE_NAME.ordinal());
controlMapKey = (String) msg.getArg(CREATE_MESSAGE_ARGS.MAP_KEY.ordinal());
controlName = (String) msg.getArg(CREATE_MESSAGE_ARGS.CONTROL_NAME.ordinal());
parentSketchName = (String) msg.getArg(CREATE_MESSAGE_ARGS.PARENT_SKETCH_NAME.ordinal());
parentId = (int) msg.getArg(CREATE_MESSAGE_ARGS.PARENT_SKETCH_ID.ordinal());
controlType = ControlType.values ()[(int) msg.getArg(CREATE_MESSAGE_ARGS.CONTROL_TYPE.ordinal())];
objVal = convertValue (controlType, msg.getArg(CREATE_MESSAGE_ARGS.OBJ_VAL.ordinal()));
minimumDisplayValue = convertValue (controlType, msg.getArg(CREATE_MESSAGE_ARGS.MIN_VAL.ordinal()));
maximumDisplayValue = convertValue (controlType, msg.getArg(CREATE_MESSAGE_ARGS.MAX_VAL.ordinal()));
controlScope = ControlScope.values ()[(int) msg.getArg(CREATE_MESSAGE_ARGS.CONTROL_SCOPE.ordinal())];
if (msg.getArgCount() > CREATE_MESSAGE_ARGS.DISPLAY_TYPE_VAL.ordinal())
{
int osc_val = (int) msg.getArg(CREATE_MESSAGE_ARGS.DISPLAY_TYPE_VAL.ordinal());
displayType = DISPLAY_TYPE.values ()[osc_val];
}
synchronized (controlMapLock) {
controlMap.addControl(this);
}
}
/**
* Get the map key created in the device as a method for mapping back
* @return The unique key to identify this object
*/
public String getControlMapKey(){
return controlMapKey;
}
/**
* Set the value of the object and notify any listeners
* Additionally, the value will propagate to any controls that match the control scope
* If we are using a trigger, send a random number or a unique value
* @param val the value to set
* @return this object
*/
public DynamicControl setValue(Object val)
{
return setValue(val, 0);
}
/**
* Set the value of the object and notify any listeners
* Additionally, the value will propagate to any controls that match the control scope
* If we are using a trigger, send a random number or a unique value
* @param val the value to set
* @param execution_time the Scheduler time we want this to occur
* @return this object
*/
public DynamicControl setValue(Object val, double execution_time)
{
executionTime = execution_time;
val = convertValue (controlType, val);
if (!objVal.equals(val)) {
if (controlType == ControlType.FLOAT)
{
objVal = (Double) val;
}
else {
objVal = val;
}
notifyGlobalListeners();
scheduleValue(null, val, execution_time);
}
return this;
}
/**
* Gets the value of the control. The type needs to be cast to the required type in the listener
* @return Control Value
*/
public Object getValue(){
return objVal;
}
/**
* The maximum value that we want as a display, for example, in a slider control. Does not limit values in the messages
* @return The maximum value we want a graphical display to be set to
*/
public Object getMaximumDisplayValue(){
return maximumDisplayValue;
}
/**
* Set the minimum display range for display
* @param min minimum display value
*
* @return this
*/
public DynamicControl setMinimumValue(Object min) {minimumDisplayValue = min; return this;}
/**
* Set the maximum display range for display
* @param max maximum display value
* @return this
*/
public DynamicControl setMaximumDisplayValue(Object max) {maximumDisplayValue = max; return this;}
/**
* The minimum value that we want as a display, for example, in a slider control. Does not limit values in the messages
* @return The minimum value we want a graphical display to be set to
*/
public Object getMinimumDisplayValue(){
return minimumDisplayValue;
}
/**
* Get the name of the control used for ControlScope matching. Also displayed in GUI
* @return The name of the control for scope matching
*/
public String getControlName(){
return controlName;
}
/**
* Register Listener to receive changed values in the control
* @param listener Listener to register for events
* @return this
*/
public DynamicControl addControlListener(DynamicControlListener listener)
{
if (listener != null) {
synchronized (controlListenerLock) {
controlListenerList.add(listener);
}
}
return this;
}
/**
* Register Listener to receive changed values in the control that need to be global type messages
* @param listener Listener to register for events
* @return this listener that has been created
*/
public DynamicControl addGlobalControlListener(DynamicControlListener listener)
{
if (listener != null) {
synchronized (globalListenerLock) {
globalControlListenerList.add(listener);
}
}
return this;
}
/**
* Register Listener to receive changed values in the control that need to be received when value is specifically set from
* Within sketch
* @param listener Listener to register for events
* @return this
*/
public DynamicControl addValueSetListener(DynamicControlListener listener)
{
if (listener != null) {
synchronized (valueSetListenerLock) {
valueSetListenerList.add(listener);
}
}
return this;
}
/**
* Deregister listener so it no longer receives messages from this control
* @param listener The lsitener we are removing
* @return this object
*/
public DynamicControl removeControlListener(DynamicControlListener listener) {
if (listener != null) {
synchronized (controlListenerLock) {
controlListenerList.remove(listener);
}
}
return this;
}
/**
* Deregister listener so it no longer receives messages from this control
* @param listener the listener we are remmoving
* @return this object
*/
public DynamicControl removeGlobalControlListener(DynamicControlListener listener) {
if (listener != null) {
synchronized (globalListenerLock) {
globalControlListenerList.remove(listener);
}
}
return this;
}
/**
* Register Listener to receive changed values in the control scope
* @param listener Listener to register for events
* @return this object
*/
public DynamicControl addControlScopeListener(ControlScopeChangedListener listener){
if (listener != null) {
synchronized (controlScopeChangedLock) {
controlScopeChangedList.add(listener);
}
}
return this;
}
/**
* Deregister listener so it no longer receives messages from this control
* @param listener the listener
* @return this object
*/
public DynamicControl removeControlScopeChangedListener(ControlScopeChangedListener listener) {
if (listener != null) {
synchronized (controlScopeChangedLock) {
controlScopeChangedList.remove(listener);
}
}
return this;
}
/**
* Erase all listeners from this control
* @return this object
*/
public DynamicControl eraseListeners()
{
// We need to
synchronized (futureMessageListLock){
for (FutureControlMessage message:
futureMessageList) {
message.pendingSchedule.setCancelled(true);
}
futureMessageList.clear();
}
synchronized (controlListenerLock) {controlListenerList.clear();}
synchronized (controlScopeChangedLock) {controlScopeChangedList.clear();}
return this;
}
/**
* Notify all registered listeners of object value on this device
* @return this object
*/
public DynamicControl notifyLocalListeners()
{
synchronized (controlListenerLock)
{
controlListenerList.forEach(listener ->
{
try
{
listener.update(this);
}
catch (Exception ex)
{
ex.printStackTrace();
}
});
}
return this;
}
/**
* Send Update Message when value set
*/
public void notifyValueSetListeners(){
synchronized (valueSetListenerLock)
{
valueSetListenerList.forEach(listener ->
{
try
{
listener.update(this);
}
catch (Exception ex)
{
ex.printStackTrace();
}
});
}
}
/**
* Send Global Update Message
*/
public void notifyGlobalListeners(){
synchronized (globalListenerLock)
{
globalControlListenerList.forEach(listener ->
{
try
{
listener.update(this);
}
catch (Exception ex)
{
ex.printStackTrace();
}
});
}
}
/**
* Notify all registered listeners of object value
* @return this object
*/
public DynamicControl notifyControlChangeListeners()
{
synchronized (controlScopeChangedLock)
{
controlScopeChangedList.forEach(listener ->
{
try
{
listener.controlScopeChanged(this.getControlScope());
}
catch (Exception ex)
{
ex.printStackTrace();
}
});
}
return this;
}
/**
* Get the tooltip to display
* @return the tooltip to display
*/
public String getTooltipText(){
String control_scope_text = "";
if (getControlScope() == ControlScope.UNIQUE)
{
control_scope_text = "UNIQUE scope";
}
else if (getControlScope() == ControlScope.SKETCH)
{
control_scope_text = "SKETCH scope";
}
else if (getControlScope() == ControlScope.CLASS)
{
control_scope_text = "CLASS scope - " + parentSketchName;
}
else if (getControlScope() == ControlScope.DEVICE)
{
control_scope_text = "DEVICE scope - " + deviceName;
}
else if (getControlScope() == ControlScope.GLOBAL)
{
control_scope_text = "GLOBAL scope";
}
return tooltipPrefix + "\n" + control_scope_text;
}
}
| orsjb/HappyBrackets | HappyBrackets/src/main/java/net/happybrackets/core/control/DynamicControl.java | Java | apache-2.0 | 63,210 |
/*
* Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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 com.amazonaws.services.elasticmapreduce.model.transform;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.elasticmapreduce.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* ListBootstrapActionsRequestMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class ListBootstrapActionsRequestMarshaller {
private static final MarshallingInfo<String> CLUSTERID_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("ClusterId").build();
private static final MarshallingInfo<String> MARKER_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("Marker").build();
private static final ListBootstrapActionsRequestMarshaller instance = new ListBootstrapActionsRequestMarshaller();
public static ListBootstrapActionsRequestMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(ListBootstrapActionsRequest listBootstrapActionsRequest, ProtocolMarshaller protocolMarshaller) {
if (listBootstrapActionsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(listBootstrapActionsRequest.getClusterId(), CLUSTERID_BINDING);
protocolMarshaller.marshall(listBootstrapActionsRequest.getMarker(), MARKER_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
| jentfoo/aws-sdk-java | aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/model/transform/ListBootstrapActionsRequestMarshaller.java | Java | apache-2.0 | 2,390 |
/**
* Server-side support classes for WebSocket requests.
*/
@NonNullApi
@NonNullFields
package org.springframework.web.reactive.socket.server.support;
import org.springframework.lang.NonNullApi;
import org.springframework.lang.NonNullFields;
| spring-projects/spring-framework | spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/support/package-info.java | Java | apache-2.0 | 246 |
/**
*
*/
package org.commcare.cases.ledger;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
import org.javarosa.core.services.storage.IMetaData;
import org.javarosa.core.services.storage.Persistable;
import org.javarosa.core.util.externalizable.DeserializationException;
import org.javarosa.core.util.externalizable.ExtUtil;
import org.javarosa.core.util.externalizable.ExtWrapMap;
import org.javarosa.core.util.externalizable.PrototypeFactory;
/**
* A Ledger is a data model which tracks numeric data organized into
* different sections with different meanings.
*
* @author ctsims
*
*/
public class Ledger implements Persistable, IMetaData {
//NOTE: Right now this is (lazily) implemented assuming that each ledger
//object tracks _all_ of the sections for an entity, which will likely be a terrible way
//to do things long-term.
public static final String STORAGE_KEY = "ledger";
public static final String INDEX_ENTITY_ID = "entity-id";
String entityId;
int recordId = -1;
Hashtable<String, Hashtable<String, Integer>> sections;
public Ledger() {
}
public Ledger(String entityId) {
this.entityId = entityId;
this.sections = new Hashtable<String, Hashtable<String, Integer>>();
}
/**
* Get the ID of the linked entity associated with this Ledger record
* @return
*/
public String getEntiyId() {
return entityId;
}
/**
* Retrieve an entry from a specific section of the ledger.
*
* If no entry is defined, the ledger will return the value '0'
*
* @param sectionId The section containing the entry
* @param entryId The Id of the entry to retrieve
* @return the entry value. '0' if no entry exists.
*/
public int getEntry(String sectionId, String entryId) {
if(!sections.containsKey(sectionId) || !sections.get(sectionId).containsKey(entryId)) {
return 0;
}
return sections.get(sectionId).get(entryId).intValue();
}
/**
* @return The list of sections available in this ledger
*/
public String[] getSectionList() {
String[] sectionList = new String[sections.size()];
int i = 0;
for(Enumeration e = sections.keys(); e.hasMoreElements();) {
sectionList[i] = (String)e.nextElement();
++i;
}
return sectionList;
}
/**
* Retrieves a list of all entries (by ID) defined in a
* section of the ledger
*
* @param sectionId The ID of a section
* @return The IDs of all entries defined in the provided section
*/
public String[] getListOfEntries(String sectionId) {
Hashtable<String, Integer> entries = sections.get(sectionId);
String[] entryList = new String[entries.size()];
int i = 0;
for(Enumeration e = entries.keys(); e.hasMoreElements();) {
entryList[i] = (String)e.nextElement();
++i;
}
return entryList;
}
/*
* (non-Javadoc)
* @see org.javarosa.core.util.externalizable.Externalizable#readExternal(java.io.DataInputStream, org.javarosa.core.util.externalizable.PrototypeFactory)
*/
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
recordId = ExtUtil.readInt(in);
entityId = ExtUtil.readString(in);
sections = (Hashtable<String, Hashtable<String, Integer>>) ExtUtil.read(in, new ExtWrapMap(String.class, new ExtWrapMap(String.class, Integer.class)));
}
/*
* (non-Javadoc)
* @see org.javarosa.core.util.externalizable.Externalizable#writeExternal(java.io.DataOutputStream)
*/
public void writeExternal(DataOutputStream out) throws IOException {
ExtUtil.writeNumeric(out, recordId);
ExtUtil.writeString(out, entityId);
ExtUtil.write(out, new ExtWrapMap(sections, new ExtWrapMap(String.class, Integer.class)));
}
/*
* (non-Javadoc)
* @see org.javarosa.core.services.storage.Persistable#setID(int)
*/
public void setID(int ID) {
recordId = ID;
}
/*
* (non-Javadoc)
* @see org.javarosa.core.services.storage.Persistable#getID()
*/
public int getID() {
return recordId;
}
/**
* Sets the value of an entry in the specified section of this ledger
*
* @param sectionId
* @param entryId
* @param quantity
*/
public void setEntry(String sectionId, String entryId, int quantity) {
if(!sections.containsKey(sectionId)) {
sections.put(sectionId, new Hashtable<String, Integer>());
}
sections.get(sectionId).put(entryId, new Integer(quantity));
}
/*
* (non-Javadoc)
* @see org.javarosa.core.services.storage.IMetaData#getMetaDataFields()
*/
public String[] getMetaDataFields() {
return new String[] {INDEX_ENTITY_ID};
}
/*
* (non-Javadoc)
* @see org.javarosa.core.services.storage.IMetaData#getMetaData(java.lang.String)
*/
public Object getMetaData(String fieldName) {
if(fieldName.equals(INDEX_ENTITY_ID)){
return entityId;
} else {
throw new IllegalArgumentException("No metadata field " + fieldName + " in the ledger storage system");
}
}
}
| wpride/commcare | cases/src/org/commcare/cases/ledger/Ledger.java | Java | apache-2.0 | 4,988 |
/*
* Copyright (c) 2010-2013 Evolveum
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.evolveum.midpoint.repo.sql.data.audit;
import com.evolveum.midpoint.audit.api.AuditEventRecord;
import com.evolveum.midpoint.audit.api.AuditService;
import com.evolveum.midpoint.prism.PrismContext;
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.prism.polystring.PolyString;
import com.evolveum.midpoint.repo.sql.data.common.enums.ROperationResultStatus;
import com.evolveum.midpoint.repo.sql.data.common.other.RObjectType;
import com.evolveum.midpoint.repo.sql.util.ClassMapper;
import com.evolveum.midpoint.repo.sql.util.DtoTranslationException;
import com.evolveum.midpoint.repo.sql.util.RUtil;
import com.evolveum.midpoint.schema.ObjectDeltaOperation;
import com.evolveum.midpoint.schema.constants.ObjectTypes;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.UserType;
import org.apache.commons.lang.Validate;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.ForeignKey;
import javax.persistence.*;
import javax.xml.namespace.QName;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* @author lazyman
*/
@Entity
@Table(name = RAuditEventRecord.TABLE_NAME, indexes = {
@Index(name = "iTimestampValue", columnList = RAuditEventRecord.COLUMN_TIMESTAMP)}) // TODO correct index name
public class RAuditEventRecord implements Serializable {
public static final String TABLE_NAME = "m_audit_event";
public static final String COLUMN_TIMESTAMP = "timestampValue";
private long id;
private Timestamp timestamp;
private String eventIdentifier;
private String sessionIdentifier;
private String taskIdentifier;
private String taskOID;
private String hostIdentifier;
//prism object - user
private String initiatorOid;
private String initiatorName;
//prism object
private String targetOid;
private String targetName;
private RObjectType targetType;
//prism object - user
private String targetOwnerOid;
private String targetOwnerName;
private RAuditEventType eventType;
private RAuditEventStage eventStage;
//collection of object deltas
private Set<RObjectDeltaOperation> deltas;
private String channel;
private ROperationResultStatus outcome;
private String parameter;
private String message;
private String result;
public String getResult() {
return result;
}
@Column(length = 1024)
public String getMessage() {
return message;
}
public String getParameter() {
return parameter;
}
public String getChannel() {
return channel;
}
@ForeignKey(name = "fk_audit_delta")
@OneToMany(mappedBy = "record", orphanRemoval = true)
@Cascade({org.hibernate.annotations.CascadeType.ALL})
public Set<RObjectDeltaOperation> getDeltas() {
if (deltas == null) {
deltas = new HashSet<RObjectDeltaOperation>();
}
return deltas;
}
public String getEventIdentifier() {
return eventIdentifier;
}
@Enumerated(EnumType.ORDINAL)
public RAuditEventStage getEventStage() {
return eventStage;
}
@Enumerated(EnumType.ORDINAL)
public RAuditEventType getEventType() {
return eventType;
}
public String getHostIdentifier() {
return hostIdentifier;
}
@Id
@GeneratedValue
public long getId() {
return id;
}
@Column(length = RUtil.COLUMN_LENGTH_OID)
public String getInitiatorOid() {
return initiatorOid;
}
public String getInitiatorName() {
return initiatorName;
}
@Enumerated(EnumType.ORDINAL)
public ROperationResultStatus getOutcome() {
return outcome;
}
public String getSessionIdentifier() {
return sessionIdentifier;
}
public String getTargetName() {
return targetName;
}
@Column(length = RUtil.COLUMN_LENGTH_OID)
public String getTargetOid() {
return targetOid;
}
@Enumerated(EnumType.ORDINAL)
public RObjectType getTargetType() {
return targetType;
}
public String getTargetOwnerName() {
return targetOwnerName;
}
@Column(length = RUtil.COLUMN_LENGTH_OID)
public String getTargetOwnerOid() {
return targetOwnerOid;
}
public String getTaskIdentifier() {
return taskIdentifier;
}
public String getTaskOID() {
return taskOID;
}
@Column(name = COLUMN_TIMESTAMP)
public Timestamp getTimestamp() {
return timestamp;
}
public void setMessage(String message) {
this.message = message;
}
public void setParameter(String parameter) {
this.parameter = parameter;
}
public void setChannel(String channel) {
this.channel = channel;
}
public void setDeltas(Set<RObjectDeltaOperation> deltas) {
this.deltas = deltas;
}
public void setEventIdentifier(String eventIdentifier) {
this.eventIdentifier = eventIdentifier;
}
public void setEventStage(RAuditEventStage eventStage) {
this.eventStage = eventStage;
}
public void setEventType(RAuditEventType eventType) {
this.eventType = eventType;
}
public void setHostIdentifier(String hostIdentifier) {
this.hostIdentifier = hostIdentifier;
}
public void setId(long id) {
this.id = id;
}
public void setInitiatorName(String initiatorName) {
this.initiatorName = initiatorName;
}
public void setInitiatorOid(String initiatorOid) {
this.initiatorOid = initiatorOid;
}
public void setOutcome(ROperationResultStatus outcome) {
this.outcome = outcome;
}
public void setSessionIdentifier(String sessionIdentifier) {
this.sessionIdentifier = sessionIdentifier;
}
public void setTargetName(String targetName) {
this.targetName = targetName;
}
public void setTargetOid(String targetOid) {
this.targetOid = targetOid;
}
public void setTargetType(RObjectType targetType) {
this.targetType = targetType;
}
public void setTargetOwnerName(String targetOwnerName) {
this.targetOwnerName = targetOwnerName;
}
public void setTargetOwnerOid(String targetOwnerOid) {
this.targetOwnerOid = targetOwnerOid;
}
public void setTaskIdentifier(String taskIdentifier) {
this.taskIdentifier = taskIdentifier;
}
public void setTaskOID(String taskOID) {
this.taskOID = taskOID;
}
public void setTimestamp(Timestamp timestamp) {
this.timestamp = timestamp;
}
public void setResult(String result) {
this.result = result;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RAuditEventRecord that = (RAuditEventRecord) o;
if (channel != null ? !channel.equals(that.channel) : that.channel != null) return false;
if (deltas != null ? !deltas.equals(that.deltas) : that.deltas != null) return false;
if (eventIdentifier != null ? !eventIdentifier.equals(that.eventIdentifier) : that.eventIdentifier != null)
return false;
if (eventStage != that.eventStage) return false;
if (eventType != that.eventType) return false;
if (hostIdentifier != null ? !hostIdentifier.equals(that.hostIdentifier) : that.hostIdentifier != null)
return false;
if (initiatorOid != null ? !initiatorOid.equals(that.initiatorOid) : that.initiatorOid != null) return false;
if (initiatorName != null ? !initiatorName.equals(that.initiatorName) : that.initiatorName != null)
return false;
if (outcome != that.outcome) return false;
if (sessionIdentifier != null ? !sessionIdentifier.equals(that.sessionIdentifier) : that.sessionIdentifier != null)
return false;
if (targetOid != null ? !targetOid.equals(that.targetOid) : that.targetOid != null) return false;
if (targetName != null ? !targetName.equals(that.targetName) : that.targetName != null) return false;
if (targetType != null ? !targetType.equals(that.targetType) : that.targetType != null) return false;
if (targetOwnerOid != null ? !targetOwnerOid.equals(that.targetOwnerOid) : that.targetOwnerOid != null)
return false;
if (targetOwnerName != null ? !targetOwnerName.equals(that.targetOwnerName) : that.targetOwnerName != null)
return false;
if (taskIdentifier != null ? !taskIdentifier.equals(that.taskIdentifier) : that.taskIdentifier != null)
return false;
if (taskOID != null ? !taskOID.equals(that.taskOID) : that.taskOID != null) return false;
if (timestamp != null ? !timestamp.equals(that.timestamp) : that.timestamp != null) return false;
if (parameter != null ? !parameter.equals(that.parameter) : that.parameter != null) return false;
if (message != null ? !message.equals(that.message) : that.message != null) return false;
if (result != null ? !result.equals(that.result) : that.result != null) return false;
return true;
}
@Override
public int hashCode() {
int result = timestamp != null ? timestamp.hashCode() : 0;
result = 31 * result + (eventIdentifier != null ? eventIdentifier.hashCode() : 0);
result = 31 * result + (sessionIdentifier != null ? sessionIdentifier.hashCode() : 0);
result = 31 * result + (taskIdentifier != null ? taskIdentifier.hashCode() : 0);
result = 31 * result + (taskOID != null ? taskOID.hashCode() : 0);
result = 31 * result + (hostIdentifier != null ? hostIdentifier.hashCode() : 0);
result = 31 * result + (initiatorName != null ? initiatorName.hashCode() : 0);
result = 31 * result + (initiatorOid != null ? initiatorOid.hashCode() : 0);
result = 31 * result + (targetOid != null ? targetOid.hashCode() : 0);
result = 31 * result + (targetName != null ? targetName.hashCode() : 0);
result = 31 * result + (targetType != null ? targetType.hashCode() : 0);
result = 31 * result + (targetOwnerOid != null ? targetOwnerOid.hashCode() : 0);
result = 31 * result + (targetOwnerName != null ? targetOwnerName.hashCode() : 0);
result = 31 * result + (eventType != null ? eventType.hashCode() : 0);
result = 31 * result + (eventStage != null ? eventStage.hashCode() : 0);
result = 31 * result + (deltas != null ? deltas.hashCode() : 0);
result = 31 * result + (channel != null ? channel.hashCode() : 0);
result = 31 * result + (outcome != null ? outcome.hashCode() : 0);
result = 31 * result + (parameter != null ? parameter.hashCode() : 0);
result = 31 * result + (message != null ? message.hashCode() : 0);
result = 31 * result + (this.result != null ? this.result.hashCode() : 0);
return result;
}
public static RAuditEventRecord toRepo(AuditEventRecord record, PrismContext prismContext)
throws DtoTranslationException {
Validate.notNull(record, "Audit event record must not be null.");
Validate.notNull(prismContext, "Prism context must not be null.");
RAuditEventRecord repo = new RAuditEventRecord();
repo.setChannel(record.getChannel());
if (record.getTimestamp() != null) {
repo.setTimestamp(new Timestamp(record.getTimestamp()));
}
repo.setEventStage(RAuditEventStage.toRepo(record.getEventStage()));
repo.setEventType(RAuditEventType.toRepo(record.getEventType()));
repo.setSessionIdentifier(record.getSessionIdentifier());
repo.setEventIdentifier(record.getEventIdentifier());
repo.setHostIdentifier(record.getHostIdentifier());
repo.setParameter(record.getParameter());
repo.setMessage(trimMessage(record.getMessage()));
if (record.getOutcome() != null) {
repo.setOutcome(RUtil.getRepoEnumValue(record.getOutcome().createStatusType(), ROperationResultStatus.class));
}
repo.setTaskIdentifier(record.getTaskIdentifier());
repo.setTaskOID(record.getTaskOID());
repo.setResult(record.getResult());
try {
if (record.getTarget() != null) {
PrismObject target = record.getTarget();
repo.setTargetName(getOrigName(target));
repo.setTargetOid(target.getOid());
QName type = ObjectTypes.getObjectType(target.getCompileTimeClass()).getTypeQName();
repo.setTargetType(ClassMapper.getHQLTypeForQName(type));
}
if (record.getTargetOwner() != null) {
PrismObject targetOwner = record.getTargetOwner();
repo.setTargetOwnerName(getOrigName(targetOwner));
repo.setTargetOwnerOid(targetOwner.getOid());
}
if (record.getInitiator() != null) {
PrismObject<UserType> initiator = record.getInitiator();
repo.setInitiatorName(getOrigName(initiator));
repo.setInitiatorOid(initiator.getOid());
}
for (ObjectDeltaOperation<?> delta : record.getDeltas()) {
if (delta == null) {
continue;
}
RObjectDeltaOperation rDelta = RObjectDeltaOperation.toRepo(repo, delta, prismContext);
rDelta.setTransient(true);
rDelta.setRecord(repo);
repo.getDeltas().add(rDelta);
}
} catch (Exception ex) {
throw new DtoTranslationException(ex.getMessage(), ex);
}
return repo;
}
public static AuditEventRecord fromRepo(RAuditEventRecord repo, PrismContext prismContext) throws DtoTranslationException{
AuditEventRecord audit = new AuditEventRecord();
audit.setChannel(repo.getChannel());
audit.setEventIdentifier(repo.getEventIdentifier());
if (repo.getEventStage() != null){
audit.setEventStage(repo.getEventStage().getStage());
}
if (repo.getEventType() != null){
audit.setEventType(repo.getEventType().getType());
}
audit.setHostIdentifier(repo.getHostIdentifier());
audit.setMessage(repo.getMessage());
if (repo.getOutcome() != null){
audit.setOutcome(repo.getOutcome().getStatus());
}
audit.setParameter(repo.getParameter());
audit.setResult(repo.getResult());
audit.setSessionIdentifier(repo.getSessionIdentifier());
audit.setTaskIdentifier(repo.getTaskIdentifier());
audit.setTaskOID(repo.getTaskOID());
if (repo.getTimestamp() != null){
audit.setTimestamp(repo.getTimestamp().getTime());
}
List<ObjectDeltaOperation> odos = new ArrayList<ObjectDeltaOperation>();
for (RObjectDeltaOperation rodo : repo.getDeltas()){
try {
ObjectDeltaOperation odo = RObjectDeltaOperation.fromRepo(rodo, prismContext);
if (odo != null){
odos.add(odo);
}
} catch (Exception ex){
//TODO: for now thi is OK, if we cannot parse detla, just skipp it.. Have to be resolved later;
}
}
audit.getDeltas().addAll((Collection) odos);
return audit;
//initiator, target, targetOwner
}
private static String trimMessage(String message) {
if (message == null || message.length() <= AuditService.MAX_MESSAGE_SIZE) {
return message;
}
return message.substring(0, AuditService.MAX_MESSAGE_SIZE - 4) + "...";
}
private static String getOrigName(PrismObject object) {
PolyString name = (PolyString) object.getPropertyRealValue(ObjectType.F_NAME, PolyString.class);
return name != null ? name.getOrig() : null;
}
}
| rpudil/midpoint | repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/audit/RAuditEventRecord.java | Java | apache-2.0 | 16,740 |
/*
* Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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 com.amazonaws.services.worklink.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeDevice" target="_top">AWS API
* Documentation</a>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeDeviceResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable {
/**
* <p>
* The current state of the device.
* </p>
*/
private String status;
/**
* <p>
* The model of the device.
* </p>
*/
private String model;
/**
* <p>
* The manufacturer of the device.
* </p>
*/
private String manufacturer;
/**
* <p>
* The operating system of the device.
* </p>
*/
private String operatingSystem;
/**
* <p>
* The operating system version of the device.
* </p>
*/
private String operatingSystemVersion;
/**
* <p>
* The operating system patch level of the device.
* </p>
*/
private String patchLevel;
/**
* <p>
* The date that the device first signed in to Amazon WorkLink.
* </p>
*/
private java.util.Date firstAccessedTime;
/**
* <p>
* The date that the device last accessed Amazon WorkLink.
* </p>
*/
private java.util.Date lastAccessedTime;
/**
* <p>
* The user name associated with the device.
* </p>
*/
private String username;
/**
* <p>
* The current state of the device.
* </p>
*
* @param status
* The current state of the device.
* @see DeviceStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
* <p>
* The current state of the device.
* </p>
*
* @return The current state of the device.
* @see DeviceStatus
*/
public String getStatus() {
return this.status;
}
/**
* <p>
* The current state of the device.
* </p>
*
* @param status
* The current state of the device.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeviceStatus
*/
public DescribeDeviceResult withStatus(String status) {
setStatus(status);
return this;
}
/**
* <p>
* The current state of the device.
* </p>
*
* @param status
* The current state of the device.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeviceStatus
*/
public DescribeDeviceResult withStatus(DeviceStatus status) {
this.status = status.toString();
return this;
}
/**
* <p>
* The model of the device.
* </p>
*
* @param model
* The model of the device.
*/
public void setModel(String model) {
this.model = model;
}
/**
* <p>
* The model of the device.
* </p>
*
* @return The model of the device.
*/
public String getModel() {
return this.model;
}
/**
* <p>
* The model of the device.
* </p>
*
* @param model
* The model of the device.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeDeviceResult withModel(String model) {
setModel(model);
return this;
}
/**
* <p>
* The manufacturer of the device.
* </p>
*
* @param manufacturer
* The manufacturer of the device.
*/
public void setManufacturer(String manufacturer) {
this.manufacturer = manufacturer;
}
/**
* <p>
* The manufacturer of the device.
* </p>
*
* @return The manufacturer of the device.
*/
public String getManufacturer() {
return this.manufacturer;
}
/**
* <p>
* The manufacturer of the device.
* </p>
*
* @param manufacturer
* The manufacturer of the device.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeDeviceResult withManufacturer(String manufacturer) {
setManufacturer(manufacturer);
return this;
}
/**
* <p>
* The operating system of the device.
* </p>
*
* @param operatingSystem
* The operating system of the device.
*/
public void setOperatingSystem(String operatingSystem) {
this.operatingSystem = operatingSystem;
}
/**
* <p>
* The operating system of the device.
* </p>
*
* @return The operating system of the device.
*/
public String getOperatingSystem() {
return this.operatingSystem;
}
/**
* <p>
* The operating system of the device.
* </p>
*
* @param operatingSystem
* The operating system of the device.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeDeviceResult withOperatingSystem(String operatingSystem) {
setOperatingSystem(operatingSystem);
return this;
}
/**
* <p>
* The operating system version of the device.
* </p>
*
* @param operatingSystemVersion
* The operating system version of the device.
*/
public void setOperatingSystemVersion(String operatingSystemVersion) {
this.operatingSystemVersion = operatingSystemVersion;
}
/**
* <p>
* The operating system version of the device.
* </p>
*
* @return The operating system version of the device.
*/
public String getOperatingSystemVersion() {
return this.operatingSystemVersion;
}
/**
* <p>
* The operating system version of the device.
* </p>
*
* @param operatingSystemVersion
* The operating system version of the device.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeDeviceResult withOperatingSystemVersion(String operatingSystemVersion) {
setOperatingSystemVersion(operatingSystemVersion);
return this;
}
/**
* <p>
* The operating system patch level of the device.
* </p>
*
* @param patchLevel
* The operating system patch level of the device.
*/
public void setPatchLevel(String patchLevel) {
this.patchLevel = patchLevel;
}
/**
* <p>
* The operating system patch level of the device.
* </p>
*
* @return The operating system patch level of the device.
*/
public String getPatchLevel() {
return this.patchLevel;
}
/**
* <p>
* The operating system patch level of the device.
* </p>
*
* @param patchLevel
* The operating system patch level of the device.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeDeviceResult withPatchLevel(String patchLevel) {
setPatchLevel(patchLevel);
return this;
}
/**
* <p>
* The date that the device first signed in to Amazon WorkLink.
* </p>
*
* @param firstAccessedTime
* The date that the device first signed in to Amazon WorkLink.
*/
public void setFirstAccessedTime(java.util.Date firstAccessedTime) {
this.firstAccessedTime = firstAccessedTime;
}
/**
* <p>
* The date that the device first signed in to Amazon WorkLink.
* </p>
*
* @return The date that the device first signed in to Amazon WorkLink.
*/
public java.util.Date getFirstAccessedTime() {
return this.firstAccessedTime;
}
/**
* <p>
* The date that the device first signed in to Amazon WorkLink.
* </p>
*
* @param firstAccessedTime
* The date that the device first signed in to Amazon WorkLink.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeDeviceResult withFirstAccessedTime(java.util.Date firstAccessedTime) {
setFirstAccessedTime(firstAccessedTime);
return this;
}
/**
* <p>
* The date that the device last accessed Amazon WorkLink.
* </p>
*
* @param lastAccessedTime
* The date that the device last accessed Amazon WorkLink.
*/
public void setLastAccessedTime(java.util.Date lastAccessedTime) {
this.lastAccessedTime = lastAccessedTime;
}
/**
* <p>
* The date that the device last accessed Amazon WorkLink.
* </p>
*
* @return The date that the device last accessed Amazon WorkLink.
*/
public java.util.Date getLastAccessedTime() {
return this.lastAccessedTime;
}
/**
* <p>
* The date that the device last accessed Amazon WorkLink.
* </p>
*
* @param lastAccessedTime
* The date that the device last accessed Amazon WorkLink.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeDeviceResult withLastAccessedTime(java.util.Date lastAccessedTime) {
setLastAccessedTime(lastAccessedTime);
return this;
}
/**
* <p>
* The user name associated with the device.
* </p>
*
* @param username
* The user name associated with the device.
*/
public void setUsername(String username) {
this.username = username;
}
/**
* <p>
* The user name associated with the device.
* </p>
*
* @return The user name associated with the device.
*/
public String getUsername() {
return this.username;
}
/**
* <p>
* The user name associated with the device.
* </p>
*
* @param username
* The user name associated with the device.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeDeviceResult withUsername(String username) {
setUsername(username);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getModel() != null)
sb.append("Model: ").append(getModel()).append(",");
if (getManufacturer() != null)
sb.append("Manufacturer: ").append(getManufacturer()).append(",");
if (getOperatingSystem() != null)
sb.append("OperatingSystem: ").append(getOperatingSystem()).append(",");
if (getOperatingSystemVersion() != null)
sb.append("OperatingSystemVersion: ").append(getOperatingSystemVersion()).append(",");
if (getPatchLevel() != null)
sb.append("PatchLevel: ").append(getPatchLevel()).append(",");
if (getFirstAccessedTime() != null)
sb.append("FirstAccessedTime: ").append(getFirstAccessedTime()).append(",");
if (getLastAccessedTime() != null)
sb.append("LastAccessedTime: ").append(getLastAccessedTime()).append(",");
if (getUsername() != null)
sb.append("Username: ").append(getUsername());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeDeviceResult == false)
return false;
DescribeDeviceResult other = (DescribeDeviceResult) obj;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getModel() == null ^ this.getModel() == null)
return false;
if (other.getModel() != null && other.getModel().equals(this.getModel()) == false)
return false;
if (other.getManufacturer() == null ^ this.getManufacturer() == null)
return false;
if (other.getManufacturer() != null && other.getManufacturer().equals(this.getManufacturer()) == false)
return false;
if (other.getOperatingSystem() == null ^ this.getOperatingSystem() == null)
return false;
if (other.getOperatingSystem() != null && other.getOperatingSystem().equals(this.getOperatingSystem()) == false)
return false;
if (other.getOperatingSystemVersion() == null ^ this.getOperatingSystemVersion() == null)
return false;
if (other.getOperatingSystemVersion() != null && other.getOperatingSystemVersion().equals(this.getOperatingSystemVersion()) == false)
return false;
if (other.getPatchLevel() == null ^ this.getPatchLevel() == null)
return false;
if (other.getPatchLevel() != null && other.getPatchLevel().equals(this.getPatchLevel()) == false)
return false;
if (other.getFirstAccessedTime() == null ^ this.getFirstAccessedTime() == null)
return false;
if (other.getFirstAccessedTime() != null && other.getFirstAccessedTime().equals(this.getFirstAccessedTime()) == false)
return false;
if (other.getLastAccessedTime() == null ^ this.getLastAccessedTime() == null)
return false;
if (other.getLastAccessedTime() != null && other.getLastAccessedTime().equals(this.getLastAccessedTime()) == false)
return false;
if (other.getUsername() == null ^ this.getUsername() == null)
return false;
if (other.getUsername() != null && other.getUsername().equals(this.getUsername()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getModel() == null) ? 0 : getModel().hashCode());
hashCode = prime * hashCode + ((getManufacturer() == null) ? 0 : getManufacturer().hashCode());
hashCode = prime * hashCode + ((getOperatingSystem() == null) ? 0 : getOperatingSystem().hashCode());
hashCode = prime * hashCode + ((getOperatingSystemVersion() == null) ? 0 : getOperatingSystemVersion().hashCode());
hashCode = prime * hashCode + ((getPatchLevel() == null) ? 0 : getPatchLevel().hashCode());
hashCode = prime * hashCode + ((getFirstAccessedTime() == null) ? 0 : getFirstAccessedTime().hashCode());
hashCode = prime * hashCode + ((getLastAccessedTime() == null) ? 0 : getLastAccessedTime().hashCode());
hashCode = prime * hashCode + ((getUsername() == null) ? 0 : getUsername().hashCode());
return hashCode;
}
@Override
public DescribeDeviceResult clone() {
try {
return (DescribeDeviceResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}
| jentfoo/aws-sdk-java | aws-java-sdk-worklink/src/main/java/com/amazonaws/services/worklink/model/DescribeDeviceResult.java | Java | apache-2.0 | 16,586 |
/*
* Copyright 2012-2014 Netherlands eScience Center.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at the following location:
*
* 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.
*
* For the full license, see: LICENSE.txt (located in the root folder of this distribution).
* ---
*/
// source:
package nl.esciencecenter.ptk.web;
/**
* Interface for Managed HTTP Streams.
*/
public interface WebStream {
public boolean autoClose();
//public boolean isChunked();
}
| NLeSC/Platinum | ptk-web/src/main/java/nl/esciencecenter/ptk/web/WebStream.java | Java | apache-2.0 | 941 |
/*
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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 com.amazonaws.services.honeycode;
import javax.annotation.Generated;
import com.amazonaws.ClientConfigurationFactory;
import com.amazonaws.annotation.NotThreadSafe;
import com.amazonaws.client.builder.AwsSyncClientBuilder;
import com.amazonaws.client.AwsSyncClientParams;
/**
* Fluent builder for {@link com.amazonaws.services.honeycode.AmazonHoneycode}. Use of the builder is preferred over
* using constructors of the client class.
**/
@NotThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public final class AmazonHoneycodeClientBuilder extends AwsSyncClientBuilder<AmazonHoneycodeClientBuilder, AmazonHoneycode> {
private static final ClientConfigurationFactory CLIENT_CONFIG_FACTORY = new ClientConfigurationFactory();
/**
* @return Create new instance of builder with all defaults set.
*/
public static AmazonHoneycodeClientBuilder standard() {
return new AmazonHoneycodeClientBuilder();
}
/**
* @return Default client using the {@link com.amazonaws.auth.DefaultAWSCredentialsProviderChain} and
* {@link com.amazonaws.regions.DefaultAwsRegionProviderChain} chain
*/
public static AmazonHoneycode defaultClient() {
return standard().build();
}
private AmazonHoneycodeClientBuilder() {
super(CLIENT_CONFIG_FACTORY);
}
/**
* Construct a synchronous implementation of AmazonHoneycode using the current builder configuration.
*
* @param params
* Current builder configuration represented as a parameter object.
* @return Fully configured implementation of AmazonHoneycode.
*/
@Override
protected AmazonHoneycode build(AwsSyncClientParams params) {
return new AmazonHoneycodeClient(params);
}
}
| aws/aws-sdk-java | aws-java-sdk-honeycode/src/main/java/com/amazonaws/services/honeycode/AmazonHoneycodeClientBuilder.java | Java | apache-2.0 | 2,368 |
package lm.com.framework.encrypt;
import java.io.IOException;
import java.security.SecureRandom;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESKeySpec;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
public class DESEncrypt {
private final static String DES = "DES";
/**
* des加密
*
* @param encryptString
* @param key
* @return
* @throws Exception
*/
public static String encode(String encryptString, String key) throws Exception {
byte[] bt = encrypt(encryptString.getBytes(), key.getBytes());
String strs = new BASE64Encoder().encode(bt);
return strs;
}
/**
* des解密
*
* @param decryptString
* @param key
* @return
* @throws IOException
* @throws Exception
*/
public static String decode(String decryptString, String key) throws IOException, Exception {
if (decryptString == null || decryptString.trim().isEmpty())
return "";
BASE64Decoder decoder = new BASE64Decoder();
byte[] buf = decoder.decodeBuffer(decryptString);
byte[] bt = decrypt(buf, key.getBytes());
return new String(bt);
}
/**
* 根据键值进行加密
*/
private static byte[] encrypt(byte[] data, byte[] key) throws Exception {
Cipher cipher = cipherInit(data, key, Cipher.ENCRYPT_MODE);
return cipher.doFinal(data);
}
/**
* 根据键值进行解密
*/
private static byte[] decrypt(byte[] data, byte[] key) throws Exception {
Cipher cipher = cipherInit(data, key, Cipher.DECRYPT_MODE);
return cipher.doFinal(data);
}
private static Cipher cipherInit(byte[] data, byte[] key, int cipherValue) throws Exception {
/** 生成一个可信任的随机数源 **/
SecureRandom sr = new SecureRandom();
/** 从原始密钥数据创建DESKeySpec对象 **/
DESKeySpec dks = new DESKeySpec(key);
/** 创建一个密钥工厂,然后用它把DESKeySpec转换成SecretKey对象 **/
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(DES);
SecretKey securekey = keyFactory.generateSecret(dks);
/** Cipher对象实际完成加密或解密操作 **/
Cipher cipher = Cipher.getInstance(DES);
/** 用密钥初始化Cipher对象 **/
cipher.init(cipherValue, securekey, sr);
return cipher;
}
}
| mrluo735/lm.cloudplat | common/lm.com.framework/src/main/java/lm/com/framework/encrypt/DESEncrypt.java | Java | apache-2.0 | 2,267 |
package com.desple.view;
import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
public class PreviewImageCanvas extends JPanel {
private BufferedImage image;
public PreviewImageCanvas() {
image = null;
}
public Dimension getPreferredSize() {
return new Dimension(512, 512);
}
public void paintComponent(Graphics g) {
super.paintComponent(g);
if (this.image != null) {
g.drawImage(this.image, 0, 0, 512, 512, this);
}
}
public void loadImage(String imageLocation) throws IOException {
this.image = ImageIO.read(new File(imageLocation));
repaint();
}
public BufferedImage getImage() {
return this.image;
}
public void setImage(BufferedImage image) {
this.image = image;
repaint();
}
}
| thebillkidy/RandomProjects | FaceRecognition/Java/src/main/java/com/desple/view/PreviewImageCanvas.java | Java | apache-2.0 | 938 |
package example.multiview;
import io.db.Connect;
import io.db.ConnectFactory;
import io.db.FormatResultSet;
import io.json.JSONStructureMaker;
import io.parcoord.db.MakeTableModel;
import java.awt.BasicStroke;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.Map.Entry;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSlider;
import javax.swing.JSplitPane;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.SwingUtilities;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.plaf.metal.MetalLookAndFeel;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.table.TableRowSorter;
import model.graph.Edge;
import model.graph.EdgeSetValueMaker;
import model.graph.GraphFilter;
import model.graph.GraphModel;
import model.graph.impl.SymmetricGraphInstance;
import model.matrix.DefaultMatrixTableModel;
import model.matrix.MatrixTableModel;
import model.shared.selection.LinkedGraphMatrixSelectionModelBridge;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.node.MissingNode;
import org.codehaus.jackson.node.ObjectNode;
import swingPlus.graph.GraphCellRenderer;
import swingPlus.graph.JGraph;
import swingPlus.graph.force.impl.BarnesHut2DForceCalculator;
import swingPlus.graph.force.impl.EdgeWeightedAttractor;
import swingPlus.matrix.JHeaderRenderer;
import swingPlus.matrix.JMatrix;
import swingPlus.parcoord.JColumnList;
import swingPlus.parcoord.JColumnList2;
import swingPlus.parcoord.JParCoord;
import swingPlus.shared.MyFrame;
import swingPlus.tablelist.ColumnSortControl;
import swingPlus.tablelist.JEditableVarColTable;
import ui.StackedRowTableUI;
import util.Messages;
import util.colour.ColorUtilities;
import util.ui.NewMetalTheme;
import util.ui.VerticalLabelUI;
import example.graph.renderers.node.NodeDegreeGraphCellRenderer;
import example.multiview.renderers.edge.EdgeCountFatEdgeRenderer;
import example.multiview.renderers.matrix.JSONObjHeaderRenderer;
import example.multiview.renderers.matrix.KeyedDataHeaderRenderer;
import example.multiview.renderers.matrix.NumberShadeRenderer;
import example.multiview.renderers.node.JSONNodeTypeGraphRenderer;
import example.multiview.renderers.node.JSONTooltipGraphCellRenderer;
import example.multiview.renderers.node.KeyedDataGraphCellRenderer;
import example.multiview.renderers.node.TableTooltipGraphCellRenderer;
import example.multiview.renderers.node.valuemakers.NodeTotalEdgeWeightValueMaker;
import example.tablelist.renderers.ColourBarCellRenderer;
public class NapierDBVis {
static final Logger LOGGER = Logger.getLogger (NapierDBVis.class);
/**
* @param args
*/
public static void main (final String[] args) {
//final MetalLookAndFeel lf = new MetalLookAndFeel();
MetalLookAndFeel.setCurrentTheme (new NewMetalTheme());
PropertyConfigurator.configure (Messages.makeProperties ("log4j"));
new NapierDBVis ();
}
public NapierDBVis () {
TableModel tableModel = null;
GraphModel graph = null;
TableModel listTableModel = null;
MatrixTableModel matrixModel = null;
Map<JsonNode, String> nodeTypeMap = null;
final Properties connectionProperties = Messages.makeProperties ("dbconnect", this.getClass(), false);
final Properties queryProperties = Messages.makeProperties ("queries", this.getClass(), false);
final Connect connect = ConnectFactory.getConnect (connectionProperties);
//ResultSet resultSet = null;
Statement stmt;
try {
stmt = connect.getConnection().createStatement();
//final ResultSet resultSet = stmt.executeQuery ("Select * from people where peopleid>0;");
final String peopleDataQuery = queryProperties.get ("PeopleData").toString();
System.err.println (peopleDataQuery);
final ResultSet peopleDataResultSet = stmt.executeQuery (peopleDataQuery);
final MakeTableModel mtm2 = new MakeTableModel();
tableModel = mtm2.makeTable (peopleDataResultSet);
//final ResultSet resultSet = stmt.executeQuery ("Select * from people where peopleid>0;");
final String pubJoinQuery = queryProperties.get ("PublicationJoin").toString();
System.err.println (pubJoinQuery);
final ResultSet pubJoinResultSet = stmt.executeQuery (pubJoinQuery);
//FormatResultSet.getInstance().printResultSet (resultSet);
final MakeTableModel mtm = new MakeTableModel();
TableModel tableModel2 = mtm.makeTable (pubJoinResultSet);
//final DatabaseMetaData dmd = connect.getConnection().getMetaData();
//final ResultSet resultSet2 = dmd.getProcedures (connect.getConnection().getCatalog(), null, "%");
//FormatResultSet.getInstance().printResultSet (resultSet2);
final String pubsByYearQuery = queryProperties.get ("PubsByYear").toString();
System.err.println (pubsByYearQuery);
final ResultSet pubsByYearResultSet = stmt.executeQuery (pubsByYearQuery);
final MakeTableModel mtm3 = new MakeTableModel();
TableModel tableModel3 = mtm3.makeTable (pubsByYearResultSet);
listTableModel = makePubByYearTable (tableModel3);
Map<Object, KeyedData> keyDataMap = makeKeyedDataMap (tableModel, 0, 1);
graph = makeGraph (keyDataMap, "peopleid", tableModel2);
matrixModel = new DefaultMatrixTableModel (graph);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
connect.close();
}
connect.close();
System.err.println (tableModel == null ? "no model" : "tableModel rows: "+tableModel.getRowCount()+", cols: "+tableModel.getColumnCount());
/*
try {
final ObjectMapper objMapper = new ObjectMapper ();
final JsonNode rootNode = objMapper.readValue (new File (fileName), JsonNode.class);
LOGGER.info ("rootnode: "+rootNode);
final JSONStructureMaker structureMaker = new JSONStructureMaker (rootNode);
graph = structureMaker.makeGraph (new String[] {"people"}, new String[] {"publications", "grants"});
//graph = structureMaker.makeGraph (new String[] {"grants"}, new String[] {"publications", "people"});
//graph = structureMaker.makeGraph (new String[] {"publications", "people", "grants"}, new String[] {"people"});
//tableModel = structureMaker.makeTable ("publications");
tableModel = structureMaker.makeTable ("people");
matrixModel = new DefaultMatrixTableModel (graph);
nodeTypeMap = structureMaker.makeNodeTypeMap (new String[] {"publications", "people", "grants"});
} catch (JsonParseException e) {
e.printStackTrace();
} catch (JsonMappingException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
*/
Map<Object, Integer> keyRowMap = makeKeyRowMap (tableModel, 0);
final JGraph jgraph = new JGraph (graph);
final EdgeWeightedAttractor edgeWeighter = new EdgeWeightedAttractor ();
jgraph.setAttractiveForceCalculator (edgeWeighter);
jgraph.setShowEdges (true);
final EdgeSetValueMaker weightedEdgeMaker = new NodeTotalEdgeWeightValueMaker ();
//final GraphCellRenderer tableTupleRenderer = new TableTupleGraphRenderer (tableModel, keyRowMap);
final GraphCellRenderer jsonGraphRenderer = new JSONNodeTypeGraphRenderer (nodeTypeMap);
jgraph.setDefaultNodeRenderer (String.class, new NodeDegreeGraphCellRenderer (10.0));
jgraph.setDefaultNodeRenderer (JsonNode.class, jsonGraphRenderer);
jgraph.setDefaultNodeRenderer (ObjectNode.class, jsonGraphRenderer);
jgraph.setDefaultNodeRenderer (KeyedData.class, new KeyedDataGraphCellRenderer (weightedEdgeMaker));
jgraph.setDefaultEdgeRenderer (Integer.class, new EdgeCountFatEdgeRenderer ());
jgraph.setDefaultNodeToolTipRenderer (KeyedData.class, new TableTooltipGraphCellRenderer ());
final JTable pubTable = new JEditableVarColTable (listTableModel);
//final JTable jtable3 = new JTable (dtm);
pubTable.setSelectionMode (ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
pubTable.setRowSelectionAllowed (true);
//jt2.setColumnSelectionAllowed (true);
pubTable.setRowSorter (new TableRowSorter<DefaultTableModel> ((DefaultTableModel)listTableModel));
final StackedRowTableUI tlui = new StackedRowTableUI ();
pubTable.setUI (tlui);
tlui.setRelativeLayout (true);
final Color[] columnColours = new Color [pubTable.getColumnCount() - 1];
for (int n = 0; n < columnColours.length; n++) {
double perc = (double)n / columnColours.length;
columnColours[n] = ColorUtilities.mixColours (Color.orange, new Color (0, 128, 255), (float)perc);
}
pubTable.getTableHeader().setReorderingAllowed(true);
pubTable.getTableHeader().setResizingAllowed(false);
System.err.println ("ptc: "+pubTable.getColumnModel().getColumnCount());
for (int col = 1; col < pubTable.getColumnCount(); col++) {
System.err.println ("col: "+col+", ptyc: "+pubTable.getColumnModel().getColumn(col));
pubTable.getColumnModel().getColumn(col).setCellRenderer (new ColourBarCellRenderer (columnColours [(col - 1) % columnColours.length]));
}
final JColumnList jcl = new JColumnList (pubTable) {
@Override
public boolean isCellEditable (final int row, final int column) {
return super.isCellEditable (row, column) && row > 0;
}
};
//jcl.addTable (pubTable);
final JMatrix jmatrix = new JMatrix ((TableModel) matrixModel);
//final JHeaderRenderer stringHeader = new JSONObjHeaderRenderer ();
//final JHeaderRenderer stringHeader2 = new JSONObjHeaderRenderer ();
final JHeaderRenderer stringHeader = new KeyedDataHeaderRenderer ();
final JHeaderRenderer stringHeader2 = new KeyedDataHeaderRenderer ();
jmatrix.getRowHeader().setDefaultRenderer (Object.class, stringHeader);
jmatrix.getRowHeader().setDefaultRenderer (String.class, stringHeader);
jmatrix.getColumnHeader().setDefaultRenderer (Object.class, stringHeader2);
jmatrix.getColumnHeader().setDefaultRenderer (String.class, stringHeader2);
((JLabel)stringHeader2).setUI (new VerticalLabelUI (false));
stringHeader.setSelectionBackground (jmatrix.getRowHeader());
stringHeader2.setSelectionBackground (jmatrix.getColumnHeader());
//jmatrix.setDefaultRenderer (HashSet.class, stringHeader);
jmatrix.setDefaultRenderer (String.class, stringHeader);
jmatrix.setDefaultRenderer (Integer.class, new NumberShadeRenderer ());
final JTable table = new JParCoord (tableModel);
table.setSelectionMode (ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
table.setRowSelectionAllowed (true);
table.setAutoCreateRowSorter (true);
table.setColumnSelectionAllowed (true);
table.setForeground (Color.lightGray);
table.setSelectionForeground (Color.orange);
if (table instanceof JParCoord) {
((JParCoord)table).setBrushForegroundColour (Color.gray);
((JParCoord)table).setBrushSelectionColour (Color.red);
((JParCoord)table).setSelectedStroke (new BasicStroke (2.0f));
//((JParCoord)table).setBrushing (true);
}
table.setGridColor (Color.gray);
table.setShowVerticalLines (false);
table.setBorder (BorderFactory.createEmptyBorder (24, 2, 24, 2));
if (table.getRowSorter() instanceof TableRowSorter) {
final TableRowSorter<? extends TableModel> trs = (TableRowSorter<? extends TableModel>)table.getRowSorter();
}
table.setAutoResizeMode (JTable.AUTO_RESIZE_OFF);
/*
jgraph.setPreferredSize (new Dimension (768, 640));
table.setPreferredSize (new Dimension (768, 384));
table.setMinimumSize (new Dimension (256, 128));
final LinkedGraphMatrixSelectionModelBridge selectionBridge = new LinkedGraphMatrixSelectionModelBridge ();
selectionBridge.addJGraph (jgraph);
selectionBridge.addJTable (table);
selectionBridge.addJTable (jmatrix);
*/
SwingUtilities.invokeLater (
new Runnable () {
@Override
public void run() {
final JFrame jf2 = new MyFrame ("JGraph Demo");
jf2.setSize (1024, 768);
final JPanel optionPanel = new JPanel ();
optionPanel.setLayout (new BoxLayout (optionPanel, BoxLayout.Y_AXIS));
final JSlider llengthSlider = new JSlider (20, 1000, (int)edgeWeighter.getLinkLength());
llengthSlider.addChangeListener(
new ChangeListener () {
@Override
public void stateChanged (final ChangeEvent cEvent) {
edgeWeighter.setLinkLength (llengthSlider.getValue());
}
}
);
final JSlider lstiffSlider = new JSlider (20, 1000, edgeWeighter.getStiffness());
lstiffSlider.addChangeListener(
new ChangeListener () {
@Override
public void stateChanged (final ChangeEvent cEvent) {
edgeWeighter.setStiffness (lstiffSlider.getValue());
}
}
);
final JSlider repulseSlider = new JSlider (1, 50, 10);
repulseSlider.addChangeListener(
new ChangeListener () {
@Override
public void stateChanged (final ChangeEvent cEvent) {
((BarnesHut2DForceCalculator)jgraph.getRepulsiveForceCalculator()).setAttenuator (3.0 / repulseSlider.getValue());
}
}
);
final JCheckBox showSingletons = new JCheckBox ("Show singletons", true);
showSingletons.addActionListener (
new ActionListener () {
@Override
public void actionPerformed (final ActionEvent e) {
final Object source = e.getSource();
if (source instanceof JCheckBox) {
final boolean selected = ((JCheckBox)source).isSelected();
final GraphFilter singletonFilter = new GraphFilter () {
@Override
public boolean includeNode (final Object obj) {
return jgraph.getModel().getEdges(obj).size() > 0 || selected;
}
@Override
public boolean includeEdge (final Edge edge) {
return true;
}
};
jgraph.setGraphFilter (singletonFilter);
}
}
}
);
final JButton clearSelections = new JButton ("Clear Selections");
clearSelections.addActionListener (
new ActionListener () {
@Override
public void actionPerformed (ActionEvent e) {
jgraph.getSelectionModel().clearSelection ();
}
}
);
final JButton graphFreezer = new JButton ("Freeze Graph");
graphFreezer.addActionListener (
new ActionListener () {
@Override
public void actionPerformed (ActionEvent e) {
jgraph.pauseWorker();
}
}
);
optionPanel.add (new JLabel ("Link Length:"));
optionPanel.add (llengthSlider);
optionPanel.add (new JLabel ("Link Stiffness:"));
optionPanel.add (lstiffSlider);
optionPanel.add (new JLabel ("Repulse Strength:"));
optionPanel.add (repulseSlider);
optionPanel.add (showSingletons);
optionPanel.add (clearSelections);
optionPanel.add (graphFreezer);
JPanel listTablePanel = new JPanel (new BorderLayout ());
listTablePanel.add (new JScrollPane (pubTable), BorderLayout.CENTER);
final Box pubControlPanel = Box.createVerticalBox();
final JScrollPane pubTableScrollPane = new JScrollPane (pubControlPanel);
pubTableScrollPane.setPreferredSize (new Dimension (168, 400));
jcl.getColumnModel().getColumn(1).setWidth (30);
listTablePanel.add (pubTableScrollPane, BorderLayout.WEST);
JTable columnSorter = new ColumnSortControl (pubTable);
pubControlPanel.add (jcl.getTableHeader());
pubControlPanel.add (jcl);
pubControlPanel.add (columnSorter.getTableHeader());
pubControlPanel.add (columnSorter);
JScrollPane parCoordsScrollPane = new JScrollPane (table);
JScrollPane matrixScrollPane = new JScrollPane (jmatrix);
JTabbedPane jtp = new JTabbedPane ();
JPanel graphPanel = new JPanel (new BorderLayout ());
graphPanel.add (jgraph, BorderLayout.CENTER);
graphPanel.add (optionPanel, BorderLayout.WEST);
jtp.addTab ("Node-Link", graphPanel);
jtp.addTab ("Matrix", matrixScrollPane);
jtp.addTab ("Pubs", listTablePanel);
jtp.addTab ("||-Coords", parCoordsScrollPane);
jtp.setPreferredSize(new Dimension (800, 480));
//jf2.getContentPane().add (optionPanel, BorderLayout.EAST);
jf2.getContentPane().add (jtp, BorderLayout.CENTER);
//jf2.getContentPane().add (tableScrollPane, BorderLayout.SOUTH);
jf2.setVisible (true);
}
}
);
}
public GraphModel makeGraph (final ResultSet nodeSet, final ResultSet edgeSet) throws SQLException {
edgeSet.beforeFirst();
final GraphModel graph = new SymmetricGraphInstance ();
// Look through the rootnode for fields named 'nodeType'
// Add that nodeTypes' subfields as nodes to a graph
while (edgeSet.next()) {
Object author1 = edgeSet.getObject(1);
Object author2 = edgeSet.getObject(2);
graph.addNode (author1);
graph.addNode (author2);
final Set<Edge> edges = graph.getEdges (author1, author2);
if (edges.isEmpty()) {
graph.addEdge (author1, author2, Integer.valueOf (1));
} else {
final Iterator<Edge> edgeIter = edges.iterator();
final Edge firstEdge = edgeIter.next();
final Integer val = (Integer)firstEdge.getEdgeObject();
firstEdge.setEdgeObject (Integer.valueOf (val.intValue() + 1));
//graph.removeEdge (firstEdge);
//graph.addEdge (node1, node2, Integer.valueOf (val.intValue() + 1));
}
}
return graph;
}
public GraphModel makeGraph (final TableModel nodes, final String primaryKeyColumn, final TableModel edges) throws SQLException {
final GraphModel graph = new SymmetricGraphInstance ();
final Map<Object, Integer> primaryKeyRowMap = new HashMap<Object, Integer> ();
for (int row = 0; row < nodes.getRowCount(); row++) {
primaryKeyRowMap.put (nodes.getValueAt (row, 0), Integer.valueOf (row));
}
// Look through the rootnode for fields named 'nodeType'
// Add that nodeTypes' subfields as nodes to a graph
for (int row = 0; row < edges.getRowCount(); row++) {
Object authorKey1 = edges.getValueAt (row, 0);
Object authorKey2 = edges.getValueAt (row, 1);
int authorIndex1 = (primaryKeyRowMap.get(authorKey1) == null ? -1 : primaryKeyRowMap.get(authorKey1).intValue());
int authorIndex2 = (primaryKeyRowMap.get(authorKey2) == null ? -1 : primaryKeyRowMap.get(authorKey2).intValue());
if (authorIndex1 >= 0 && authorIndex2 >= 0) {
Object graphNode1 = nodes.getValueAt (authorIndex1, 1);
Object graphNode2 = nodes.getValueAt (authorIndex2, 1);
graph.addNode (graphNode1);
graph.addNode (graphNode2);
final Set<Edge> gedges = graph.getEdges (graphNode1, graphNode2);
if (gedges.isEmpty()) {
graph.addEdge (graphNode1, graphNode2, Integer.valueOf (1));
} else {
final Iterator<Edge> edgeIter = gedges.iterator();
final Edge firstEdge = edgeIter.next();
final Integer val = (Integer)firstEdge.getEdgeObject();
firstEdge.setEdgeObject (Integer.valueOf (val.intValue() + 1));
}
}
}
return graph;
}
public GraphModel makeGraph (final Map<Object, KeyedData> keyDataMap, final String primaryKeyColumn, final TableModel edges) throws SQLException {
final GraphModel graph = new SymmetricGraphInstance ();
// Look through the rootnode for fields named 'nodeType'
// Add that nodeTypes' subfields as nodes to a graph
for (int row = 0; row < edges.getRowCount(); row++) {
Object authorKey1 = edges.getValueAt (row, 0);
Object authorKey2 = edges.getValueAt (row, 1);
if (authorKey1 != null && authorKey2 != null) {
Object graphNode1 = keyDataMap.get (authorKey1);
Object graphNode2 = keyDataMap.get (authorKey2);
if (graphNode1 != null && graphNode2 != null) {
graph.addNode (graphNode1);
graph.addNode (graphNode2);
final Set<Edge> gedges = graph.getEdges (graphNode1, graphNode2);
if (gedges.isEmpty()) {
graph.addEdge (graphNode1, graphNode2, Integer.valueOf (1));
} else {
final Iterator<Edge> edgeIter = gedges.iterator();
final Edge firstEdge = edgeIter.next();
final Integer val = (Integer)firstEdge.getEdgeObject();
firstEdge.setEdgeObject (Integer.valueOf (val.intValue() + 1));
}
}
}
}
return graph;
}
public Map<Object, Integer> makeKeyRowMap (final TableModel tableModel, final int columnPKIndex) {
final Map<Object, Integer> primaryKeyRowMap = new HashMap<Object, Integer> ();
for (int row = 0; row < tableModel.getRowCount(); row++) {
primaryKeyRowMap.put (tableModel.getValueAt (row, 0), Integer.valueOf (row));
}
return primaryKeyRowMap;
}
public Map<Object, KeyedData> makeKeyedDataMap (final TableModel tableModel, final int columnPKIndex, final int columnLabelIndex) {
final Map<Object, KeyedData> primaryKeyDataMap = new HashMap<Object, KeyedData> ();
for (int row = 0; row < tableModel.getRowCount(); row++) {
primaryKeyDataMap.put (tableModel.getValueAt (row, columnPKIndex), makeKeyedData (tableModel, columnPKIndex, columnLabelIndex, row));
}
return primaryKeyDataMap;
}
public KeyedData makeKeyedData (final TableModel tableModel, final int columnPKIndex, final int columnLabelIndex, final int rowIndex) {
List<Object> data = new ArrayList<Object> ();
for (int n = 0; n < tableModel.getColumnCount(); n++) {
data.add (tableModel.getValueAt (rowIndex, n));
}
KeyedData kd = new KeyedData (tableModel.getValueAt (rowIndex, columnPKIndex), data, columnLabelIndex);
return kd;
}
/**
* can't do pivot queries in ANSI SQL
* @param sqlresult
* @return
*/
public TableModel makePubByYearTable (final TableModel sqlresult) {
DefaultTableModel tm = new DefaultTableModel () {
public Class<?> getColumnClass(int columnIndex) {
if (columnIndex > 0) {
return Long.class;
}
return Integer.class;
}
public boolean isCellEditable (final int row, final int column) {
return false;
}
};
Map<Object, List<Long>> yearsToTypes = new HashMap<Object, List<Long>> ();
Map<Object, Integer> columnTypes = new HashMap<Object, Integer> ();
tm.addColumn ("Year");
int col = 1;
for (int sqlrow = 0; sqlrow < sqlresult.getRowCount(); sqlrow++) {
Object type = sqlresult.getValueAt (sqlrow, 1);
if (columnTypes.get(type) == null) {
columnTypes.put(type, Integer.valueOf(col));
tm.addColumn (type);
col++;
}
}
System.err.println ("cols: "+columnTypes+", "+columnTypes.size());
for (int sqlrow = 0; sqlrow < sqlresult.getRowCount(); sqlrow++) {
Object year = sqlresult.getValueAt (sqlrow, 0);
if (year != null) {
Object type = sqlresult.getValueAt (sqlrow, 1);
Object val = sqlresult.getValueAt (sqlrow, 2);
int colIndex = columnTypes.get(type).intValue();
List<Long> store = yearsToTypes.get (year);
if (store == null) {
Long[] storep = new Long [col - 1];
Arrays.fill (storep, Long.valueOf(0));
List<Long> longs = Arrays.asList (storep);
store = new ArrayList (longs);
//Collections.fill (store, Long.valueOf (0));
yearsToTypes.put (year, store);
}
store.set (colIndex - 1, (Long)val);
}
}
for (Entry<Object, List<Long>> yearEntry : yearsToTypes.entrySet()) {
Object[] rowData = new Object [col];
rowData[0] = yearEntry.getKey();
for (int n = 1; n < col; n++) {
rowData[n] = yearEntry.getValue().get(n-1);
}
tm.addRow(rowData);
}
return tm;
}
}
| martingraham/JSwingPlus | src/example/multiview/NapierDBVis.java | Java | apache-2.0 | 24,478 |
package com.umeng.soexample.run.step;
/**
* 步数更新回调
* Created by dylan on 16/9/27.
*/
public interface UpdateUiCallBack {
/**
* 更新UI步数
*
* @param stepCount 步数
*/
void updateUi(int stepCount);
}
| liulei-0911/LLApp | myselfapp/src/main/java/com/umeng/soexample/run/step/UpdateUiCallBack.java | Java | apache-2.0 | 249 |
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 2016 Oracle and/or its affiliates. All rights reserved.
*
* Oracle and Java are registered trademarks of Oracle and/or its affiliates.
* Other names may be trademarks of their respective owners.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common
* Development and Distribution License("CDDL") (collectively, the
* "License"). You may not use this file except in compliance with the
* License. You can obtain a copy of the License at
* http://www.netbeans.org/cddl-gplv2.html
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
* specific language governing permissions and limitations under the
* License. When distributing the software, include this License Header
* Notice in each file and include the License file at
* nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the
* License Header, with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* If you wish your version of this file to be governed by only the CDDL
* or only the GPL Version 2, indicate your decision by adding
* "[Contributor] elects to include this software in this distribution
* under the [CDDL or GPL Version 2] license." If you do not indicate a
* single choice of license, a recipient has the option to distribute
* your version of this file under either the CDDL, the GPL Version 2 or
* to extend the choice of license to its licensees as provided above.
* However, if you add GPL Version 2 code and therefore, elected the GPL
* Version 2 license, then the option applies only if the new code is
* made subject to such option by the copyright holder.
*
* Contributor(s):
*
* Portions Copyrighted 2016 Sun Microsystems, Inc.
*/
package beans;
import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author marc.gareta
*/
@Entity
@Table(name = "TIPO_SERVICIO", catalog = "", schema = "APP")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "TIPO_SERVICIO.findAll", query = "SELECT t FROM TipoServicio t"),
@NamedQuery(name = "TIPO_SERVICIO.findAllNombre", query = "SELECT t.nombre FROM TipoServicio t"),
@NamedQuery(name = "TIPO_SERVICIO.findById", query = "SELECT t FROM TipoServicio t WHERE t.id = :id"),
@NamedQuery(name = "TIPO_SERVICIO.findByNombre", query = "SELECT t FROM TipoServicio t WHERE t.nombre = :nombre"),
@NamedQuery(name = "TIPO_SERVICIO.deleteAll", query = "DELETE FROM TipoServicio t")})
public class TipoServicio implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(nullable = false)
private Integer id;
@Column(length = 100)
private String nombre;
@OneToMany(mappedBy = "tipoServicio")
private Collection<ParteIncidencia> parteIncidenciaCollection;
public TipoServicio() {
}
public TipoServicio(Integer id) {
this.id = id;
}
public TipoServicio(String nombre) {
this.nombre = nombre;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getNombre() {
return nombre;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
@XmlTransient
public Collection<ParteIncidencia> getParteIncidenciaCollection() {
return parteIncidenciaCollection;
}
public void setParteIncidenciaCollection(Collection<ParteIncidencia> parteIncidenciaCollection) {
this.parteIncidenciaCollection = parteIncidenciaCollection;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof TipoServicio)) {
return false;
}
TipoServicio other = (TipoServicio) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "beans.TipoServicio[ id=" + id + " ]";
}
}
| MGareta/BBVA | src/java/beans/TipoServicio.java | Java | apache-2.0 | 5,309 |
package ch.bfh.swos.bookapp.jpa.model;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import static javax.persistence.GenerationType.IDENTITY;
import static javax.persistence.TemporalType.DATE;
/**
* Entity implementation class for Entity: Book
*
*/
@Entity
public class Book implements Serializable {
@Id
@GeneratedValue(strategy = IDENTITY)
private Long id;
private String bookId;
private String title;
@Temporal(DATE)
private Date releaseDate;
private static final long serialVersionUID = 1L;
@ManyToOne
private Author author;
public Book() {
super();
}
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public String getBookId() {
return bookId;
}
public void setBookId(String bookId) {
this.bookId = bookId;
}
public String getTitle() {
return this.title;
}
public void setTitle(String title) {
this.title = title;
}
public Date getReleaseDate() {
return this.releaseDate;
}
public void setReleaseDate(Date releaseDate) {
this.releaseDate = releaseDate;
}
public Author getAuthor() {
return author;
}
public void setAuthor(Author author) {
this.author = author;
}
}
| rvillars/bookapp-cqrs | ch.bfh.swos.bookapp.jpa/src/main/java/ch/bfh/swos/bookapp/jpa/model/Book.java | Java | apache-2.0 | 1,241 |
/*
* Copyright 2010-2011 Nabeel Mukhtar
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.google.code.linkedinapi.schema.impl;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import com.google.code.linkedinapi.schema.Adapter1;
import com.google.code.linkedinapi.schema.DateOfBirth;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"year",
"month",
"day"
})
@XmlRootElement(name = "date-of-birth")
public class DateOfBirthImpl
implements Serializable, DateOfBirth
{
private final static long serialVersionUID = 2461660169443089969L;
@XmlElement(required = true, type = String.class)
@XmlJavaTypeAdapter(Adapter1 .class)
protected Long year;
@XmlElement(required = true, type = String.class)
@XmlJavaTypeAdapter(Adapter1 .class)
protected Long month;
@XmlElement(required = true, type = String.class)
@XmlJavaTypeAdapter(Adapter1 .class)
protected Long day;
public Long getYear() {
return year;
}
public void setYear(Long value) {
this.year = value;
}
public Long getMonth() {
return month;
}
public void setMonth(Long value) {
this.month = value;
}
public Long getDay() {
return day;
}
public void setDay(Long value) {
this.day = value;
}
}
| shisoft/LinkedIn-J | core/src/main/java/com/google/code/linkedinapi/schema/impl/DateOfBirthImpl.java | Java | apache-2.0 | 2,214 |
package excelcom.api;
import com.sun.jna.platform.win32.COM.COMException;
import com.sun.jna.platform.win32.COM.COMLateBindingObject;
import com.sun.jna.platform.win32.COM.IDispatch;
import com.sun.jna.platform.win32.OaIdl;
import com.sun.jna.platform.win32.OleAuto;
import com.sun.jna.platform.win32.Variant;
import static com.sun.jna.platform.win32.Variant.VT_NULL;
/**
* Represents a Range
*/
class Range extends COMLateBindingObject {
Range(IDispatch iDispatch) throws COMException {
super(iDispatch);
}
Variant.VARIANT getValue() {
return this.invoke("Value");
}
int getRow() {
return this.invoke("Row").intValue();
}
int getColumn() {
return this.invoke("Column").intValue();
}
void setInteriorColor(ExcelColor color) {
new CellPane(this.getAutomationProperty("Interior", this)).setColorIndex(color);
}
ExcelColor getInteriorColor() {
return ExcelColor.getColor(new CellPane(this.getAutomationProperty("Interior", this)).getColorIndex());
}
void setFontColor(ExcelColor color) {
new CellPane(this.getAutomationProperty("Font", this)).setColorIndex(color);
}
ExcelColor getFontColor() {
return ExcelColor.getColor(new CellPane(this.getAutomationProperty("Font", this)).getColorIndex());
}
void setBorderColor(ExcelColor color) {
new CellPane(this.getAutomationProperty("Borders", this)).setColorIndex(color);
}
ExcelColor getBorderColor() {
return ExcelColor.getColor(new CellPane(this.getAutomationProperty("Borders", this)).getColorIndex());
}
void setComment(String comment) {
this.invokeNoReply("ClearComments");
this.invoke("AddComment", new Variant.VARIANT(comment));
}
String getComment() {
return new COMLateBindingObject(this.getAutomationProperty("Comment")) {
private String getText() {
return this.invoke("Text").stringValue();
}
}.getText();
}
FindResult find(Variant.VARIANT[] options) {
IDispatch find = (IDispatch) this.invoke("Find", options).getValue();
if (find == null) {
return null;
}
return new FindResult(find, this);
}
FindResult findNext(FindResult previous) {
return new FindResult(this.getAutomationProperty("FindNext", this, previous.toVariant()), this);
}
/**
* Can be Interior, Border or Font. Has methods for setting e.g. Color.
*/
private class CellPane extends COMLateBindingObject {
CellPane(IDispatch iDispatch) {
super(iDispatch);
}
void setColorIndex(ExcelColor color) {
this.setProperty("ColorIndex", color.getIndex());
}
int getColorIndex() {
Variant.VARIANT colorIndex = this.invoke("ColorIndex");
if(colorIndex.getVarType().intValue() == VT_NULL) {
throw new NullPointerException("return type of colorindex is null. Maybe multiple colors in range?");
}
return this.invoke("ColorIndex").intValue();
}
}
}
| lprc/excelcom | src/main/java/excelcom/api/Range.java | Java | apache-2.0 | 3,146 |
/*
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.cloud.bigtable.hbase;
import static com.google.cloud.bigtable.hbase.test_env.SharedTestEnvRule.COLUMN_FAMILY;
import java.io.IOException;
import java.util.List;
import org.apache.hadoop.hbase.HColumnDescriptor;
import org.apache.hadoop.hbase.HRegionLocation;
import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.RegionInfo;
import org.junit.Assert;
import org.junit.Test;
@SuppressWarnings("deprecation")
public class TestCreateTable extends AbstractTestCreateTable {
@Override
protected void createTable(TableName tableName) throws IOException {
getConnection().getAdmin().createTable(createDescriptor(tableName));
}
@Override
protected void createTable(TableName tableName, byte[] start, byte[] end, int splitCount)
throws IOException {
getConnection().getAdmin().createTable(createDescriptor(tableName), start, end, splitCount);
}
@Override
protected void createTable(TableName tableName, byte[][] ranges) throws IOException {
getConnection().getAdmin().createTable(createDescriptor(tableName), ranges);
}
private HTableDescriptor createDescriptor(TableName tableName) {
return new HTableDescriptor(tableName).addFamily(new HColumnDescriptor(COLUMN_FAMILY));
}
@Override
protected List<HRegionLocation> getRegions(TableName tableName) throws Exception {
return getConnection().getRegionLocator(tableName).getAllRegionLocations();
}
@Test
public void testGetRegions() throws Exception {
TableName tableName = sharedTestEnv.newTestTableName();
getConnection().getAdmin().createTable(createDescriptor(tableName));
List<RegionInfo> regions = getConnection().getAdmin().getRegions(tableName);
Assert.assertEquals(1, regions.size());
}
@Override
protected boolean asyncGetRegions(TableName tableName) throws Exception {
return getConnection().getAdmin().getRegions(tableName).size() == 1 ? true : false;
}
@Override
protected boolean isTableEnabled(TableName tableName) throws Exception {
return getConnection().getAdmin().isTableEnabled(tableName);
}
@Override
protected void disableTable(TableName tableName) throws Exception {
getConnection().getAdmin().disableTable(tableName);
}
@Override
protected void adminDeleteTable(TableName tableName) throws Exception {
getConnection().getAdmin().deleteTable(tableName);
}
@Override
protected boolean tableExists(TableName tableName) throws Exception {
return getConnection().getAdmin().tableExists(tableName);
}
}
| sduskis/cloud-bigtable-client | bigtable-hbase-2.x-parent/bigtable-hbase-2.x-integration-tests/src/test/java/com/google/cloud/bigtable/hbase/TestCreateTable.java | Java | apache-2.0 | 3,209 |
// Copyright 2004, 2005 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry.binding;
import org.apache.hivemind.Location;
import org.apache.tapestry.BindingException;
import org.apache.tapestry.IActionListener;
import org.apache.tapestry.IComponent;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.PageRedirectException;
import org.apache.tapestry.RedirectException;
import org.apache.tapestry.coerce.ValueConverter;
import org.apache.tapestry.listener.ListenerMap;
/**
* Test for {@link org.apache.tapestry.binding.ListenerMethodBinding}.
*
* @author Howard M. Lewis Ship
* @since 4.0
*/
public class TestListenerMethodBinding extends BindingTestCase
{
public void testInvokeListener()
{
IComponent component = newComponent();
ListenerMap map = newListenerMap();
IActionListener listener = newListener();
Location l = newLocation();
IComponent sourceComponent = newComponent();
IRequestCycle cycle = newCycle();
ValueConverter vc = newValueConverter();
trainGetListener(component, map, listener);
listener.actionTriggered(sourceComponent, cycle);
replayControls();
ListenerMethodBinding b = new ListenerMethodBinding("param", vc, l, component, "foo");
assertSame(b, b.getObject());
assertSame(component, b.getComponent());
b.actionTriggered(sourceComponent, cycle);
verifyControls();
}
public void testToString()
{
IComponent component = newComponent();
Location l = newLocation();
ValueConverter vc = newValueConverter();
trainGetExtendedId(component, "Fred/barney");
replayControls();
ListenerMethodBinding b = new ListenerMethodBinding("param", vc, l, component, "foo");
String toString = b.toString();
String description = toString.substring(toString.indexOf('[') + 1, toString.length() - 1);
assertEquals(
"param, component=Fred/barney, methodName=foo, location=classpath:/org/apache/tapestry/binding/TestListenerMethodBinding, line 1",
description);
verifyControls();
}
public void testInvokeAndPageRedirect()
{
IComponent component = newComponent();
ListenerMap map = newListenerMap();
IActionListener listener = newListener();
Location l = newLocation();
ValueConverter vc = newValueConverter();
IComponent sourceComponent = newComponent();
IRequestCycle cycle = newCycle();
trainGetListener(component, map, listener);
listener.actionTriggered(sourceComponent, cycle);
Throwable t = new PageRedirectException("TargetPage");
setThrowable(listener, t);
replayControls();
ListenerMethodBinding b = new ListenerMethodBinding("param", vc, l, component, "foo");
try
{
b.actionTriggered(sourceComponent, cycle);
unreachable();
}
catch (PageRedirectException ex)
{
assertSame(t, ex);
}
verifyControls();
}
public void testInvokeAndRedirect()
{
IComponent component = newComponent();
ListenerMap map = newListenerMap();
IActionListener listener = newListener();
Location l = newLocation();
ValueConverter vc = newValueConverter();
IComponent sourceComponent = newComponent();
IRequestCycle cycle = newCycle();
trainGetListener(component, map, listener);
listener.actionTriggered(sourceComponent, cycle);
Throwable t = new RedirectException("http://foo.bar");
setThrowable(listener, t);
replayControls();
ListenerMethodBinding b = new ListenerMethodBinding("param", vc, l, component, "foo");
try
{
b.actionTriggered(sourceComponent, cycle);
unreachable();
}
catch (RedirectException ex)
{
assertSame(t, ex);
}
verifyControls();
}
public void testInvokeListenerFailure()
{
IComponent component = newComponent();
ListenerMap map = newListenerMap();
IActionListener listener = newListener();
Location l = newLocation();
ValueConverter vc = newValueConverter();
IComponent sourceComponent = newComponent();
IRequestCycle cycle = newCycle();
trainGetListener(component, map, listener);
listener.actionTriggered(sourceComponent, cycle);
Throwable t = new RuntimeException("Failure.");
setThrowable(listener, t);
trainGetExtendedId(component, "Fred/barney");
replayControls();
ListenerMethodBinding b = new ListenerMethodBinding("param", vc, l, component, "foo");
try
{
b.actionTriggered(sourceComponent, cycle);
unreachable();
}
catch (BindingException ex)
{
assertEquals(
"Exception invoking listener method foo of component Fred/barney: Failure.",
ex.getMessage());
assertSame(component, ex.getComponent());
assertSame(l, ex.getLocation());
assertSame(b, ex.getBinding());
}
verifyControls();
}
private void trainGetListener(IComponent component, ListenerMap lm, IActionListener listener)
{
trainGetListeners(component, lm);
trainGetListener(lm, "foo", listener);
}
protected IRequestCycle newCycle()
{
return (IRequestCycle) newMock(IRequestCycle.class);
}
private void trainGetListener(ListenerMap map, String methodName, IActionListener listener)
{
map.getListener(methodName);
setReturnValue(map, listener);
}
private void trainGetListeners(IComponent component, ListenerMap lm)
{
component.getListeners();
setReturnValue(component,lm);
}
private ListenerMap newListenerMap()
{
return (ListenerMap) newMock(ListenerMap.class);
}
private IActionListener newListener()
{
return (IActionListener) newMock(IActionListener.class);
}
} | apache/tapestry4 | framework/src/test/org/apache/tapestry/binding/TestListenerMethodBinding.java | Java | apache-2.0 | 6,776 |
/*
* 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.sysml.lops.compile;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.io.DoubleWritable;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.mapred.SequenceFileInputFormat;
import org.apache.sysml.api.DMLScript;
import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
import org.apache.sysml.conf.ConfigurationManager;
import org.apache.sysml.conf.DMLConfig;
import org.apache.sysml.hops.AggBinaryOp;
import org.apache.sysml.hops.BinaryOp;
import org.apache.sysml.hops.Hop.FileFormatTypes;
import org.apache.sysml.hops.HopsException;
import org.apache.sysml.hops.OptimizerUtils;
import org.apache.sysml.lops.AppendM;
import org.apache.sysml.lops.BinaryM;
import org.apache.sysml.lops.CombineBinary;
import org.apache.sysml.lops.Data;
import org.apache.sysml.lops.Data.OperationTypes;
import org.apache.sysml.lops.FunctionCallCP;
import org.apache.sysml.lops.Lop;
import org.apache.sysml.lops.Lop.Type;
import org.apache.sysml.lops.LopProperties.ExecLocation;
import org.apache.sysml.lops.LopProperties.ExecType;
import org.apache.sysml.lops.LopsException;
import org.apache.sysml.lops.MapMult;
import org.apache.sysml.lops.OutputParameters;
import org.apache.sysml.lops.OutputParameters.Format;
import org.apache.sysml.lops.PMMJ;
import org.apache.sysml.lops.ParameterizedBuiltin;
import org.apache.sysml.lops.PickByCount;
import org.apache.sysml.lops.SortKeys;
import org.apache.sysml.lops.Unary;
import org.apache.sysml.parser.DataExpression;
import org.apache.sysml.parser.Expression;
import org.apache.sysml.parser.Expression.DataType;
import org.apache.sysml.parser.ParameterizedBuiltinFunctionExpression;
import org.apache.sysml.parser.StatementBlock;
import org.apache.sysml.runtime.DMLRuntimeException;
import org.apache.sysml.runtime.controlprogram.parfor.ProgramConverter;
import org.apache.sysml.runtime.controlprogram.parfor.util.IDSequence;
import org.apache.sysml.runtime.instructions.CPInstructionParser;
import org.apache.sysml.runtime.instructions.Instruction;
import org.apache.sysml.runtime.instructions.Instruction.INSTRUCTION_TYPE;
import org.apache.sysml.runtime.instructions.InstructionParser;
import org.apache.sysml.runtime.instructions.MRJobInstruction;
import org.apache.sysml.runtime.instructions.SPInstructionParser;
import org.apache.sysml.runtime.instructions.cp.CPInstruction;
import org.apache.sysml.runtime.instructions.cp.CPInstruction.CPINSTRUCTION_TYPE;
import org.apache.sysml.runtime.instructions.cp.VariableCPInstruction;
import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
import org.apache.sysml.runtime.matrix.data.InputInfo;
import org.apache.sysml.runtime.matrix.data.OutputInfo;
import org.apache.sysml.runtime.matrix.sort.PickFromCompactInputFormat;
/**
*
* Class to maintain a DAG of lops and compile it into
* runtime instructions, incl piggybacking into jobs.
*
* @param <N> the class parameter has no affect and is
* only kept for documentation purposes.
*/
public class Dag<N extends Lop>
{
private static final Log LOG = LogFactory.getLog(Dag.class.getName());
private static final int CHILD_BREAKS_ALIGNMENT = 2;
private static final int CHILD_DOES_NOT_BREAK_ALIGNMENT = 1;
private static final int MRCHILD_NOT_FOUND = 0;
private static final int MR_CHILD_FOUND_BREAKS_ALIGNMENT = 4;
private static final int MR_CHILD_FOUND_DOES_NOT_BREAK_ALIGNMENT = 5;
private static IDSequence job_id = null;
private static IDSequence var_index = null;
private int total_reducers = -1;
private String scratch = "";
private String scratchFilePath = null;
private double gmrMapperFootprint = 0;
static {
job_id = new IDSequence();
var_index = new IDSequence();
}
// hash set for all nodes in dag
private ArrayList<Lop> nodes = null;
/*
* Hashmap to translates the nodes in the DAG to a sequence of numbers
* key: Lop ID
* value: Sequence Number (0 ... |DAG|)
*
* This map is primarily used in performing DFS on the DAG, and subsequently in performing ancestor-descendant checks.
*/
private HashMap<Long, Integer> IDMap = null;
private static class NodeOutput {
String fileName;
String varName;
OutputInfo outInfo;
ArrayList<Instruction> preInstructions; // instructions added before a MR instruction
ArrayList<Instruction> postInstructions; // instructions added after a MR instruction
ArrayList<Instruction> lastInstructions;
NodeOutput() {
fileName = null;
varName = null;
outInfo = null;
preInstructions = new ArrayList<Instruction>();
postInstructions = new ArrayList<Instruction>();
lastInstructions = new ArrayList<Instruction>();
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getVarName() {
return varName;
}
public void setVarName(String varName) {
this.varName = varName;
}
public OutputInfo getOutInfo() {
return outInfo;
}
public void setOutInfo(OutputInfo outInfo) {
this.outInfo = outInfo;
}
public ArrayList<Instruction> getPreInstructions() {
return preInstructions;
}
public void addPreInstruction(Instruction inst) {
preInstructions.add(inst);
}
public ArrayList<Instruction> getPostInstructions() {
return postInstructions;
}
public void addPostInstruction(Instruction inst) {
postInstructions.add(inst);
}
public ArrayList<Instruction> getLastInstructions() {
return lastInstructions;
}
public void addLastInstruction(Instruction inst) {
lastInstructions.add(inst);
}
}
public Dag()
{
//allocate internal data structures
nodes = new ArrayList<Lop>();
IDMap = new HashMap<Long, Integer>();
// get number of reducers from dml config
total_reducers = ConfigurationManager.getNumReducers();
}
///////
// filename handling
private String getFilePath() {
if ( scratchFilePath == null ) {
scratchFilePath = scratch + Lop.FILE_SEPARATOR
+ Lop.PROCESS_PREFIX + DMLScript.getUUID()
+ Lop.FILE_SEPARATOR + Lop.FILE_SEPARATOR
+ ProgramConverter.CP_ROOT_THREAD_ID + Lop.FILE_SEPARATOR;
}
return scratchFilePath;
}
public static String getNextUniqueFilenameSuffix() {
return "temp" + job_id.getNextID();
}
public String getNextUniqueFilename() {
return getFilePath() + getNextUniqueFilenameSuffix();
}
public static String getNextUniqueVarname(DataType dt) {
return (dt==DataType.MATRIX ? Lop.MATRIX_VAR_NAME_PREFIX :
Lop.FRAME_VAR_NAME_PREFIX) + var_index.getNextID();
}
///////
// Dag modifications
/**
* Method to add a node to the DAG.
*
* @param node low-level operator
* @return true if node was not already present, false if not.
*/
public boolean addNode(Lop node) {
if (nodes.contains(node))
return false;
nodes.add(node);
return true;
}
/**
* Method to compile a dag generically
*
* @param sb statement block
* @param config dml configuration
* @return list of instructions
* @throws LopsException if LopsException occurs
* @throws IOException if IOException occurs
* @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public ArrayList<Instruction> getJobs(StatementBlock sb, DMLConfig config)
throws LopsException, IOException, DMLRuntimeException {
if (config != null)
{
total_reducers = config.getIntValue(DMLConfig.NUM_REDUCERS);
scratch = config.getTextValue(DMLConfig.SCRATCH_SPACE) + "/";
}
// hold all nodes in a vector (needed for ordering)
ArrayList<Lop> node_v = new ArrayList<Lop>();
node_v.addAll(nodes);
/*
* Sort the nodes by topological order.
*
* 1) All nodes with level i appear prior to the nodes in level i+1.
* 2) All nodes within a level are ordered by their ID i.e., in the order
* they are created
*/
doTopologicalSort_strict_order(node_v);
// do greedy grouping of operations
ArrayList<Instruction> inst = doGreedyGrouping(sb, node_v);
return inst;
}
private static void deleteUpdatedTransientReadVariables(StatementBlock sb, ArrayList<Lop> nodeV,
ArrayList<Instruction> inst) throws DMLRuntimeException {
if ( sb == null )
return;
if( LOG.isTraceEnabled() )
LOG.trace("In delete updated variables");
// CANDIDATE list of variables which could have been updated in this statement block
HashMap<String, Lop> labelNodeMapping = new HashMap<String, Lop>();
// ACTUAL list of variables whose value is updated, AND the old value of the variable
// is no longer accessible/used.
HashSet<String> updatedLabels = new HashSet<String>();
HashMap<String, Lop> updatedLabelsLineNum = new HashMap<String, Lop>();
// first capture all transient read variables
for ( Lop node : nodeV ) {
if (node.getExecLocation() == ExecLocation.Data
&& ((Data) node).isTransient()
&& ((Data) node).getOperationType() == OperationTypes.READ
&& ((Data) node).getDataType() == DataType.MATRIX) {
// "node" is considered as updated ONLY IF the old value is not used any more
// So, make sure that this READ node does not feed into any (transient/persistent) WRITE
boolean hasWriteParent=false;
for(Lop p : node.getOutputs()) {
if(p.getExecLocation() == ExecLocation.Data) {
// if the "p" is of type Data, then it has to be a WRITE
hasWriteParent = true;
break;
}
}
if ( !hasWriteParent ) {
// node has no parent of type WRITE, so this is a CANDIDATE variable
// add it to labelNodeMapping so that it is considered in further processing
labelNodeMapping.put(node.getOutputParameters().getLabel(), node);
}
}
}
// capture updated transient write variables
for ( Lop node : nodeV ) {
if (node.getExecLocation() == ExecLocation.Data
&& ((Data) node).isTransient()
&& ((Data) node).getOperationType() == OperationTypes.WRITE
&& ((Data) node).getDataType() == DataType.MATRIX
&& labelNodeMapping.containsKey(node.getOutputParameters().getLabel()) // check to make sure corresponding (i.e., with the same label/name) transient read is present
&& !labelNodeMapping.containsValue(node.getInputs().get(0)) // check to avoid cases where transient read feeds into a transient write
) {
updatedLabels.add(node.getOutputParameters().getLabel());
updatedLabelsLineNum.put(node.getOutputParameters().getLabel(), node);
}
}
// generate RM instructions
Instruction rm_inst = null;
for ( String label : updatedLabels )
{
rm_inst = VariableCPInstruction.prepareRemoveInstruction(label);
rm_inst.setLocation(updatedLabelsLineNum.get(label));
if( LOG.isTraceEnabled() )
LOG.trace(rm_inst.toString());
inst.add(rm_inst);
}
}
private static void generateRemoveInstructions(StatementBlock sb, ArrayList<Instruction> deleteInst)
throws DMLRuntimeException {
if ( sb == null )
return;
if( LOG.isTraceEnabled() )
LOG.trace("In generateRemoveInstructions()");
Instruction inst = null;
// RULE 1: if in IN and not in OUT, then there should be an rmvar or rmfilevar inst
// (currently required for specific cases of external functions)
for (String varName : sb.liveIn().getVariableNames()) {
if (!sb.liveOut().containsVariable(varName)) {
// DataType dt = in.getVariable(varName).getDataType();
// if( !(dt==DataType.MATRIX || dt==DataType.UNKNOWN) )
// continue; //skip rm instructions for non-matrix objects
inst = VariableCPInstruction.prepareRemoveInstruction(varName);
inst.setLocation(sb.getEndLine(), sb.getEndLine(), -1, -1);
deleteInst.add(inst);
if( LOG.isTraceEnabled() )
LOG.trace(" Adding " + inst.toString());
}
}
// RULE 2: if in KILL and not in IN and not in OUT, then there should be an rmvar or rmfilevar inst
// (currently required for specific cases of nested loops)
// i.e., local variables which are created within the block, and used entirely within the block
/*for (String varName : sb.getKill().getVariableNames()) {
if ((!sb.liveIn().containsVariable(varName))
&& (!sb.liveOut().containsVariable(varName))) {
// DataType dt =
// sb.getKill().getVariable(varName).getDataType();
// if( !(dt==DataType.MATRIX || dt==DataType.UNKNOWN) )
// continue; //skip rm instructions for non-matrix objects
inst = createCleanupInstruction(varName);
deleteInst.add(inst);
if (DMLScript.DEBUG)
System.out.println("Adding instruction (r2) "
+ inst.toString());
}
}*/
}
private static ArrayList<ArrayList<Lop>> createNodeVectors(int size) {
ArrayList<ArrayList<Lop>> arr = new ArrayList<ArrayList<Lop>>();
// for each job type, we need to create a vector.
// additionally, create another vector for execNodes
for (int i = 0; i < size; i++) {
arr.add(new ArrayList<Lop>());
}
return arr;
}
private static void clearNodeVectors(ArrayList<ArrayList<Lop>> arr) {
for (ArrayList<Lop> tmp : arr) {
tmp.clear();
}
}
private static boolean isCompatible(ArrayList<Lop> nodes, JobType jt, int from, int to)
throws LopsException
{
int base = jt.getBase();
for ( Lop node : nodes ) {
if ((node.getCompatibleJobs() & base) == 0) {
if( LOG.isTraceEnabled() )
LOG.trace("Not compatible "+ node.toString());
return false;
}
}
return true;
}
/**
* Function that determines if the two input nodes can be executed together
* in at least one job.
*
* @param node1 low-level operator 1
* @param node2 low-level operator 2
* @return true if nodes can be executed together
*/
private static boolean isCompatible(Lop node1, Lop node2) {
return( (node1.getCompatibleJobs() & node2.getCompatibleJobs()) > 0);
}
/**
* Function that checks if the given node executes in the job specified by jt.
*
* @param node low-level operator
* @param jt job type
* @return true if node executes in the specified job type
*/
private static boolean isCompatible(Lop node, JobType jt) {
if ( jt == JobType.GMRCELL )
jt = JobType.GMR;
return ((node.getCompatibleJobs() & jt.getBase()) > 0);
}
/*
* Add node, and its relevant children to job-specific node vectors.
*/
private void addNodeByJobType(Lop node, ArrayList<ArrayList<Lop>> arr,
ArrayList<Lop> execNodes, boolean eliminate) throws LopsException {
if (!eliminate) {
// Check if this lop defines a MR job.
if ( node.definesMRJob() ) {
// find the corresponding JobType
JobType jt = JobType.findJobTypeFromLop(node);
if ( jt == null ) {
throw new LopsException(node.printErrorLocation() + "No matching JobType is found for a the lop type: " + node.getType() + " \n");
}
// Add "node" to corresponding job vector
if ( jt == JobType.GMR ) {
if ( node.hasNonBlockedInputs() ) {
int gmrcell_index = JobType.GMRCELL.getId();
arr.get(gmrcell_index).add(node);
int from = arr.get(gmrcell_index).size();
addChildren(node, arr.get(gmrcell_index), execNodes);
int to = arr.get(gmrcell_index).size();
if (!isCompatible(arr.get(gmrcell_index),JobType.GMR, from, to)) // check against GMR only, not against GMRCELL
throw new LopsException(node.printErrorLocation() + "Error during compatibility check \n");
}
else {
// if "node" (in this case, a group lop) has any inputs from RAND
// then add it to RAND job. Otherwise, create a GMR job
if (hasChildNode(node, arr.get(JobType.DATAGEN.getId()) )) {
arr.get(JobType.DATAGEN.getId()).add(node);
// we should NOT call 'addChildren' because appropriate
// child nodes would have got added to RAND job already
} else {
int gmr_index = JobType.GMR.getId();
arr.get(gmr_index).add(node);
int from = arr.get(gmr_index).size();
addChildren(node, arr.get(gmr_index), execNodes);
int to = arr.get(gmr_index).size();
if (!isCompatible(arr.get(gmr_index),JobType.GMR, from, to))
throw new LopsException(node.printErrorLocation() + "Error during compatibility check \n");
}
}
}
else {
int index = jt.getId();
arr.get(index).add(node);
int from = arr.get(index).size();
addChildren(node, arr.get(index), execNodes);
int to = arr.get(index).size();
// check if all added nodes are compatible with current job
if (!isCompatible(arr.get(index), jt, from, to)) {
throw new LopsException(
"Unexpected error in addNodeByType.");
}
}
return;
}
}
if ( eliminate ) {
// Eliminated lops are directly added to GMR queue.
// Note that eliminate flag is set only for 'group' lops
if ( node.hasNonBlockedInputs() )
arr.get(JobType.GMRCELL.getId()).add(node);
else
arr.get(JobType.GMR.getId()).add(node);
return;
}
/*
* If this lop does not define a job, check if it uses the output of any
* specialized job. i.e., if this lop has a child node in any of the
* job-specific vector, then add it to the vector. Note: This lop must
* be added to ONLY ONE of the job-specific vectors.
*/
int numAdded = 0;
for ( JobType j : JobType.values() ) {
if ( j.getId() > 0 && hasDirectChildNode(node, arr.get(j.getId()))) {
if (isCompatible(node, j)) {
arr.get(j.getId()).add(node);
numAdded += 1;
}
}
}
if (numAdded > 1) {
throw new LopsException("Unexpected error in addNodeByJobType(): A given lop can ONLY be added to a single job vector (numAdded = " + numAdded + ")." );
}
}
/*
* Remove the node from all job-specific node vectors. This method is
* invoked from removeNodesForNextIteration().
*/
private static void removeNodeByJobType(Lop node, ArrayList<ArrayList<Lop>> arr) {
for ( JobType jt : JobType.values())
if ( jt.getId() > 0 )
arr.get(jt.getId()).remove(node);
}
/**
* As some jobs only write one output, all operations in the mapper need to
* be redone and cannot be marked as finished.
*
* @param execNodes list of exec low-level operators
* @param jobNodes list of job low-level operators
* @param finishedNodes list of finished low-level operators
* @throws LopsException if LopsException occurs
*/
private void handleSingleOutputJobs(ArrayList<Lop> execNodes,
ArrayList<ArrayList<Lop>> jobNodes, ArrayList<Lop> finishedNodes)
throws LopsException {
/*
* If the input of a MMCJ/MMRJ job (must have executed in a Mapper) is used
* by multiple lops then we should mark it as not-finished.
*/
ArrayList<Lop> nodesWithUnfinishedOutputs = new ArrayList<Lop>();
int[] jobIndices = {JobType.MMCJ.getId()};
Lop.Type[] lopTypes = { Lop.Type.MMCJ};
// TODO: SortByValue should be treated similar to MMCJ, since it can
// only sort one file now
for ( int jobi=0; jobi < jobIndices.length; jobi++ ) {
int jindex = jobIndices[jobi];
if (!jobNodes.get(jindex).isEmpty()) {
ArrayList<Lop> vec = jobNodes.get(jindex);
// first find all nodes with more than one parent that is not finished.
for (int i = 0; i < vec.size(); i++) {
Lop node = vec.get(i);
if (node.getExecLocation() == ExecLocation.MapOrReduce
|| node.getExecLocation() == ExecLocation.Map) {
Lop MRparent = getParentNode(node, execNodes, ExecLocation.MapAndReduce);
if ( MRparent != null && MRparent.getType() == lopTypes[jobi]) {
int numParents = node.getOutputs().size();
if (numParents > 1) {
for (int j = 0; j < numParents; j++) {
if (!finishedNodes.contains(node.getOutputs()
.get(j)))
nodesWithUnfinishedOutputs.add(node);
}
}
}
}
}
// need to redo all nodes in nodesWithOutput as well as their children
for ( Lop node : vec ) {
if (node.getExecLocation() == ExecLocation.MapOrReduce
|| node.getExecLocation() == ExecLocation.Map) {
if (nodesWithUnfinishedOutputs.contains(node))
finishedNodes.remove(node);
if (hasParentNode(node, nodesWithUnfinishedOutputs))
finishedNodes.remove(node);
}
}
}
}
}
/**
* Method to check if a lop can be eliminated from checking
*
* @param node low-level operator
* @param execNodes list of exec nodes
* @return true if lop can be eliminated
*/
private static boolean canEliminateLop(Lop node, ArrayList<Lop> execNodes) {
// this function can only eliminate "aligner" lops such a group
if (!node.isAligner())
return false;
// find the child whose execLoc = 'MapAndReduce'
int ret = getChildAlignment(node, execNodes, ExecLocation.MapAndReduce);
if (ret == CHILD_BREAKS_ALIGNMENT)
return false;
else if (ret == CHILD_DOES_NOT_BREAK_ALIGNMENT)
return true;
else if (ret == MRCHILD_NOT_FOUND)
return false;
else if (ret == MR_CHILD_FOUND_BREAKS_ALIGNMENT)
return false;
else if (ret == MR_CHILD_FOUND_DOES_NOT_BREAK_ALIGNMENT)
return true;
else
throw new RuntimeException("Should not happen. \n");
}
/**
* Method to generate createvar instructions, which creates a new entry
* in the symbol table. One instruction is generated for every LOP that is
* 1) type Data and
* 2) persistent and
* 3) matrix and
* 4) read
*
* Transient reads needn't be considered here since the previous program
* block would already create appropriate entries in the symbol table.
*
* @param nodes_v list of nodes
* @param inst list of instructions
* @throws LopsException if LopsException occurs
* @throws IOException if IOException occurs
*/
private static void generateInstructionsForInputVariables(ArrayList<Lop> nodes_v, ArrayList<Instruction> inst) throws LopsException, IOException {
for(Lop n : nodes_v) {
if (n.getExecLocation() == ExecLocation.Data && !((Data) n).isTransient()
&& ((Data) n).getOperationType() == OperationTypes.READ
&& (n.getDataType() == DataType.MATRIX || n.getDataType() == DataType.FRAME) ) {
if ( !((Data)n).isLiteral() ) {
try {
String inst_string = n.getInstructions();
CPInstruction currInstr = CPInstructionParser.parseSingleInstruction(inst_string);
currInstr.setLocation(n);
inst.add(currInstr);
} catch (DMLRuntimeException e) {
throw new LopsException(n.printErrorLocation() + "error generating instructions from input variables in Dag -- \n", e);
}
}
}
}
}
/**
* Determine whether to send <code>node</code> to MR or to process it in the control program.
* It is sent to MR in the following cases:
*
* 1) if input lop gets processed in MR then <code>node</code> can be piggybacked
*
* 2) if the exectype of write lop itself is marked MR i.e., memory estimate > memory budget.
*
* @param node low-level operator
* @return true if lop should be sent to MR
*/
private static boolean sendWriteLopToMR(Lop node)
{
if ( DMLScript.rtplatform == RUNTIME_PLATFORM.SINGLE_NODE )
return false;
Lop in = node.getInputs().get(0);
Format nodeFormat = node.getOutputParameters().getFormat();
// Case of a transient read feeding into only one output persistent binaryblock write
// Move the temporary file on HDFS to required persistent location, insteadof copying.
if ( in.getExecLocation() == ExecLocation.Data && in.getOutputs().size() == 1
&& !((Data)node).isTransient()
&& ((Data)in).isTransient()
&& ((Data)in).getOutputParameters().isBlocked()
&& node.getOutputParameters().isBlocked() ) {
return false;
}
//send write lop to MR if (1) it is marked with exec type MR (based on its memory estimate), or
//(2) if the input lop is in MR and the write format allows to pack it into the same job (this does
//not apply to csv write because MR csvwrite is a separate MR job type)
return (node.getExecType() == ExecType.MR
|| (in.getExecType() == ExecType.MR && nodeFormat != Format.CSV));
}
/**
* Computes the memory footprint required to execute <code>node</code> in the mapper.
* It is used only for those nodes that use inputs from distributed cache. The returned
* value is utilized in limiting the number of instructions piggybacked onto a single GMR mapper.
*
* @param node low-level operator
* @return memory footprint
*/
private static double computeFootprintInMapper(Lop node) {
// Memory limits must be checked only for nodes that use distributed cache
if ( ! node.usesDistributedCache() )
// default behavior
return 0.0;
OutputParameters in1dims = node.getInputs().get(0).getOutputParameters();
OutputParameters in2dims = node.getInputs().get(1).getOutputParameters();
double footprint = 0;
if ( node instanceof MapMult ) {
int dcInputIndex = node.distributedCacheInputIndex()[0];
footprint = AggBinaryOp.getMapmmMemEstimate(
in1dims.getNumRows(), in1dims.getNumCols(), in1dims.getRowsInBlock(), in1dims.getColsInBlock(), in1dims.getNnz(),
in2dims.getNumRows(), in2dims.getNumCols(), in2dims.getRowsInBlock(), in2dims.getColsInBlock(), in2dims.getNnz(),
dcInputIndex, false);
}
else if ( node instanceof PMMJ ) {
int dcInputIndex = node.distributedCacheInputIndex()[0];
footprint = AggBinaryOp.getMapmmMemEstimate(
in1dims.getNumRows(), 1, in1dims.getRowsInBlock(), in1dims.getColsInBlock(), in1dims.getNnz(),
in2dims.getNumRows(), in2dims.getNumCols(), in2dims.getRowsInBlock(), in2dims.getColsInBlock(), in2dims.getNnz(),
dcInputIndex, true);
}
else if ( node instanceof AppendM ) {
footprint = BinaryOp.footprintInMapper(
in1dims.getNumRows(), in1dims.getNumCols(),
in2dims.getNumRows(), in2dims.getNumCols(),
in1dims.getRowsInBlock(), in1dims.getColsInBlock());
}
else if ( node instanceof BinaryM ) {
footprint = BinaryOp.footprintInMapper(
in1dims.getNumRows(), in1dims.getNumCols(),
in2dims.getNumRows(), in2dims.getNumCols(),
in1dims.getRowsInBlock(), in1dims.getColsInBlock());
}
else {
// default behavior
return 0.0;
}
return footprint;
}
/**
* Determines if <code>node</code> can be executed in current round of MR jobs or if it needs to be queued for later rounds.
* If the total estimated footprint (<code>node</code> and previously added nodes in GMR) is less than available memory on
* the mappers then <code>node</code> can be executed in current round, and <code>true</code> is returned. Otherwise,
* <code>node</code> must be queued and <code>false</code> is returned.
*
* @param node low-level operator
* @param footprintInMapper mapper footprint
* @return true if node can be executed in current round of jobs
*/
private static boolean checkMemoryLimits(Lop node, double footprintInMapper) {
boolean addNode = true;
// Memory limits must be checked only for nodes that use distributed cache
if ( ! node.usesDistributedCache() )
// default behavior
return addNode;
double memBudget = Math.min(AggBinaryOp.MAPMULT_MEM_MULTIPLIER, BinaryOp.APPEND_MEM_MULTIPLIER) * OptimizerUtils.getRemoteMemBudgetMap(true);
if ( footprintInMapper <= memBudget )
return addNode;
else
return !addNode;
}
/**
* Method to group a vector of sorted lops.
*
* @param sb statement block
* @param node_v list of low-level operators
* @return list of instructions
* @throws LopsException if LopsException occurs
* @throws IOException if IOException occurs
* @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private ArrayList<Instruction> doGreedyGrouping(StatementBlock sb, ArrayList<Lop> node_v)
throws LopsException, IOException, DMLRuntimeException
{
if( LOG.isTraceEnabled() )
LOG.trace("Grouping DAG ============");
// nodes to be executed in current iteration
ArrayList<Lop> execNodes = new ArrayList<Lop>();
// nodes that have already been processed
ArrayList<Lop> finishedNodes = new ArrayList<Lop>();
// nodes that are queued for the following iteration
ArrayList<Lop> queuedNodes = new ArrayList<Lop>();
ArrayList<ArrayList<Lop>> jobNodes = createNodeVectors(JobType.getNumJobTypes());
// list of instructions
ArrayList<Instruction> inst = new ArrayList<Instruction>();
//ArrayList<Instruction> preWriteDeleteInst = new ArrayList<Instruction>();
ArrayList<Instruction> writeInst = new ArrayList<Instruction>();
ArrayList<Instruction> deleteInst = new ArrayList<Instruction>();
ArrayList<Instruction> endOfBlockInst = new ArrayList<Instruction>();
// remove files for transient reads that are updated.
deleteUpdatedTransientReadVariables(sb, node_v, writeInst);
generateRemoveInstructions(sb, endOfBlockInst);
generateInstructionsForInputVariables(node_v, inst);
boolean done = false;
String indent = " ";
while (!done) {
if( LOG.isTraceEnabled() )
LOG.trace("Grouping nodes in DAG");
execNodes.clear();
queuedNodes.clear();
clearNodeVectors(jobNodes);
gmrMapperFootprint=0;
for ( Lop node : node_v ) {
// finished nodes don't need to be processed
if (finishedNodes.contains(node))
continue;
if( LOG.isTraceEnabled() )
LOG.trace("Processing node (" + node.getID()
+ ") " + node.toString() + " exec nodes size is " + execNodes.size());
//if node defines MR job, make sure it is compatible with all
//its children nodes in execNodes
if(node.definesMRJob() && !compatibleWithChildrenInExecNodes(execNodes, node))
{
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Queueing node "
+ node.toString() + " (code 1)");
queuedNodes.add(node);
removeNodesForNextIteration(node, finishedNodes, execNodes, queuedNodes, jobNodes);
continue;
}
// if child is queued, this node will be processed in the later
// iteration
if (hasChildNode(node,queuedNodes)) {
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Queueing node "
+ node.toString() + " (code 2)");
queuedNodes.add(node);
// if node has more than two inputs,
// remove children that will be needed in a future
// iterations
// may also have to remove parent nodes of these children
removeNodesForNextIteration(node, finishedNodes, execNodes,
queuedNodes, jobNodes);
continue;
}
// if inputs come from different jobs, then queue
if ( node.getInputs().size() >= 2) {
int jobid = Integer.MIN_VALUE;
boolean queueit = false;
for(int idx=0; idx < node.getInputs().size(); idx++) {
int input_jobid = jobType(node.getInputs().get(idx), jobNodes);
if (input_jobid != -1) {
if ( jobid == Integer.MIN_VALUE )
jobid = input_jobid;
else if ( jobid != input_jobid ) {
queueit = true;
break;
}
}
}
if ( queueit ) {
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Queueing node " + node.toString() + " (code 3)");
queuedNodes.add(node);
removeNodesForNextIteration(node, finishedNodes, execNodes, queuedNodes, jobNodes);
continue;
}
}
// See if this lop can be eliminated
// This check is for "aligner" lops (e.g., group)
boolean eliminate = false;
eliminate = canEliminateLop(node, execNodes);
if (eliminate) {
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Adding -"+ node.toString());
execNodes.add(node);
finishedNodes.add(node);
addNodeByJobType(node, jobNodes, execNodes, eliminate);
continue;
}
// If the node defines a MR Job then make sure none of its
// children that defines a MR Job are present in execNodes
if (node.definesMRJob()) {
if (hasMRJobChildNode(node, execNodes)) {
// "node" must NOT be queued when node=group and the child that defines job is Rand
// this is because "group" can be pushed into the "Rand" job.
if (! (node.getType() == Lop.Type.Grouping && checkDataGenAsChildNode(node,execNodes)) ) {
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Queueing node " + node.toString() + " (code 4)");
queuedNodes.add(node);
removeNodesForNextIteration(node, finishedNodes,
execNodes, queuedNodes, jobNodes);
continue;
}
}
}
// if "node" has more than one input, and has a descendant lop
// in execNodes that is of type RecordReader
// then all its inputs must be ancestors of RecordReader. If
// not, queue "node"
if (node.getInputs().size() > 1
&& hasChildNode(node, execNodes, ExecLocation.RecordReader)) {
// get the actual RecordReader lop
Lop rr_node = getChildNode(node, execNodes, ExecLocation.RecordReader);
// all inputs of "node" must be ancestors of rr_node
boolean queue_it = false;
for (Lop n : node.getInputs()) {
// each input should be ancestor of RecordReader lop
if (!n.equals(rr_node) && !isChild(rr_node, n, IDMap)) {
queue_it = true; // i.e., "node" must be queued
break;
}
}
if (queue_it) {
// queue node
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Queueing -" + node.toString() + " (code 5)");
queuedNodes.add(node);
// TODO: does this have to be modified to handle
// recordreader lops?
removeNodesForNextIteration(node, finishedNodes,
execNodes, queuedNodes, jobNodes);
continue;
} else {
// nothing here.. subsequent checks have to be performed
// on "node"
;
}
}
// data node, always add if child not queued
// only write nodes are kept in execnodes
if (node.getExecLocation() == ExecLocation.Data) {
Data dnode = (Data) node;
boolean dnode_queued = false;
if ( dnode.getOperationType() == OperationTypes.READ ) {
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Adding Data -"+ node.toString());
// TODO: avoid readScalar instruction, and read it on-demand just like the way Matrices are read in control program
if ( node.getDataType() == DataType.SCALAR
//TODO: LEO check the following condition is still needed
&& node.getOutputParameters().getFile_name() != null ) {
// this lop corresponds to reading a scalar from HDFS file
// add it to execNodes so that "readScalar" instruction gets generated
execNodes.add(node);
// note: no need to add it to any job vector
}
}
else if (dnode.getOperationType() == OperationTypes.WRITE) {
// Skip the transient write <code>node</code> if the input is a
// transient read with the same variable name. i.e., a dummy copy.
// Hence, <code>node</code> can be avoided.
// TODO: this case should ideally be handled in the language layer
// prior to the construction of Hops Dag
Lop input = dnode.getInputs().get(0);
if ( dnode.isTransient()
&& input.getExecLocation() == ExecLocation.Data
&& ((Data)input).isTransient()
&& dnode.getOutputParameters().getLabel().equals(input.getOutputParameters().getLabel()) ) {
// do nothing, <code>node</code> must not processed any further.
;
}
else if ( execNodes.contains(input) && !isCompatible(node, input) && sendWriteLopToMR(node)) {
// input is in execNodes but it is not compatible with write lop. So, queue the write lop.
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Queueing -" + node.toString());
queuedNodes.add(node);
dnode_queued = true;
}
else {
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Adding Data -"+ node.toString());
execNodes.add(node);
if ( sendWriteLopToMR(node) ) {
addNodeByJobType(node, jobNodes, execNodes, false);
}
}
}
if (!dnode_queued)
finishedNodes.add(node);
continue;
}
// map or reduce node, can always be piggybacked with parent
if (node.getExecLocation() == ExecLocation.MapOrReduce) {
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Adding -"+ node.toString());
execNodes.add(node);
finishedNodes.add(node);
addNodeByJobType(node, jobNodes, execNodes, false);
continue;
}
// RecordReader node, add, if no parent needs reduce, else queue
if (node.getExecLocation() == ExecLocation.RecordReader) {
// "node" should not have any children in
// execNodes .. it has to be the first one in the job!
if (!hasChildNode(node, execNodes, ExecLocation.Map)
&& !hasChildNode(node, execNodes,
ExecLocation.MapAndReduce)) {
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Adding -"+ node.toString());
execNodes.add(node);
finishedNodes.add(node);
addNodeByJobType(node, jobNodes, execNodes, false);
} else {
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Queueing -"+ node.toString() + " (code 6)");
queuedNodes.add(node);
removeNodesForNextIteration(node, finishedNodes,
execNodes, queuedNodes, jobNodes);
}
continue;
}
// map node, add, if no parent needs reduce, else queue
if (node.getExecLocation() == ExecLocation.Map) {
boolean queueThisNode = false;
int subcode = -1;
if ( node.usesDistributedCache() ) {
// if an input to <code>node</code> comes from distributed cache
// then that input must get executed in one of the previous jobs.
int[] dcInputIndexes = node.distributedCacheInputIndex();
for( int dcInputIndex : dcInputIndexes ){
Lop dcInput = node.getInputs().get(dcInputIndex-1);
if ( (dcInput.getType() != Lop.Type.Data && dcInput.getExecType()==ExecType.MR)
&& execNodes.contains(dcInput) )
{
queueThisNode = true;
subcode = 1;
}
}
// Limit the number of distributed cache inputs based on the available memory in mappers
double memsize = computeFootprintInMapper(node);
//gmrMapperFootprint += computeFootprintInMapper(node);
if ( gmrMapperFootprint>0 && !checkMemoryLimits(node, gmrMapperFootprint+memsize ) ) {
queueThisNode = true;
subcode = 2;
}
if(!queueThisNode)
gmrMapperFootprint += memsize;
}
if (!queueThisNode && !hasChildNode(node, execNodes,ExecLocation.MapAndReduce)&& !hasMRJobChildNode(node, execNodes)) {
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Adding -"+ node.toString());
execNodes.add(node);
finishedNodes.add(node);
addNodeByJobType(node, jobNodes, execNodes, false);
} else {
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Queueing -"+ node.toString() + " (code 7 - " + "subcode " + subcode + ")");
queuedNodes.add(node);
removeNodesForNextIteration(node, finishedNodes,
execNodes, queuedNodes, jobNodes);
}
continue;
}
// reduce node, make sure no parent needs reduce, else queue
if (node.getExecLocation() == ExecLocation.MapAndReduce) {
// TODO: statiko -- keep the middle condition
// discuss about having a lop that is MapAndReduce but does
// not define a job
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Adding -"+ node.toString());
execNodes.add(node);
finishedNodes.add(node);
addNodeByJobType(node, jobNodes, execNodes, eliminate);
continue;
}
// aligned reduce, make sure a parent that is reduce exists
if (node.getExecLocation() == ExecLocation.Reduce) {
if ( compatibleWithChildrenInExecNodes(execNodes, node) &&
(hasChildNode(node, execNodes, ExecLocation.MapAndReduce)
|| hasChildNode(node, execNodes, ExecLocation.Map) ) )
{
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Adding -"+ node.toString());
execNodes.add(node);
finishedNodes.add(node);
addNodeByJobType(node, jobNodes, execNodes, false);
} else {
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Queueing -"+ node.toString() + " (code 8)");
queuedNodes.add(node);
removeNodesForNextIteration(node, finishedNodes,
execNodes, queuedNodes, jobNodes);
}
continue;
}
// add Scalar to execNodes if it has no child in exec nodes
// that will be executed in a MR job.
if (node.getExecLocation() == ExecLocation.ControlProgram) {
for ( Lop lop : node.getInputs() ) {
if (execNodes.contains(lop)
&& !(lop.getExecLocation() == ExecLocation.Data)
&& !(lop.getExecLocation() == ExecLocation.ControlProgram)) {
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Queueing -"+ node.toString() + " (code 9)");
queuedNodes.add(node);
removeNodesForNextIteration(node, finishedNodes,
execNodes, queuedNodes, jobNodes);
break;
}
}
if (queuedNodes.contains(node))
continue;
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Adding - scalar"+ node.toString());
execNodes.add(node);
addNodeByJobType(node, jobNodes, execNodes, false);
finishedNodes.add(node);
continue;
}
}
// no work to do
if ( execNodes.isEmpty() ) {
if( !queuedNodes.isEmpty() )
{
//System.err.println("Queued nodes should be 0");
throw new LopsException("Queued nodes should not be 0 at this point \n");
}
if( LOG.isTraceEnabled() )
LOG.trace("All done! queuedNodes = "+ queuedNodes.size());
done = true;
} else {
// work to do
if( LOG.isTraceEnabled() )
LOG.trace("Generating jobs for group -- Node count="+ execNodes.size());
// first process scalar instructions
generateControlProgramJobs(execNodes, inst, writeInst, deleteInst);
// copy unassigned lops in execnodes to gmrnodes
for (int i = 0; i < execNodes.size(); i++) {
Lop node = execNodes.get(i);
if (jobType(node, jobNodes) == -1) {
if ( isCompatible(node, JobType.GMR) ) {
if ( node.hasNonBlockedInputs() ) {
jobNodes.get(JobType.GMRCELL.getId()).add(node);
addChildren(node, jobNodes.get(JobType.GMRCELL.getId()), execNodes);
}
else {
jobNodes.get(JobType.GMR.getId()).add(node);
addChildren(node, jobNodes.get(JobType.GMR.getId()), execNodes);
}
}
else {
if( LOG.isTraceEnabled() )
LOG.trace(indent + "Queueing -" + node.toString() + " (code 10)");
execNodes.remove(i);
finishedNodes.remove(node);
queuedNodes.add(node);
removeNodesForNextIteration(node, finishedNodes,
execNodes, queuedNodes, jobNodes);
}
}
}
// next generate MR instructions
if (!execNodes.isEmpty())
generateMRJobs(execNodes, inst, writeInst, deleteInst, jobNodes);
handleSingleOutputJobs(execNodes, jobNodes, finishedNodes);
}
}
// add write and delete inst at the very end.
//inst.addAll(preWriteDeleteInst);
inst.addAll(writeInst);
inst.addAll(deleteInst);
inst.addAll(endOfBlockInst);
return inst;
}
private boolean compatibleWithChildrenInExecNodes(ArrayList<Lop> execNodes, Lop node) {
for( Lop tmpNode : execNodes ) {
// for lops that execute in control program, compatibleJobs property is set to LopProperties.INVALID
// we should not consider such lops in this check
if (isChild(tmpNode, node, IDMap)
&& tmpNode.getExecLocation() != ExecLocation.ControlProgram
//&& tmpNode.getCompatibleJobs() != LopProperties.INVALID
&& (tmpNode.getCompatibleJobs() & node.getCompatibleJobs()) == 0)
return false;
}
return true;
}
/**
* Exclude rmvar instruction for varname from deleteInst, if exists
*
* @param varName variable name
* @param deleteInst list of instructions
*/
private static void excludeRemoveInstruction(String varName, ArrayList<Instruction> deleteInst) {
//for(Instruction inst : deleteInst) {
for(int i=0; i < deleteInst.size(); i++) {
Instruction inst = deleteInst.get(i);
if ((inst.getType() == INSTRUCTION_TYPE.CONTROL_PROGRAM || inst.getType() == INSTRUCTION_TYPE.SPARK)
&& ((CPInstruction)inst).getCPInstructionType() == CPINSTRUCTION_TYPE.Variable
&& ((VariableCPInstruction)inst).isRemoveVariable(varName) ) {
deleteInst.remove(i);
}
}
}
/**
* Generate rmvar instructions for the inputs, if their consumer count becomes zero.
*
* @param node low-level operator
* @param inst list of instructions
* @param delteInst list of instructions
* @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private void processConsumersForInputs(Lop node, ArrayList<Instruction> inst, ArrayList<Instruction> delteInst) throws DMLRuntimeException {
// reduce the consumer count for all input lops
// if the count becomes zero, then then variable associated w/ input can be removed
for(Lop in : node.getInputs() ) {
if(DMLScript.ENABLE_DEBUG_MODE) {
processConsumers(in, inst, delteInst, node);
}
else {
processConsumers(in, inst, delteInst, null);
}
}
}
private static void processConsumers(Lop node, ArrayList<Instruction> inst, ArrayList<Instruction> deleteInst, Lop locationInfo) throws DMLRuntimeException {
// reduce the consumer count for all input lops
// if the count becomes zero, then then variable associated w/ input can be removed
if ( node.removeConsumer() == 0 ) {
if ( node.getExecLocation() == ExecLocation.Data && ((Data)node).isLiteral() ) {
return;
}
String label = node.getOutputParameters().getLabel();
Instruction currInstr = VariableCPInstruction.prepareRemoveInstruction(label);
if (locationInfo != null)
currInstr.setLocation(locationInfo);
else
currInstr.setLocation(node);
inst.add(currInstr);
excludeRemoveInstruction(label, deleteInst);
}
}
/**
* Method to generate instructions that are executed in Control Program. At
* this point, this DAG has no dependencies on the MR dag. ie. none of the
* inputs are outputs of MR jobs
*
* @param execNodes list of low-level operators
* @param inst list of instructions
* @param writeInst list of write instructions
* @param deleteInst list of delete instructions
* @throws LopsException if LopsException occurs
* @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private void generateControlProgramJobs(ArrayList<Lop> execNodes,
ArrayList<Instruction> inst, ArrayList<Instruction> writeInst, ArrayList<Instruction> deleteInst) throws LopsException, DMLRuntimeException {
// nodes to be deleted from execnodes
ArrayList<Lop> markedNodes = new ArrayList<Lop>();
// variable names to be deleted
ArrayList<String> var_deletions = new ArrayList<String>();
HashMap<String, Lop> var_deletionsLineNum = new HashMap<String, Lop>();
boolean doRmVar = false;
for (int i = 0; i < execNodes.size(); i++) {
Lop node = execNodes.get(i);
doRmVar = false;
// mark input scalar read nodes for deletion
// TODO: statiko -- check if this condition ever evaluated to TRUE
if (node.getExecLocation() == ExecLocation.Data
&& ((Data) node).getOperationType() == Data.OperationTypes.READ
&& ((Data) node).getDataType() == DataType.SCALAR
&& node.getOutputParameters().getFile_name() == null ) {
markedNodes.add(node);
continue;
}
// output scalar instructions and mark nodes for deletion
if (node.getExecLocation() == ExecLocation.ControlProgram) {
if (node.getDataType() == DataType.SCALAR) {
// Output from lops with SCALAR data type must
// go into Temporary Variables (Var0, Var1, etc.)
NodeOutput out = setupNodeOutputs(node, ExecType.CP, false, false);
inst.addAll(out.getPreInstructions()); // dummy
deleteInst.addAll(out.getLastInstructions());
} else {
// Output from lops with non-SCALAR data type must
// go into Temporary Files (temp0, temp1, etc.)
NodeOutput out = setupNodeOutputs(node, ExecType.CP, false, false);
inst.addAll(out.getPreInstructions());
boolean hasTransientWriteParent = false;
for ( Lop parent : node.getOutputs() ) {
if ( parent.getExecLocation() == ExecLocation.Data
&& ((Data)parent).getOperationType() == Data.OperationTypes.WRITE
&& ((Data)parent).isTransient() ) {
hasTransientWriteParent = true;
break;
}
}
if ( !hasTransientWriteParent ) {
deleteInst.addAll(out.getLastInstructions());
}
else {
var_deletions.add(node.getOutputParameters().getLabel());
var_deletionsLineNum.put(node.getOutputParameters().getLabel(), node);
}
}
String inst_string = "";
// Lops with arbitrary number of inputs (ParameterizedBuiltin, GroupedAggregate, DataGen)
// are handled separately, by simply passing ONLY the output variable to getInstructions()
if (node.getType() == Lop.Type.ParameterizedBuiltin
|| node.getType() == Lop.Type.GroupedAgg
|| node.getType() == Lop.Type.DataGen ){
inst_string = node.getInstructions(node.getOutputParameters().getLabel());
}
// Lops with arbitrary number of inputs and outputs are handled
// separately as well by passing arrays of inputs and outputs
else if ( node.getType() == Lop.Type.FunctionCallCP )
{
String[] inputs = new String[node.getInputs().size()];
String[] outputs = new String[node.getOutputs().size()];
int count = 0;
for( Lop in : node.getInputs() )
inputs[count++] = in.getOutputParameters().getLabel();
count = 0;
for( Lop out : node.getOutputs() )
{
outputs[count++] = out.getOutputParameters().getLabel();
}
inst_string = node.getInstructions(inputs, outputs);
}
else if (node.getType() == Lop.Type.MULTIPLE_CP) { // ie, MultipleCP class
inst_string = node.getInstructions(node.getOutputParameters().getLabel());
}
else {
if ( node.getInputs().isEmpty() ) {
// currently, such a case exists only for Rand lop
inst_string = node.getInstructions(node.getOutputParameters().getLabel());
}
else if (node.getInputs().size() == 1) {
inst_string = node.getInstructions(node.getInputs()
.get(0).getOutputParameters().getLabel(),
node.getOutputParameters().getLabel());
}
else if (node.getInputs().size() == 2) {
inst_string = node.getInstructions(
node.getInputs().get(0).getOutputParameters().getLabel(),
node.getInputs().get(1).getOutputParameters().getLabel(),
node.getOutputParameters().getLabel());
}
else if (node.getInputs().size() == 3 || node.getType() == Type.Ternary) {
inst_string = node.getInstructions(
node.getInputs().get(0).getOutputParameters().getLabel(),
node.getInputs().get(1).getOutputParameters().getLabel(),
node.getInputs().get(2).getOutputParameters().getLabel(),
node.getOutputParameters().getLabel());
}
else if (node.getInputs().size() == 4) {
inst_string = node.getInstructions(
node.getInputs().get(0).getOutputParameters().getLabel(),
node.getInputs().get(1).getOutputParameters().getLabel(),
node.getInputs().get(2).getOutputParameters().getLabel(),
node.getInputs().get(3).getOutputParameters().getLabel(),
node.getOutputParameters().getLabel());
}
else if (node.getInputs().size() == 5) {
inst_string = node.getInstructions(
node.getInputs().get(0).getOutputParameters().getLabel(),
node.getInputs().get(1).getOutputParameters().getLabel(),
node.getInputs().get(2).getOutputParameters().getLabel(),
node.getInputs().get(3).getOutputParameters().getLabel(),
node.getInputs().get(4).getOutputParameters().getLabel(),
node.getOutputParameters().getLabel());
}
else if (node.getInputs().size() == 6) {
inst_string = node.getInstructions(
node.getInputs().get(0).getOutputParameters().getLabel(),
node.getInputs().get(1).getOutputParameters().getLabel(),
node.getInputs().get(2).getOutputParameters().getLabel(),
node.getInputs().get(3).getOutputParameters().getLabel(),
node.getInputs().get(4).getOutputParameters().getLabel(),
node.getInputs().get(5).getOutputParameters().getLabel(),
node.getOutputParameters().getLabel());
}
else if (node.getInputs().size() == 7) {
inst_string = node.getInstructions(
node.getInputs().get(0).getOutputParameters().getLabel(),
node.getInputs().get(1).getOutputParameters().getLabel(),
node.getInputs().get(2).getOutputParameters().getLabel(),
node.getInputs().get(3).getOutputParameters().getLabel(),
node.getInputs().get(4).getOutputParameters().getLabel(),
node.getInputs().get(5).getOutputParameters().getLabel(),
node.getInputs().get(6).getOutputParameters().getLabel(),
node.getOutputParameters().getLabel());
}
else {
String[] inputs = new String[node.getInputs().size()];
for( int j=0; j<node.getInputs().size(); j++ )
inputs[j] = node.getInputs().get(j).getOutputParameters().getLabel();
inst_string = node.getInstructions(inputs,
node.getOutputParameters().getLabel());
}
}
try {
if( LOG.isTraceEnabled() )
LOG.trace("Generating instruction - "+ inst_string);
Instruction currInstr = InstructionParser.parseSingleInstruction(inst_string);
if(currInstr == null) {
throw new LopsException("Error parsing the instruction:" + inst_string);
}
if (node._beginLine != 0)
currInstr.setLocation(node);
else if ( !node.getOutputs().isEmpty() )
currInstr.setLocation(node.getOutputs().get(0));
else if ( !node.getInputs().isEmpty() )
currInstr.setLocation(node.getInputs().get(0));
inst.add(currInstr);
} catch (Exception e) {
throw new LopsException(node.printErrorLocation() + "Problem generating simple inst - "
+ inst_string, e);
}
markedNodes.add(node);
doRmVar = true;
//continue;
}
else if (node.getExecLocation() == ExecLocation.Data ) {
Data dnode = (Data)node;
Data.OperationTypes op = dnode.getOperationType();
if ( op == Data.OperationTypes.WRITE ) {
NodeOutput out = null;
if ( sendWriteLopToMR(node) ) {
// In this case, Data WRITE lop goes into MR, and
// we don't have to do anything here
doRmVar = false;
}
else {
out = setupNodeOutputs(node, ExecType.CP, false, false);
if ( dnode.getDataType() == DataType.SCALAR ) {
// processing is same for both transient and persistent scalar writes
writeInst.addAll(out.getLastInstructions());
//inst.addAll(out.getLastInstructions());
doRmVar = false;
}
else {
// setupNodeOutputs() handles both transient and persistent matrix writes
if ( dnode.isTransient() ) {
//inst.addAll(out.getPreInstructions()); // dummy ?
deleteInst.addAll(out.getLastInstructions());
doRmVar = false;
}
else {
// In case of persistent write lop, write instruction will be generated
// and that instruction must be added to <code>inst</code> so that it gets
// executed immediately. If it is added to <code>deleteInst</code> then it
// gets executed at the end of program block's execution
inst.addAll(out.getLastInstructions());
doRmVar = true;
}
}
markedNodes.add(node);
//continue;
}
}
else {
// generate a temp label to hold the value that is read from HDFS
if ( node.getDataType() == DataType.SCALAR ) {
node.getOutputParameters().setLabel(Lop.SCALAR_VAR_NAME_PREFIX + var_index.getNextID());
String io_inst = node.getInstructions(node.getOutputParameters().getLabel(),
node.getOutputParameters().getFile_name());
CPInstruction currInstr = CPInstructionParser.parseSingleInstruction(io_inst);
currInstr.setLocation(node);
inst.add(currInstr);
Instruction tempInstr = VariableCPInstruction.prepareRemoveInstruction(node.getOutputParameters().getLabel());
tempInstr.setLocation(node);
deleteInst.add(tempInstr);
}
else {
throw new LopsException("Matrix READs are not handled in CP yet!");
}
markedNodes.add(node);
doRmVar = true;
//continue;
}
}
// see if rmvar instructions can be generated for node's inputs
if(doRmVar)
processConsumersForInputs(node, inst, deleteInst);
doRmVar = false;
}
for ( String var : var_deletions ) {
Instruction rmInst = VariableCPInstruction.prepareRemoveInstruction(var);
if( LOG.isTraceEnabled() )
LOG.trace(" Adding var_deletions: " + rmInst.toString());
rmInst.setLocation(var_deletionsLineNum.get(var));
deleteInst.add(rmInst);
}
// delete all marked nodes
for ( Lop node : markedNodes ) {
execNodes.remove(node);
}
}
/**
* Method to remove all child nodes of a queued node that should be executed
* in a following iteration.
*
* @param node low-level operator
* @param finishedNodes list of finished nodes
* @param execNodes list of exec nodes
* @param queuedNodes list of queued nodes
* @param jobvec list of lists of low-level operators
* @throws LopsException if LopsException occurs
*/
private void removeNodesForNextIteration(Lop node, ArrayList<Lop> finishedNodes,
ArrayList<Lop> execNodes, ArrayList<Lop> queuedNodes,
ArrayList<ArrayList<Lop>> jobvec) throws LopsException {
// only queued nodes with multiple inputs need to be handled.
if (node.getInputs().size() == 1)
return;
//if all children are queued, then there is nothing to do.
boolean allQueued = true;
for( Lop input : node.getInputs() ) {
if( !queuedNodes.contains(input) ) {
allQueued = false;
break;
}
}
if ( allQueued )
return;
if( LOG.isTraceEnabled() )
LOG.trace(" Before remove nodes for next iteration -- size of execNodes " + execNodes.size());
// Determine if <code>node</code> has inputs from the same job or multiple jobs
int jobid = Integer.MIN_VALUE;
boolean inputs_in_same_job = true;
for( Lop input : node.getInputs() ) {
int input_jobid = jobType(input, jobvec);
if ( jobid == Integer.MIN_VALUE )
jobid = input_jobid;
else if ( jobid != input_jobid ) {
inputs_in_same_job = false;
break;
}
}
// Determine if there exist any unassigned inputs to <code>node</code>
// Evaluate only those lops that execute in MR.
boolean unassigned_inputs = false;
for( Lop input : node.getInputs() ) {
//if ( input.getExecLocation() != ExecLocation.ControlProgram && jobType(input, jobvec) == -1 ) {
if ( input.getExecType() == ExecType.MR && !execNodes.contains(input)) { //jobType(input, jobvec) == -1 ) {
unassigned_inputs = true;
break;
}
}
// Determine if any node's children are queued
boolean child_queued = false;
for( Lop input : node.getInputs() ) {
if (queuedNodes.contains(input) ) {
child_queued = true;
break;
}
}
if (LOG.isTraceEnabled()) {
LOG.trace(" Property Flags:");
LOG.trace(" Inputs in same job: " + inputs_in_same_job);
LOG.trace(" Unassigned inputs: " + unassigned_inputs);
LOG.trace(" Child queued: " + child_queued);
}
// Evaluate each lop in <code>execNodes</code> for removal.
// Add lops to be removed to <code>markedNodes</code>.
ArrayList<Lop> markedNodes = new ArrayList<Lop>();
for (Lop tmpNode : execNodes ) {
if (LOG.isTraceEnabled()) {
LOG.trace(" Checking for removal (" + tmpNode.getID() + ") " + tmpNode.toString());
}
// if tmpNode is not a descendant of 'node', then there is no advantage in removing tmpNode for later iterations.
if(!isChild(tmpNode, node, IDMap))
continue;
// handle group input lops
if(node.getInputs().contains(tmpNode) && tmpNode.isAligner()) {
markedNodes.add(tmpNode);
if( LOG.isTraceEnabled() )
LOG.trace(" Removing for next iteration (code 1): (" + tmpNode.getID() + ") " + tmpNode.toString());
}
//if (child_queued) {
// if one of the children are queued,
// remove some child nodes on other leg that may be needed later on.
// For e.g. Group lop.
if (!hasOtherQueuedParentNode(tmpNode, queuedNodes, node)
&& branchHasNoOtherUnExecutedParents(tmpNode, node, execNodes, finishedNodes)) {
boolean queueit = false;
int code = -1;
switch(node.getExecLocation()) {
case Map:
if(branchCanBePiggyBackedMap(tmpNode, node, execNodes, queuedNodes, markedNodes))
queueit = true;
code=2;
break;
case MapAndReduce:
if(branchCanBePiggyBackedMapAndReduce(tmpNode, node, execNodes, queuedNodes)&& !tmpNode.definesMRJob())
queueit = true;
code=3;
break;
case Reduce:
if(branchCanBePiggyBackedReduce(tmpNode, node, execNodes, queuedNodes))
queueit = true;
code=4;
break;
default:
//do nothing
}
if(queueit) {
if( LOG.isTraceEnabled() )
LOG.trace(" Removing for next iteration (code " + code + "): (" + tmpNode.getID() + ") " + tmpNode.toString());
markedNodes.add(tmpNode);
}
}
/*
* "node" has no other queued children.
*
* If inputs are in the same job and "node" is of type
* MapAndReduce, then remove nodes of all types other than
* Reduce, MapAndReduce, and the ones that define a MR job as
* they can be piggybacked later.
*
* e.g: A=Rand, B=Rand, C=A%*%B Here, both inputs of MMCJ lop
* come from Rand job, and they should not be removed.
*
* Other examples: -- MMCJ whose children are of type
* MapAndReduce (say GMR) -- Inputs coming from two different
* jobs .. GMR & REBLOCK
*/
//boolean himr = hasOtherMapAndReduceParentNode(tmpNode, execNodes,node);
//boolean bcbp = branchCanBePiggyBackedMapAndReduce(tmpNode, node, execNodes, finishedNodes);
//System.out.println(" .. " + inputs_in_same_job + "," + himr + "," + bcbp);
if ((inputs_in_same_job || unassigned_inputs)
&& node.getExecLocation() == ExecLocation.MapAndReduce
&& !hasOtherMapAndReduceParentNode(tmpNode, execNodes,node) // don't remove since it already piggybacked with a MapReduce node
&& branchCanBePiggyBackedMapAndReduce(tmpNode, node, execNodes, queuedNodes)
&& !tmpNode.definesMRJob()) {
if( LOG.isTraceEnabled() )
LOG.trace(" Removing for next iteration (code 5): ("+ tmpNode.getID() + ") " + tmpNode.toString());
markedNodes.add(tmpNode);
}
} // for i
// we also need to delete all parent nodes of marked nodes
for ( Lop enode : execNodes ) {
if( LOG.isTraceEnabled() ) {
LOG.trace(" Checking for removal - ("
+ enode.getID() + ") " + enode.toString());
}
if (hasChildNode(enode, markedNodes) && !markedNodes.contains(enode)) {
markedNodes.add(enode);
if( LOG.isTraceEnabled() )
LOG.trace(" Removing for next iteration (code 6) (" + enode.getID() + ") " + enode.toString());
}
}
if ( execNodes.size() != markedNodes.size() ) {
// delete marked nodes from finishedNodes and execNodes
// add to queued nodes
for(Lop n : markedNodes) {
if ( n.usesDistributedCache() )
gmrMapperFootprint -= computeFootprintInMapper(n);
finishedNodes.remove(n);
execNodes.remove(n);
removeNodeByJobType(n, jobvec);
queuedNodes.add(n);
}
}
}
private boolean branchCanBePiggyBackedReduce(Lop tmpNode, Lop node, ArrayList<Lop> execNodes, ArrayList<Lop> queuedNodes) {
if(node.getExecLocation() != ExecLocation.Reduce)
return false;
// if tmpNode is descendant of any queued child of node, then branch can not be piggybacked
for(Lop ni : node.getInputs()) {
if(queuedNodes.contains(ni) && isChild(tmpNode, ni, IDMap))
return false;
}
for( Lop n : execNodes ) {
if(n.equals(node))
continue;
if(n.equals(tmpNode) && n.getExecLocation() != ExecLocation.Map && n.getExecLocation() != ExecLocation.MapOrReduce)
return false;
// check if n is on the branch tmpNode->*->node
if(isChild(n, node, IDMap) && isChild(tmpNode, n, IDMap)) {
if(!node.getInputs().contains(tmpNode) // redundant
&& n.getExecLocation() != ExecLocation.Map && n.getExecLocation() != ExecLocation.MapOrReduce)
return false;
}
}
return true;
}
private boolean branchCanBePiggyBackedMap(Lop tmpNode, Lop node, ArrayList<Lop> execNodes, ArrayList<Lop> queuedNodes, ArrayList<Lop> markedNodes) {
if(node.getExecLocation() != ExecLocation.Map)
return false;
// if tmpNode is descendant of any queued child of node, then branch can not be piggybacked
for(Lop ni : node.getInputs()) {
if(queuedNodes != null && queuedNodes.contains(ni) && isChild(tmpNode, ni, IDMap))
return false;
}
// since node.location=Map: only Map & MapOrReduce lops must be considered
if( tmpNode.definesMRJob() || (tmpNode.getExecLocation() != ExecLocation.Map && tmpNode.getExecLocation() != ExecLocation.MapOrReduce))
return false;
// if there exist a node "dcInput" that is
// -- a) parent of tmpNode, and b) feeds into "node" via distributed cache
// then, tmpNode should not be removed.
// "dcInput" must be executed prior to "node", and removal of tmpNode does not make that happen.
if(node.usesDistributedCache() ) {
for(int dcInputIndex : node.distributedCacheInputIndex()) {
Lop dcInput = node.getInputs().get(dcInputIndex-1);
if(isChild(tmpNode, dcInput, IDMap))
return false;
}
}
// if tmpNode requires an input from distributed cache,
// remove tmpNode only if that input can fit into mappers' memory. If not,
if ( tmpNode.usesDistributedCache() ) {
double memsize = computeFootprintInMapper(tmpNode);
if (node.usesDistributedCache() )
memsize += computeFootprintInMapper(node);
if ( markedNodes != null ) {
for(Lop n : markedNodes) {
if ( n.usesDistributedCache() )
memsize += computeFootprintInMapper(n);
}
}
if ( !checkMemoryLimits(node, memsize ) ) {
return false;
}
}
return ( (tmpNode.getCompatibleJobs() & node.getCompatibleJobs()) > 0);
}
/**
* Function that checks if <code>tmpNode</code> can be piggybacked with MapAndReduce
* lop <code>node</code>.
*
* Decision depends on the exec location of <code>tmpNode</code>. If the exec location is:
* MapAndReduce: CAN NOT be piggybacked since it defines its own MR job
* Reduce: CAN NOT be piggybacked since it must execute before <code>node</code>
* Map or MapOrReduce: CAN be piggybacked ONLY IF it is comatible w/ <code>tmpNode</code>
*
* @param tmpNode temporary low-level operator
* @param node low-level operator
* @param execNodes list of exec nodes
* @param queuedNodes list of queued nodes
* @return true if tmpNode can be piggbacked on node
*/
private boolean branchCanBePiggyBackedMapAndReduce(Lop tmpNode, Lop node,
ArrayList<Lop> execNodes, ArrayList<Lop> queuedNodes) {
if (node.getExecLocation() != ExecLocation.MapAndReduce)
return false;
JobType jt = JobType.findJobTypeFromLop(node);
for ( Lop n : execNodes ) {
if (n.equals(node))
continue;
// Evaluate only nodes on the branch between tmpNode->..->node
if (n.equals(tmpNode) || (isChild(n, node, IDMap) && isChild(tmpNode, n, IDMap))) {
if ( hasOtherMapAndReduceParentNode(tmpNode, queuedNodes,node) )
return false;
ExecLocation el = n.getExecLocation();
if (el != ExecLocation.Map && el != ExecLocation.MapOrReduce)
return false;
else if (!isCompatible(n, jt))
return false;
}
}
return true;
}
private boolean branchHasNoOtherUnExecutedParents(Lop tmpNode, Lop node,
ArrayList<Lop> execNodes, ArrayList<Lop> finishedNodes) {
//if tmpNode has more than one unfinished output, return false
if(tmpNode.getOutputs().size() > 1)
{
int cnt = 0;
for (Lop output : tmpNode.getOutputs() )
if (!finishedNodes.contains(output))
cnt++;
if(cnt != 1)
return false;
}
//check to see if any node between node and tmpNode has more than one unfinished output
for( Lop n : execNodes ) {
if(n.equals(node) || n.equals(tmpNode))
continue;
if(isChild(n, node, IDMap) && isChild(tmpNode, n, IDMap))
{
int cnt = 0;
for (Lop output : n.getOutputs() ) {
if (!finishedNodes.contains(output))
cnt++;
}
if(cnt != 1)
return false;
}
}
return true;
}
/**
* Method to return the job index for a lop.
*
* @param lops low-level operator
* @param jobvec list of lists of low-level operators
* @return job index for a low-level operator
* @throws LopsException if LopsException occurs
*/
private static int jobType(Lop lops, ArrayList<ArrayList<Lop>> jobvec) throws LopsException {
for ( JobType jt : JobType.values()) {
int i = jt.getId();
if (i > 0 && jobvec.get(i) != null && jobvec.get(i).contains(lops)) {
return i;
}
}
return -1;
}
/**
* Method to see if there is a node of type MapAndReduce between tmpNode and node
* in given node collection
*
* @param tmpNode temporary low-level operator
* @param nodeList list of low-level operators
* @param node low-level operator
* @return true if MapAndReduce node between tmpNode and node in nodeList
*/
private boolean hasOtherMapAndReduceParentNode(Lop tmpNode,
ArrayList<Lop> nodeList, Lop node) {
if ( tmpNode.getExecLocation() == ExecLocation.MapAndReduce)
return true;
for ( Lop n : tmpNode.getOutputs() ) {
if ( nodeList.contains(n) && isChild(n,node,IDMap)) {
if(!n.equals(node) && n.getExecLocation() == ExecLocation.MapAndReduce)
return true;
else
return hasOtherMapAndReduceParentNode(n, nodeList, node);
}
}
return false;
}
/**
* Method to check if there is a queued node that is a parent of both tmpNode and node
*
* @param tmpNode temporary low-level operator
* @param queuedNodes list of queued nodes
* @param node low-level operator
* @return true if there is a queued node that is a parent of tmpNode and node
*/
private boolean hasOtherQueuedParentNode(Lop tmpNode, ArrayList<Lop> queuedNodes, Lop node) {
if ( queuedNodes.isEmpty() )
return false;
boolean[] nodeMarked = node.get_reachable();
boolean[] tmpMarked = tmpNode.get_reachable();
long nodeid = IDMap.get(node.getID());
long tmpid = IDMap.get(tmpNode.getID());
for ( Lop qnode : queuedNodes ) {
int id = IDMap.get(qnode.getID());
if ((id != nodeid && nodeMarked[id]) && (id != tmpid && tmpMarked[id]) )
return true;
}
return false;
}
/**
* Method to print the lops grouped by job type
*
* @param jobNodes list of lists of low-level operators
* @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static void printJobNodes(ArrayList<ArrayList<Lop>> jobNodes)
throws DMLRuntimeException
{
if (LOG.isTraceEnabled()){
for ( JobType jt : JobType.values() ) {
int i = jt.getId();
if (i > 0 && jobNodes.get(i) != null && !jobNodes.get(i).isEmpty() ) {
LOG.trace(jt.getName() + " Job Nodes:");
for (int j = 0; j < jobNodes.get(i).size(); j++) {
LOG.trace(" "
+ jobNodes.get(i).get(j).getID() + ") "
+ jobNodes.get(i).get(j).toString());
}
}
}
}
}
/**
* Method to check if there exists any lops with ExecLocation=RecordReader
*
* @param nodes list of low-level operators
* @param loc exec location
* @return true if there is a node with RecordReader exec location
*/
private static boolean hasANode(ArrayList<Lop> nodes, ExecLocation loc) {
for ( Lop n : nodes ) {
if (n.getExecLocation() == ExecLocation.RecordReader)
return true;
}
return false;
}
private ArrayList<ArrayList<Lop>> splitGMRNodesByRecordReader(ArrayList<Lop> gmrnodes)
{
// obtain the list of record reader nodes
ArrayList<Lop> rrnodes = new ArrayList<Lop>();
for (Lop gmrnode : gmrnodes ) {
if (gmrnode.getExecLocation() == ExecLocation.RecordReader)
rrnodes.add(gmrnode);
}
// We allocate one extra vector to hold lops that do not depend on any
// recordreader lops
ArrayList<ArrayList<Lop>> splitGMR = createNodeVectors(rrnodes.size() + 1);
// flags to indicate whether a lop has been added to one of the node vectors
boolean[] flags = new boolean[gmrnodes.size()];
Arrays.fill(flags, false);
// first, obtain all ancestors of recordreader lops
for (int rrid = 0; rrid < rrnodes.size(); rrid++) {
// prepare node list for i^th record reader lop
// add record reader lop
splitGMR.get(rrid).add(rrnodes.get(rrid));
for (int j = 0; j < gmrnodes.size(); j++) {
if (rrnodes.get(rrid).equals(gmrnodes.get(j)))
flags[j] = true;
else if (isChild(rrnodes.get(rrid), gmrnodes.get(j), IDMap)) {
splitGMR.get(rrid).add(gmrnodes.get(j));
flags[j] = true;
}
}
}
// add all remaining lops to a separate job
int jobindex = rrnodes.size(); // the last node vector
for (int i = 0; i < gmrnodes.size(); i++) {
if (!flags[i]) {
splitGMR.get(jobindex).add(gmrnodes.get(i));
flags[i] = true;
}
}
return splitGMR;
}
/**
* Method to generate hadoop jobs. Exec nodes can contains a mixture of node
* types requiring different mr jobs. This method breaks the job into
* sub-types and then invokes the appropriate method to generate
* instructions.
*
* @param execNodes list of exec nodes
* @param inst list of instructions
* @param writeinst list of write instructions
* @param deleteinst list of delete instructions
* @param jobNodes list of list of low-level operators
* @throws LopsException if LopsException occurs
* @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private void generateMRJobs(ArrayList<Lop> execNodes,
ArrayList<Instruction> inst,
ArrayList<Instruction> writeinst,
ArrayList<Instruction> deleteinst, ArrayList<ArrayList<Lop>> jobNodes)
throws LopsException, DMLRuntimeException
{
printJobNodes(jobNodes);
ArrayList<Instruction> rmvarinst = new ArrayList<Instruction>();
for (JobType jt : JobType.values()) {
// do nothing, if jt = INVALID or ANY
if ( jt == JobType.INVALID || jt == JobType.ANY )
continue;
int index = jt.getId(); // job id is used as an index into jobNodes
ArrayList<Lop> currNodes = jobNodes.get(index);
// generate MR job
if (currNodes != null && !currNodes.isEmpty() ) {
if( LOG.isTraceEnabled() )
LOG.trace("Generating " + jt.getName() + " job");
if (jt.allowsRecordReaderInstructions() && hasANode(jobNodes.get(index), ExecLocation.RecordReader)) {
// split the nodes by recordReader lops
ArrayList<ArrayList<Lop>> rrlist = splitGMRNodesByRecordReader(jobNodes.get(index));
for (int i = 0; i < rrlist.size(); i++) {
generateMapReduceInstructions(rrlist.get(i), inst, writeinst, deleteinst, rmvarinst, jt);
}
}
else if ( jt.allowsSingleShuffleInstruction() ) {
// These jobs allow a single shuffle instruction.
// We should split the nodes so that a separate job is produced for each shuffle instruction.
Lop.Type splittingLopType = jt.getShuffleLopType();
ArrayList<Lop> nodesForASingleJob = new ArrayList<Lop>();
for (int i = 0; i < jobNodes.get(index).size(); i++) {
if (jobNodes.get(index).get(i).getType() == splittingLopType) {
nodesForASingleJob.clear();
// Add the lop that defines the split
nodesForASingleJob.add(jobNodes.get(index).get(i));
/*
* Add the splitting lop's children. This call is redundant when jt=SORT
* because a sort job ALWAYS has a SINGLE lop in the entire job
* i.e., there are no children to add when jt=SORT.
*/
addChildren(jobNodes.get(index).get(i), nodesForASingleJob, jobNodes.get(index));
if ( jt.isCompatibleWithParentNodes() ) {
/*
* If the splitting lop is compatible with parent nodes
* then they must be added to the job. For example, MMRJ lop
* may have a Data(Write) lop as its parent, which can be
* executed along with MMRJ.
*/
addParents(jobNodes.get(index).get(i), nodesForASingleJob, jobNodes.get(index));
}
generateMapReduceInstructions(nodesForASingleJob, inst, writeinst, deleteinst, rmvarinst, jt);
}
}
}
else {
// the default case
generateMapReduceInstructions(jobNodes.get(index), inst, writeinst, deleteinst, rmvarinst, jt);
}
}
}
inst.addAll(rmvarinst);
}
/**
* Method to add all parents of "node" in exec_n to node_v.
*
* @param node low-level operator
* @param node_v list of nodes
* @param exec_n list of nodes
*/
private void addParents(Lop node, ArrayList<Lop> node_v, ArrayList<Lop> exec_n) {
for (Lop enode : exec_n ) {
if (isChild(node, enode, IDMap)) {
if (!node_v.contains(enode)) {
if( LOG.isTraceEnabled() )
LOG.trace("Adding parent - " + enode.toString());
node_v.add(enode);
}
}
}
}
/**
* Method to add all relevant data nodes for set of exec nodes.
*
* @param node low-level operator
* @param node_v list of nodes
* @param exec_n list of nodes
*/
private static void addChildren(Lop node, ArrayList<Lop> node_v, ArrayList<Lop> exec_n) {
// add child in exec nodes that is not of type scalar
if (exec_n.contains(node)
&& node.getExecLocation() != ExecLocation.ControlProgram) {
if (!node_v.contains(node)) {
node_v.add(node);
if(LOG.isTraceEnabled())
LOG.trace(" Added child " + node.toString());
}
}
if (!exec_n.contains(node))
return;
// recurse
for (Lop n : node.getInputs() ) {
addChildren(n, node_v, exec_n);
}
}
/**
* Method that determines the output format for a given node.
*
* @param node low-level operator
* @param cellModeOverride override mode
* @return output info
* @throws LopsException if LopsException occurs
*/
private static OutputInfo getOutputInfo(Lop node, boolean cellModeOverride)
throws LopsException
{
if ( (node.getDataType() == DataType.SCALAR && node.getExecType() == ExecType.CP)
|| node instanceof FunctionCallCP )
return null;
OutputInfo oinfo = null;
OutputParameters oparams = node.getOutputParameters();
if (oparams.isBlocked()) {
if ( !cellModeOverride )
oinfo = OutputInfo.BinaryBlockOutputInfo;
else {
// output format is overridden, for example, due to recordReaderInstructions in the job
oinfo = OutputInfo.BinaryCellOutputInfo;
// record decision of overriding in lop's outputParameters so that
// subsequent jobs that use this lop's output know the correct format.
// TODO: ideally, this should be done by having a member variable in Lop
// which stores the outputInfo.
try {
oparams.setDimensions(oparams.getNumRows(), oparams.getNumCols(), -1, -1, oparams.getNnz(), oparams.getUpdateType());
} catch(HopsException e) {
throw new LopsException(node.printErrorLocation() + "error in getOutputInfo in Dag ", e);
}
}
} else {
if (oparams.getFormat() == Format.TEXT || oparams.getFormat() == Format.MM)
oinfo = OutputInfo.TextCellOutputInfo;
else if ( oparams.getFormat() == Format.CSV ) {
oinfo = OutputInfo.CSVOutputInfo;
}
else {
oinfo = OutputInfo.BinaryCellOutputInfo;
}
}
/* Instead of following hardcoding, one must get this information from Lops */
if (node.getType() == Type.SortKeys && node.getExecType() == ExecType.MR) {
if( ((SortKeys)node).getOpType() == SortKeys.OperationTypes.Indexes)
oinfo = OutputInfo.BinaryBlockOutputInfo;
else
oinfo = OutputInfo.OutputInfoForSortOutput;
} else if (node.getType() == Type.CombineBinary) {
// Output format of CombineBinary (CB) depends on how the output is consumed
CombineBinary combine = (CombineBinary) node;
if ( combine.getOperation() == org.apache.sysml.lops.CombineBinary.OperationTypes.PreSort ) {
oinfo = OutputInfo.OutputInfoForSortInput;
}
else if ( combine.getOperation() == org.apache.sysml.lops.CombineBinary.OperationTypes.PreCentralMoment
|| combine.getOperation() == org.apache.sysml.lops.CombineBinary.OperationTypes.PreCovUnweighted
|| combine.getOperation() == org.apache.sysml.lops.CombineBinary.OperationTypes.PreGroupedAggUnweighted ) {
oinfo = OutputInfo.WeightedPairOutputInfo;
}
} else if ( node.getType() == Type.CombineTernary) {
oinfo = OutputInfo.WeightedPairOutputInfo;
} else if (node.getType() == Type.CentralMoment
|| node.getType() == Type.CoVariance )
{
// CMMR always operate in "cell mode",
// and the output is always in cell format
oinfo = OutputInfo.BinaryCellOutputInfo;
}
return oinfo;
}
private String prepareAssignVarInstruction(Lop input, Lop node) {
StringBuilder sb = new StringBuilder();
sb.append(ExecType.CP);
sb.append(Lop.OPERAND_DELIMITOR);
sb.append("assignvar");
sb.append(Lop.OPERAND_DELIMITOR);
sb.append( input.prepScalarInputOperand(ExecType.CP) );
sb.append(Lop.OPERAND_DELIMITOR);
sb.append(node.prepOutputOperand());
return sb.toString();
}
/**
* Method to setup output filenames and outputInfos, and to generate related instructions
*
* @param node low-level operator
* @param et exec type
* @param cellModeOverride override mode
* @param copyTWrite ?
* @return node output
* @throws DMLRuntimeException if DMLRuntimeException occurs
* @throws LopsException if LopsException occurs
*/
private NodeOutput setupNodeOutputs(Lop node, ExecType et, boolean cellModeOverride, boolean copyTWrite)
throws DMLRuntimeException, LopsException {
OutputParameters oparams = node.getOutputParameters();
NodeOutput out = new NodeOutput();
node.setConsumerCount(node.getOutputs().size());
// Compute the output format for this node
out.setOutInfo(getOutputInfo(node, cellModeOverride));
// If node is NOT of type Data then we must generate
// a variable to hold the value produced by this node
// note: functioncallcp requires no createvar, rmvar since
// since outputs are explicitly specified
if (node.getExecLocation() != ExecLocation.Data )
{
if (node.getDataType() == DataType.SCALAR) {
oparams.setLabel(Lop.SCALAR_VAR_NAME_PREFIX + var_index.getNextID());
out.setVarName(oparams.getLabel());
Instruction currInstr = VariableCPInstruction.prepareRemoveInstruction(oparams.getLabel());
currInstr.setLocation(node);
out.addLastInstruction(currInstr);
}
else if(node instanceof ParameterizedBuiltin
&& ((ParameterizedBuiltin)node).getOp() == org.apache.sysml.lops.ParameterizedBuiltin.OperationTypes.TRANSFORM) {
ParameterizedBuiltin pbi = (ParameterizedBuiltin)node;
Lop input = pbi.getNamedInput(ParameterizedBuiltinFunctionExpression.TF_FN_PARAM_DATA);
if(input.getDataType()== DataType.FRAME) {
// Output of transform is in CSV format, which gets subsequently reblocked
// TODO: change it to output binaryblock
Data dataInput = (Data) input;
oparams.setFile_name(getNextUniqueFilename());
oparams.setLabel(getNextUniqueVarname(DataType.MATRIX));
// generate an instruction that creates a symbol table entry for the new variable in CSV format
Data delimLop = (Data) dataInput.getNamedInputLop(
DataExpression.DELIM_DELIMITER, DataExpression.DEFAULT_DELIM_DELIMITER);
Instruction createvarInst = VariableCPInstruction.prepareCreateVariableInstruction(
oparams.getLabel(), oparams.getFile_name(), true,
DataType.MATRIX, OutputInfo.outputInfoToString(OutputInfo.CSVOutputInfo),
new MatrixCharacteristics(oparams.getNumRows(), oparams.getNumCols(), -1, -1, oparams.getNnz()), oparams.getUpdateType(),
false, delimLop.getStringValue(), true
);
createvarInst.setLocation(node);
out.addPreInstruction(createvarInst);
// temp file as well as the variable has to be deleted at the end
Instruction currInstr = VariableCPInstruction.prepareRemoveInstruction(oparams.getLabel());
currInstr.setLocation(node);
out.addLastInstruction(currInstr);
// finally, add the generated filename and variable name to the list of outputs
out.setFileName(oparams.getFile_name());
out.setVarName(oparams.getLabel());
}
else {
throw new LopsException("Input to transform() has an invalid type: " + input.getDataType() + ", it must be FRAME.");
}
}
else if(!(node instanceof FunctionCallCP)) //general case
{
// generate temporary filename and a variable name to hold the
// output produced by "rootNode"
oparams.setFile_name(getNextUniqueFilename());
oparams.setLabel(getNextUniqueVarname(node.getDataType()));
// generate an instruction that creates a symbol table entry for the new variable
//String createInst = prepareVariableInstruction("createvar", node);
//out.addPreInstruction(CPInstructionParser.parseSingleInstruction(createInst));
int rpb = (int) oparams.getRowsInBlock();
int cpb = (int) oparams.getColsInBlock();
Instruction createvarInst = VariableCPInstruction.prepareCreateVariableInstruction(
oparams.getLabel(),
oparams.getFile_name(),
true, node.getDataType(),
OutputInfo.outputInfoToString(getOutputInfo(node, false)),
new MatrixCharacteristics(oparams.getNumRows(), oparams.getNumCols(), rpb, cpb, oparams.getNnz()),
oparams.getUpdateType()
);
createvarInst.setLocation(node);
out.addPreInstruction(createvarInst);
// temp file as well as the variable has to be deleted at the end
Instruction currInstr = VariableCPInstruction.prepareRemoveInstruction(oparams.getLabel());
currInstr.setLocation(node);
out.addLastInstruction(currInstr);
// finally, add the generated filename and variable name to the list of outputs
out.setFileName(oparams.getFile_name());
out.setVarName(oparams.getLabel());
}
else {
// If the function call is set with output lops (e.g., multi return builtin),
// generate a createvar instruction for each function output
FunctionCallCP fcall = (FunctionCallCP) node;
if ( fcall.getFunctionOutputs() != null ) {
for( Lop fnOut: fcall.getFunctionOutputs()) {
OutputParameters fnOutParams = fnOut.getOutputParameters();
//OutputInfo oinfo = getOutputInfo((N)fnOut, false);
Instruction createvarInst = VariableCPInstruction.prepareCreateVariableInstruction(
fnOutParams.getLabel(),
getFilePath() + fnOutParams.getLabel(),
true, fnOut.getDataType(),
OutputInfo.outputInfoToString(getOutputInfo(fnOut, false)),
new MatrixCharacteristics(fnOutParams.getNumRows(), fnOutParams.getNumCols(), (int)fnOutParams.getRowsInBlock(), (int)fnOutParams.getColsInBlock(), fnOutParams.getNnz()),
oparams.getUpdateType()
);
if (node._beginLine != 0)
createvarInst.setLocation(node);
else
createvarInst.setLocation(fnOut);
out.addPreInstruction(createvarInst);
}
}
}
}
// rootNode is of type Data
else {
if ( node.getDataType() == DataType.SCALAR ) {
// generate assignment operations for final and transient writes
if ( oparams.getFile_name() == null && !(node instanceof Data && ((Data)node).isPersistentWrite()) ) {
String io_inst = prepareAssignVarInstruction(node.getInputs().get(0), node);
CPInstruction currInstr = CPInstructionParser.parseSingleInstruction(io_inst);
if (node._beginLine != 0)
currInstr.setLocation(node);
else if ( !node.getInputs().isEmpty() )
currInstr.setLocation(node.getInputs().get(0));
out.addLastInstruction(currInstr);
}
else {
//CP PERSISTENT WRITE SCALARS
Lop fname = ((Data)node).getNamedInputLop(DataExpression.IO_FILENAME);
String io_inst = node.getInstructions(node.getInputs().get(0).getOutputParameters().getLabel(), fname.getOutputParameters().getLabel());
CPInstruction currInstr = CPInstructionParser.parseSingleInstruction(io_inst);
if (node._beginLine != 0)
currInstr.setLocation(node);
else if ( !node.getInputs().isEmpty() )
currInstr.setLocation(node.getInputs().get(0));
out.addLastInstruction(currInstr);
}
}
else {
if ( ((Data)node).isTransient() ) {
if ( et == ExecType.CP ) {
// If transient matrix write is in CP then its input MUST be executed in CP as well.
// get variable and filename associated with the input
String inputFileName = node.getInputs().get(0).getOutputParameters().getFile_name();
String inputVarName = node.getInputs().get(0).getOutputParameters().getLabel();
String constVarName = oparams.getLabel();
String constFileName = inputFileName + constVarName;
/*
* Symbol Table state must change as follows:
*
* FROM:
* mvar1 -> temp21
*
* TO:
* mVar1 -> temp21
* tVarH -> temp21
*/
Instruction currInstr = VariableCPInstruction.prepareCopyInstruction(inputVarName, constVarName);
currInstr.setLocation(node);
out.addLastInstruction(currInstr);
out.setFileName(constFileName);
}
else {
if(copyTWrite) {
Instruction currInstr = VariableCPInstruction.prepareCopyInstruction(node.getInputs().get(0).getOutputParameters().getLabel(), oparams.getLabel());
currInstr.setLocation(node);
out.addLastInstruction(currInstr);
return out;
}
/*
* Since the "rootNode" is a transient data node, we first need to generate a
* temporary filename as well as a variable name to hold the <i>immediate</i>
* output produced by "rootNode". These generated HDFS filename and the
* variable name must be changed at the end of an iteration/program block
* so that the subsequent iteration/program block can correctly access the
* generated data. Therefore, we need to distinguish between the following:
*
* 1) Temporary file name & variable name: They hold the immediate output
* produced by "rootNode". Both names are generated below.
*
* 2) Constant file name & variable name: They are constant across iterations.
* Variable name is given by rootNode's label that is created in the upper layers.
* File name is generated by concatenating "temporary file name" and "constant variable name".
*
* Temporary files must be moved to constant files at the end of the iteration/program block.
*/
// generate temporary filename & var name
String tempVarName = oparams.getLabel() + "temp";
String tempFileName = getNextUniqueFilename();
//String createInst = prepareVariableInstruction("createvar", tempVarName, node.getDataType(), node.getValueType(), tempFileName, oparams, out.getOutInfo());
//out.addPreInstruction(CPInstructionParser.parseSingleInstruction(createInst));
int rpb = (int) oparams.getRowsInBlock();
int cpb = (int) oparams.getColsInBlock();
Instruction createvarInst = VariableCPInstruction.prepareCreateVariableInstruction(
tempVarName,
tempFileName,
true, node.getDataType(),
OutputInfo.outputInfoToString(out.getOutInfo()),
new MatrixCharacteristics(oparams.getNumRows(), oparams.getNumCols(), rpb, cpb, oparams.getNnz()),
oparams.getUpdateType()
);
createvarInst.setLocation(node);
out.addPreInstruction(createvarInst);
String constVarName = oparams.getLabel();
String constFileName = tempFileName + constVarName;
oparams.setFile_name(getFilePath() + constFileName);
/*
* Since this is a node that denotes a transient read/write, we need to make sure
* that the data computed for a given variable in a given iteration is passed on
* to the next iteration. This is done by generating miscellaneous instructions
* that gets executed at the end of the program block.
*
* The state of the symbol table must change
*
* FROM:
* tVarA -> temp21tVarA (old copy of temp21)
* tVarAtemp -> temp21 (new copy that should override the old copy)
*
* TO:
* tVarA -> temp21tVarA
*/
// rename the temp variable to constant variable (e.g., cpvar tVarAtemp tVarA)
/*Instruction currInstr = VariableCPInstruction.prepareCopyInstruction(tempVarName, constVarName);
if(DMLScript.ENABLE_DEBUG_MODE) {
currInstr.setLineNum(node._beginLine);
}
out.addLastInstruction(currInstr);
Instruction tempInstr = VariableCPInstruction.prepareRemoveInstruction(tempVarName);
if(DMLScript.ENABLE_DEBUG_MODE) {
tempInstr.setLineNum(node._beginLine);
}
out.addLastInstruction(tempInstr);*/
// Generate a single mvvar instruction (e.g., mvvar tempA A)
// instead of two instructions "cpvar tempA A" and "rmvar tempA"
Instruction currInstr = VariableCPInstruction.prepareMoveInstruction(tempVarName, constVarName);
currInstr.setLocation(node);
out.addLastInstruction(currInstr);
// finally, add the temporary filename and variable name to the list of outputs
out.setFileName(tempFileName);
out.setVarName(tempVarName);
}
}
// rootNode is not a transient write. It is a persistent write.
else {
if(et == ExecType.MR) { //MR PERSISTENT WRITE
// create a variable to hold the result produced by this "rootNode"
oparams.setLabel("pVar" + var_index.getNextID() );
//String createInst = prepareVariableInstruction("createvar", node);
//out.addPreInstruction(CPInstructionParser.parseSingleInstruction(createInst));
int rpb = (int) oparams.getRowsInBlock();
int cpb = (int) oparams.getColsInBlock();
Lop fnameLop = ((Data)node).getNamedInputLop(DataExpression.IO_FILENAME);
String fnameStr = (fnameLop instanceof Data && ((Data)fnameLop).isLiteral()) ?
fnameLop.getOutputParameters().getLabel()
: Lop.VARIABLE_NAME_PLACEHOLDER + fnameLop.getOutputParameters().getLabel() + Lop.VARIABLE_NAME_PLACEHOLDER;
Instruction createvarInst;
// for MatrixMarket format, the creatvar will output the result to a temporary file in textcell format
// the CP write instruction (post instruction) after the MR instruction will merge the result into a single
// part MM format file on hdfs.
if (oparams.getFormat() == Format.CSV) {
String tempFileName = getNextUniqueFilename();
String createInst = node.getInstructions(tempFileName);
createvarInst= CPInstructionParser.parseSingleInstruction(createInst);
//NOTE: no instruction patching because final write from cp instruction
String writeInst = node.getInstructions(oparams.getLabel(), fnameLop.getOutputParameters().getLabel() );
CPInstruction currInstr = CPInstructionParser.parseSingleInstruction(writeInst);
currInstr.setLocation(node);
out.addPostInstruction(currInstr);
// remove the variable
CPInstruction tempInstr = CPInstructionParser.parseSingleInstruction(
"CP" + Lop.OPERAND_DELIMITOR + "rmfilevar" + Lop.OPERAND_DELIMITOR
+ oparams.getLabel() + Lop.VALUETYPE_PREFIX + Expression.ValueType.UNKNOWN + Lop.OPERAND_DELIMITOR
+ "true" + Lop.VALUETYPE_PREFIX + "BOOLEAN");
tempInstr.setLocation(node);
out.addLastInstruction(tempInstr);
}
else if (oparams.getFormat() == Format.MM ) {
createvarInst= VariableCPInstruction.prepareCreateVariableInstruction(
oparams.getLabel(),
getNextUniqueFilename(),
false, node.getDataType(),
OutputInfo.outputInfoToString(getOutputInfo(node, false)),
new MatrixCharacteristics(oparams.getNumRows(), oparams.getNumCols(), rpb, cpb, oparams.getNnz()),
oparams.getUpdateType()
);
//NOTE: no instruction patching because final write from cp instruction
String writeInst = node.getInstructions(oparams.getLabel(), fnameLop.getOutputParameters().getLabel());
CPInstruction currInstr = CPInstructionParser.parseSingleInstruction(writeInst);
currInstr.setLocation(node);
out.addPostInstruction(currInstr);
// remove the variable
CPInstruction tempInstr = CPInstructionParser.parseSingleInstruction(
"CP" + Lop.OPERAND_DELIMITOR + "rmfilevar" + Lop.OPERAND_DELIMITOR
+ oparams.getLabel() + Lop.VALUETYPE_PREFIX + Expression.ValueType.UNKNOWN + Lop.OPERAND_DELIMITOR
+ "true" + Lop.VALUETYPE_PREFIX + "BOOLEAN");
tempInstr.setLocation(node);
out.addLastInstruction(tempInstr);
}
else {
createvarInst= VariableCPInstruction.prepareCreateVariableInstruction(
oparams.getLabel(),
fnameStr,
false, node.getDataType(),
OutputInfo.outputInfoToString(getOutputInfo(node, false)),
new MatrixCharacteristics(oparams.getNumRows(), oparams.getNumCols(), rpb, cpb, oparams.getNnz()),
oparams.getUpdateType()
);
// remove the variable
CPInstruction currInstr = CPInstructionParser.parseSingleInstruction(
"CP" + Lop.OPERAND_DELIMITOR + "rmfilevar" + Lop.OPERAND_DELIMITOR
+ oparams.getLabel() + Lop.VALUETYPE_PREFIX + Expression.ValueType.UNKNOWN + Lop.OPERAND_DELIMITOR
+ "false" + Lop.VALUETYPE_PREFIX + "BOOLEAN");
currInstr.setLocation(node);
out.addLastInstruction(currInstr);
}
createvarInst.setLocation(node);
out.addPreInstruction(createvarInst);
// finally, add the filename and variable name to the list of outputs
out.setFileName(oparams.getFile_name());
out.setVarName(oparams.getLabel());
}
else { //CP PERSISTENT WRITE
// generate a write instruction that writes matrix to HDFS
Lop fname = ((Data)node).getNamedInputLop(DataExpression.IO_FILENAME);
Instruction currInstr = null;
Lop inputLop = node.getInputs().get(0);
// Case of a transient read feeding into only one output persistent binaryblock write
// Move the temporary file on HDFS to required persistent location, insteadof copying.
if (inputLop.getExecLocation() == ExecLocation.Data
&& inputLop.getOutputs().size() == 1
&& ((Data)inputLop).isTransient()
&& ((Data)inputLop).getOutputParameters().isBlocked()
&& node.getOutputParameters().isBlocked() ) {
// transient read feeding into persistent write in blocked representation
// simply, move the file
//prepare filename (literal or variable in order to support dynamic write)
String fnameStr = (fname instanceof Data && ((Data)fname).isLiteral()) ?
fname.getOutputParameters().getLabel()
: Lop.VARIABLE_NAME_PLACEHOLDER + fname.getOutputParameters().getLabel() + Lop.VARIABLE_NAME_PLACEHOLDER;
currInstr = (CPInstruction) VariableCPInstruction.prepareMoveInstruction(
inputLop.getOutputParameters().getLabel(),
fnameStr, "binaryblock" );
}
else {
String io_inst = node.getInstructions(
node.getInputs().get(0).getOutputParameters().getLabel(),
fname.getOutputParameters().getLabel());
if(node.getExecType() == ExecType.SPARK)
// This will throw an exception if the exectype of hop is set incorrectly
// Note: the exec type and exec location of lops needs to be set to SPARK and ControlProgram respectively
currInstr = SPInstructionParser.parseSingleInstruction(io_inst);
else
currInstr = CPInstructionParser.parseSingleInstruction(io_inst);
}
if ( !node.getInputs().isEmpty() && node.getInputs().get(0)._beginLine != 0)
currInstr.setLocation(node.getInputs().get(0));
else
currInstr.setLocation(node);
out.addLastInstruction(currInstr);
}
}
}
}
return out;
}
/**
* Method to generate MapReduce job instructions from a given set of nodes.
*
* @param execNodes list of exec nodes
* @param inst list of instructions
* @param writeinst list of write instructions
* @param deleteinst list of delete instructions
* @param rmvarinst list of rmvar instructions
* @param jt job type
* @throws LopsException if LopsException occurs
* @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private void generateMapReduceInstructions(ArrayList<Lop> execNodes,
ArrayList<Instruction> inst, ArrayList<Instruction> writeinst, ArrayList<Instruction> deleteinst, ArrayList<Instruction> rmvarinst,
JobType jt) throws LopsException, DMLRuntimeException
{
ArrayList<Byte> resultIndices = new ArrayList<Byte>();
ArrayList<String> inputs = new ArrayList<String>();
ArrayList<String> outputs = new ArrayList<String>();
ArrayList<InputInfo> inputInfos = new ArrayList<InputInfo>();
ArrayList<OutputInfo> outputInfos = new ArrayList<OutputInfo>();
ArrayList<Long> numRows = new ArrayList<Long>();
ArrayList<Long> numCols = new ArrayList<Long>();
ArrayList<Long> numRowsPerBlock = new ArrayList<Long>();
ArrayList<Long> numColsPerBlock = new ArrayList<Long>();
ArrayList<String> mapperInstructions = new ArrayList<String>();
ArrayList<String> randInstructions = new ArrayList<String>();
ArrayList<String> recordReaderInstructions = new ArrayList<String>();
int numReducers = 0;
int replication = 1;
ArrayList<String> inputLabels = new ArrayList<String>();
ArrayList<String> outputLabels = new ArrayList<String>();
ArrayList<Instruction> renameInstructions = new ArrayList<Instruction>();
ArrayList<Instruction> variableInstructions = new ArrayList<Instruction>();
ArrayList<Instruction> postInstructions = new ArrayList<Instruction>();
ArrayList<Integer> MRJobLineNumbers = null;
if(DMLScript.ENABLE_DEBUG_MODE) {
MRJobLineNumbers = new ArrayList<Integer>();
}
ArrayList<Lop> inputLops = new ArrayList<Lop>();
boolean cellModeOverride = false;
/* Find the nodes that produce an output */
ArrayList<Lop> rootNodes = new ArrayList<Lop>();
getOutputNodes(execNodes, rootNodes, jt);
if( LOG.isTraceEnabled() )
LOG.trace("# of root nodes = " + rootNodes.size());
/* Remove transient writes that are simple copy of transient reads */
if (jt == JobType.GMR || jt == JobType.GMRCELL) {
ArrayList<Lop> markedNodes = new ArrayList<Lop>();
// only keep data nodes that are results of some computation.
for ( Lop rnode : rootNodes ) {
if (rnode.getExecLocation() == ExecLocation.Data
&& ((Data) rnode).isTransient()
&& ((Data) rnode).getOperationType() == OperationTypes.WRITE
&& ((Data) rnode).getDataType() == DataType.MATRIX) {
// no computation, just a copy
if (rnode.getInputs().get(0).getExecLocation() == ExecLocation.Data
&& ((Data) rnode.getInputs().get(0)).isTransient()
&& rnode.getOutputParameters().getLabel().equals(
rnode.getInputs().get(0).getOutputParameters().getLabel()))
{
markedNodes.add(rnode);
}
}
}
// delete marked nodes
rootNodes.removeAll(markedNodes);
markedNodes.clear();
if ( rootNodes.isEmpty() )
return;
}
// structure that maps node to their indices that will be used in the instructions
HashMap<Lop, Integer> nodeIndexMapping = new HashMap<Lop, Integer>();
/* Determine all input data files */
for ( Lop rnode : rootNodes ) {
getInputPathsAndParameters(rnode, execNodes, inputs, inputInfos, numRows, numCols,
numRowsPerBlock, numColsPerBlock, nodeIndexMapping, inputLabels, inputLops, MRJobLineNumbers);
}
// In case of RAND job, instructions are defined in the input file
if (jt == JobType.DATAGEN)
randInstructions = inputs;
int[] start_index = new int[1];
start_index[0] = inputs.size();
/* Get RecordReader Instructions */
// currently, recordreader instructions are allowed only in GMR jobs
if (jt == JobType.GMR || jt == JobType.GMRCELL) {
for ( Lop rnode : rootNodes ) {
getRecordReaderInstructions(rnode, execNodes, inputs, recordReaderInstructions,
nodeIndexMapping, start_index, inputLabels, inputLops, MRJobLineNumbers);
if ( recordReaderInstructions.size() > 1 )
throw new LopsException("MapReduce job can only have a single recordreader instruction: " + recordReaderInstructions.toString());
}
}
/*
* Handle cases when job's output is FORCED to be cell format.
* - If there exist a cell input, then output can not be blocked.
* Only exception is when jobType = REBLOCK/CSVREBLOCK (for obvisous reason)
* or when jobType = RAND since RandJob takes a special input file,
* whose format should not be used to dictate the output format.
* - If there exists a recordReader instruction
* - If jobtype = GroupedAgg. This job can only run in cell mode.
*/
//
if ( jt != JobType.REBLOCK && jt != JobType.CSV_REBLOCK && jt != JobType.DATAGEN && jt != JobType.TRANSFORM) {
for (int i=0; i < inputInfos.size(); i++)
if ( inputInfos.get(i) == InputInfo.BinaryCellInputInfo || inputInfos.get(i) == InputInfo.TextCellInputInfo )
cellModeOverride = true;
}
if ( !recordReaderInstructions.isEmpty() || jt == JobType.GROUPED_AGG )
cellModeOverride = true;
/* Get Mapper Instructions */
for (int i = 0; i < rootNodes.size(); i++) {
getMapperInstructions(rootNodes.get(i), execNodes, inputs,
mapperInstructions, nodeIndexMapping, start_index,
inputLabels, inputLops, MRJobLineNumbers);
}
if (LOG.isTraceEnabled()) {
LOG.trace(" Input strings: " + inputs.toString());
if (jt == JobType.DATAGEN)
LOG.trace(" Rand instructions: " + getCSVString(randInstructions));
if (jt == JobType.GMR)
LOG.trace(" RecordReader instructions: " + getCSVString(recordReaderInstructions));
LOG.trace(" Mapper instructions: " + getCSVString(mapperInstructions));
}
/* Get Shuffle and Reducer Instructions */
ArrayList<String> shuffleInstructions = new ArrayList<String>();
ArrayList<String> aggInstructionsReducer = new ArrayList<String>();
ArrayList<String> otherInstructionsReducer = new ArrayList<String>();
for( Lop rn : rootNodes ) {
int resultIndex = getAggAndOtherInstructions(
rn, execNodes, shuffleInstructions, aggInstructionsReducer,
otherInstructionsReducer, nodeIndexMapping, start_index,
inputLabels, inputLops, MRJobLineNumbers);
if ( resultIndex == -1)
throw new LopsException("Unexpected error in piggybacking!");
if ( rn.getExecLocation() == ExecLocation.Data
&& ((Data)rn).getOperationType() == Data.OperationTypes.WRITE && ((Data)rn).isTransient()
&& rootNodes.contains(rn.getInputs().get(0))
) {
// Both rn (a transient write) and its input are root nodes.
// Instead of creating two copies of the data, simply generate a cpvar instruction
NodeOutput out = setupNodeOutputs(rn, ExecType.MR, cellModeOverride, true);
writeinst.addAll(out.getLastInstructions());
}
else {
resultIndices.add(Byte.valueOf((byte)resultIndex));
// setup output filenames and outputInfos and generate related instructions
NodeOutput out = setupNodeOutputs(rn, ExecType.MR, cellModeOverride, false);
outputLabels.add(out.getVarName());
outputs.add(out.getFileName());
outputInfos.add(out.getOutInfo());
if (LOG.isTraceEnabled()) {
LOG.trace(" Output Info: " + out.getFileName() + ";" + OutputInfo.outputInfoToString(out.getOutInfo()) + ";" + out.getVarName());
}
renameInstructions.addAll(out.getLastInstructions());
variableInstructions.addAll(out.getPreInstructions());
postInstructions.addAll(out.getPostInstructions());
}
}
/* Determine if the output dimensions are known */
byte[] resultIndicesByte = new byte[resultIndices.size()];
for (int i = 0; i < resultIndicesByte.length; i++) {
resultIndicesByte[i] = resultIndices.get(i).byteValue();
}
if (LOG.isTraceEnabled()) {
LOG.trace(" Shuffle Instructions: " + getCSVString(shuffleInstructions));
LOG.trace(" Aggregate Instructions: " + getCSVString(aggInstructionsReducer));
LOG.trace(" Other instructions =" + getCSVString(otherInstructionsReducer));
LOG.trace(" Output strings: " + outputs.toString());
LOG.trace(" ResultIndices = " + resultIndices.toString());
}
/* Prepare the MapReduce job instruction */
MRJobInstruction mr = new MRJobInstruction(jt);
// check if this is a map-only job. If not, set the number of reducers
if ( !shuffleInstructions.isEmpty() || !aggInstructionsReducer.isEmpty() || !otherInstructionsReducer.isEmpty() )
numReducers = total_reducers;
// set inputs, outputs, and other other properties for the job
mr.setInputOutputLabels(inputLabels.toArray(new String[0]), outputLabels.toArray(new String[0]));
mr.setOutputs(resultIndicesByte);
mr.setDimsUnknownFilePrefix(getFilePath());
mr.setNumberOfReducers(numReducers);
mr.setReplication(replication);
// set instructions for recordReader and mapper
mr.setRecordReaderInstructions(getCSVString(recordReaderInstructions));
mr.setMapperInstructions(getCSVString(mapperInstructions));
//compute and set mapper memory requirements (for consistency of runtime piggybacking)
if( jt == JobType.GMR ) {
double mem = 0;
for( Lop n : execNodes )
mem += computeFootprintInMapper(n);
mr.setMemoryRequirements(mem);
}
if ( jt == JobType.DATAGEN )
mr.setRandInstructions(getCSVString(randInstructions));
// set shuffle instructions
mr.setShuffleInstructions(getCSVString(shuffleInstructions));
// set reducer instruction
mr.setAggregateInstructionsInReducer(getCSVString(aggInstructionsReducer));
mr.setOtherInstructionsInReducer(getCSVString(otherInstructionsReducer));
if(DMLScript.ENABLE_DEBUG_MODE) {
// set line number information for each MR instruction
mr.setMRJobInstructionsLineNumbers(MRJobLineNumbers);
}
/* Add the prepared instructions to output set */
inst.addAll(variableInstructions);
inst.add(mr);
inst.addAll(postInstructions);
deleteinst.addAll(renameInstructions);
for (Lop l : inputLops) {
if(DMLScript.ENABLE_DEBUG_MODE) {
processConsumers(l, rmvarinst, deleteinst, l);
}
else {
processConsumers(l, rmvarinst, deleteinst, null);
}
}
}
/**
* converts an array list into a Lop.INSTRUCTION_DELIMITOR separated string
*
* @param inputStrings list of input strings
* @return Lop.INSTRUCTION_DELIMITOR separated string
*/
private static String getCSVString(ArrayList<String> inputStrings) {
StringBuilder sb = new StringBuilder();
for ( String str : inputStrings ) {
if( str != null ) {
if( sb.length()>0 )
sb.append(Lop.INSTRUCTION_DELIMITOR);
sb.append( str );
}
}
return sb.toString();
}
/**
* Method to populate aggregate and other instructions in reducer.
*
* @param node low-level operator
* @param execNodes list of exec nodes
* @param shuffleInstructions list of shuffle instructions
* @param aggInstructionsReducer ?
* @param otherInstructionsReducer ?
* @param nodeIndexMapping node index mapping
* @param start_index start index
* @param inputLabels list of input labels
* @param inputLops list of input lops
* @param MRJobLineNumbers MR job line numbers
* @return -1 if problem
* @throws LopsException if LopsException occurs
*/
private int getAggAndOtherInstructions(Lop node, ArrayList<Lop> execNodes,
ArrayList<String> shuffleInstructions,
ArrayList<String> aggInstructionsReducer,
ArrayList<String> otherInstructionsReducer,
HashMap<Lop, Integer> nodeIndexMapping, int[] start_index,
ArrayList<String> inputLabels, ArrayList<Lop> inputLops,
ArrayList<Integer> MRJobLineNumbers) throws LopsException
{
int ret_val = -1;
if (nodeIndexMapping.containsKey(node))
return nodeIndexMapping.get(node);
// if not an input source and not in exec nodes, return.
if (!execNodes.contains(node))
return ret_val;
ArrayList<Integer> inputIndices = new ArrayList<Integer>();
// recurse
// For WRITE, since the first element from input is the real input (the other elements
// are parameters for the WRITE operation), so we only need to take care of the
// first element.
if (node.getType() == Lop.Type.Data && ((Data)node).getOperationType() == Data.OperationTypes.WRITE) {
ret_val = getAggAndOtherInstructions(node.getInputs().get(0),
execNodes, shuffleInstructions, aggInstructionsReducer,
otherInstructionsReducer, nodeIndexMapping, start_index,
inputLabels, inputLops, MRJobLineNumbers);
inputIndices.add(ret_val);
}
else {
for ( Lop cnode : node.getInputs() ) {
ret_val = getAggAndOtherInstructions(cnode,
execNodes, shuffleInstructions, aggInstructionsReducer,
otherInstructionsReducer, nodeIndexMapping, start_index,
inputLabels, inputLops, MRJobLineNumbers);
inputIndices.add(ret_val);
}
}
if (node.getExecLocation() == ExecLocation.Data ) {
if ( ((Data)node).getFileFormatType() == FileFormatTypes.CSV
&& !(node.getInputs().get(0) instanceof ParameterizedBuiltin
&& ((ParameterizedBuiltin)node.getInputs().get(0)).getOp() == org.apache.sysml.lops.ParameterizedBuiltin.OperationTypes.TRANSFORM)) {
// Generate write instruction, which goes into CSV_WRITE Job
int output_index = start_index[0];
shuffleInstructions.add(node.getInstructions(inputIndices.get(0), output_index));
if(DMLScript.ENABLE_DEBUG_MODE) {
MRJobLineNumbers.add(node._beginLine);
}
nodeIndexMapping.put(node, output_index);
start_index[0]++;
return output_index;
}
else {
return ret_val;
}
}
if (node.getExecLocation() == ExecLocation.MapAndReduce) {
/* Generate Shuffle Instruction for "node", and return the index associated with produced output */
boolean instGenerated = true;
int output_index = start_index[0];
switch(node.getType()) {
/* Lop types that take a single input */
case ReBlock:
case CSVReBlock:
case SortKeys:
case CentralMoment:
case CoVariance:
case GroupedAgg:
case DataPartition:
shuffleInstructions.add(node.getInstructions(inputIndices.get(0), output_index));
if(DMLScript.ENABLE_DEBUG_MODE) {
MRJobLineNumbers.add(node._beginLine);
}
break;
case ParameterizedBuiltin:
if( ((ParameterizedBuiltin)node).getOp() == org.apache.sysml.lops.ParameterizedBuiltin.OperationTypes.TRANSFORM ) {
shuffleInstructions.add(node.getInstructions(output_index));
if(DMLScript.ENABLE_DEBUG_MODE) {
MRJobLineNumbers.add(node._beginLine);
}
}
break;
/* Lop types that take two inputs */
case MMCJ:
case MMRJ:
case CombineBinary:
shuffleInstructions.add(node.getInstructions(inputIndices.get(0), inputIndices.get(1), output_index));
if(DMLScript.ENABLE_DEBUG_MODE) {
MRJobLineNumbers.add(node._beginLine);
}
break;
/* Lop types that take three inputs */
case CombineTernary:
shuffleInstructions.add(node.getInstructions(inputIndices
.get(0), inputIndices.get(1), inputIndices.get(2), output_index));
if(DMLScript.ENABLE_DEBUG_MODE) {
MRJobLineNumbers.add(node._beginLine);
}
break;
default:
instGenerated = false;
break;
}
if ( instGenerated ) {
nodeIndexMapping.put(node, output_index);
start_index[0]++;
return output_index;
}
else {
return inputIndices.get(0);
}
}
/* Get instructions for aligned reduce and other lops below the reduce. */
if (node.getExecLocation() == ExecLocation.Reduce
|| node.getExecLocation() == ExecLocation.MapOrReduce
|| hasChildNode(node, execNodes, ExecLocation.MapAndReduce)) {
if (inputIndices.size() == 1) {
int output_index = start_index[0];
start_index[0]++;
if (node.getType() == Type.Aggregate) {
aggInstructionsReducer.add(node.getInstructions(
inputIndices.get(0), output_index));
if(DMLScript.ENABLE_DEBUG_MODE) {
MRJobLineNumbers.add(node._beginLine);
}
}
else {
otherInstructionsReducer.add(node.getInstructions(
inputIndices.get(0), output_index));
}
if(DMLScript.ENABLE_DEBUG_MODE) {
MRJobLineNumbers.add(node._beginLine);
}
nodeIndexMapping.put(node, output_index);
return output_index;
} else if (inputIndices.size() == 2) {
int output_index = start_index[0];
start_index[0]++;
otherInstructionsReducer.add(node.getInstructions(inputIndices
.get(0), inputIndices.get(1), output_index));
if(DMLScript.ENABLE_DEBUG_MODE) {
MRJobLineNumbers.add(node._beginLine);
}
nodeIndexMapping.put(node, output_index);
// populate list of input labels.
// only Unary lops can contribute to labels
if (node instanceof Unary && node.getInputs().size() > 1) {
int index = 0;
for (int i = 0; i < node.getInputs().size(); i++) {
if (node.getInputs().get(i).getDataType() == DataType.SCALAR) {
index = i;
break;
}
}
if (node.getInputs().get(index).getExecLocation() == ExecLocation.Data
&& !((Data) (node.getInputs().get(index))).isLiteral()) {
inputLabels.add(node.getInputs().get(index).getOutputParameters().getLabel());
inputLops.add(node.getInputs().get(index));
}
if (node.getInputs().get(index).getExecLocation() != ExecLocation.Data) {
inputLabels.add(node.getInputs().get(index).getOutputParameters().getLabel());
inputLops.add(node.getInputs().get(index));
}
}
return output_index;
} else if (inputIndices.size() == 3 || node.getType() == Type.Ternary) {
int output_index = start_index[0];
start_index[0]++;
if (node.getType() == Type.Ternary ) {
// in case of CTABLE_TRANSFORM_SCALAR_WEIGHT: inputIndices.get(2) would be -1
otherInstructionsReducer.add(node.getInstructions(
inputIndices.get(0), inputIndices.get(1),
inputIndices.get(2), output_index));
if(DMLScript.ENABLE_DEBUG_MODE) {
MRJobLineNumbers.add(node._beginLine);
}
nodeIndexMapping.put(node, output_index);
}
else if( node.getType() == Type.ParameterizedBuiltin ){
otherInstructionsReducer.add(node.getInstructions(
inputIndices.get(0), inputIndices.get(1),
inputIndices.get(2), output_index));
if(DMLScript.ENABLE_DEBUG_MODE) {
MRJobLineNumbers.add(node._beginLine);
}
nodeIndexMapping.put(node, output_index);
}
else
{
otherInstructionsReducer.add(node.getInstructions(
inputIndices.get(0), inputIndices.get(1),
inputIndices.get(2), output_index));
if(DMLScript.ENABLE_DEBUG_MODE) {
MRJobLineNumbers.add(node._beginLine);
}
nodeIndexMapping.put(node, output_index);
return output_index;
}
return output_index;
}
else if (inputIndices.size() == 4) {
int output_index = start_index[0];
start_index[0]++;
otherInstructionsReducer.add(node.getInstructions(
inputIndices.get(0), inputIndices.get(1),
inputIndices.get(2), inputIndices.get(3), output_index));
if(DMLScript.ENABLE_DEBUG_MODE) {
MRJobLineNumbers.add(node._beginLine);
}
nodeIndexMapping.put(node, output_index);
return output_index;
}
else
throw new LopsException("Invalid number of inputs to a lop: "
+ inputIndices.size());
}
return -1;
}
/**
* Method to get record reader instructions for a MR job.
*
* @param node low-level operator
* @param execNodes list of exec nodes
* @param inputStrings list of input strings
* @param recordReaderInstructions list of record reader instructions
* @param nodeIndexMapping node index mapping
* @param start_index start index
* @param inputLabels list of input labels
* @param inputLops list of input lops
* @param MRJobLineNumbers MR job line numbers
* @return -1 if problem
* @throws LopsException if LopsException occurs
*/
private static int getRecordReaderInstructions(Lop node, ArrayList<Lop> execNodes,
ArrayList<String> inputStrings,
ArrayList<String> recordReaderInstructions,
HashMap<Lop, Integer> nodeIndexMapping, int[] start_index,
ArrayList<String> inputLabels, ArrayList<Lop> inputLops,
ArrayList<Integer> MRJobLineNumbers) throws LopsException
{
// if input source, return index
if (nodeIndexMapping.containsKey(node))
return nodeIndexMapping.get(node);
// not input source and not in exec nodes, then return.
if (!execNodes.contains(node))
return -1;
ArrayList<Integer> inputIndices = new ArrayList<Integer>();
int max_input_index = -1;
//N child_for_max_input_index = null;
// get mapper instructions
for (int i = 0; i < node.getInputs().size(); i++) {
// recurse
Lop childNode = node.getInputs().get(i);
int ret_val = getRecordReaderInstructions(childNode, execNodes,
inputStrings, recordReaderInstructions, nodeIndexMapping,
start_index, inputLabels, inputLops, MRJobLineNumbers);
inputIndices.add(ret_val);
if (ret_val > max_input_index) {
max_input_index = ret_val;
//child_for_max_input_index = childNode;
}
}
// only lops with execLocation as RecordReader can contribute
// instructions
if ((node.getExecLocation() == ExecLocation.RecordReader)) {
int output_index = max_input_index;
// cannot reuse index if this is true
// need to add better indexing schemes
output_index = start_index[0];
start_index[0]++;
nodeIndexMapping.put(node, output_index);
// populate list of input labels.
// only Ranagepick lop can contribute to labels
if (node.getType() == Type.PickValues) {
PickByCount pbc = (PickByCount) node;
if (pbc.getOperationType() == PickByCount.OperationTypes.RANGEPICK) {
int scalarIndex = 1; // always the second input is a scalar
// if data lop not a literal -- add label
if (node.getInputs().get(scalarIndex).getExecLocation() == ExecLocation.Data
&& !((Data) (node.getInputs().get(scalarIndex))).isLiteral()) {
inputLabels.add(node.getInputs().get(scalarIndex).getOutputParameters().getLabel());
inputLops.add(node.getInputs().get(scalarIndex));
}
// if not data lop, then this is an intermediate variable.
if (node.getInputs().get(scalarIndex).getExecLocation() != ExecLocation.Data) {
inputLabels.add(node.getInputs().get(scalarIndex).getOutputParameters().getLabel());
inputLops.add(node.getInputs().get(scalarIndex));
}
}
}
// get recordreader instruction.
if (node.getInputs().size() == 2) {
recordReaderInstructions.add(node.getInstructions(inputIndices
.get(0), inputIndices.get(1), output_index));
if(DMLScript.ENABLE_DEBUG_MODE) {
MRJobLineNumbers.add(node._beginLine);
}
}
else
throw new LopsException(
"Unexpected number of inputs while generating a RecordReader Instruction");
return output_index;
}
return -1;
}
/**
* Method to get mapper instructions for a MR job.
*
* @param node low-level operator
* @param execNodes list of exec nodes
* @param inputStrings list of input strings
* @param instructionsInMapper list of instructions in mapper
* @param nodeIndexMapping ?
* @param start_index starting index
* @param inputLabels input labels
* @param MRJoblineNumbers MR job line numbers
* @return -1 if problem
* @throws LopsException if LopsException occurs
*/
private int getMapperInstructions(Lop node, ArrayList<Lop> execNodes,
ArrayList<String> inputStrings,
ArrayList<String> instructionsInMapper,
HashMap<Lop, Integer> nodeIndexMapping, int[] start_index,
ArrayList<String> inputLabels, ArrayList<Lop> inputLops,
ArrayList<Integer> MRJobLineNumbers) throws LopsException
{
// if input source, return index
if (nodeIndexMapping.containsKey(node))
return nodeIndexMapping.get(node);
// not input source and not in exec nodes, then return.
if (!execNodes.contains(node))
return -1;
ArrayList<Integer> inputIndices = new ArrayList<Integer>();
int max_input_index = -1;
// get mapper instructions
for( Lop childNode : node.getInputs()) {
int ret_val = getMapperInstructions(childNode, execNodes,
inputStrings, instructionsInMapper, nodeIndexMapping,
start_index, inputLabels, inputLops, MRJobLineNumbers);
inputIndices.add(ret_val);
if (ret_val > max_input_index) {
max_input_index = ret_val;
}
}
// only map and map-or-reduce without a reduce child node can contribute
// to mapper instructions.
if ((node.getExecLocation() == ExecLocation.Map || node
.getExecLocation() == ExecLocation.MapOrReduce)
&& !hasChildNode(node, execNodes, ExecLocation.MapAndReduce)
&& !hasChildNode(node, execNodes, ExecLocation.Reduce)
) {
int output_index = max_input_index;
// cannot reuse index if this is true
// need to add better indexing schemes
// if (child_for_max_input_index.getOutputs().size() > 1) {
output_index = start_index[0];
start_index[0]++;
// }
nodeIndexMapping.put(node, output_index);
// populate list of input labels.
// only Unary lops can contribute to labels
if (node instanceof Unary && node.getInputs().size() > 1) {
// Following code must be executed only for those Unary
// operators that have more than one input
// It should not be executed for "true" unary operators like
// cos(A).
int index = 0;
for (int i1 = 0; i1 < node.getInputs().size(); i1++) {
if (node.getInputs().get(i1).getDataType() == DataType.SCALAR) {
index = i1;
break;
}
}
// if data lop not a literal -- add label
if (node.getInputs().get(index).getExecLocation() == ExecLocation.Data
&& !((Data) (node.getInputs().get(index))).isLiteral()) {
inputLabels.add(node.getInputs().get(index).getOutputParameters().getLabel());
inputLops.add(node.getInputs().get(index));
}
// if not data lop, then this is an intermediate variable.
if (node.getInputs().get(index).getExecLocation() != ExecLocation.Data) {
inputLabels.add(node.getInputs().get(index).getOutputParameters().getLabel());
inputLops.add(node.getInputs().get(index));
}
}
// get mapper instruction.
if (node.getInputs().size() == 1)
instructionsInMapper.add(node.getInstructions(inputIndices
.get(0), output_index));
else if (node.getInputs().size() == 2) {
instructionsInMapper.add(node.getInstructions(inputIndices
.get(0), inputIndices.get(1), output_index));
}
else if (node.getInputs().size() == 3)
instructionsInMapper.add(node.getInstructions(inputIndices.get(0),
inputIndices.get(1),
inputIndices.get(2),
output_index));
else if ( node.getInputs().size() == 4) {
// Example: Reshape
instructionsInMapper.add(node.getInstructions(
inputIndices.get(0),
inputIndices.get(1),
inputIndices.get(2),
inputIndices.get(3),
output_index ));
}
else if ( node.getInputs().size() == 5) {
// Example: RangeBasedReIndex A[row_l:row_u, col_l:col_u]
instructionsInMapper.add(node.getInstructions(
inputIndices.get(0),
inputIndices.get(1),
inputIndices.get(2),
inputIndices.get(3),
inputIndices.get(4),
output_index ));
}
else if ( node.getInputs().size() == 7 ) {
// Example: RangeBasedReIndex A[row_l:row_u, col_l:col_u] = B
instructionsInMapper.add(node.getInstructions(
inputIndices.get(0),
inputIndices.get(1),
inputIndices.get(2),
inputIndices.get(3),
inputIndices.get(4),
inputIndices.get(5),
inputIndices.get(6),
output_index ));
}
else
throw new LopsException("Node with " + node.getInputs().size() + " inputs is not supported in dag.java.");
if(DMLScript.ENABLE_DEBUG_MODE) {
MRJobLineNumbers.add(node._beginLine);
}
return output_index;
}
return -1;
}
// Method to populate inputs and also populates node index mapping.
private static void getInputPathsAndParameters(Lop node, ArrayList<Lop> execNodes,
ArrayList<String> inputStrings, ArrayList<InputInfo> inputInfos,
ArrayList<Long> numRows, ArrayList<Long> numCols,
ArrayList<Long> numRowsPerBlock, ArrayList<Long> numColsPerBlock,
HashMap<Lop, Integer> nodeIndexMapping, ArrayList<String> inputLabels,
ArrayList<Lop> inputLops, ArrayList<Integer> MRJobLineNumbers)
throws LopsException {
// treat rand as an input.
if (node.getType() == Type.DataGen && execNodes.contains(node)
&& !nodeIndexMapping.containsKey(node)) {
numRows.add(node.getOutputParameters().getNumRows());
numCols.add(node.getOutputParameters().getNumCols());
numRowsPerBlock.add(node.getOutputParameters().getRowsInBlock());
numColsPerBlock.add(node.getOutputParameters().getColsInBlock());
inputStrings.add(node.getInstructions(inputStrings.size(), inputStrings.size()));
if(DMLScript.ENABLE_DEBUG_MODE) {
MRJobLineNumbers.add(node._beginLine);
}
inputInfos.add(InputInfo.TextCellInputInfo);
nodeIndexMapping.put(node, inputStrings.size() - 1);
return;
}
// get input file names
if (!execNodes.contains(node)
&& !nodeIndexMapping.containsKey(node)
&& !(node.getExecLocation() == ExecLocation.Data)
&& (!(node.getExecLocation() == ExecLocation.ControlProgram && node
.getDataType() == DataType.SCALAR))
|| (!execNodes.contains(node)
&& node.getExecLocation() == ExecLocation.Data
&& ((Data) node).getOperationType() == Data.OperationTypes.READ
&& ((Data) node).getDataType() != DataType.SCALAR && !nodeIndexMapping
.containsKey(node))) {
if (node.getOutputParameters().getFile_name() != null) {
inputStrings.add(node.getOutputParameters().getFile_name());
} else {
// use label name
inputStrings.add(Lop.VARIABLE_NAME_PLACEHOLDER + node.getOutputParameters().getLabel()
+ Lop.VARIABLE_NAME_PLACEHOLDER);
}
inputLabels.add(node.getOutputParameters().getLabel());
inputLops.add(node);
numRows.add(node.getOutputParameters().getNumRows());
numCols.add(node.getOutputParameters().getNumCols());
numRowsPerBlock.add(node.getOutputParameters().getRowsInBlock());
numColsPerBlock.add(node.getOutputParameters().getColsInBlock());
InputInfo nodeInputInfo = null;
// Check if file format type is binary or text and update infos
if (node.getOutputParameters().isBlocked()) {
if (node.getOutputParameters().getFormat() == Format.BINARY)
nodeInputInfo = InputInfo.BinaryBlockInputInfo;
else
throw new LopsException("Invalid format (" + node.getOutputParameters().getFormat() + ") encountered for a node/lop (ID=" + node.getID() + ") with blocked output.");
}
else {
if (node.getOutputParameters().getFormat() == Format.TEXT)
nodeInputInfo = InputInfo.TextCellInputInfo;
else
nodeInputInfo = InputInfo.BinaryCellInputInfo;
}
/*
* Hardcode output Key and Value Classes for SortKeys
*/
// TODO: statiko -- remove this hardcoding -- i.e., lops must encode
// the information on key/value classes
if (node.getType() == Type.SortKeys) {
// SortKeys is the input to some other lop (say, L)
// InputInfo of L is the ouputInfo of SortKeys, which is
// (compactformat, doubleWriteable, IntWritable)
nodeInputInfo = new InputInfo(PickFromCompactInputFormat.class,
DoubleWritable.class, IntWritable.class);
} else if (node.getType() == Type.CombineBinary) {
// CombineBinary is the input to some other lop (say, L)
// InputInfo of L is the ouputInfo of CombineBinary
// And, the outputInfo of CombineBinary depends on the operation!
CombineBinary combine = (CombineBinary) node;
if ( combine.getOperation() == org.apache.sysml.lops.CombineBinary.OperationTypes.PreSort ) {
nodeInputInfo = new InputInfo(SequenceFileInputFormat.class,
DoubleWritable.class, IntWritable.class);
}
else if ( combine.getOperation() == org.apache.sysml.lops.CombineBinary.OperationTypes.PreCentralMoment
|| combine.getOperation() == org.apache.sysml.lops.CombineBinary.OperationTypes.PreCovUnweighted
|| combine.getOperation() == org.apache.sysml.lops.CombineBinary.OperationTypes.PreGroupedAggUnweighted ) {
nodeInputInfo = InputInfo.WeightedPairInputInfo;
}
} else if ( node.getType() == Type.CombineTernary ) {
nodeInputInfo = InputInfo.WeightedPairInputInfo;
}
inputInfos.add(nodeInputInfo);
nodeIndexMapping.put(node, inputStrings.size() - 1);
return;
}
// if exec nodes does not contain node at this point, return.
if (!execNodes.contains(node))
return;
// process children recursively
for ( Lop lop : node.getInputs() ) {
getInputPathsAndParameters(lop, execNodes, inputStrings,
inputInfos, numRows, numCols, numRowsPerBlock,
numColsPerBlock, nodeIndexMapping, inputLabels, inputLops, MRJobLineNumbers);
}
}
/**
* Method to find all terminal nodes.
*
* @param execNodes list of exec nodes
* @param rootNodes list of root nodes
* @param jt job type
*/
private static void getOutputNodes(ArrayList<Lop> execNodes, ArrayList<Lop> rootNodes, JobType jt) {
for ( Lop node : execNodes ) {
// terminal node
if (node.getOutputs().isEmpty() && !rootNodes.contains(node)) {
rootNodes.add(node);
}
else {
// check for nodes with at least one child outside execnodes
int cnt = 0;
for (Lop lop : node.getOutputs() ) {
cnt += (!execNodes.contains(lop)) ? 1 : 0;
}
if (cnt > 0 && !rootNodes.contains(node) // not already a rootnode
&& !(node.getExecLocation() == ExecLocation.Data
&& ((Data) node).getOperationType() == OperationTypes.READ
&& ((Data) node).getDataType() == DataType.MATRIX) ) // Not a matrix Data READ
{
if ( jt.allowsSingleShuffleInstruction() && node.getExecLocation() != ExecLocation.MapAndReduce)
continue;
if (cnt < node.getOutputs().size()) {
if(!node.getProducesIntermediateOutput())
rootNodes.add(node);
}
else
rootNodes.add(node);
}
}
}
}
/**
* check to see if a is the child of b (i.e., there is a directed path from a to b)
*
* @param a child lop
* @param b parent lop
* @param IDMap id map
* @return true if a child of b
*/
private static boolean isChild(Lop a, Lop b, HashMap<Long, Integer> IDMap) {
int bID = IDMap.get(b.getID());
return a.get_reachable()[bID];
}
/**
* Method to topologically sort lops
*
* @param v list of lops
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
private void doTopologicalSort_strict_order(ArrayList<Lop> v) {
//int numNodes = v.size();
/*
* Step 1: compute the level for each node in the DAG. Level for each node is
* computed as lops are created. So, this step is need not be performed here.
* Step 2: sort the nodes by level, and within a level by node ID.
*/
// Step1: Performed at the time of creating Lops
// Step2: sort nodes by level, and then by node ID
Lop[] nodearray = v.toArray(new Lop[0]);
Arrays.sort(nodearray, new LopComparator());
// Copy sorted nodes into "v" and construct a mapping between Lop IDs and sequence of numbers
v.clear();
IDMap.clear();
for (int i = 0; i < nodearray.length; i++) {
v.add(nodearray[i]);
IDMap.put(v.get(i).getID(), i);
}
/*
* Compute of All-pair reachability graph (Transitive Closure) of the DAG.
* - Perform a depth-first search (DFS) from every node $u$ in the DAG
* - and construct the list of reachable nodes from the node $u$
* - store the constructed reachability information in $u$.reachable[] boolean array
*/
//
//
for (int i = 0; i < nodearray.length; i++) {
boolean[] arr = v.get(i).create_reachable(nodearray.length);
Arrays.fill(arr, false);
dagDFS(v.get(i), arr);
}
// print the nodes in sorted order
if (LOG.isTraceEnabled()) {
for ( Lop vnode : v ) {
StringBuilder sb = new StringBuilder();
sb.append(vnode.getID());
sb.append("(");
sb.append(vnode.getLevel());
sb.append(") ");
sb.append(vnode.getType());
sb.append("(");
for(Lop vin : vnode.getInputs()) {
sb.append(vin.getID());
sb.append(",");
}
sb.append("), ");
LOG.trace(sb.toString());
}
LOG.trace("topological sort -- done");
}
}
/**
* Method to perform depth-first traversal from a given node in the DAG.
* Store the reachability information in marked[] boolean array.
*
* @param root low-level operator
* @param marked reachability results
*/
private void dagDFS(Lop root, boolean[] marked) {
//contains check currently required for globalopt, will be removed when cleaned up
if( !IDMap.containsKey(root.getID()) )
return;
int mapID = IDMap.get(root.getID());
if ( marked[mapID] )
return;
marked[mapID] = true;
for( Lop lop : root.getOutputs() ) {
dagDFS(lop, marked);
}
}
private static boolean hasDirectChildNode(Lop node, ArrayList<Lop> childNodes) {
if ( childNodes.isEmpty() )
return false;
for( Lop cnode : childNodes ) {
if ( cnode.getOutputs().contains(node))
return true;
}
return false;
}
private boolean hasChildNode(Lop node, ArrayList<Lop> nodes) {
return hasChildNode(node, nodes, ExecLocation.INVALID);
}
private boolean hasChildNode(Lop node, ArrayList<Lop> childNodes, ExecLocation type) {
if ( childNodes.isEmpty() )
return false;
int index = IDMap.get(node.getID());
for( Lop cnode : childNodes ) {
if ( (type == ExecLocation.INVALID || cnode.getExecLocation() == type) && cnode.get_reachable()[index])
return true;
}
return false;
}
private Lop getChildNode(Lop node, ArrayList<Lop> childNodes, ExecLocation type) {
if ( childNodes.isEmpty() )
return null;
int index = IDMap.get(node.getID());
for( Lop cnode : childNodes ) {
if ( cnode.getExecLocation() == type && cnode.get_reachable()[index])
return cnode;
}
return null;
}
/*
* Returns a node "n" such that
* 1) n \in parentNodes
* 2) n is an ancestor of "node"
* 3) n.ExecLocation = type
*
* Returns null if no such "n" exists
*
*/
private Lop getParentNode(Lop node, ArrayList<Lop> parentNodes, ExecLocation type) {
if ( parentNodes.isEmpty() )
return null;
for( Lop pn : parentNodes ) {
int index = IDMap.get( pn.getID() );
if ( pn.getExecLocation() == type && node.get_reachable()[index])
return pn;
}
return null;
}
// Checks if "node" has any descendants in nodesVec with definedMRJob flag
// set to true
private boolean hasMRJobChildNode(Lop node, ArrayList<Lop> nodesVec) {
if ( nodesVec.isEmpty() )
return false;
int index = IDMap.get(node.getID());
for( Lop n : nodesVec ) {
if ( n.definesMRJob() && n.get_reachable()[index])
return true;
}
return false;
}
private boolean checkDataGenAsChildNode(Lop node, ArrayList<Lop> nodesVec) {
if( nodesVec.isEmpty() )
return true;
int index = IDMap.get(node.getID());
boolean onlyDatagen = true;
for( Lop n : nodesVec ) {
if ( n.definesMRJob() && n.get_reachable()[index] && JobType.findJobTypeFromLop(n) != JobType.DATAGEN )
onlyDatagen = false;
}
// return true also when there is no lop in "nodesVec" that defines a MR job.
return onlyDatagen;
}
private static int getChildAlignment(Lop node, ArrayList<Lop> execNodes, ExecLocation type)
{
for (Lop n : node.getInputs() ) {
if (!execNodes.contains(n))
continue;
if (execNodes.contains(n) && n.getExecLocation() == type) {
if (n.getBreaksAlignment())
return MR_CHILD_FOUND_BREAKS_ALIGNMENT;
else
return MR_CHILD_FOUND_DOES_NOT_BREAK_ALIGNMENT;
}
else {
int ret = getChildAlignment(n, execNodes, type);
if (ret == MR_CHILD_FOUND_DOES_NOT_BREAK_ALIGNMENT
|| ret == CHILD_DOES_NOT_BREAK_ALIGNMENT) {
if (n.getBreaksAlignment())
return CHILD_BREAKS_ALIGNMENT;
else
return CHILD_DOES_NOT_BREAK_ALIGNMENT;
}
else if (ret == MRCHILD_NOT_FOUND
|| ret == CHILD_BREAKS_ALIGNMENT
|| ret == MR_CHILD_FOUND_BREAKS_ALIGNMENT)
return ret;
else
throw new RuntimeException("Something wrong in getChildAlignment().");
}
}
return MRCHILD_NOT_FOUND;
}
private boolean hasParentNode(Lop node, ArrayList<Lop> parentNodes) {
if ( parentNodes.isEmpty() )
return false;
for( Lop pnode : parentNodes ) {
int index = IDMap.get( pnode.getID() );
if ( node.get_reachable()[index])
return true;
}
return false;
}
}
| iyounus/incubator-systemml | src/main/java/org/apache/sysml/lops/compile/Dag.java | Java | apache-2.0 | 143,562 |
package com.iservport.et.service;
import java.nio.charset.Charset;
import org.apache.commons.codec.binary.Base64;
import org.springframework.http.HttpHeaders;
import org.springframework.web.util.UriComponentsBuilder;
/**
* Base class to Enterprise tester API calls.
*
* @author mauriciofernandesdecastro
*/
public class AbstractETApiService {
private String scheme = "http";
private String host = "et2.primecontrol.com.br";
private int port = 8807;
private String app = "/EnterpriseTester";
protected final UriComponentsBuilder getApiUriBuilder() {
return UriComponentsBuilder.newInstance().scheme(scheme).host(host).port(port).path(app);
}
/**
* Basic headers (for testing).
*
* @param username
* @param password
*/
@SuppressWarnings("serial")
protected HttpHeaders createHeaders(final String username, final String password ){
return new HttpHeaders(){
{
String auth = username + ":" + password;
byte[] encodedAuth = Base64.encodeBase64(
auth.getBytes(Charset.forName("US-ASCII")) );
String authHeader = "Basic " + new String( encodedAuth );
set( "Authorization", authHeader );
}
};
}
}
| chmulato/helianto-seed | src/main/java/com/iservport/et/service/AbstractETApiService.java | Java | apache-2.0 | 1,266 |
/*
* Copyright 2017 GcsSloop
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Last modified 2017-03-08 01:01:18
*
* GitHub: https://github.com/GcsSloop
* Website: http://www.gcssloop.com
* Weibo: http://weibo.com/GcsSloop
*/
package com.github.florent37.expectanim.core.position;
import android.view.View;
/**
* Created by florentchampigny on 17/02/2017.
*/
public class PositionAnimExpectationRightOf extends PositionAnimationViewDependant {
public PositionAnimExpectationRightOf(View otherView) {
super(otherView);
setForPositionX(true);
}
@Override
public Float getCalculatedValueX(View viewToMove) {
return viewCalculator.finalPositionRightOfView(otherView) + getMargin(viewToMove);
}
@Override
public Float getCalculatedValueY(View viewToMove) {
return null;
}
}
| GcsSloop/diycode | expectanim/src/main/java/com/github/florent37/expectanim/core/position/PositionAnimExpectationRightOf.java | Java | apache-2.0 | 1,365 |
/*
* Copyright 2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jsefa.common.converter;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* Enum constant annotation.
*
* @author Norman Lahme-Huetig
*
*/
@Retention(RUNTIME)
@Target({FIELD})
public @interface EnumConstant {
/**
* The display name of the enum constant.
*/
String value();
}
| Manmay/JSefa | src/main/java/org/jsefa/common/converter/EnumConstant.java | Java | apache-2.0 | 1,076 |
package com.douwe.notes.resource.impl;
import com.douwe.notes.entities.Cycle;
import com.douwe.notes.resource.ICycleResource;
import com.douwe.notes.service.ICycleService;
import com.douwe.notes.service.IInsfrastructureService;
import com.douwe.notes.service.ServiceException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.EJB;
import javax.ws.rs.Path;
/**
*
* @author Vincent Douwe <douwevincent@yahoo.fr>
*/
@Path("/cycles")
public class CycleResource implements ICycleResource{
@EJB
private IInsfrastructureService infranstructureService;
@EJB
private ICycleService cycleService;
public Cycle createCycle(Cycle cycle) {
try {
return cycleService.saveOrUpdateCycle(cycle);
} catch (ServiceException ex) {
Logger.getLogger(CycleResource.class.getName()).log(Level.SEVERE, null, ex);
return null;
}
}
public List<Cycle> getAllCycle() {
try {
return cycleService.getAllCycles();
} catch (ServiceException ex) {
Logger.getLogger(CycleResource.class.getName()).log(Level.SEVERE, null, ex);
return null;
}
}
public Cycle getCycle(long id) {
try {
return cycleService.findCycleById(id);
} catch (ServiceException ex) {
Logger.getLogger(CycleResource.class.getName()).log(Level.SEVERE, null, ex);
return null;
}
}
public Cycle updateCycle(long id, Cycle cycle) {
try {
Cycle c = cycleService.findCycleById(id);
if(c != null){
c.setNom(cycle.getNom());
return cycleService.saveOrUpdateCycle(c);
}
return null;
} catch (ServiceException ex) {
Logger.getLogger(CycleResource.class.getName()).log(Level.SEVERE, null, ex);
return null;
}
}
public void deleteCycle(long id) {
try {
cycleService.deleteCycle(id);
} catch (ServiceException ex) {
Logger.getLogger(CycleResource.class.getName()).log(Level.SEVERE, null, ex);
}
}
public IInsfrastructureService getInfranstructureService() {
return infranstructureService;
}
public void setInfranstructureService(IInsfrastructureService infranstructureService) {
this.infranstructureService = infranstructureService;
}
public ICycleService getCycleService() {
return cycleService;
}
public void setCycleService(ICycleService cycleService) {
this.cycleService = cycleService;
}
}
| royken/notes | src/main/java/com/douwe/notes/resource/impl/CycleResource.java | Java | apache-2.0 | 2,688 |
/*
* Copyright 2010 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.javascript.jscomp;
import com.google.common.base.Preconditions;
import com.google.common.collect.HashMultiset;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Multiset;
import com.google.common.collect.Sets;
import com.google.javascript.jscomp.CompilerOptions.AliasTransformation;
import com.google.javascript.jscomp.CompilerOptions.AliasTransformationHandler;
import com.google.javascript.jscomp.Scope.Var;
import com.google.javascript.rhino.IR;
import com.google.javascript.rhino.JSDocInfo;
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.SourcePosition;
import com.google.javascript.rhino.Token;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;
/**
* Process aliases in goog.scope blocks.
*
* goog.scope(function() {
* var dom = goog.dom;
* var DIV = dom.TagName.DIV;
*
* dom.createElement(DIV);
* });
*
* should become
*
* goog.dom.createElement(goog.dom.TagName.DIV);
*
* The advantage of using goog.scope is that the compiler will *guarantee*
* the anonymous function will be inlined, even if it can't prove
* that it's semantically correct to do so. For example, consider this case:
*
* goog.scope(function() {
* goog.getBar = function () { return alias; };
* ...
* var alias = foo.bar;
* })
*
* In theory, the compiler can't inline 'alias' unless it can prove that
* goog.getBar is called only after 'alias' is defined.
*
* In practice, the compiler will inline 'alias' anyway, at the risk of
* 'fixing' bad code.
*
* @author robbyw@google.com (Robby Walker)
*/
class ScopedAliases implements HotSwapCompilerPass {
/** Name used to denote an scoped function block used for aliasing. */
static final String SCOPING_METHOD_NAME = "goog.scope";
private final AbstractCompiler compiler;
private final PreprocessorSymbolTable preprocessorSymbolTable;
private final AliasTransformationHandler transformationHandler;
// Errors
static final DiagnosticType GOOG_SCOPE_USED_IMPROPERLY = DiagnosticType.error(
"JSC_GOOG_SCOPE_USED_IMPROPERLY",
"The call to goog.scope must be alone in a single statement.");
static final DiagnosticType GOOG_SCOPE_HAS_BAD_PARAMETERS =
DiagnosticType.error(
"JSC_GOOG_SCOPE_HAS_BAD_PARAMETERS",
"The call to goog.scope must take only a single parameter. It must" +
" be an anonymous function that itself takes no parameters.");
static final DiagnosticType GOOG_SCOPE_REFERENCES_THIS = DiagnosticType.error(
"JSC_GOOG_SCOPE_REFERENCES_THIS",
"The body of a goog.scope function cannot reference 'this'.");
static final DiagnosticType GOOG_SCOPE_USES_RETURN = DiagnosticType.error(
"JSC_GOOG_SCOPE_USES_RETURN",
"The body of a goog.scope function cannot use 'return'.");
static final DiagnosticType GOOG_SCOPE_USES_THROW = DiagnosticType.error(
"JSC_GOOG_SCOPE_USES_THROW",
"The body of a goog.scope function cannot use 'throw'.");
static final DiagnosticType GOOG_SCOPE_ALIAS_REDEFINED = DiagnosticType.error(
"JSC_GOOG_SCOPE_ALIAS_REDEFINED",
"The alias {0} is assigned a value more than once.");
static final DiagnosticType GOOG_SCOPE_ALIAS_CYCLE = DiagnosticType.error(
"JSC_GOOG_SCOPE_ALIAS_CYCLE",
"The aliases {0} has a cycle.");
static final DiagnosticType GOOG_SCOPE_NON_ALIAS_LOCAL = DiagnosticType.error(
"JSC_GOOG_SCOPE_NON_ALIAS_LOCAL",
"The local variable {0} is in a goog.scope and is not an alias.");
private Multiset<String> scopedAliasNames = HashMultiset.create();
ScopedAliases(AbstractCompiler compiler,
@Nullable PreprocessorSymbolTable preprocessorSymbolTable,
AliasTransformationHandler transformationHandler) {
this.compiler = compiler;
this.preprocessorSymbolTable = preprocessorSymbolTable;
this.transformationHandler = transformationHandler;
}
@Override
public void process(Node externs, Node root) {
hotSwapScript(root, null);
}
@Override
public void hotSwapScript(Node root, Node originalRoot) {
Traversal traversal = new Traversal();
NodeTraversal.traverse(compiler, root, traversal);
if (!traversal.hasErrors()) {
// Apply the aliases.
List<AliasUsage> aliasWorkQueue =
Lists.newArrayList(traversal.getAliasUsages());
while (!aliasWorkQueue.isEmpty()) {
List<AliasUsage> newQueue = Lists.newArrayList();
for (AliasUsage aliasUsage : aliasWorkQueue) {
if (aliasUsage.referencesOtherAlias()) {
newQueue.add(aliasUsage);
} else {
aliasUsage.applyAlias();
}
}
// Prevent an infinite loop.
if (newQueue.size() == aliasWorkQueue.size()) {
Var cycleVar = newQueue.get(0).aliasVar;
compiler.report(JSError.make(
cycleVar.getNode(), GOOG_SCOPE_ALIAS_CYCLE, cycleVar.getName()));
break;
} else {
aliasWorkQueue = newQueue;
}
}
// Remove the alias definitions.
for (Node aliasDefinition : traversal.getAliasDefinitionsInOrder()) {
if (aliasDefinition.getParent().isVar() &&
aliasDefinition.getParent().hasOneChild()) {
aliasDefinition.getParent().detachFromParent();
} else {
aliasDefinition.detachFromParent();
}
}
// Collapse the scopes.
for (Node scopeCall : traversal.getScopeCalls()) {
Node expressionWithScopeCall = scopeCall.getParent();
Node scopeClosureBlock = scopeCall.getLastChild().getLastChild();
scopeClosureBlock.detachFromParent();
expressionWithScopeCall.getParent().replaceChild(
expressionWithScopeCall,
scopeClosureBlock);
NodeUtil.tryMergeBlock(scopeClosureBlock);
}
if (traversal.getAliasUsages().size() > 0 ||
traversal.getAliasDefinitionsInOrder().size() > 0 ||
traversal.getScopeCalls().size() > 0) {
compiler.reportCodeChange();
}
}
}
private abstract class AliasUsage {
final Var aliasVar;
final Node aliasReference;
AliasUsage(Var aliasVar, Node aliasReference) {
this.aliasVar = aliasVar;
this.aliasReference = aliasReference;
}
/** Checks to see if this references another alias. */
public boolean referencesOtherAlias() {
Node aliasDefinition = aliasVar.getInitialValue();
Node root = NodeUtil.getRootOfQualifiedName(aliasDefinition);
Var otherAliasVar = aliasVar.getScope().getOwnSlot(root.getString());
return otherAliasVar != null;
}
public abstract void applyAlias();
}
private class AliasedNode extends AliasUsage {
AliasedNode(Var aliasVar, Node aliasReference) {
super(aliasVar, aliasReference);
}
@Override
public void applyAlias() {
Node aliasDefinition = aliasVar.getInitialValue();
aliasReference.getParent().replaceChild(
aliasReference, aliasDefinition.cloneTree());
}
}
private class AliasedTypeNode extends AliasUsage {
AliasedTypeNode(Var aliasVar, Node aliasReference) {
super(aliasVar, aliasReference);
}
@Override
public void applyAlias() {
Node aliasDefinition = aliasVar.getInitialValue();
String aliasName = aliasVar.getName();
String typeName = aliasReference.getString();
String aliasExpanded =
Preconditions.checkNotNull(aliasDefinition.getQualifiedName());
Preconditions.checkState(typeName.startsWith(aliasName));
aliasReference.setString(typeName.replaceFirst(aliasName, aliasExpanded));
}
}
private class Traversal implements NodeTraversal.ScopedCallback {
// The job of this class is to collect these three data sets.
// The order of this list determines the order that aliases are applied.
private final List<Node> aliasDefinitionsInOrder = Lists.newArrayList();
private final List<Node> scopeCalls = Lists.newArrayList();
private final List<AliasUsage> aliasUsages = Lists.newArrayList();
// This map is temporary and cleared for each scope.
private final Map<String, Var> aliases = Maps.newHashMap();
// Suppose you create an alias.
// var x = goog.x;
// As a side-effect, this means you can shadow the namespace 'goog'
// in inner scopes. When we inline the namespaces, we have to rename
// these shadows.
//
// Fortunately, we already have a name uniquifier that runs during tree
// normalization (before optimizations). We run it here on a limited
// set of variables, but only as a last resort (because this will screw
// up warning messages downstream).
private final Set<String> forbiddenLocals = Sets.newHashSet("$jscomp");
private boolean hasNamespaceShadows = false;
private boolean hasErrors = false;
private AliasTransformation transformation = null;
Collection<Node> getAliasDefinitionsInOrder() {
return aliasDefinitionsInOrder;
}
private List<AliasUsage> getAliasUsages() {
return aliasUsages;
}
List<Node> getScopeCalls() {
return scopeCalls;
}
boolean hasErrors() {
return hasErrors;
}
private boolean isCallToScopeMethod(Node n) {
return n.isCall() &&
SCOPING_METHOD_NAME.equals(n.getFirstChild().getQualifiedName());
}
@Override
public void enterScope(NodeTraversal t) {
Node n = t.getCurrentNode().getParent();
if (n != null && isCallToScopeMethod(n)) {
transformation = transformationHandler.logAliasTransformation(
n.getSourceFileName(), getSourceRegion(n));
findAliases(t);
}
}
@Override
public void exitScope(NodeTraversal t) {
if (t.getScopeDepth() > 2) {
findNamespaceShadows(t);
}
if (t.getScopeDepth() == 2) {
renameNamespaceShadows(t);
aliases.clear();
forbiddenLocals.clear();
transformation = null;
hasNamespaceShadows = false;
}
}
@Override
public final boolean shouldTraverse(NodeTraversal t, Node n, Node parent) {
if (n.isFunction() && t.inGlobalScope()) {
// Do not traverse in to functions except for goog.scope functions.
if (parent == null || !isCallToScopeMethod(parent)) {
return false;
}
}
return true;
}
private SourcePosition<AliasTransformation> getSourceRegion(Node n) {
Node testNode = n;
Node next = null;
for (; next != null || testNode.isScript();) {
next = testNode.getNext();
testNode = testNode.getParent();
}
int endLine = next == null ? Integer.MAX_VALUE : next.getLineno();
int endChar = next == null ? Integer.MAX_VALUE : next.getCharno();
SourcePosition<AliasTransformation> pos =
new SourcePosition<AliasTransformation>() {};
pos.setPositionInformation(
n.getLineno(), n.getCharno(), endLine, endChar);
return pos;
}
private void report(NodeTraversal t, Node n, DiagnosticType error,
String... arguments) {
compiler.report(t.makeError(n, error, arguments));
hasErrors = true;
}
private void findAliases(NodeTraversal t) {
Scope scope = t.getScope();
for (Var v : scope.getVarIterable()) {
Node n = v.getNode();
Node parent = n.getParent();
boolean isVar = parent.isVar();
boolean isFunctionDecl = NodeUtil.isFunctionDeclaration(parent);
if (isVar && n.getFirstChild() != null && n.getFirstChild().isQualifiedName()) {
recordAlias(v);
} else if (v.isBleedingFunction()) {
// Bleeding functions already get a BAD_PARAMETERS error, so just
// do nothing.
} else if (parent.getType() == Token.LP) {
// Parameters of the scope function also get a BAD_PARAMETERS
// error.
} else if (isVar || isFunctionDecl) {
boolean isHoisted = NodeUtil.isHoistedFunctionDeclaration(parent);
Node grandparent = parent.getParent();
Node value = v.getInitialValue() != null ?
v.getInitialValue() :
null;
Node varNode = null;
String name = n.getString();
int nameCount = scopedAliasNames.count(name);
scopedAliasNames.add(name);
String globalName =
"$jscomp.scope." + name + (nameCount == 0 ? "" : ("$" + nameCount));
compiler.ensureLibraryInjected("base");
// First, we need to free up the function expression (EXPR)
// to be used in another expression.
if (isFunctionDecl) {
// Replace "function NAME() { ... }" with "var NAME;".
Node existingName = v.getNameNode();
// We can't keep the local name on the function expression,
// because IE is buggy and will leak the name into the global
// scope. This is covered in more detail here:
// http://wiki.ecmascript.org/lib/exe/fetch.php?id=resources:resources&cache=cache&media=resources:jscriptdeviationsfromes3.pdf
//
// This will only cause problems if this is a hoisted, recursive
// function, and the programmer is using the hoisting.
Node newName = IR.name("").useSourceInfoFrom(existingName);
value.replaceChild(existingName, newName);
varNode = IR.var(existingName).useSourceInfoFrom(existingName);
grandparent.replaceChild(parent, varNode);
} else {
if (value != null) {
// If this is a VAR, we can just detach the expression and
// the tree will still be valid.
value.detachFromParent();
}
varNode = parent;
}
// Add $jscomp.scope.name = EXPR;
// Make sure we copy over all the jsdoc and debug info.
if (value != null || v.getJSDocInfo() != null) {
Node newDecl = NodeUtil.newQualifiedNameNodeDeclaration(
compiler.getCodingConvention(),
globalName,
value,
v.getJSDocInfo())
.useSourceInfoIfMissingFromForTree(n);
NodeUtil.setDebugInformation(
newDecl.getFirstChild().getFirstChild(), n, name);
if (isHoisted) {
grandparent.addChildToFront(newDecl);
} else {
grandparent.addChildBefore(newDecl, varNode);
}
}
// Rewrite "var name = EXPR;" to "var name = $jscomp.scope.name;"
v.getNameNode().addChildToFront(
NodeUtil.newQualifiedNameNode(
compiler.getCodingConvention(), globalName, n, name));
recordAlias(v);
} else {
// Do not other kinds of local symbols, like catch params.
report(t, n, GOOG_SCOPE_NON_ALIAS_LOCAL, n.getString());
}
}
}
private void recordAlias(Var aliasVar) {
String name = aliasVar.getName();
aliases.put(name, aliasVar);
String qualifiedName =
aliasVar.getInitialValue().getQualifiedName();
transformation.addAlias(name, qualifiedName);
int rootIndex = qualifiedName.indexOf(".");
if (rootIndex != -1) {
String qNameRoot = qualifiedName.substring(0, rootIndex);
if (!aliases.containsKey(qNameRoot)) {
forbiddenLocals.add(qNameRoot);
}
}
}
/** Find out if there are any local shadows of namespaces. */
private void findNamespaceShadows(NodeTraversal t) {
if (hasNamespaceShadows) {
return;
}
Scope scope = t.getScope();
for (Var v : scope.getVarIterable()) {
if (forbiddenLocals.contains(v.getName())) {
hasNamespaceShadows = true;
return;
}
}
}
/**
* Rename any local shadows of namespaces.
* This should be a very rare occurrence, so only do this traversal
* if we know that we need it.
*/
private void renameNamespaceShadows(NodeTraversal t) {
if (hasNamespaceShadows) {
MakeDeclaredNamesUnique.Renamer renamer =
new MakeDeclaredNamesUnique.WhitelistedRenamer(
new MakeDeclaredNamesUnique.ContextualRenamer(),
forbiddenLocals);
for (String s : forbiddenLocals) {
renamer.addDeclaredName(s);
}
MakeDeclaredNamesUnique uniquifier =
new MakeDeclaredNamesUnique(renamer);
NodeTraversal.traverse(compiler, t.getScopeRoot(), uniquifier);
}
}
private void validateScopeCall(NodeTraversal t, Node n, Node parent) {
if (preprocessorSymbolTable != null) {
preprocessorSymbolTable.addReference(n.getFirstChild());
}
if (!parent.isExprResult()) {
report(t, n, GOOG_SCOPE_USED_IMPROPERLY);
}
if (n.getChildCount() != 2) {
// The goog.scope call should have exactly 1 parameter. The first
// child is the "goog.scope" and the second should be the parameter.
report(t, n, GOOG_SCOPE_HAS_BAD_PARAMETERS);
} else {
Node anonymousFnNode = n.getChildAtIndex(1);
if (!anonymousFnNode.isFunction() ||
NodeUtil.getFunctionName(anonymousFnNode) != null ||
NodeUtil.getFunctionParameters(anonymousFnNode).hasChildren()) {
report(t, anonymousFnNode, GOOG_SCOPE_HAS_BAD_PARAMETERS);
} else {
scopeCalls.add(n);
}
}
}
@Override
public void visit(NodeTraversal t, Node n, Node parent) {
if (isCallToScopeMethod(n)) {
validateScopeCall(t, n, n.getParent());
}
if (t.getScopeDepth() < 2) {
return;
}
int type = n.getType();
Var aliasVar = null;
if (type == Token.NAME) {
String name = n.getString();
Var lexicalVar = t.getScope().getVar(n.getString());
if (lexicalVar != null && lexicalVar == aliases.get(name)) {
aliasVar = lexicalVar;
}
}
// Validate the top-level of the goog.scope block.
if (t.getScopeDepth() == 2) {
if (aliasVar != null && NodeUtil.isLValue(n)) {
if (aliasVar.getNode() == n) {
aliasDefinitionsInOrder.add(n);
// Return early, to ensure that we don't record a definition
// twice.
return;
} else {
report(t, n, GOOG_SCOPE_ALIAS_REDEFINED, n.getString());
}
}
if (type == Token.RETURN) {
report(t, n, GOOG_SCOPE_USES_RETURN);
} else if (type == Token.THIS) {
report(t, n, GOOG_SCOPE_REFERENCES_THIS);
} else if (type == Token.THROW) {
report(t, n, GOOG_SCOPE_USES_THROW);
}
}
// Validate all descendent scopes of the goog.scope block.
if (t.getScopeDepth() >= 2) {
// Check if this name points to an alias.
if (aliasVar != null) {
// Note, to support the transitive case, it's important we don't
// clone aliasedNode here. For example,
// var g = goog; var d = g.dom; d.createElement('DIV');
// The node in aliasedNode (which is "g") will be replaced in the
// changes pass above with "goog". If we cloned here, we'd end up
// with <code>g.dom.createElement('DIV')</code>.
aliasUsages.add(new AliasedNode(aliasVar, n));
}
JSDocInfo info = n.getJSDocInfo();
if (info != null) {
for (Node node : info.getTypeNodes()) {
fixTypeNode(node);
}
}
// TODO(robbyw): Error for goog.scope not at root.
}
}
private void fixTypeNode(Node typeNode) {
if (typeNode.isString()) {
String name = typeNode.getString();
int endIndex = name.indexOf('.');
if (endIndex == -1) {
endIndex = name.length();
}
String baseName = name.substring(0, endIndex);
Var aliasVar = aliases.get(baseName);
if (aliasVar != null) {
aliasUsages.add(new AliasedTypeNode(aliasVar, typeNode));
}
}
for (Node child = typeNode.getFirstChild(); child != null;
child = child.getNext()) {
fixTypeNode(child);
}
}
}
}
| jhiswin/idiil-closure-compiler | src/com/google/javascript/jscomp/ScopedAliases.java | Java | apache-2.0 | 21,121 |
package com.xinfan.msgbox.service.dao.dialect;
public class MysqlDialect extends Dialect {
@Override
public boolean supportsLimit() {
return true;
}
@Override
public boolean supportsLimitOffset() {
return true;
}
@Override
public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder) {
sql = sql.trim();
boolean isForUpdate = false;
if (sql.toLowerCase().endsWith(" for update")) {
sql = sql.substring(0, sql.length() - 11);
isForUpdate = true;
}
StringBuffer pagingSelect = new StringBuffer(sql.length() + 100);
pagingSelect.append("select * from ( ");
pagingSelect.append(sql);
int endInt = Integer.parseInt(offsetPlaceholder) + + + Integer.parseInt(limitPlaceholder);
pagingSelect.append(" ) _t limit " + offset + "," + endInt);
if (isForUpdate) {
pagingSelect.append(" for update");
}
return pagingSelect.toString();
}
public String getCountSql(String sql)
{
sql = sql.trim();
if (sql.toLowerCase().endsWith(" for update")) {
sql = sql.substring(0, sql.length() - 11);
}
StringBuffer countSelect = new StringBuffer(sql.length() + 100);
countSelect.append("select count(*) from ( ");
countSelect.append(sql);
countSelect.append(" ) _t ");
return countSelect.toString();
}
}
| xinfan123/blue-server | bulu-service/src/main/java/com/xinfan/msgbox/service/dao/dialect/MysqlDialect.java | Java | apache-2.0 | 1,374 |
package uk.ac.ebi.embl.api.validation.fixer.entry;
import uk.ac.ebi.embl.api.entry.Entry;
import uk.ac.ebi.embl.api.entry.Text;
import uk.ac.ebi.embl.api.entry.feature.Feature;
import uk.ac.ebi.embl.api.entry.qualifier.Qualifier;
import uk.ac.ebi.embl.api.entry.reference.Person;
import uk.ac.ebi.embl.api.entry.reference.Reference;
import uk.ac.ebi.embl.api.validation.Severity;
import uk.ac.ebi.embl.api.validation.ValidationResult;
import uk.ac.ebi.embl.api.validation.ValidationScope;
import uk.ac.ebi.embl.api.validation.annotation.Description;
import uk.ac.ebi.embl.api.validation.annotation.ExcludeScope;
import uk.ac.ebi.embl.api.validation.check.entry.EntryValidationCheck;
import uk.ac.ebi.embl.api.validation.helper.Utils;
/**
* Fix works for certain non-ascii characters only. Check Utils.removeAccents limitations.
* If it is not possible to transliterate certain chars, it will be caught in and rejected
* by AsciiCharacterCheck.
*/
@Description("Non-ascii characters fixed from \"{0}\" to \"{1}\".")
@ExcludeScope(validationScope = {ValidationScope.NCBI, ValidationScope.NCBI_MASTER})
public class NonAsciiCharacterFix extends EntryValidationCheck {
private static final String ASCII_CHARACTER_FIX = "AsciiCharacterFix_1";
public ValidationResult check(Entry entry) {
result = new ValidationResult();
if (entry == null)
return result;
attemptFix(entry.getComment());
attemptFix(entry.getDescription());
for (Reference reference : entry.getReferences()) {
if (reference.getPublication() != null) {
String pubTitle = reference.getPublication().getTitle();
if (pubTitle != null) {
String fixedPubTitle = fixedStr(pubTitle);
if (!fixedPubTitle.equals(pubTitle)) {
reference.getPublication().setTitle(fixedPubTitle);
reportMessage(Severity.FIX, reference.getOrigin(), ASCII_CHARACTER_FIX, pubTitle, fixedPubTitle);
}
}
if (reference.getPublication().getAuthors() != null) {
for (Person author : reference.getPublication().getAuthors()) {
String firstName = author.getFirstName();
if (firstName != null) {
String fixedFirstName = fixedStr(firstName);
if (!fixedFirstName.equals(firstName)) {
author.setFirstName(fixedFirstName);
reportMessage(Severity.FIX, reference.getOrigin(), ASCII_CHARACTER_FIX, firstName, fixedFirstName);
}
}
String surname = author.getSurname();
if (surname != null) {
String fixedSurname = fixedStr(surname);
if (!fixedSurname.equals(surname)) {
author.setSurname(fixedSurname);
reportMessage(Severity.FIX, reference.getOrigin(), ASCII_CHARACTER_FIX, surname, fixedSurname);
}
}
}
}
}
}
for (Feature feature : entry.getFeatures()) {
for (Qualifier qualifier : feature.getQualifiers()) {
if (qualifier.getName().equals(Qualifier.COUNTRY_QUALIFIER_NAME)
|| qualifier.getName().equals(Qualifier.ISOLATE_QUALIFIER_NAME) ) {
String qualifierValue = qualifier.getValue();
if (qualifierValue != null) {
String fixedVal = fixedStr(qualifierValue);
if (!fixedVal.equals(qualifierValue)) {
qualifier.setValue(fixedVal);
reportMessage(Severity.FIX, qualifier.getOrigin(), ASCII_CHARACTER_FIX, qualifierValue, fixedVal);
}
}
}
}
}
return result;
}
private void attemptFix(Text text) {
if (text != null && text.getText() != null) {
if (Utils.hasNonAscii(text.getText())) {
String fixed = Utils.removeAccents(text.getText());
if (!fixed.equals(text.getText())) {
text.setText(fixed);
reportMessage(Severity.FIX, text.getOrigin(), ASCII_CHARACTER_FIX, text.getText(), fixed);
}
}
}
}
private String fixedStr(String str) {
if (Utils.hasNonAscii(str)) {
return Utils.removeAccents(str);
}
return str;
}
}
| enasequence/sequencetools | src/main/java/uk/ac/ebi/embl/api/validation/fixer/entry/NonAsciiCharacterFix.java | Java | apache-2.0 | 4,774 |
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example.android.sunshine.app;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.AsyncTask;
import android.text.format.Time;
import android.util.Log;
import com.example.android.sunshine.app.data.WeatherContract;
import com.example.android.sunshine.app.data.WeatherContract.WeatherEntry;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Vector;
public class FetchWeatherTask extends AsyncTask<String, Void, Void>
{
private final String LOG_TAG = FetchWeatherTask.class.getSimpleName();
private final Context mContext;
public FetchWeatherTask (Context context)
{
mContext = context;
}
private boolean DEBUG = true;
/**
* Helper method to handle insertion of a new location in the weather database.
*
* @param locationSetting The location string used to request updates from the server.
* @param cityName A human-readable city name, e.g "Mountain View"
* @param lat the latitude of the city
* @param lon the longitude of the city
* @return the row ID of the added location.
*/
long addLocation (String locationSetting, String cityName, double lat, double lon)
{
long locationId;
// First, check if the location with this city name exists in the db
Cursor locationCursor = mContext.getContentResolver().query(
WeatherContract.LocationEntry.CONTENT_URI,
new String[] {WeatherContract.LocationEntry._ID},
WeatherContract.LocationEntry.COLUMN_LOCATION_SETTING + " = ?",
new String[] {locationSetting},
null);
if (locationCursor.moveToFirst())
{
int locationIdIndex = locationCursor.getColumnIndex(WeatherContract.LocationEntry._ID);
locationId = locationCursor.getLong(locationIdIndex);
}
else
{
// Now that the content provider is set up, inserting rows of data is pretty simple.
// First create a ContentValues object to hold the data you want to insert.
ContentValues locationValues = new ContentValues();
// Then add the data, along with the corresponding name of the data type,
// so the content provider knows what kind of value is being inserted.
locationValues.put(WeatherContract.LocationEntry.COLUMN_CITY_NAME, cityName);
locationValues.put(WeatherContract.LocationEntry.COLUMN_LOCATION_SETTING, locationSetting);
locationValues.put(WeatherContract.LocationEntry.COLUMN_COORD_LAT, lat);
locationValues.put(WeatherContract.LocationEntry.COLUMN_COORD_LONG, lon);
// Finally, insert location data into the database.
Uri insertedUri = mContext.getContentResolver().insert(
WeatherContract.LocationEntry.CONTENT_URI,
locationValues
);
// The resulting URI contains the ID for the row. Extract the locationId from the Uri.
locationId = ContentUris.parseId(insertedUri);
}
locationCursor.close();
// Wait, that worked? Yes!
return locationId;
}
/**
* Take the String representing the complete forecast in JSON Format and
* pull out the data we need to construct the Strings needed for the wireframes.
* <p>
* Fortunately parsing is easy: constructor takes the JSON string and converts it
* into an Object hierarchy for us.
*/
private void getWeatherDataFromJson (String forecastJsonStr, String locationSetting) throws JSONException
{
// Now we have a String representing the complete forecast in JSON Format.
// Fortunately parsing is easy: constructor takes the JSON string and converts it
// into an Object hierarchy for us.
// These are the names of the JSON objects that need to be extracted.
// Location information
final String OWM_CITY = "city";
final String OWM_CITY_NAME = "name";
final String OWM_COORD = "coord";
// Location coordinate
final String OWM_LATITUDE = "lat";
final String OWM_LONGITUDE = "lon";
// Weather information. Each day's forecast info is an element of the "list" array.
final String OWM_LIST = "list";
final String OWM_PRESSURE = "pressure";
final String OWM_HUMIDITY = "humidity";
final String OWM_WINDSPEED = "speed";
final String OWM_WIND_DIRECTION = "deg";
// All temperatures are children of the "temp" object.
final String OWM_TEMPERATURE = "temp";
final String OWM_MAX = "max";
final String OWM_MIN = "min";
final String OWM_WEATHER = "weather";
final String OWM_DESCRIPTION = "main";
final String OWM_WEATHER_ID = "id";
try
{
JSONObject forecastJson = new JSONObject(forecastJsonStr);
JSONArray weatherArray = forecastJson.getJSONArray(OWM_LIST);
JSONObject cityJson = forecastJson.getJSONObject(OWM_CITY);
String cityName = cityJson.getString(OWM_CITY_NAME);
JSONObject cityCoord = cityJson.getJSONObject(OWM_COORD);
double cityLatitude = cityCoord.getDouble(OWM_LATITUDE);
double cityLongitude = cityCoord.getDouble(OWM_LONGITUDE);
long locationId = addLocation(locationSetting, cityName, cityLatitude, cityLongitude);
// Insert the new weather information into the database
Vector<ContentValues> cVVector = new Vector<>(weatherArray.length());
// OWM returns daily forecasts based upon the local time of the city that is being
// asked for, which means that we need to know the GMT offset to translate this data
// properly.
// Since this data is also sent in-order and the first day is always the
// current day, we're going to take advantage of that to get a nice
// normalized UTC date for all of our weather.
Time dayTime = new Time();
dayTime.setToNow();
// we start at the day returned by local time. Otherwise this is a mess.
int julianStartDay = Time.getJulianDay(System.currentTimeMillis(), dayTime.gmtoff);
// now we work exclusively in UTC
dayTime = new Time();
for (int i = 0; i < weatherArray.length(); i++)
{
// These are the values that will be collected.
long dateTime;
double pressure;
int humidity;
double windSpeed;
double windDirection;
double high;
double low;
String description;
int weatherId;
// Get the JSON object representing the day
JSONObject dayForecast = weatherArray.getJSONObject(i);
// Cheating to convert this to UTC time, which is what we want anyhow
dateTime = dayTime.setJulianDay(julianStartDay + i);
pressure = dayForecast.getDouble(OWM_PRESSURE);
humidity = dayForecast.getInt(OWM_HUMIDITY);
windSpeed = dayForecast.getDouble(OWM_WINDSPEED);
windDirection = dayForecast.getDouble(OWM_WIND_DIRECTION);
// Description is in a child array called "weather", which is 1 element long.
// That element also contains a weather code.
JSONObject weatherObject = dayForecast.getJSONArray(OWM_WEATHER).getJSONObject(0);
description = weatherObject.getString(OWM_DESCRIPTION);
weatherId = weatherObject.getInt(OWM_WEATHER_ID);
// Temperatures are in a child object called "temp". Try not to name variables
// "temp" when working with temperature. It confuses everybody.
JSONObject temperatureObject = dayForecast.getJSONObject(OWM_TEMPERATURE);
high = temperatureObject.getDouble(OWM_MAX);
low = temperatureObject.getDouble(OWM_MIN);
ContentValues weatherValues = new ContentValues();
weatherValues.put(WeatherEntry.COLUMN_LOC_KEY, locationId);
weatherValues.put(WeatherEntry.COLUMN_DATE, dateTime);
weatherValues.put(WeatherEntry.COLUMN_HUMIDITY, humidity);
weatherValues.put(WeatherEntry.COLUMN_PRESSURE, pressure);
weatherValues.put(WeatherEntry.COLUMN_WIND_SPEED, windSpeed);
weatherValues.put(WeatherEntry.COLUMN_DEGREES, windDirection);
weatherValues.put(WeatherEntry.COLUMN_MAX_TEMP, high);
weatherValues.put(WeatherEntry.COLUMN_MIN_TEMP, low);
weatherValues.put(WeatherEntry.COLUMN_SHORT_DESC, description);
weatherValues.put(WeatherEntry.COLUMN_WEATHER_ID, weatherId);
cVVector.add(weatherValues);
}
int inserted = 0;
// add to database
if (cVVector.size() > 0)
{
ContentValues[] cvArray = new ContentValues[cVVector.size()];
cVVector.toArray(cvArray);
inserted = mContext.getContentResolver().bulkInsert(WeatherEntry.CONTENT_URI, cvArray);
}
Log.d(LOG_TAG, "FetchWeatherTask Complete. " + inserted + " Inserted");
}
catch (JSONException e)
{
Log.e(LOG_TAG, e.getMessage(), e);
e.printStackTrace();
}
}
@Override
protected Void doInBackground (String... params)
{
// If there's no zip code, there's nothing to look up. Verify size of params.
if (params.length == 0)
{
return null;
}
String locationQuery = params[0];
// These two need to be declared outside the try/catch
// so that they can be closed in the finally block.
HttpURLConnection urlConnection = null;
BufferedReader reader = null;
// Will contain the raw JSON response as a string.
String forecastJsonStr = null;
String format = "json";
String units = "metric";
int numDays = 14;
try
{
// Construct the URL for the OpenWeatherMap query
// Possible parameters are avaiable at OWM's forecast API page, at
// http://openweathermap.org/API#forecast
final String FORECAST_BASE_URL = "http://api.openweathermap.org/data/2.5/forecast/daily?";
final String ZIP_CODE_PARAM = "zip";
final String FORMAT_PARAM = "mode";
final String UNITS_PARAM = "units";
final String DAYS_PARAM = "cnt";
final String APP_ID_PARAM = "appid";
Uri builtUri = Uri.parse(FORECAST_BASE_URL).buildUpon()
.appendQueryParameter(APP_ID_PARAM, BuildConfig.OPEN_WEATHER_MAP_API_KEY)
.appendQueryParameter(ZIP_CODE_PARAM, params[0])
.appendQueryParameter(FORMAT_PARAM, format)
.appendQueryParameter(UNITS_PARAM, units)
.appendQueryParameter(DAYS_PARAM, Integer.toString(numDays))
.build();
URL url = new URL(builtUri.toString());
// Create the request to OpenWeatherMap, and open the connection
urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setRequestMethod("GET");
urlConnection.connect();
// Read the input stream into a String
InputStream inputStream = urlConnection.getInputStream();
StringBuffer buffer = new StringBuffer();
if (inputStream == null)
{
// Nothing to do.
return null;
}
reader = new BufferedReader(new InputStreamReader(inputStream));
String line;
while ((line = reader.readLine()) != null)
{
// Since it's JSON, adding a newline isn't necessary (it won't affect parsing)
// But it does make debugging a *lot* easier if you print out the completed
// buffer for debugging.
buffer.append(line + "\n");
}
if (buffer.length() == 0)
{
// Stream was empty. No point in parsing.
return null;
}
forecastJsonStr = buffer.toString();
getWeatherDataFromJson(forecastJsonStr, locationQuery);
}
catch (IOException e)
{
Log.e(LOG_TAG, "Error ", e);
// If the code didn't successfully get the weather data, there's no point in attemping
// to parse it.
return null;
}
catch (JSONException e)
{
Log.e(LOG_TAG, e.getMessage(), e);
e.printStackTrace();
}
finally
{
if (urlConnection != null)
{
urlConnection.disconnect();
}
if (reader != null)
{
try
{
reader.close();
}
catch (final IOException e)
{
Log.e(LOG_TAG, "Error closing stream", e);
}
}
}
return null;
}
}
| denis-evteev/udacity-android-sunshine-app | app/src/main/java/com/example/android/sunshine/app/FetchWeatherTask.java | Java | apache-2.0 | 12,246 |
package org.gsonformat.intellij.process;
import com.intellij.psi.*;
import org.apache.http.util.TextUtils;
import org.gsonformat.intellij.config.Config;
import org.gsonformat.intellij.config.Constant;
import org.gsonformat.intellij.entity.FieldEntity;
import org.gsonformat.intellij.entity.ClassEntity;
import java.util.regex.Pattern;
/**
* Created by dim on 16/11/7.
*/
class AutoValueProcessor extends Processor {
@Override
public void onStarProcess(ClassEntity classEntity, PsiElementFactory factory, PsiClass cls,IProcessor visitor) {
super.onStarProcess(classEntity, factory, cls, visitor);
injectAutoAnnotation(factory, cls);
}
private void injectAutoAnnotation(PsiElementFactory factory, PsiClass cls) {
PsiModifierList modifierList = cls.getModifierList();
PsiElement firstChild = modifierList.getFirstChild();
Pattern pattern = Pattern.compile("@.*?AutoValue");
if (firstChild != null && !pattern.matcher(firstChild.getText()).find()) {
PsiAnnotation annotationFromText = factory.createAnnotationFromText("@com.google.auto.value.AutoValue", cls);
modifierList.addBefore(annotationFromText, firstChild);
}
if (!modifierList.hasModifierProperty(PsiModifier.ABSTRACT)) {
modifierList.setModifierProperty(PsiModifier.ABSTRACT, true);
}
}
@Override
public void generateField(PsiElementFactory factory, FieldEntity fieldEntity, PsiClass cls, ClassEntity classEntity) {
if (fieldEntity.isGenerate()) {
StringBuilder fieldSb = new StringBuilder();
String filedName = fieldEntity.getGenerateFieldName();
if (!TextUtils.isEmpty(classEntity.getExtra())) {
fieldSb.append(classEntity.getExtra()).append("\n");
classEntity.setExtra(null);
}
if (fieldEntity.getTargetClass() != null) {
fieldEntity.getTargetClass().setGenerate(true);
}
fieldSb.append(String.format("public abstract %s %s() ; ", fieldEntity.getFullNameType(), filedName));
cls.add(factory.createMethodFromText(fieldSb.toString(), cls));
}
}
@Override
public void generateGetterAndSetter(PsiElementFactory factory, PsiClass cls, ClassEntity classEntity) {
}
@Override
public void generateConvertMethod(PsiElementFactory factory, PsiClass cls, ClassEntity classEntity) {
super.generateConvertMethod(factory, cls, classEntity);
createMethod(factory, Constant.autoValueMethodTemplate.replace("$className$", cls.getName()).trim(), cls);
}
@Override
protected void onEndGenerateClass(PsiElementFactory factory, ClassEntity classEntity, PsiClass parentClass, PsiClass generateClass, IProcessor visitor) {
super.onEndGenerateClass(factory, classEntity, parentClass, generateClass, visitor);
injectAutoAnnotation(factory, generateClass);
}
}
| gengjiawen/GsonFormat | src/main/java/org/gsonformat/intellij/process/AutoValueProcessor.java | Java | apache-2.0 | 2,976 |
/* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory
This file is part of HermiT.
HermiT is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
HermiT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with HermiT. If not, see <http://www.gnu.org/licenses/>.
*/
package org.semanticweb.HermiT.datatypes.owlreal;
public final class PlusInfinity extends Number {
private static final long serialVersionUID = -205551124673073593L;
public static final PlusInfinity INSTANCE = new PlusInfinity();
private PlusInfinity() {
}
public boolean equals(Object that) {
return this == that;
}
public String toString() {
return "+INF";
}
public double doubleValue() {
throw new UnsupportedOperationException();
}
public float floatValue() {
throw new UnsupportedOperationException();
}
public int intValue() {
throw new UnsupportedOperationException();
}
public long longValue() {
throw new UnsupportedOperationException();
}
protected Object readResolve() {
return INSTANCE;
}
}
| CPoirot3/OWL-Reasoner | project/src/org/semanticweb/HermiT/datatypes/owlreal/PlusInfinity.java | Java | apache-2.0 | 1,607 |
/*
* Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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 com.amazonaws.services.mturk.model.transform;
import java.math.*;
import javax.annotation.Generated;
import com.amazonaws.services.mturk.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;
import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;
/**
* HITLayoutParameter JSON Unmarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class HITLayoutParameterJsonUnmarshaller implements Unmarshaller<HITLayoutParameter, JsonUnmarshallerContext> {
public HITLayoutParameter unmarshall(JsonUnmarshallerContext context) throws Exception {
HITLayoutParameter hITLayoutParameter = new HITLayoutParameter();
int originalDepth = context.getCurrentDepth();
String currentParentElement = context.getCurrentParentElement();
int targetDepth = originalDepth + 1;
JsonToken token = context.getCurrentToken();
if (token == null)
token = context.nextToken();
if (token == VALUE_NULL) {
return null;
}
while (true) {
if (token == null)
break;
if (token == FIELD_NAME || token == START_OBJECT) {
if (context.testExpression("Name", targetDepth)) {
context.nextToken();
hITLayoutParameter.setName(context.getUnmarshaller(String.class).unmarshall(context));
}
if (context.testExpression("Value", targetDepth)) {
context.nextToken();
hITLayoutParameter.setValue(context.getUnmarshaller(String.class).unmarshall(context));
}
} else if (token == END_ARRAY || token == END_OBJECT) {
if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {
if (context.getCurrentDepth() <= originalDepth)
break;
}
}
token = context.nextToken();
}
return hITLayoutParameter;
}
private static HITLayoutParameterJsonUnmarshaller instance;
public static HITLayoutParameterJsonUnmarshaller getInstance() {
if (instance == null)
instance = new HITLayoutParameterJsonUnmarshaller();
return instance;
}
}
| dagnir/aws-sdk-java | aws-java-sdk-mechanicalturkrequester/src/main/java/com/amazonaws/services/mturk/model/transform/HITLayoutParameterJsonUnmarshaller.java | Java | apache-2.0 | 2,995 |
package com.nhpatt.myconference.entities;
import com.google.gson.JsonArray;
/**
* @author Javier Gamarra
*/
public class TalkEvent {
private final JsonArray talks;
public TalkEvent(JsonArray talks) {
this.talks = talks;
}
public JsonArray getTalks() {
return talks;
}
}
| nhpatt/MyConference | app/src/main/java/com/nhpatt/myconference/entities/TalkEvent.java | Java | apache-2.0 | 312 |
/*
* Copyright (C) 2009-2015 Dell, Inc.
* See annotations for authorship information
*
* ====================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
package org.dasein.cloud.aws.identity;
import org.dasein.cloud.AbstractCapabilities;
import org.dasein.cloud.CloudException;
import org.dasein.cloud.InternalException;
import org.dasein.cloud.aws.AWSCloud;
import org.dasein.cloud.identity.IdentityAndAccessCapabilities;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.Locale;
/**
* Created by stas on 18/06/15.
*/
public class IAMCapabilities extends AbstractCapabilities<AWSCloud> implements IdentityAndAccessCapabilities {
public IAMCapabilities(AWSCloud provider) {
super(provider);
}
@Override
public boolean supportsAccessControls() throws CloudException, InternalException {
return true;
}
@Override
public boolean supportsConsoleAccess() throws CloudException, InternalException {
return true;
}
@Override
public boolean supportsAPIAccess() throws CloudException, InternalException {
return true;
}
@Nullable
@Override
public String getConsoleUrl() throws CloudException, InternalException {
return String.format("https://%s.signin.aws.amazon.com/console", getContext().getAccountNumber());
}
@Nonnull
@Override
public String getProviderTermForUser(Locale locale) {
return "user";
}
@Nonnull
@Override
public String getProviderTermForGroup(@Nonnull Locale locale) {
return "group";
}
}
| maksimov/dasein-cloud-aws-old | src/main/java/org/dasein/cloud/aws/identity/IAMCapabilities.java | Java | apache-2.0 | 2,228 |
/*
* 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.ignite.internal.processors.cache;
import java.util.Collection;
import java.util.UUID;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtFuture;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLocalPartition;
import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateRequest;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemandMessage;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPreloaderAssignments;
import org.apache.ignite.internal.util.future.GridFinishedFuture;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
import org.apache.ignite.lang.IgnitePredicate;
import org.jetbrains.annotations.Nullable;
/**
* Adapter for preloading which always assumes that preloading finished.
*/
public class GridCachePreloaderAdapter implements GridCachePreloader {
/** */
protected final CacheGroupContext grp;
/** */
protected final GridCacheSharedContext ctx;
/** Logger. */
protected final IgniteLogger log;
/** Start future (always completed by default). */
private final IgniteInternalFuture finFut;
/** Preload predicate. */
protected IgnitePredicate<GridCacheEntryInfo> preloadPred;
/**
* @param grp Cache group.
*/
public GridCachePreloaderAdapter(CacheGroupContext grp) {
assert grp != null;
this.grp = grp;
ctx = grp.shared();
log = ctx.logger(getClass());
finFut = new GridFinishedFuture();
}
/** {@inheritDoc} */
@Override public void start() throws IgniteCheckedException {
// No-op.
}
/** {@inheritDoc} */
@Override public void onKernalStop() {
// No-op.
}
/** {@inheritDoc} */
@Override public IgniteInternalFuture<Boolean> forceRebalance() {
return new GridFinishedFuture<>(true);
}
/** {@inheritDoc} */
@Override public boolean needForceKeys() {
return false;
}
/** {@inheritDoc} */
@Override public void onReconnected() {
// No-op.
}
/** {@inheritDoc} */
@Override public void preloadPredicate(IgnitePredicate<GridCacheEntryInfo> preloadPred) {
this.preloadPred = preloadPred;
}
/** {@inheritDoc} */
@Override public IgnitePredicate<GridCacheEntryInfo> preloadPredicate() {
return preloadPred;
}
/** {@inheritDoc} */
@Override public IgniteInternalFuture<Object> startFuture() {
return finFut;
}
/** {@inheritDoc} */
@Override public IgniteInternalFuture<?> syncFuture() {
return finFut;
}
/** {@inheritDoc} */
@Override public IgniteInternalFuture<Boolean> rebalanceFuture() {
return finFut;
}
/** {@inheritDoc} */
@Override public void unwindUndeploys() {
grp.unwindUndeploys();
}
/** {@inheritDoc} */
@Override public void handleSupplyMessage(int idx, UUID id, GridDhtPartitionSupplyMessage s) {
// No-op.
}
/** {@inheritDoc} */
@Override public void handleDemandMessage(int idx, UUID id, GridDhtPartitionDemandMessage d) {
// No-op.
}
/** {@inheritDoc} */
@Override public GridDhtFuture<Object> request(GridCacheContext ctx, Collection<KeyCacheObject> keys,
AffinityTopologyVersion topVer) {
return null;
}
/** {@inheritDoc} */
@Override public GridDhtFuture<Object> request(GridCacheContext ctx, GridNearAtomicAbstractUpdateRequest req,
AffinityTopologyVersion topVer) {
return null;
}
/** {@inheritDoc} */
@Override public void onInitialExchangeComplete(@Nullable Throwable err) {
// No-op.
}
/** {@inheritDoc} */
@Override public GridDhtPreloaderAssignments assign(GridDhtPartitionsExchangeFuture exchFut) {
return null;
}
/** {@inheritDoc} */
@Override public Runnable addAssignments(GridDhtPreloaderAssignments assignments,
boolean forcePreload,
int cnt,
Runnable next,
@Nullable GridFutureAdapter<Boolean> forcedRebFut) {
return null;
}
/** {@inheritDoc} */
@Override public void evictPartitionAsync(GridDhtLocalPartition part) {
// No-op.
}
/** {@inheritDoc} */
@Override public void onTopologyChanged(GridDhtPartitionsExchangeFuture lastFut) {
// No-op.
}
/** {@inheritDoc} */
@Override public void dumpDebugInfo() {
// No-op.
}
}
| a1vanov/ignite | modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloaderAdapter.java | Java | apache-2.0 | 5,818 |
/*
* Copyright © 2009 HotPads (admin@hotpads.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.datarouter.virtualnode.replication;
import java.util.Optional;
import io.datarouter.storage.node.tableconfig.NodewatchConfigurationBuilder;
public class ReplicationNodeOptions{
public final Optional<String> tableName;
public final Optional<Integer> everyNToPrimary;
public final Optional<Boolean> disableForcePrimary;
public final Optional<Boolean> disableIntroducer;
public final Optional<NodewatchConfigurationBuilder> nodewatchConfigurationBuilder;
private ReplicationNodeOptions(
Optional<String> tableName,
Optional<Integer> everyNToPrimary,
Optional<Boolean> disableForcePrimary,
Optional<Boolean> disableIntroducer,
Optional<NodewatchConfigurationBuilder> nodewatchConfigurationBuilder){
this.tableName = tableName;
this.everyNToPrimary = everyNToPrimary;
this.disableForcePrimary = disableForcePrimary;
this.disableIntroducer = disableIntroducer;
this.nodewatchConfigurationBuilder = nodewatchConfigurationBuilder;
}
public static class ReplicationNodeOptionsBuilder{
public Optional<String> tableName = Optional.empty();
public Optional<Integer> everyNToPrimary = Optional.empty();
public Optional<Boolean> disableForcePrimary = Optional.empty();
public Optional<Boolean> disableIntroducer = Optional.empty();
public Optional<NodewatchConfigurationBuilder> nodewatchConfigurationBuilder = Optional.empty();
public ReplicationNodeOptionsBuilder withTableName(String tableName){
this.tableName = Optional.of(tableName);
return this;
}
public ReplicationNodeOptionsBuilder withEveryNToPrimary(Integer everyNToPrimary){
this.everyNToPrimary = Optional.of(everyNToPrimary);
return this;
}
public ReplicationNodeOptionsBuilder withDisableForcePrimary(boolean disableForcePrimary){
this.disableForcePrimary = Optional.of(disableForcePrimary);
return this;
}
public ReplicationNodeOptionsBuilder withDisableIntroducer(boolean disableIntroducer){
this.disableIntroducer = Optional.of(disableIntroducer);
return this;
}
public ReplicationNodeOptionsBuilder withNodewatchConfigurationBuilder(
NodewatchConfigurationBuilder nodewatchConfigurationBuilder){
this.nodewatchConfigurationBuilder = Optional.of(nodewatchConfigurationBuilder);
return this;
}
public ReplicationNodeOptions build(){
return new ReplicationNodeOptions(
tableName,
everyNToPrimary,
disableForcePrimary,
disableIntroducer,
nodewatchConfigurationBuilder);
}
}
} | hotpads/datarouter | datarouter-virtual-node/src/main/java/io/datarouter/virtualnode/replication/ReplicationNodeOptions.java | Java | apache-2.0 | 3,098 |
package fr.javatronic.blog.massive.annotation1;
import fr.javatronic.blog.processor.Annotation_001;
@Annotation_001
public class Class_175 {
}
| lesaint/experimenting-annotation-processing | experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/Class_175.java | Java | apache-2.0 | 145 |
/*-
* -\-\-
* docker-client
* --
* Copyright (C) 2016 Spotify AB
* --
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* -/-/-
*/
package com.spotify.docker.client.messages;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.ANY;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
import java.util.List;
@AutoValue
@JsonAutoDetect(fieldVisibility = ANY, getterVisibility = NONE, setterVisibility = NONE)
public abstract class CpuStats {
@JsonProperty("cpu_usage")
public abstract CpuUsage cpuUsage();
@JsonProperty("system_cpu_usage")
public abstract Long systemCpuUsage();
@JsonProperty("throttling_data")
public abstract ThrottlingData throttlingData();
@JsonCreator
static CpuStats create(
@JsonProperty("cpu_usage") final CpuUsage cpuUsage,
@JsonProperty("system_cpu_usage") final Long systemCpuUsage,
@JsonProperty("throttling_data") final ThrottlingData throttlingData) {
return new AutoValue_CpuStats(cpuUsage, systemCpuUsage, throttlingData);
}
@AutoValue
public abstract static class CpuUsage {
@JsonProperty("total_usage")
public abstract Long totalUsage();
@JsonProperty("percpu_usage")
public abstract ImmutableList<Long> percpuUsage();
@JsonProperty("usage_in_kernelmode")
public abstract Long usageInKernelmode();
@JsonProperty("usage_in_usermode")
public abstract Long usageInUsermode();
@JsonCreator
static CpuUsage create(
@JsonProperty("total_usage") final Long totalUsage,
@JsonProperty("percpu_usage") final List<Long> perCpuUsage,
@JsonProperty("usage_in_kernelmode") final Long usageInKernelmode,
@JsonProperty("usage_in_usermode") final Long usageInUsermode) {
return new AutoValue_CpuStats_CpuUsage(totalUsage, ImmutableList.copyOf(perCpuUsage),
usageInKernelmode, usageInUsermode);
}
}
@AutoValue
public abstract static class ThrottlingData {
@JsonProperty("periods")
public abstract Long periods();
@JsonProperty("throttled_periods")
public abstract Long throttledPeriods();
@JsonProperty("throttled_time")
public abstract Long throttledTime();
@JsonCreator
static ThrottlingData create(
@JsonProperty("periods") final Long periods,
@JsonProperty("throttled_periods") final Long throttledPeriods,
@JsonProperty("throttled_time") final Long throttledTime) {
return new AutoValue_CpuStats_ThrottlingData(periods, throttledPeriods, throttledTime);
}
}
}
| MarcoLotz/docker-client | src/main/java/com/spotify/docker/client/messages/CpuStats.java | Java | apache-2.0 | 3,323 |
package io.sensesecure.hadoop.xz;
import java.io.BufferedInputStream;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
import org.apache.hadoop.io.SequenceFile;
import org.apache.hadoop.io.compress.CompressionInputStream;
import org.tukaani.xz.XZInputStream;
/**
*
* @author yongtang
*/
public class XZCompressionInputStream extends CompressionInputStream {
private BufferedInputStream bufferedIn;
private XZInputStream xzIn;
private boolean resetStateNeeded;
public XZCompressionInputStream(InputStream in) throws IOException {
super(in);
resetStateNeeded = false;
bufferedIn = new BufferedInputStream(super.in);
}
@Override
public int read(byte[] b, int off, int len) throws IOException {
if (resetStateNeeded) {
resetStateNeeded = false;
bufferedIn = new BufferedInputStream(super.in);
xzIn = null;
}
return getInputStream().read(b, off, len);
}
@Override
public void resetState() throws IOException {
resetStateNeeded = true;
}
@Override
public int read() throws IOException {
byte b[] = new byte[1];
int result = this.read(b, 0, 1);
return (result < 0) ? result : (b[0] & 0xff);
}
@Override
public void close() throws IOException {
if (!resetStateNeeded) {
if (xzIn != null) {
xzIn.close();
xzIn = null;
}
resetStateNeeded = true;
}
}
/**
* This compression stream ({@link #xzIn}) is initialized lazily, in case
* the data is not available at the time of initialization. This is
* necessary for the codec to be used in a {@link SequenceFile.Reader}, as
* it constructs the {@link XZCompressionInputStream} before putting data
* into its buffer. Eager initialization of {@link #xzIn} there results in
* an {@link EOFException}.
*/
private XZInputStream getInputStream() throws IOException {
if (xzIn == null) {
xzIn = new XZInputStream(bufferedIn);
}
return xzIn;
}
}
| yongtang/hadoop-xz | src/main/java/io/sensesecure/hadoop/xz/XZCompressionInputStream.java | Java | apache-2.0 | 2,173 |
package generics;
//: generics/SuperTypeWildcards.java
import java.util.*;
public class SuperTypeWildcards {
static void writeTo(List<? super Apple> apples) {
apples.add(new Apple());
apples.add(new Jonathan());
// apples.add(new Fruit()); // Error
}
} ///:~
| Shelley132/java-review | thinkinginjava/generics/SuperTypeWildcards.java | Java | apache-2.0 | 276 |
package org.giwi.geotracker.routes.priv;
import io.vertx.core.Vertx;
import io.vertx.ext.web.Router;
import io.vertx.ext.web.RoutingContext;
import org.giwi.geotracker.annotation.VertxRoute;
import org.giwi.geotracker.beans.AuthUtils;
import org.giwi.geotracker.exception.BusinessException;
import org.giwi.geotracker.services.ParamService;
import javax.inject.Inject;
/**
* The type Param route.
*/
@VertxRoute(rootPath = "/api/1/private/param")
public class ParamRoute implements VertxRoute.Route {
@Inject
private ParamService paramService;
@Inject
private AuthUtils authUtils;
/**
* Init router.
*
* @param vertx the vertx
* @return the router
*/
@Override
public Router init(Vertx vertx) {
Router router = Router.router(vertx);
router.get("/roles").handler(this::getRoles);
return router;
}
/**
* @api {get} /api/1/private/param/roles Get roles
* @apiName getRoles
* @apiGroup Params
* @apiDescription Get roles
* @apiHeader {String} secureToken User secureToken
* @apiSuccess {Array} roles Role[]
*/
private void getRoles(RoutingContext ctx) {
paramService.getRoles(res -> {
if (res.succeeded()) {
ctx.response().end(res.result().encode());
} else {
ctx.fail(new BusinessException(res.cause()));
}
});
}
}
| Giwi/geoTracker | src/main/java/org/giwi/geotracker/routes/priv/ParamRoute.java | Java | apache-2.0 | 1,430 |
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.model.translators;
import google.registry.util.CidrAddressBlock;
/** Stores {@link CidrAddressBlock} as a canonicalized string. */
public class CidrAddressBlockTranslatorFactory
extends AbstractSimpleTranslatorFactory<CidrAddressBlock, String> {
public CidrAddressBlockTranslatorFactory() {
super(CidrAddressBlock.class);
}
@Override
SimpleTranslator<CidrAddressBlock, String> createTranslator() {
return new SimpleTranslator<CidrAddressBlock, String>(){
@Override
public CidrAddressBlock loadValue(String datastoreValue) {
return CidrAddressBlock.create(datastoreValue);
}
@Override
public String saveValue(CidrAddressBlock pojoValue) {
return pojoValue.toString();
}};
}
}
| google/nomulus | core/src/main/java/google/registry/model/translators/CidrAddressBlockTranslatorFactory.java | Java | apache-2.0 | 1,397 |
/*
* ARX: Powerful Data Anonymization
* Copyright 2012 - 2021 Fabian Prasser and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.deidentifier.arx.gui.view.impl.define;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import org.deidentifier.arx.gui.Controller;
import org.deidentifier.arx.gui.model.Model;
import org.deidentifier.arx.gui.model.ModelCriterion;
import org.deidentifier.arx.gui.model.ModelEvent;
import org.deidentifier.arx.gui.model.ModelEvent.ModelPart;
import org.deidentifier.arx.gui.model.ModelBLikenessCriterion;
import org.deidentifier.arx.gui.model.ModelDDisclosurePrivacyCriterion;
import org.deidentifier.arx.gui.model.ModelExplicitCriterion;
import org.deidentifier.arx.gui.model.ModelLDiversityCriterion;
import org.deidentifier.arx.gui.model.ModelRiskBasedCriterion;
import org.deidentifier.arx.gui.model.ModelTClosenessCriterion;
import org.deidentifier.arx.gui.resources.Resources;
import org.deidentifier.arx.gui.view.SWTUtil;
import org.deidentifier.arx.gui.view.def.IView;
import org.deidentifier.arx.gui.view.impl.common.ClipboardHandlerTable;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.TableItem;
import de.linearbits.swt.table.DynamicTable;
import de.linearbits.swt.table.DynamicTableColumn;
/**
* This class displays a list of all defined privacy criteria.
*
* @author fabian
*/
public class ViewPrivacyModels implements IView {
/** Controller */
private Controller controller;
/** Model */
private Model model = null;
/** View */
private final DynamicTable table;
/** View */
private final DynamicTableColumn column1;
/** View */
private final DynamicTableColumn column2;
/** View */
private final DynamicTableColumn column3;
/** View */
private final Composite root;
/** View */
private final Image symbolL;
/** View */
private final Image symbolT;
/** View */
private final Image symbolK;
/** View */
private final Image symbolD;
/** View */
private final Image symbolDP;
/** View */
private final Image symbolR;
/** View */
private final Image symbolG;
/** View */
private final Image symbolB;
/** View */
private final LayoutPrivacySettings layout;
/**
* Creates a new instance.
*
* @param parent
* @param controller
* @param layoutCriteria
*/
public ViewPrivacyModels(final Composite parent, final Controller controller, LayoutPrivacySettings layoutCriteria) {
// Register
this.controller = controller;
this.controller.addListener(ModelPart.CRITERION_DEFINITION, this);
this.controller.addListener(ModelPart.MODEL, this);
this.controller.addListener(ModelPart.ATTRIBUTE_TYPE, this);
this.controller.addListener(ModelPart.ATTRIBUTE_TYPE_BULK_UPDATE, this);
this.layout = layoutCriteria;
this.symbolL = controller.getResources().getManagedImage("symbol_l.png"); //$NON-NLS-1$
this.symbolT = controller.getResources().getManagedImage("symbol_t.png"); //$NON-NLS-1$
this.symbolK = controller.getResources().getManagedImage("symbol_k.png"); //$NON-NLS-1$
this.symbolD = controller.getResources().getManagedImage("symbol_d.png"); //$NON-NLS-1$
this.symbolDP = controller.getResources().getManagedImage("symbol_dp.png"); //$NON-NLS-1$
this.symbolR = controller.getResources().getManagedImage("symbol_r.png"); //$NON-NLS-1$
this.symbolG = controller.getResources().getManagedImage("symbol_gt.png"); //$NON-NLS-1$
this.symbolB = controller.getResources().getManagedImage("symbol_b.png"); //$NON-NLS-1$
this.root = parent;
this.table = SWTUtil.createTableDynamic(root, SWT.SINGLE | SWT.V_SCROLL | SWT.FULL_SELECTION);
this.table.setHeaderVisible(true);
this.table.setLinesVisible(true);
GridData gd = SWTUtil.createFillHorizontallyGridData();
gd.heightHint = 100;
this.table.setLayoutData(gd);
SWTUtil.createGenericTooltip(table);
this.table.setMenu(new ClipboardHandlerTable(table).getMenu());
this.table.addSelectionListener(new SelectionAdapter(){
public void widgetSelected(SelectionEvent arg0) {
layout.updateButtons();
}
});
this.column1 = new DynamicTableColumn(table, SWT.NONE);
this.column1.setText(Resources.getMessage("ViewCriteriaList.0")); //$NON-NLS-1$
this.column1.setWidth("10%", "30px"); //$NON-NLS-1$ //$NON-NLS-2$
this.column2 = new DynamicTableColumn(table, SWT.NONE);
this.column2.setText(Resources.getMessage("CriterionSelectionDialog.2")); //$NON-NLS-1$
this.column2.setWidth("45%", "100px"); //$NON-NLS-1$ //$NON-NLS-2$
this.column3 = new DynamicTableColumn(table, SWT.NONE);
this.column3.setText(Resources.getMessage("CriterionSelectionDialog.3")); //$NON-NLS-1$
this.column3.setWidth("45%", "100px"); //$NON-NLS-1$ //$NON-NLS-2$
this.column1.pack();
this.column2.pack();
this.column3.pack();
this.layout.updateButtons();
reset();
}
/**
* Add
*/
public void actionAdd() {
controller.actionCriterionAdd();
}
/**
* Configure
*/
public void actionConfigure() {
ModelCriterion criterion = this.getSelectedCriterion();
if (criterion != null) {
controller.actionCriterionConfigure(criterion);
}
}
/**
* Pull
*/
public void actionPull() {
ModelCriterion criterion = this.getSelectedCriterion();
if (criterion != null && criterion instanceof ModelExplicitCriterion) {
controller.actionCriterionPull(criterion);
}
}
/**
* Push
*/
public void actionPush() {
ModelCriterion criterion = this.getSelectedCriterion();
if (criterion != null && criterion instanceof ModelExplicitCriterion) {
controller.actionCriterionPush(criterion);
}
}
/**
* Remove
*/
public void actionRemove() {
ModelCriterion criterion = this.getSelectedCriterion();
if (criterion != null) {
controller.actionCriterionEnable(criterion);
}
}
@Override
public void dispose() {
this.controller.removeListener(this);
}
/**
* Returns the currently selected criterion, if any
* @return
*/
public ModelCriterion getSelectedCriterion() {
if (table.getSelection() == null || table.getSelection().length == 0) {
return null;
}
return (ModelCriterion)table.getSelection()[0].getData();
}
/**
* May criteria be added
* @return
*/
public boolean isAddEnabled() {
return model != null && model.getInputDefinition() != null &&
model.getInputDefinition().getQuasiIdentifyingAttributes() != null;
}
@Override
public void reset() {
root.setRedraw(false);
if (table != null) {
table.removeAll();
}
root.setRedraw(true);
SWTUtil.disable(root);
}
@Override
public void update(ModelEvent event) {
// Model update
if (event.part == ModelPart.MODEL) {
this.model = (Model)event.data;
}
// Other updates
if (event.part == ModelPart.CRITERION_DEFINITION ||
event.part == ModelPart.ATTRIBUTE_TYPE ||
event.part == ModelPart.ATTRIBUTE_TYPE_BULK_UPDATE ||
event.part == ModelPart.MODEL) {
// Update table
if (model!=null) {
updateTable();
}
}
}
/**
* Update table
*/
private void updateTable() {
root.setRedraw(false);
table.removeAll();
if (model.getDifferentialPrivacyModel().isEnabled()) {
TableItem item = new TableItem(table, SWT.NONE);
item.setText(new String[] { "", model.getDifferentialPrivacyModel().toString(), "" }); //$NON-NLS-1$ //$NON-NLS-2$
item.setImage(0, symbolDP);
item.setData(model.getDifferentialPrivacyModel());
}
if (model.getKAnonymityModel().isEnabled()) {
TableItem item = new TableItem(table, SWT.NONE);
item.setText(new String[] { "", model.getKAnonymityModel().toString(), "" }); //$NON-NLS-1$ //$NON-NLS-2$
item.setImage(0, symbolK);
item.setData(model.getKAnonymityModel());
}
if (model.getKMapModel().isEnabled()) {
TableItem item = new TableItem(table, SWT.NONE);
item.setText(new String[] { "", model.getKMapModel().toString(), "" }); //$NON-NLS-1$ //$NON-NLS-2$
item.setImage(0, symbolK);
item.setData(model.getKMapModel());
}
if (model.getDPresenceModel().isEnabled()) {
TableItem item = new TableItem(table, SWT.NONE);
item.setText(new String[] { "", model.getDPresenceModel().toString(), "" }); //$NON-NLS-1$ //$NON-NLS-2$
item.setImage(0, symbolD);
item.setData(model.getDPresenceModel());
}
if (model.getStackelbergModel().isEnabled()) {
TableItem item = new TableItem(table, SWT.NONE);
item.setText(new String[] { "", model.getStackelbergModel().toString(), ""});
item.setImage(0, symbolG);
item.setData(model.getStackelbergModel());
}
List<ModelExplicitCriterion> explicit = new ArrayList<ModelExplicitCriterion>();
for (ModelLDiversityCriterion other : model.getLDiversityModel().values()) {
if (other.isEnabled()) {
explicit.add(other);
}
}
for (ModelTClosenessCriterion other : model.getTClosenessModel().values()) {
if (other.isEnabled()) {
explicit.add(other);
}
}
for (ModelDDisclosurePrivacyCriterion other : model.getDDisclosurePrivacyModel().values()) {
if (other.isEnabled()) {
explicit.add(other);
}
}
for (ModelBLikenessCriterion other : model.getBLikenessModel().values()) {
if (other.isEnabled()) {
explicit.add(other);
}
}
Collections.sort(explicit, new Comparator<ModelExplicitCriterion>(){
public int compare(ModelExplicitCriterion o1, ModelExplicitCriterion o2) {
return o1.getAttribute().compareTo(o2.getAttribute());
}
});
for (ModelExplicitCriterion c :explicit) {
TableItem item = new TableItem(table, SWT.NONE);
item.setText(new String[] { "", c.toString(), c.getAttribute() }); //$NON-NLS-1$
if (c instanceof ModelLDiversityCriterion) {
item.setImage(0, symbolL);
} else if (c instanceof ModelTClosenessCriterion) {
item.setImage(0, symbolT);
} else if (c instanceof ModelDDisclosurePrivacyCriterion) {
item.setImage(0, symbolD);
} else if (c instanceof ModelBLikenessCriterion) {
item.setImage(0, symbolB);
}
item.setData(c);
}
List<ModelRiskBasedCriterion> riskBased = new ArrayList<ModelRiskBasedCriterion>();
for (ModelRiskBasedCriterion other : model.getRiskBasedModel()) {
if (other.isEnabled()) {
riskBased.add(other);
}
}
Collections.sort(riskBased, new Comparator<ModelRiskBasedCriterion>(){
public int compare(ModelRiskBasedCriterion o1, ModelRiskBasedCriterion o2) {
return o1.getLabel().compareTo(o2.getLabel());
}
});
for (ModelRiskBasedCriterion c : riskBased) {
TableItem item = new TableItem(table, SWT.NONE);
item.setText(new String[] { "", c.toString(), "" }); //$NON-NLS-1$ //$NON-NLS-2$
item.setImage(0, symbolR);
item.setData(c);
}
// Update
layout.updateButtons();
root.setRedraw(true);
SWTUtil.enable(root);
table.redraw();
}
}
| arx-deidentifier/arx | src/gui/org/deidentifier/arx/gui/view/impl/define/ViewPrivacyModels.java | Java | apache-2.0 | 13,712 |
/*
* Copyright (c) 2016 Hugo Matalonga & João Paulo Fernandes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hmatalonga.greenhub.ui;
import android.annotation.TargetApi;
import android.app.ActivityManager;
import android.app.AppOpsManager;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v4.content.ContextCompat;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.support.v7.widget.helper.ItemTouchHelper;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.hmatalonga.greenhub.Config;
import com.hmatalonga.greenhub.R;
import com.hmatalonga.greenhub.events.OpenTaskDetailsEvent;
import com.hmatalonga.greenhub.events.TaskRemovedEvent;
import com.hmatalonga.greenhub.managers.TaskController;
import com.hmatalonga.greenhub.models.Memory;
import com.hmatalonga.greenhub.models.ui.Task;
import com.hmatalonga.greenhub.ui.adapters.TaskAdapter;
import com.hmatalonga.greenhub.util.SettingsUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
public class TaskListActivity extends BaseActivity {
private ArrayList<Task> mTaskList;
private RecyclerView mRecyclerView;
private TaskAdapter mAdapter;
/**
* The {@link android.support.v4.widget.SwipeRefreshLayout} that detects swipe gestures and
* triggers callbacks in the app.
*/
private SwipeRefreshLayout mSwipeRefreshLayout;
private ProgressBar mLoader;
private Task mLastKilledApp;
private long mLastKilledTimestamp;
private boolean mIsUpdating;
private int mSortOrderName;
private int mSortOrderMemory;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (!SettingsUtils.isTosAccepted(getApplicationContext())) {
startActivity(new Intent(this, WelcomeActivity.class));
finish();
return;
}
setContentView(R.layout.activity_task_list);
Toolbar toolbar = findViewById(R.id.toolbar_actionbar);
if (toolbar != null) {
setSupportActionBar(toolbar);
}
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
}
loadComponents();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_task_list, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
startActivity(new Intent(this, SettingsActivity.class));
return true;
} else if (id == R.id.action_sort_memory) {
sortTasksBy(Config.SORT_BY_MEMORY, mSortOrderMemory);
mSortOrderMemory = -mSortOrderMemory;
return true;
} else if (id == R.id.action_sort_name) {
sortTasksBy(Config.SORT_BY_NAME, mSortOrderName);
mSortOrderName = -mSortOrderName;
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
EventBus.getDefault().unregister(this);
super.onStop();
}
@Override
public void onResume() {
super.onResume();
if (!mIsUpdating) initiateRefresh();
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onTaskRemovedEvent(TaskRemovedEvent event) {
updateHeaderInfo();
mLastKilledApp = event.task;
mLastKilledTimestamp = System.currentTimeMillis();
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onOpenTaskDetailsEvent(OpenTaskDetailsEvent event) {
startActivity(new Intent(
Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
Uri.parse("package:" + event.task.getPackageInfo().packageName)
));
}
private void loadComponents() {
Toolbar toolbar = findViewById(R.id.toolbar_actionbar);
setSupportActionBar(toolbar);
mLoader = findViewById(R.id.loader);
mLastKilledApp = null;
mSortOrderName = 1;
mSortOrderMemory = 1;
FloatingActionButton fab = findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (mTaskList.isEmpty()) {
Snackbar.make(
view,
getString(R.string.task_no_apps_running),
Snackbar.LENGTH_LONG
).show();
return;
}
int apps = 0;
double memory = 0;
String message;
TaskController controller = new TaskController(getApplicationContext());
for (Task task : mTaskList) {
if (!task.isChecked()) continue;
controller.killApp(task);
memory += task.getMemory();
apps++;
}
memory = Math.round(memory * 100.0) / 100.0;
mRecyclerView.setVisibility(View.GONE);
mLoader.setVisibility(View.VISIBLE);
initiateRefresh();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
message = (apps > 0) ?
makeMessage(apps) :
getString(R.string.task_no_apps_killed);
} else {
message = (apps > 0) ?
makeMessage(apps, memory) :
getString(R.string.task_no_apps_killed);
}
Snackbar.make(
view,
message,
Snackbar.LENGTH_LONG
).show();
}
});
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N &&
!hasSpecialPermission(getApplicationContext())) {
showPermissionInfoDialog();
}
mTaskList = new ArrayList<>();
mIsUpdating = false;
setupRefreshLayout();
setupRecyclerView();
}
private void sortTasksBy(final int filter, final int order) {
if (filter == Config.SORT_BY_MEMORY) {
// Sort by memory
Collections.sort(mTaskList, new Comparator<Task>() {
@Override
public int compare(Task t1, Task t2) {
int result;
if (t1.getMemory() < t2.getMemory()) {
result = -1;
} else if (t1.getMemory() == t2.getMemory()) {
result = 0;
} else {
result = 1;
}
return order * result;
}
});
} else if (filter == Config.SORT_BY_NAME) {
// Sort by name
Collections.sort(mTaskList, new Comparator<Task>() {
@Override
public int compare(Task t1, Task t2) {
return order * t1.getLabel().compareTo(t2.getLabel());
}
});
}
mAdapter.notifyDataSetChanged();
}
private String makeMessage(int apps) {
return getString(R.string.task_killed) + " " + apps + " apps!";
}
private String makeMessage(int apps, double memory) {
return getString(R.string.task_killed) + " " + apps + " apps! " +
getString(R.string.task_cleared) + " " + memory + " MB";
}
private void setupRecyclerView() {
mRecyclerView = findViewById(R.id.rv);
// use this setting to improve performance if you know that changes
// in content do not change the layout size of the RecyclerView
mRecyclerView.setHasFixedSize(true);
// use a linear layout manager
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mAdapter = new TaskAdapter(getApplicationContext(), mTaskList);
mRecyclerView.setAdapter(mAdapter);
setUpItemTouchHelper();
setUpAnimationDecoratorHelper();
}
private void setupRefreshLayout() {
mSwipeRefreshLayout = findViewById(R.id.swipe_layout);
//noinspection ResourceAsColor
if (Build.VERSION.SDK_INT >= 23) {
mSwipeRefreshLayout.setColorSchemeColors(
getColor(R.color.color_accent),
getColor(R.color.color_primary_dark)
);
} else {
final Context context = getApplicationContext();
mSwipeRefreshLayout.setColorSchemeColors(
ContextCompat.getColor(context, R.color.color_accent),
ContextCompat.getColor(context, R.color.color_primary_dark)
);
}
mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
if (!mIsUpdating) initiateRefresh();
}
});
}
/**
* This is the standard support library way of implementing "swipe to delete" feature.
* You can do custom drawing in onChildDraw method but whatever you draw will
* disappear once the swipe is over, and while the items are animating to their
* new position the recycler view background will be visible.
* That is rarely an desired effect.
*/
private void setUpItemTouchHelper() {
ItemTouchHelper.SimpleCallback simpleItemTouchCallback =
new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT) {
// we want to cache these and not allocate anything repeatedly in the onChildDraw method
Drawable background;
Drawable xMark;
int xMarkMargin;
boolean initiated;
private void init() {
background = new ColorDrawable(Color.DKGRAY);
xMark = ContextCompat.getDrawable(
TaskListActivity.this, R.drawable.ic_delete_white_24dp
);
xMark.setColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP);
xMarkMargin = (int) TaskListActivity.this.getResources()
.getDimension(R.dimen.fab_margin);
initiated = true;
}
// not important, we don't want drag & drop
@Override
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder,
RecyclerView.ViewHolder target) {
return false;
}
@Override
public int getSwipeDirs(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
int position = viewHolder.getAdapterPosition();
TaskAdapter testAdapter = (TaskAdapter) recyclerView.getAdapter();
if (testAdapter.isUndoOn() && testAdapter.isPendingRemoval(position)) {
return 0;
}
return super.getSwipeDirs(recyclerView, viewHolder);
}
@Override
public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {
int swipedPosition = viewHolder.getAdapterPosition();
TaskAdapter adapter = (TaskAdapter) mRecyclerView.getAdapter();
boolean undoOn = adapter.isUndoOn();
if (undoOn) {
adapter.pendingRemoval(swipedPosition);
} else {
adapter.remove(swipedPosition);
}
}
@Override
public void onChildDraw(Canvas canvas, RecyclerView recyclerView,
RecyclerView.ViewHolder viewHolder, float dX, float dY,
int actionState, boolean isCurrentlyActive) {
View itemView = viewHolder.itemView;
// not sure why, but this method get's called
// for viewholder that are already swiped away
if (viewHolder.getAdapterPosition() == -1) {
// not interested in those
return;
}
if (!initiated) {
init();
}
// draw background
background.setBounds(
itemView.getRight() + (int) dX,
itemView.getTop(),
itemView.getRight(),
itemView.getBottom()
);
background.draw(canvas);
// draw x mark
int itemHeight = itemView.getBottom() - itemView.getTop();
int intrinsicWidth = xMark.getIntrinsicWidth();
int intrinsicHeight = xMark.getIntrinsicWidth();
int xMarkLeft = itemView.getRight() - xMarkMargin - intrinsicWidth;
int xMarkRight = itemView.getRight() - xMarkMargin;
int xMarkTop = itemView.getTop() + (itemHeight - intrinsicHeight) / 2;
int xMarkBottom = xMarkTop + intrinsicHeight;
xMark.setBounds(xMarkLeft, xMarkTop, xMarkRight, xMarkBottom);
xMark.draw(canvas);
super.onChildDraw(canvas, recyclerView, viewHolder,
dX, dY, actionState, isCurrentlyActive);
}
};
ItemTouchHelper mItemTouchHelper = new ItemTouchHelper(simpleItemTouchCallback);
mItemTouchHelper.attachToRecyclerView(mRecyclerView);
}
/**
* We're gonna setup another ItemDecorator that will draw the red background
* in the empty space while the items are animating to thier new positions
* after an item is removed.
*/
private void setUpAnimationDecoratorHelper() {
mRecyclerView.addItemDecoration(new RecyclerView.ItemDecoration() {
// we want to cache this and not allocate anything repeatedly in the onDraw method
Drawable background;
boolean initiated;
private void init() {
background = new ColorDrawable(Color.DKGRAY);
initiated = true;
}
@Override
public void onDraw(Canvas canvas, RecyclerView parent, RecyclerView.State state) {
if (!initiated) {
init();
}
// only if animation is in progress
if (parent.getItemAnimator().isRunning()) {
// some items might be animating down and some items might be
// animating up to close the gap left by the removed item
// this is not exclusive, both movement can be happening at the same time
// to reproduce this leave just enough items so the first one
// and the last one would be just a little off screen
// then remove one from the middle
// find first child with translationY > 0
// and last one with translationY < 0
// we're after a rect that is not covered in recycler-view views
// at this point in time
View lastViewComingDown = null;
View firstViewComingUp = null;
// this is fixed
int left = 0;
int right = parent.getWidth();
// this we need to find out
int top = 0;
int bottom = 0;
// find relevant translating views
int childCount = parent.getLayoutManager().getChildCount();
for (int i = 0; i < childCount; i++) {
View child = parent.getLayoutManager().getChildAt(i);
if (child.getTranslationY() < 0) {
// view is coming down
lastViewComingDown = child;
} else if (child.getTranslationY() > 0) {
// view is coming up
if (firstViewComingUp == null) {
firstViewComingUp = child;
}
}
}
if (lastViewComingDown != null && firstViewComingUp != null) {
// views are coming down AND going up to fill the void
top = lastViewComingDown.getBottom() +
(int) lastViewComingDown.getTranslationY();
bottom = firstViewComingUp.getTop() +
(int) firstViewComingUp.getTranslationY();
} else if (lastViewComingDown != null) {
// views are going down to fill the void
top = lastViewComingDown.getBottom() +
(int) lastViewComingDown.getTranslationY();
bottom = lastViewComingDown.getBottom();
} else if (firstViewComingUp != null) {
// views are coming up to fill the void
top = firstViewComingUp.getTop();
bottom = firstViewComingUp.getTop() +
(int) firstViewComingUp.getTranslationY();
}
background.setBounds(left, top, right, bottom);
background.draw(canvas);
}
super.onDraw(canvas, parent, state);
}
});
}
/**
* By abstracting the refresh process to a single method, the app allows both the
* SwipeGestureLayout onRefresh() method and the Refresh action item to refresh the content.
*/
private void initiateRefresh() {
mIsUpdating = true;
setHeaderToRefresh();
/**
* Execute the background task, which uses {@link android.os.AsyncTask} to load the data.
*/
new LoadRunningProcessesTask().execute(getApplicationContext());
}
/**
* When the AsyncTask finishes, it calls onRefreshComplete(), which updates the data in the
* ListAdapter and turns off the progress bar.
*/
private void onRefreshComplete(List<Task> result) {
if (mLoader.getVisibility() == View.VISIBLE) {
mLoader.setVisibility(View.GONE);
mRecyclerView.setVisibility(View.VISIBLE);
}
// Remove all items from the ListAdapter, and then replace them with the new items
mAdapter.swap(result);
mIsUpdating = false;
updateHeaderInfo();
// Stop the refreshing indicator
mSwipeRefreshLayout.setRefreshing(false);
}
private void updateHeaderInfo() {
String text;
TextView textView = findViewById(R.id.count);
text = "Apps " + mTaskList.size();
textView.setText(text);
textView = findViewById(R.id.usage);
double memory = Memory.getAvailableMemoryMB(getApplicationContext());
if (memory > 1000) {
text = getString(R.string.task_free_ram) + " " +
(Math.round(memory / 1000.0)) + " GB";
} else {
text = getString(R.string.task_free_ram) + " " + memory + " MB";
}
textView.setText(text);
}
private void setHeaderToRefresh() {
TextView textView = findViewById(R.id.count);
textView.setText(getString(R.string.header_status_loading));
textView = findViewById(R.id.usage);
textView.setText("");
}
private double getTotalUsage(List<Task> list) {
double usage = 0;
for (Task task : list) {
usage += task.getMemory();
}
return Math.round(usage * 100.0) / 100.0;
}
private boolean isKilledAppAlive(final String label) {
long now = System.currentTimeMillis();
if (mLastKilledTimestamp < (now - Config.KILL_APP_TIMEOUT)) {
mLastKilledApp = null;
return false;
}
for (Task task : mTaskList) {
if (task.getLabel().equals(label)) {
return true;
}
}
return false;
}
private void checkIfLastAppIsKilled() {
if (mLastKilledApp != null && isKilledAppAlive(mLastKilledApp.getLabel())) {
final String packageName = mLastKilledApp.getPackageInfo().packageName;
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(getString(R.string.kill_app_dialog_text))
.setTitle(mLastKilledApp.getLabel());
builder.setPositiveButton(R.string.force_close, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// User clicked OK button
startActivity(new Intent(
Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
Uri.parse("package:" + packageName)
));
}
});
builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// User cancelled the dialog
dialog.cancel();
}
});
builder.create().show();
}
mLastKilledApp = null;
}
@TargetApi(21)
private boolean hasSpecialPermission(final Context context) {
AppOpsManager appOps = (AppOpsManager) context
.getSystemService(Context.APP_OPS_SERVICE);
int mode = appOps.checkOpNoThrow("android:get_usage_stats",
android.os.Process.myUid(), context.getPackageName());
return mode == AppOpsManager.MODE_ALLOWED;
}
@TargetApi(21)
private void showPermissionInfoDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(getString(R.string.package_usage_permission_text))
.setTitle(getString(R.string.package_usage_permission_title));
builder.setPositiveButton(R.string.open_settings, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// User clicked OK button
startActivity(new Intent(Settings.ACTION_USAGE_ACCESS_SETTINGS));
}
});
builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// User cancelled the dialog
dialog.cancel();
}
});
builder.create().show();
}
private class LoadRunningProcessesTask extends AsyncTask<Context, Void, List<Task>> {
@Override
protected List<Task> doInBackground(Context... params) {
TaskController taskController = new TaskController(params[0]);
return taskController.getRunningTasks();
}
@Override
protected void onPostExecute(List<Task> result) {
super.onPostExecute(result);
onRefreshComplete(result);
checkIfLastAppIsKilled();
}
}
} | hmatalonga/GreenHub | app/src/main/java/com/hmatalonga/greenhub/ui/TaskListActivity.java | Java | apache-2.0 | 25,536 |
/*
*
* * Copyright 2015 Skymind,Inc.
* *
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
* *
* * http://www.apache.org/licenses/LICENSE-2.0
* *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* * See the License for the specific language governing permissions and
* * limitations under the License.
*
*
*/
package org.nd4j.linalg.api.ops.impl.accum;
import org.nd4j.linalg.api.buffer.DataBuffer;
import org.nd4j.linalg.api.complex.IComplexNumber;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.api.ops.Op;
/**
* Calculate the mean of the vector
*
* @author Adam Gibson
*/
public class Mean extends Sum {
public Mean() {
}
public Mean(INDArray x, INDArray y, INDArray z, int n) {
super(x, y, z, n);
}
public Mean(INDArray x, INDArray y, int n) {
super(x, y, n);
}
public Mean(INDArray x) {
super(x);
}
public Mean(INDArray x, INDArray y) {
super(x, y);
}
@Override
public String name() {
return "mean";
}
@Override
public Op opForDimension(int index, int dimension) {
INDArray xAlongDimension = x.vectorAlongDimension(index, dimension);
if (y() != null)
return new Mean(xAlongDimension, y.vectorAlongDimension(index, dimension), xAlongDimension.length());
else
return new Mean(x.vectorAlongDimension(index, dimension));
}
@Override
public Op opForDimension(int index, int... dimension) {
INDArray xAlongDimension = x.tensorAlongDimension(index, dimension);
if (y() != null)
return new Mean(xAlongDimension, y.tensorAlongDimension(index, dimension), xAlongDimension.length());
else
return new Mean(x.tensorAlongDimension(index, dimension));
}
@Override
public double getAndSetFinalResult(double accum){
double d = accum / n();
this.finalResult = d;
return d;
}
@Override
public float getAndSetFinalResult(float accum){
float f = accum / n();
this.finalResult = f;
return f;
}
@Override
public double calculateFinalResult(double accum, int n) {
return accum / n;
}
@Override
public float calculateFinalResult(float accum, int n) {
return accum / n;
}
@Override
public IComplexNumber getAndSetFinalResult(IComplexNumber accum){
finalResultComplex = accum.div(n());
return finalResultComplex;
}
}
| GeorgeMe/nd4j | nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/accum/Mean.java | Java | apache-2.0 | 2,853 |
package com.fantasy.lulutong.activity.me;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import com.fantasy.lulutong.R;
import com.fantasy.lulutong.activity.BaseActivity;
/**
* “注册”的页面
* @author Fantasy
* @version 1.0, 2017-02-
*/
public class RegisterActivity extends BaseActivity {
private RelativeLayout relativeBack;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.layout_register);
relativeBack = (RelativeLayout) findViewById(R.id.relative_register_back);
relativeBack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
}
}
| FantasyLWX/LuLuTong | app/src/main/java/com/fantasy/lulutong/activity/me/RegisterActivity.java | Java | apache-2.0 | 863 |
package com.blackducksoftware.integration.hub.detect.tool.bazel;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.ArrayList;
import java.util.List;
import org.junit.jupiter.api.Test;
public class BazelVariableSubstitutorTest {
@Test
public void testTargetOnly() {
BazelVariableSubstitutor substitutor = new BazelVariableSubstitutor("//foo:foolib");
final List<String> origArgs = new ArrayList<>();
origArgs.add("query");
origArgs.add("filter(\"@.*:jar\", deps(${detect.bazel.target}))");
final List<String> adjustedArgs = substitutor.substitute(origArgs);
assertEquals(2, adjustedArgs.size());
assertEquals("query", adjustedArgs.get(0));
assertEquals("filter(\"@.*:jar\", deps(//foo:foolib))", adjustedArgs.get(1));
}
@Test
public void testBoth() {
BazelVariableSubstitutor substitutor = new BazelVariableSubstitutor("//foo:foolib", "//external:org_apache_commons_commons_io");
final List<String> origArgs = new ArrayList<>();
origArgs.add("query");
origArgs.add("filter(\"@.*:jar\", deps(${detect.bazel.target}))");
origArgs.add("kind(maven_jar, ${detect.bazel.target.dependency})");
final List<String> adjustedArgs = substitutor.substitute(origArgs);
assertEquals(3, adjustedArgs.size());
assertEquals("query", adjustedArgs.get(0));
assertEquals("filter(\"@.*:jar\", deps(//foo:foolib))", adjustedArgs.get(1));
assertEquals("kind(maven_jar, //external:org_apache_commons_commons_io)", adjustedArgs.get(2));
}
}
| blackducksoftware/hub-detect | hub-detect/src/test/groovy/com/blackducksoftware/integration/hub/detect/tool/bazel/BazelVariableSubstitutorTest.java | Java | apache-2.0 | 1,618 |
package com.dyhpoon.fodex.navigationDrawer;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import com.dyhpoon.fodex.R;
/**
* Created by darrenpoon on 3/2/15.
*/
public class NavigationDrawerAdapter extends SectionAdapter {
private Context mContext;
public class ViewType {
public static final int PROFILE = 0;
public static final int WHITESPACE = 1;
public static final int PAGE = 2;
public static final int DIVIDER = 3;
public static final int UTILITY = 4;
}
public NavigationDrawerAdapter(Context context) {
mContext = context;
}
@Override
public int getSectionCount() {
return 5; // all view types
}
@Override
public Boolean isSectionEnabled(int section) {
switch (section) {
case ViewType.PROFILE:
return false;
case ViewType.WHITESPACE:
return false;
case ViewType.PAGE:
return true;
case ViewType.DIVIDER:
return false;
case ViewType.UTILITY:
return true;
default:
throw new IllegalArgumentException(
"Unhandled section number in navigation drawer adapter, found: " + section);
}
}
@Override
public int getViewCountAtSection(int section) {
switch (section) {
case ViewType.PROFILE:
return 1;
case ViewType.WHITESPACE:
return 1;
case ViewType.PAGE:
return NavigationDrawerData.getPageItems(mContext).size();
case ViewType.DIVIDER:
return 1;
case ViewType.UTILITY:
return NavigationDrawerData.getUtilityItems(mContext).size();
default:
throw new IllegalArgumentException(
"Unhandled section number in navigation drawer adapter, found: " + section);
}
}
@Override
public View getView(int section, int position, View convertView, ViewGroup parent) {
switch (section) {
case 0:
convertView = inflateProfile(convertView);
break;
case 1:
convertView = inflateWhiteSpace(convertView);
break;
case 2:
convertView = inflatePageItem(convertView, position);
break;
case 3:
convertView = inflateListDivider(convertView);
break;
case 4:
convertView = inflateUtilityItem(convertView, position);
break;
default:
throw new IllegalArgumentException(
"Unhandled section/position number in navigation drawer adapter, " +
"found section: " + section + " position: " + position);
}
return convertView;
}
private View inflateProfile(View convertView) {
if (convertView == null) {
convertView = View.inflate(mContext, R.layout.list_item_profile, null);
}
return convertView;
}
private View inflateWhiteSpace(View convertView) {
if (convertView == null) {
convertView = View.inflate(mContext, R.layout.list_item_whitespace, null);
}
return convertView;
}
private View inflatePageItem(View convertView, int position) {
if (convertView == null) {
convertView = new NavigationDrawerItem(mContext);
}
NavigationDrawerInfo info = NavigationDrawerData.getPageItem(mContext, position);
((NavigationDrawerItem)convertView).iconImageView.setImageDrawable(info.drawable);
((NavigationDrawerItem)convertView).titleTextView.setText(info.title);
return convertView;
}
private View inflateUtilityItem(View convertView, int position) {
if (convertView == null) {
convertView = new NavigationDrawerItem(mContext);
}
NavigationDrawerInfo info = NavigationDrawerData.getUtilityItem(mContext, position);
((NavigationDrawerItem)convertView).iconImageView.setImageDrawable(info.drawable);
((NavigationDrawerItem)convertView).titleTextView.setText(info.title);
return convertView;
}
private View inflateListDivider(View convertView) {
if (convertView == null) {
convertView = View.inflate(mContext, R.layout.list_item_divider, null);
}
return convertView;
}
}
| dyhpoon/Fo.dex | app/src/main/java/com/dyhpoon/fodex/navigationDrawer/NavigationDrawerAdapter.java | Java | apache-2.0 | 4,636 |
/**
* This class hierarchy was generated from the Yang module hcta-epc
* by the <a target="_top" href="https://github.com/tail-f-systems/JNC">JNC</a> plugin of <a target="_top" href="http://code.google.com/p/pyang/">pyang</a>.
* The generated classes may be used to manipulate pieces of configuration data
* with NETCONF operations such as edit-config, delete-config and lock. These
* operations are typically accessed through the JNC Java library by
* instantiating Device objects and setting up NETCONF sessions with real
* devices using a compatible YANG model.
* <p>
* @see <a target="_top" href="https://github.com/tail-f-systems/JNC">JNC project page</a>
* @see <a target="_top" href="ftp://ftp.rfc-editor.org/in-notes/rfc6020.txt">RFC 6020: YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)</a>
* @see <a target="_top" href="ftp://ftp.rfc-editor.org/in-notes/rfc6241.txt">RFC 6241: Network Configuration Protocol (NETCONF)</a>
* @see <a target="_top" href="ftp://ftp.rfc-editor.org/in-notes/rfc6242.txt">RFC 6242: Using the NETCONF Protocol over Secure Shell (SSH)</a>
* @see <a target="_top" href="http://www.tail-f.com">Tail-f Systems</a>
*/
package hctaEpc.mmeSgsn.interface_.ge; | jnpr-shinma/yangfile | hitel/src/hctaEpc/mmeSgsn/interface_/ge/package-info.java | Java | apache-2.0 | 1,235 |
/*
* Copyright 2011-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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 com.amazonaws.client.builder;
import com.amazonaws.AmazonWebServiceClient;
import com.amazonaws.ClientConfiguration;
import com.amazonaws.ClientConfigurationFactory;
import com.amazonaws.PredefinedClientConfigurations;
import com.amazonaws.SdkClientException;
import com.amazonaws.annotation.NotThreadSafe;
import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.annotation.SdkProtectedApi;
import com.amazonaws.annotation.SdkTestInternalApi;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.client.AwsSyncClientParams;
import com.amazonaws.monitoring.MonitoringListener;
import com.amazonaws.handlers.RequestHandler2;
import com.amazonaws.metrics.RequestMetricCollector;
import com.amazonaws.monitoring.CsmConfigurationProvider;
import com.amazonaws.monitoring.DefaultCsmConfigurationProviderChain;
import com.amazonaws.regions.AwsRegionProvider;
import com.amazonaws.regions.DefaultAwsRegionProviderChain;
import com.amazonaws.regions.Region;
import com.amazonaws.regions.RegionUtils;
import com.amazonaws.regions.Regions;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.ExecutorService;
/**
* Base class for all service specific client builders.
*
* @param <Subclass> Concrete builder type, used for better fluent methods.
* @param <TypeToBuild> Type that this builder builds.
*/
@NotThreadSafe
@SdkProtectedApi
public abstract class AwsClientBuilder<Subclass extends AwsClientBuilder, TypeToBuild> {
/**
* Default Region Provider chain. Used only when the builder is not explicitly configured with a
* region.
*/
private static final AwsRegionProvider DEFAULT_REGION_PROVIDER = new DefaultAwsRegionProviderChain();
/**
* Different services may have custom client configuration factories to vend defaults tailored
* for that service. If no explicit client configuration is provided to the builder the default
* factory for the service is used.
*/
private final ClientConfigurationFactory clientConfigFactory;
/**
* {@link AwsRegionProvider} to use when no explicit region or endpointConfiguration is configured.
* This is currently not exposed for customization by customers.
*/
private final AwsRegionProvider regionProvider;
private final AdvancedConfig.Builder advancedConfig = AdvancedConfig.builder();
private AWSCredentialsProvider credentials;
private ClientConfiguration clientConfig;
private RequestMetricCollector metricsCollector;
private Region region;
private List<RequestHandler2> requestHandlers;
private EndpointConfiguration endpointConfiguration;
private CsmConfigurationProvider csmConfig;
private MonitoringListener monitoringListener;
protected AwsClientBuilder(ClientConfigurationFactory clientConfigFactory) {
this(clientConfigFactory, DEFAULT_REGION_PROVIDER);
}
@SdkTestInternalApi
protected AwsClientBuilder(ClientConfigurationFactory clientConfigFactory,
AwsRegionProvider regionProvider) {
this.clientConfigFactory = clientConfigFactory;
this.regionProvider = regionProvider;
}
/**
* Gets the AWSCredentialsProvider currently configured in the builder.
*/
public final AWSCredentialsProvider getCredentials() {
return this.credentials;
}
/**
* Sets the AWSCredentialsProvider used by the client. If not specified the default is {@link
* DefaultAWSCredentialsProviderChain}.
*
* @param credentialsProvider New AWSCredentialsProvider to use.
*/
public final void setCredentials(AWSCredentialsProvider credentialsProvider) {
this.credentials = credentialsProvider;
}
/**
* Sets the AWSCredentialsProvider used by the client. If not specified the default is {@link
* DefaultAWSCredentialsProviderChain}.
*
* @param credentialsProvider New AWSCredentialsProvider to use.
* @return This object for method chaining.
*/
public final Subclass withCredentials(AWSCredentialsProvider credentialsProvider) {
setCredentials(credentialsProvider);
return getSubclass();
}
/**
* If the builder isn't explicitly configured with credentials we use the {@link
* DefaultAWSCredentialsProviderChain}.
*/
private AWSCredentialsProvider resolveCredentials() {
return (credentials == null) ? DefaultAWSCredentialsProviderChain.getInstance() : credentials;
}
/**
* Gets the ClientConfiguration currently configured in the builder
*/
public final ClientConfiguration getClientConfiguration() {
return this.clientConfig;
}
/**
* Sets the ClientConfiguration to be used by the client. If not specified the default is
* typically {@link PredefinedClientConfigurations#defaultConfig} but may differ per service.
*
* @param config Custom configuration to use
*/
public final void setClientConfiguration(ClientConfiguration config) {
this.clientConfig = config;
}
/**
* Sets the ClientConfiguration to be used by the client. If not specified the default is
* typically {@link PredefinedClientConfigurations#defaultConfig} but may differ per service.
*
* @param config Custom configuration to use
* @return This object for method chaining.
*/
public final Subclass withClientConfiguration(ClientConfiguration config) {
setClientConfiguration(config);
return getSubclass();
}
/**
* If not explicit client configuration is provided we consult the {@link
* ClientConfigurationFactory} of the service. If an explicit configuration is provided we use
* ClientConfiguration's copy constructor to avoid mutation.
*/
private ClientConfiguration resolveClientConfiguration() {
return (clientConfig == null) ? clientConfigFactory.getConfig() :
new ClientConfiguration(clientConfig);
}
/**
* Gets the {@link RequestMetricCollector} in use by the builder.
*/
public final RequestMetricCollector getMetricsCollector() {
return this.metricsCollector;
}
/**
* Sets a custom RequestMetricCollector to use for the client.
*
* @param metrics Custom RequestMetricCollector to use.
*/
public final void setMetricsCollector(RequestMetricCollector metrics) {
this.metricsCollector = metrics;
}
/**
* Sets a custom RequestMetricCollector to use for the client.
*
* @param metrics Custom RequestMetricCollector to use.
* @return This object for method chaining.
*/
public final Subclass withMetricsCollector(RequestMetricCollector metrics) {
setMetricsCollector(metrics);
return getSubclass();
}
/**
* Gets the region in use by the builder.
*/
public final String getRegion() {
return region == null ? null : region.getName();
}
/**
* Sets the region to be used by the client. This will be used to determine both the
* service endpoint (eg: https://sns.us-west-1.amazonaws.com) and signing region (eg: us-west-1)
* for requests. If neither region or endpoint configuration {@link #setEndpointConfiguration(EndpointConfiguration)}
* are explicitly provided in the builder the {@link #DEFAULT_REGION_PROVIDER} is consulted.
*
* @param region Region to use
*/
public final void setRegion(String region) {
withRegion(region);
}
/**
* Sets the region to be used by the client. This will be used to determine both the
* service endpoint (eg: https://sns.us-west-1.amazonaws.com) and signing region (eg: us-west-1)
* for requests. If neither region or endpoint configuration {@link #setEndpointConfiguration(EndpointConfiguration)}
* are explicitly provided in the builder the {@link #DEFAULT_REGION_PROVIDER} is consulted.
*
* <p> For regions not explicitly in the {@link Regions} enum use the {@link
* #withRegion(String)} overload.</p>
*
* @param region Region to use
* @return This object for method chaining.
*/
public final Subclass withRegion(Regions region) {
return withRegion(region.getName());
}
/**
* Sets the region to be used by the client. This will be used to determine both the
* service endpoint (eg: https://sns.us-west-1.amazonaws.com) and signing region (eg: us-west-1)
* for requests. If neither region or endpoint configuration {@link #setEndpointConfiguration(EndpointConfiguration)}
* are explicitly provided in the builder the {@link #DEFAULT_REGION_PROVIDER} is consulted.
*
* @param region Region to use
* @return This object for method chaining.
*/
public final Subclass withRegion(String region) {
return withRegion(getRegionObject(region));
}
/**
* Lookups the {@link Region} object for the given string region name.
*
* @param regionStr Region name.
* @return Region object.
* @throws SdkClientException If region cannot be found in the metadata.
*/
private Region getRegionObject(String regionStr) {
Region regionObj = RegionUtils.getRegion(regionStr);
if (regionObj == null) {
throw new SdkClientException(String.format("Could not find region information for '%s' in SDK metadata.",
regionStr));
}
return regionObj;
}
/**
* Sets the region to be used by the client. This will be used to determine both the
* service endpoint (eg: https://sns.us-west-1.amazonaws.com) and signing region (eg: us-west-1)
* for requests. If neither region or endpoint configuration {@link #setEndpointConfiguration(EndpointConfiguration)}
* are explicitly provided in the builder the {@link #DEFAULT_REGION_PROVIDER} is consulted.
*
* @param region Region to use, this will be used to determine both service endpoint
* and the signing region
* @return This object for method chaining.
*/
private Subclass withRegion(Region region) {
this.region = region;
return getSubclass();
}
/**
* Gets the service endpointConfiguration in use by the builder
*/
public final EndpointConfiguration getEndpoint() {
return endpointConfiguration;
}
/**
* Sets the endpoint configuration (service endpoint & signing region) to be used for requests. If neither region {@link #setRegion(String)}
* or endpoint configuration are explicitly provided in the builder the {@link #DEFAULT_REGION_PROVIDER} is consulted.
*
* <p><b>Only use this if using a non-standard service endpoint - the recommended approach for configuring a client is to use {@link #setRegion(String)}</b>
*
* @param endpointConfiguration The endpointConfiguration to use
*/
public final void setEndpointConfiguration(EndpointConfiguration endpointConfiguration) {
withEndpointConfiguration(endpointConfiguration);
}
/**
* Sets the endpoint configuration (service endpoint & signing region) to be used for requests. If neither region {@link #withRegion(String)}
* or endpoint configuration are explicitly provided in the builder the {@link #DEFAULT_REGION_PROVIDER} is consulted.
*
* <p><b>Only use this if using a non-standard service endpoint - the recommended approach for configuring a client is to use {@link #withRegion(String)}</b>
*
* @param endpointConfiguration The endpointConfiguration to use
* @return This object for method chaining.
*/
public final Subclass withEndpointConfiguration(EndpointConfiguration endpointConfiguration) {
this.endpointConfiguration = endpointConfiguration;
return getSubclass();
}
/**
* Gets the list of request handlers in use by the builder.
*/
public final List<RequestHandler2> getRequestHandlers() {
return this.requestHandlers == null ? null :
Collections.unmodifiableList(this.requestHandlers);
}
/**
* Sets the request handlers to use in the client.
*
* @param handlers Request handlers to use for client.
*/
public final void setRequestHandlers(RequestHandler2... handlers) {
this.requestHandlers = Arrays.asList(handlers);
}
/**
* Sets the request handlers to use in the client.
*
* @param handlers Request handlers to use for client.
* @return This object for method chaining.
*/
public final Subclass withRequestHandlers(RequestHandler2... handlers) {
setRequestHandlers(handlers);
return getSubclass();
}
/**
* Gets the {@link MonitoringListener} in use by the builder.
*/
public final MonitoringListener getMonitoringListener() {
return this.monitoringListener;
}
/**
* Sets a custom MonitoringListener to use for the client.
*
* @param monitoringListener Custom Monitoring Listener to use.
*/
public final void setMonitoringListener(MonitoringListener monitoringListener) {
this.monitoringListener = monitoringListener;
}
/**
* Sets a custom MonitoringListener to use for the client.
*
* @param monitoringListener Custom MonitoringListener to use.
* @return This object for method chaining.
*/
public final Subclass withMonitoringListener(MonitoringListener monitoringListener) {
setMonitoringListener(monitoringListener);
return getSubclass();
}
/**
* Request handlers are copied to a new list to avoid mutation, if no request handlers are
* provided to the builder we supply an empty list.
*/
private List<RequestHandler2> resolveRequestHandlers() {
return (requestHandlers == null) ? new ArrayList<RequestHandler2>() :
new ArrayList<RequestHandler2>(requestHandlers);
}
public CsmConfigurationProvider getClientSideMonitoringConfigurationProvider() {
return csmConfig;
}
public void setClientSideMonitoringConfigurationProvider(CsmConfigurationProvider csmConfig) {
this.csmConfig = csmConfig;
}
public Subclass withClientSideMonitoringConfigurationProvider(
CsmConfigurationProvider csmConfig) {
setClientSideMonitoringConfigurationProvider(csmConfig);
return getSubclass();
}
private CsmConfigurationProvider resolveClientSideMonitoringConfig() {
return csmConfig == null ? DefaultCsmConfigurationProviderChain.getInstance() : csmConfig;
}
/**
* Get the current value of an advanced config option.
* @param key Key of value to get.
* @param <T> Type of value to get.
* @return Value if set, otherwise null.
*/
protected final <T> T getAdvancedConfig(AdvancedConfig.Key<T> key) {
return advancedConfig.get(key);
}
/**
* Sets the value of an advanced config option.
* @param key Key of value to set.
* @param value The new value.
* @param <T> Type of value.
*/
protected final <T> void putAdvancedConfig(AdvancedConfig.Key<T> key, T value) {
advancedConfig.put(key, value);
}
/**
* Region and endpoint logic is tightly coupled to the client class right now so it's easier to
* set them after client creation and let the normal logic kick in. Ideally this should resolve
* the endpoint and signer information here and just pass that information as is to the client.
*
* @param clientInterface Client to configure
*/
@SdkInternalApi
final TypeToBuild configureMutableProperties(TypeToBuild clientInterface) {
AmazonWebServiceClient client = (AmazonWebServiceClient) clientInterface;
setRegion(client);
client.makeImmutable();
return clientInterface;
}
/**
* Builds a client with the configure properties.
*
* @return Client instance to make API calls with.
*/
public abstract TypeToBuild build();
/**
* @return An instance of AwsSyncClientParams that has all params to be used in the sync client
* constructor.
*/
protected final AwsSyncClientParams getSyncClientParams() {
return new SyncBuilderParams();
}
protected final AdvancedConfig getAdvancedConfig() {
return advancedConfig.build();
}
private void setRegion(AmazonWebServiceClient client) {
if (region != null && endpointConfiguration != null) {
throw new IllegalStateException("Only one of Region or EndpointConfiguration may be set.");
}
if (endpointConfiguration != null) {
client.setEndpoint(endpointConfiguration.getServiceEndpoint());
client.setSignerRegionOverride(endpointConfiguration.getSigningRegion());
} else if (region != null) {
client.setRegion(region);
} else {
final String region = determineRegionFromRegionProvider();
if (region != null) {
client.setRegion(getRegionObject(region));
} else {
throw new SdkClientException(
"Unable to find a region via the region provider chain. " +
"Must provide an explicit region in the builder or setup environment to supply a region.");
}
}
}
/**
* Attempt to determine the region from the configured region provider. This will return null in the event that the
* region provider could not determine the region automatically.
*/
private String determineRegionFromRegionProvider() {
try {
return regionProvider.getRegion();
}
catch (SdkClientException e) {
// The AwsRegionProviderChain that is used by default throws an exception instead of returning null when
// the region is not defined. For that reason, we have to support both throwing an exception and returning
// null as the region not being defined.
return null;
}
}
@SuppressWarnings("unchecked")
protected final Subclass getSubclass() {
return (Subclass) this;
}
/**
* Presents a view of the builder to be used in a client constructor.
*/
protected class SyncBuilderParams extends AwsAsyncClientParams {
private final ClientConfiguration _clientConfig;
private final AWSCredentialsProvider _credentials;
private final RequestMetricCollector _metricsCollector;
private final List<RequestHandler2> _requestHandlers;
private final CsmConfigurationProvider _csmConfig;
private final MonitoringListener _monitoringListener;
private final AdvancedConfig _advancedConfig;
protected SyncBuilderParams() {
this._clientConfig = resolveClientConfiguration();
this._credentials = resolveCredentials();
this._metricsCollector = metricsCollector;
this._requestHandlers = resolveRequestHandlers();
this._csmConfig = resolveClientSideMonitoringConfig();
this._monitoringListener = monitoringListener;
this._advancedConfig = advancedConfig.build();
}
@Override
public AWSCredentialsProvider getCredentialsProvider() {
return this._credentials;
}
@Override
public ClientConfiguration getClientConfiguration() {
return this._clientConfig;
}
@Override
public RequestMetricCollector getRequestMetricCollector() {
return this._metricsCollector;
}
@Override
public List<RequestHandler2> getRequestHandlers() {
return this._requestHandlers;
}
@Override
public CsmConfigurationProvider getClientSideMonitoringConfigurationProvider() {
return this._csmConfig;
}
@Override
public MonitoringListener getMonitoringListener() {
return this._monitoringListener;
}
@Override
public AdvancedConfig getAdvancedConfig() {
return _advancedConfig;
}
@Override
public ExecutorService getExecutor() {
throw new UnsupportedOperationException("ExecutorService is not used for sync client.");
}
}
/**
* A container for configuration required to submit requests to a service (service endpoint and signing region)
*/
public static final class EndpointConfiguration {
private final String serviceEndpoint;
private final String signingRegion;
/**
* @param serviceEndpoint the service endpoint either with or without the protocol (e.g. https://sns.us-west-1.amazonaws.com or sns.us-west-1.amazonaws.com)
* @param signingRegion the region to use for SigV4 signing of requests (e.g. us-west-1)
*/
public EndpointConfiguration(String serviceEndpoint, String signingRegion) {
this.serviceEndpoint = serviceEndpoint;
this.signingRegion = signingRegion;
}
public String getServiceEndpoint() {
return serviceEndpoint;
}
public String getSigningRegion() {
return signingRegion;
}
}
}
| jentfoo/aws-sdk-java | aws-java-sdk-core/src/main/java/com/amazonaws/client/builder/AwsClientBuilder.java | Java | apache-2.0 | 22,211 |
package com.jukusoft.libgdx.rpg.engine.story.impl;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.jukusoft.libgdx.rpg.engine.story.StoryPart;
import com.jukusoft.libgdx.rpg.engine.story.StoryTeller;
import com.jukusoft.libgdx.rpg.engine.time.GameTime;
import com.jukusoft.libgdx.rpg.engine.utils.ArrayUtils;
import com.jukusoft.libgdx.rpg.engine.utils.FileUtils;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Justin on 07.02.2017.
*/
public class DefaultStoryTeller implements StoryTeller {
/**
* all story parts
*/
List<StoryPart> storyParts = new ArrayList<>();
protected volatile StoryPart currentPart = null;
protected int currentPartIndex = 0;
protected BitmapFont font = null;
public DefaultStoryTeller (BitmapFont font) {
this.font = font;
}
@Override public void load(String storyFile) throws IOException {
String[] lines = ArrayUtils.convertStringListToArray(FileUtils.readLines(storyFile, StandardCharsets.UTF_8));
StoryPart part = new StoryPart();
this.currentPart = part;
//parse lines
for (String line : lines) {
if (line.startsWith("#")) {
//next part
storyParts.add(part);
part = new StoryPart();
continue;
}
part.addLine(line);
}
storyParts.add(part);
}
@Override public void start() {
this.currentPart.start();
}
@Override public int countParts() {
return this.storyParts.size();
}
@Override public StoryPart getCurrentPart() {
return this.currentPart;
}
@Override public float getPartProgress(long now) {
if (currentPart == null) {
return 1f;
} else {
return currentPart.getPartProgress(now);
}
}
@Override public void update(GameTime time) {
if (currentPart.hasFinished(time.getTime())) {
//switch to next part
this.currentPartIndex++;
if (this.currentPartIndex < this.storyParts.size()) {
this.currentPart = this.storyParts.get(this.currentPartIndex);
this.currentPart.start();
System.out.println("next story part: " + this.currentPartIndex);
} else {
System.out.println("story finished!");
}
}
}
@Override public void draw(GameTime time, SpriteBatch batch, float x, float y, float spacePerLine) {
if (currentPart == null) {
return;
}
String[] lines = this.currentPart.getLineArray();
for (int i = 0; i < lines.length; i++) {
this.font.draw(batch, lines[i], /*(game.getViewportWidth() - 80) / 2*/x, y - (i * spacePerLine));
}
}
@Override public boolean hasFinished() {
return this.currentPartIndex > this.storyParts.size();
}
}
| JuKu/libgdx-test-rpg | engine/src/main/java/com/jukusoft/libgdx/rpg/engine/story/impl/DefaultStoryTeller.java | Java | apache-2.0 | 3,080 |
/*
* Copyright to the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.rioproject.test.log;
import org.junit.runner.RunWith;
import org.rioproject.test.RioTestRunner;
/**
* Tests ServiceEventLog notifications using logback
*
* @author Dennis Reedy
*/
@RunWith(RioTestRunner.class)
public class LogbackServiceLogEventAppenderTest extends BaseServiceEventLogTest {
}
| khartig/assimilator | rio-test/src/test/java/org/rioproject/test/log/LogbackServiceLogEventAppenderTest.java | Java | apache-2.0 | 926 |
/*
* Copyright 2014 NAVER Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.navercorp.pinpoint.web.controller;
import com.navercorp.pinpoint.web.service.oncecloud.ItemService;
import com.navercorp.pinpoint.web.vo.oncecloud.Item;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* @author wziyong
*/
@Controller
@RequestMapping("/Item")
public class ItemController {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private ItemService itemService;
/*@RequestMapping(value = "/add", method = RequestMethod.POST)
@ResponseBody
public MyResult add(@RequestParam(value = "name", required = true) String name, @RequestParam(value = "cluster_id", required = true) String cluster_id, @RequestParam(value = "interface", required = true) String interface_addr, @RequestParam(value = "status", required = true) String status, @RequestParam(value = "description", required = false) String desc) {
Host host = new Host();
host.setName(name);
host.setClusterId(Integer.parseInt(cluster_id));
host.setInterfaceAddr(interface_addr);
host.setStatus(Integer.parseInt(status));
host.setDescription(desc);
this.hostService.add(host);
return new MyResult(true, 0, null);
}*/
@RequestMapping(value = "/getList", method = RequestMethod.POST)
@ResponseBody
public List<Item> getItemList(@RequestParam(value = "host_id", required = true) String host_id, @RequestParam(value = "offset", required = false) String offset) {
if (offset != null && offset != "") {
return this.itemService.getList(Integer.parseInt(host_id), Integer.parseInt(offset));
}
else{
return this.itemService.getList(Integer.parseInt(host_id), 0);
}
}
} | wziyong/pinpoint | web/src/main/java/com/navercorp/pinpoint/web/controller/ItemController.java | Java | apache-2.0 | 2,732 |
package org.renjin.primitives;
import org.renjin.eval.Context;
import org.renjin.eval.EvalException;
import org.renjin.primitives.annotations.processor.ArgumentException;
import org.renjin.primitives.annotations.processor.ArgumentIterator;
import org.renjin.primitives.annotations.processor.WrapperRuntime;
import org.renjin.sexp.BuiltinFunction;
import org.renjin.sexp.Environment;
import org.renjin.sexp.FunctionCall;
import org.renjin.sexp.PairList;
import org.renjin.sexp.SEXP;
import org.renjin.sexp.StringVector;
import org.renjin.sexp.Vector;
public class R$primitive$attr$assign
extends BuiltinFunction
{
public R$primitive$attr$assign() {
super("attr<-");
}
public SEXP apply(Context context, Environment environment, FunctionCall call, PairList args) {
try {
ArgumentIterator argIt = new ArgumentIterator(context, environment, args);
SEXP s0 = argIt.evalNext();
SEXP s1 = argIt.evalNext();
SEXP s2 = argIt.evalNext();
if (!argIt.hasNext()) {
return this.doApply(context, environment, s0, s1, s2);
}
throw new EvalException("attr<-: too many arguments, expected at most 3.");
} catch (ArgumentException e) {
throw new EvalException(context, "Invalid argument: %s. Expected:\n\tattr<-(any, character(1), any)", e.getMessage());
} catch (EvalException e) {
e.initContext(context);
throw e;
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new EvalException(e);
}
}
public static SEXP doApply(Context context, Environment environment, FunctionCall call, String[] argNames, SEXP[] args) {
try {
if ((args.length) == 3) {
return doApply(context, environment, args[ 0 ], args[ 1 ], args[ 2 ]);
}
} catch (EvalException e) {
e.initContext(context);
throw e;
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new EvalException(e);
}
throw new EvalException("attr<-: max arity is 3");
}
public SEXP apply(Context context, Environment environment, FunctionCall call, String[] argNames, SEXP[] args) {
return R$primitive$attr$assign.doApply(context, environment, call, argNames, args);
}
public static SEXP doApply(Context context, Environment environment, SEXP arg0, SEXP arg1, SEXP arg2)
throws Exception
{
if (((arg0 instanceof SEXP)&&((arg1 instanceof Vector)&&StringVector.VECTOR_TYPE.isWiderThanOrEqualTo(((Vector) arg1))))&&(arg2 instanceof SEXP)) {
return Attributes.setAttribute(((SEXP) arg0), WrapperRuntime.convertToString(arg1), ((SEXP) arg2));
} else {
throw new EvalException(String.format("Invalid argument:\n\tattr<-(%s, %s, %s)\n\tExpected:\n\tattr<-(any, character(1), any)", arg0 .getTypeName(), arg1 .getTypeName(), arg2 .getTypeName()));
}
}
}
| bedatadriven/renjin-statet | org.renjin.core/src-gen/org/renjin/primitives/R$primitive$attr$assign.java | Java | apache-2.0 | 3,078 |
package com.chinare.rop.server;
import javax.servlet.http.HttpServletRequest;
/**
* @author 王贵源(wangguiyuan@chinarecrm.com.cn)
*/
public interface RequestChecker {
public boolean check(HttpServletRequest request);
}
| ZHCS-CLUB/AXE | axe/axe-chinare-rop/axe-chinare-rop-server/src/main/java/com/chinare/rop/server/RequestChecker.java | Java | apache-2.0 | 242 |
/*
* Copyright (c) 2018.
* J. Melzer
*/
package com.jmelzer.jitty.utl;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* Created by J. Melzer on 27.03.2018.
*/
public class RandomUtilTest {
@Test
public void randomIntFromInterval() {
for (int i = 0; i < 20; i++) {
int n = RandomUtil.randomIntFromInterval(0, 10);
assertTrue("must be between 0 and 10 not " + n, n > -1 && n < 11);
}
}
@Test
public void nextInt() {
RandomUtil randomUtil = new RandomUtil(0, 10);
for (int i = 0; i < 11; i++) {
assertTrue(randomUtil.hasMoreNumbers());
int n = randomUtil.nextInt();
assertTrue("must be between 0 and 10 not " + n, n > -1 && n < 11);
}
assertFalse(randomUtil.hasMoreNumbers());
}
} | chokdee/jitty | data/src/test/java/com/jmelzer/jitty/utl/RandomUtilTest.java | Java | apache-2.0 | 890 |
/*
* Generated by the Jasper component of Apache Tomcat
* Version: Apache Tomcat/7.0.53
* Generated at: 2015-06-08 03:36:45 UTC
* Note: The last modified time of this file was set to
* the last modified time of the source file after
* generation to assist with modification tracking.
*/
package org.apache.jsp.prefs;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
public final class tab_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static final javax.servlet.jsp.JspFactory _jspxFactory =
javax.servlet.jsp.JspFactory.getDefaultFactory();
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005ff_005fview;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fsakai_005fview_005fcontainer_0026_005ftitle;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fsakai_005fstylesheet_0026_005fpath_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fsakai_005fview_005fcontent;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005ff_005fverbatim;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fh_005fform_0026_005fid;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fsakai_005ftool_005fbar;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fh_005fpanelGroup_0026_005fstyle_005frendered;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fh_005fcommandButton_0026_005fvalue_005fstyleClass_005fid_005faction_005faccesskey_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fsakai_005fmessages_0026_005frendered_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fescape_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fescape_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005ft_005fdataList_0026_005fvar_005fvalue_005frowIndexVar_005flayout_005fitemStyleClass_005fid;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005ftitle_005fstyleClass_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fh_005foutputFormat_0026_005fvalue;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005frendered_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fh_005fselectOneRadio_0026_005fvalue_005frendered_005flayout;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005ff_005fselectItem_0026_005fitemValue_005fitemLabel_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fh_005finputHidden_0026_005fvalue_005fid_005fnobody;
private javax.el.ExpressionFactory _el_expressionfactory;
private org.apache.tomcat.InstanceManager _jsp_instancemanager;
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
return _jspx_dependants;
}
public void _jspInit() {
_005fjspx_005ftagPool_005ff_005fview = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fsakai_005fview_005fcontainer_0026_005ftitle = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fsakai_005fstylesheet_0026_005fpath_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fsakai_005fview_005fcontent = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005ff_005fverbatim = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fh_005fform_0026_005fid = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fh_005fpanelGroup_0026_005fstyle_005frendered = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fh_005fcommandButton_0026_005fvalue_005fstyleClass_005fid_005faction_005faccesskey_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fsakai_005fmessages_0026_005frendered_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fescape_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fescape_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005ft_005fdataList_0026_005fvar_005fvalue_005frowIndexVar_005flayout_005fitemStyleClass_005fid = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005ftitle_005fstyleClass_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fh_005foutputFormat_0026_005fvalue = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005frendered_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fh_005fselectOneRadio_0026_005fvalue_005frendered_005flayout = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005ff_005fselectItem_0026_005fitemValue_005fitemLabel_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fh_005finputHidden_0026_005fvalue_005fid_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
}
public void _jspDestroy() {
_005fjspx_005ftagPool_005ff_005fview.release();
_005fjspx_005ftagPool_005fsakai_005fview_005fcontainer_0026_005ftitle.release();
_005fjspx_005ftagPool_005fsakai_005fstylesheet_0026_005fpath_005fnobody.release();
_005fjspx_005ftagPool_005fsakai_005fview_005fcontent.release();
_005fjspx_005ftagPool_005ff_005fverbatim.release();
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody.release();
_005fjspx_005ftagPool_005fh_005fform_0026_005fid.release();
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar.release();
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.release();
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody.release();
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.release();
_005fjspx_005ftagPool_005fh_005fpanelGroup_0026_005fstyle_005frendered.release();
_005fjspx_005ftagPool_005fh_005fcommandButton_0026_005fvalue_005fstyleClass_005fid_005faction_005faccesskey_005fnobody.release();
_005fjspx_005ftagPool_005fsakai_005fmessages_0026_005frendered_005fnobody.release();
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fescape_005fnobody.release();
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fescape_005fnobody.release();
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.release();
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fnobody.release();
_005fjspx_005ftagPool_005ft_005fdataList_0026_005fvar_005fvalue_005frowIndexVar_005flayout_005fitemStyleClass_005fid.release();
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fnobody.release();
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005ftitle_005fstyleClass_005fnobody.release();
_005fjspx_005ftagPool_005fh_005foutputFormat_0026_005fvalue.release();
_005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.release();
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005frendered_005fnobody.release();
_005fjspx_005ftagPool_005fh_005fselectOneRadio_0026_005fvalue_005frendered_005flayout.release();
_005fjspx_005ftagPool_005ff_005fselectItem_0026_005fitemValue_005fitemLabel_005fnobody.release();
_005fjspx_005ftagPool_005fh_005finputHidden_0026_005fvalue_005fid_005fnobody.release();
}
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
throws java.io.IOException, javax.servlet.ServletException {
final javax.servlet.jsp.PageContext pageContext;
javax.servlet.http.HttpSession session = null;
final javax.servlet.ServletContext application;
final javax.servlet.ServletConfig config;
javax.servlet.jsp.JspWriter out = null;
final java.lang.Object page = this;
javax.servlet.jsp.JspWriter _jspx_out = null;
javax.servlet.jsp.PageContext _jspx_page_context = null;
try {
response.setContentType("text/html");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write('\n');
out.write('\n');
out.write('\n');
out.write('\n');
out.write('\n');
out.write('\n');
out.write('\n');
out.write('\n');
if (_jspx_meth_f_005fview_005f0(_jspx_page_context))
return;
out.write('\n');
out.write('\n');
} catch (java.lang.Throwable t) {
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
try { out.clearBuffer(); } catch (java.io.IOException e) {}
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
else throw new ServletException(t);
}
} finally {
_jspxFactory.releasePageContext(_jspx_page_context);
}
}
private boolean _jspx_meth_f_005fview_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest)_jspx_page_context.getRequest();
javax.servlet.http.HttpServletResponse response = (javax.servlet.http.HttpServletResponse)_jspx_page_context.getResponse();
// f:view
com.sun.faces.taglib.jsf_core.ViewTag _jspx_th_f_005fview_005f0 = (com.sun.faces.taglib.jsf_core.ViewTag) _005fjspx_005ftagPool_005ff_005fview.get(com.sun.faces.taglib.jsf_core.ViewTag.class);
_jspx_th_f_005fview_005f0.setPageContext(_jspx_page_context);
_jspx_th_f_005fview_005f0.setParent(null);
int _jspx_eval_f_005fview_005f0 = _jspx_th_f_005fview_005f0.doStartTag();
if (_jspx_eval_f_005fview_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fview_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fview_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fview_005f0.doInitBody();
}
do {
out.write('\n');
if (_jspx_meth_sakai_005fview_005fcontainer_005f0(_jspx_th_f_005fview_005f0, _jspx_page_context))
return true;
out.write('\n');
out.write('\n');
int evalDoAfterBody = _jspx_th_f_005fview_005f0.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fview_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fview_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fview.reuse(_jspx_th_f_005fview_005f0);
return true;
}
_005fjspx_005ftagPool_005ff_005fview.reuse(_jspx_th_f_005fview_005f0);
return false;
}
private boolean _jspx_meth_sakai_005fview_005fcontainer_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fview_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest)_jspx_page_context.getRequest();
javax.servlet.http.HttpServletResponse response = (javax.servlet.http.HttpServletResponse)_jspx_page_context.getResponse();
// sakai:view_container
org.sakaiproject.jsf.tag.ViewTag _jspx_th_sakai_005fview_005fcontainer_005f0 = (org.sakaiproject.jsf.tag.ViewTag) _005fjspx_005ftagPool_005fsakai_005fview_005fcontainer_0026_005ftitle.get(org.sakaiproject.jsf.tag.ViewTag.class);
_jspx_th_sakai_005fview_005fcontainer_005f0.setPageContext(_jspx_page_context);
_jspx_th_sakai_005fview_005fcontainer_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fview_005f0);
// /prefs/tab.jsp(10,0) name = title type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005fview_005fcontainer_005f0.setTitle("#{msgs.prefs_title}");
int _jspx_eval_sakai_005fview_005fcontainer_005f0 = _jspx_th_sakai_005fview_005fcontainer_005f0.doStartTag();
if (_jspx_eval_sakai_005fview_005fcontainer_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
out.write('\n');
if (_jspx_meth_sakai_005fstylesheet_005f0(_jspx_th_sakai_005fview_005fcontainer_005f0, _jspx_page_context))
return true;
out.write('\n');
if (_jspx_meth_sakai_005fview_005fcontent_005f0(_jspx_th_sakai_005fview_005fcontainer_005f0, _jspx_page_context))
return true;
out.write('\n');
}
if (_jspx_th_sakai_005fview_005fcontainer_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005fview_005fcontainer_0026_005ftitle.reuse(_jspx_th_sakai_005fview_005fcontainer_005f0);
return true;
}
_005fjspx_005ftagPool_005fsakai_005fview_005fcontainer_0026_005ftitle.reuse(_jspx_th_sakai_005fview_005fcontainer_005f0);
return false;
}
private boolean _jspx_meth_sakai_005fstylesheet_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005fview_005fcontainer_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:stylesheet
org.sakaiproject.jsf.tag.StylesheetTag _jspx_th_sakai_005fstylesheet_005f0 = (org.sakaiproject.jsf.tag.StylesheetTag) _005fjspx_005ftagPool_005fsakai_005fstylesheet_0026_005fpath_005fnobody.get(org.sakaiproject.jsf.tag.StylesheetTag.class);
_jspx_th_sakai_005fstylesheet_005f0.setPageContext(_jspx_page_context);
_jspx_th_sakai_005fstylesheet_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005fview_005fcontainer_005f0);
// /prefs/tab.jsp(11,0) name = path type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005fstylesheet_005f0.setPath("/css/prefs.css");
int _jspx_eval_sakai_005fstylesheet_005f0 = _jspx_th_sakai_005fstylesheet_005f0.doStartTag();
if (_jspx_th_sakai_005fstylesheet_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005fstylesheet_0026_005fpath_005fnobody.reuse(_jspx_th_sakai_005fstylesheet_005f0);
return true;
}
_005fjspx_005ftagPool_005fsakai_005fstylesheet_0026_005fpath_005fnobody.reuse(_jspx_th_sakai_005fstylesheet_005f0);
return false;
}
private boolean _jspx_meth_sakai_005fview_005fcontent_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005fview_005fcontainer_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest)_jspx_page_context.getRequest();
javax.servlet.http.HttpServletResponse response = (javax.servlet.http.HttpServletResponse)_jspx_page_context.getResponse();
// sakai:view_content
org.sakaiproject.jsf.tag.ViewContentTag _jspx_th_sakai_005fview_005fcontent_005f0 = (org.sakaiproject.jsf.tag.ViewContentTag) _005fjspx_005ftagPool_005fsakai_005fview_005fcontent.get(org.sakaiproject.jsf.tag.ViewContentTag.class);
_jspx_th_sakai_005fview_005fcontent_005f0.setPageContext(_jspx_page_context);
_jspx_th_sakai_005fview_005fcontent_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005fview_005fcontainer_005f0);
int _jspx_eval_sakai_005fview_005fcontent_005f0 = _jspx_th_sakai_005fview_005fcontent_005f0.doStartTag();
if (_jspx_eval_sakai_005fview_005fcontent_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
out.write('\n');
out.write('\n');
if (_jspx_meth_f_005fverbatim_005f0(_jspx_th_sakai_005fview_005fcontent_005f0, _jspx_page_context))
return true;
out.write('\n');
out.write(' ');
out.write(' ');
if (_jspx_meth_h_005fform_005f0(_jspx_th_sakai_005fview_005fcontent_005f0, _jspx_page_context))
return true;
out.write('\n');
}
if (_jspx_th_sakai_005fview_005fcontent_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005fview_005fcontent.reuse(_jspx_th_sakai_005fview_005fcontent_005f0);
return true;
}
_005fjspx_005ftagPool_005fsakai_005fview_005fcontent.reuse(_jspx_th_sakai_005fview_005fcontent_005f0);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005fview_005fcontent_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f0 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f0.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005fview_005fcontent_005f0);
int _jspx_eval_f_005fverbatim_005f0 = _jspx_th_f_005fverbatim_005f0.doStartTag();
if (_jspx_eval_f_005fverbatim_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f0.doInitBody();
}
do {
out.write("\n");
out.write(" <script type=\"text/javascript\" src=\"/library/js/jquery/jquery-1.9.1.min.js\">//</script>\n");
out.write(" <script type=\"text/javascript\" src=\"/library/js/fluid/1.4/MyInfusion.js\">//</script>\n");
out.write(" <script type=\"text/javascript\" src=\"/sakai-user-tool-prefs/js/prefs.js\">//</script>\n");
out.write("<script type=\"text/javascript\">\n");
out.write("<!--\n");
out.write("function checkReloadTop() {\n");
out.write(" check = jQuery('input[id$=reloadTop]').val();\n");
out.write(" if (check == 'true' ) parent.location.reload();\n");
out.write("}\n");
out.write("\n");
out.write("jQuery(document).ready(function () {\n");
out.write(" setTimeout('checkReloadTop();', 1500);\n");
out.write(" setupMultipleSelect();\n");
out.write(" setupPrefsGen();\n");
out.write("});\n");
out.write("//-->\n");
out.write("</script>\n");
if (_jspx_meth_t_005foutputText_005f0(_jspx_th_f_005fverbatim_005f0, _jspx_page_context))
return true;
out.write('\n');
out.write('\n');
if (_jspx_meth_t_005foutputText_005f1(_jspx_th_f_005fverbatim_005f0, _jspx_page_context))
return true;
out.write('\n');
if (_jspx_meth_t_005foutputText_005f2(_jspx_th_f_005fverbatim_005f0, _jspx_page_context))
return true;
out.write('\n');
if (_jspx_meth_t_005foutputText_005f3(_jspx_th_f_005fverbatim_005f0, _jspx_page_context))
return true;
out.write('\n');
if (_jspx_meth_t_005foutputText_005f4(_jspx_th_f_005fverbatim_005f0, _jspx_page_context))
return true;
out.write('\n');
out.write('\n');
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f0.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f0);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f0);
return false;
}
private boolean _jspx_meth_t_005foutputText_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// t:outputText
org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag _jspx_th_t_005foutputText_005f0 = (org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag) _005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody.get(org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag.class);
_jspx_th_t_005foutputText_005f0.setPageContext(_jspx_page_context);
_jspx_th_t_005foutputText_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f0);
// /prefs/tab.jsp(32,0) name = style type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f0.setStyle("display:none");
// /prefs/tab.jsp(32,0) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f0.setStyleClass("checkboxSelectMessage");
// /prefs/tab.jsp(32,0) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f0.setValue("#{msgs.prefs_checkbox_select_message}");
int _jspx_eval_t_005foutputText_005f0 = _jspx_th_t_005foutputText_005f0.doStartTag();
if (_jspx_th_t_005foutputText_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody.reuse(_jspx_th_t_005foutputText_005f0);
return true;
}
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody.reuse(_jspx_th_t_005foutputText_005f0);
return false;
}
private boolean _jspx_meth_t_005foutputText_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// t:outputText
org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag _jspx_th_t_005foutputText_005f1 = (org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag) _005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody.get(org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag.class);
_jspx_th_t_005foutputText_005f1.setPageContext(_jspx_page_context);
_jspx_th_t_005foutputText_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f0);
// /prefs/tab.jsp(34,0) name = style type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f1.setStyle("display:none");
// /prefs/tab.jsp(34,0) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f1.setStyleClass("movePanelMessage");
// /prefs/tab.jsp(34,0) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f1.setValue("Move selected sites to top of {0}");
int _jspx_eval_t_005foutputText_005f1 = _jspx_th_t_005foutputText_005f1.doStartTag();
if (_jspx_th_t_005foutputText_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody.reuse(_jspx_th_t_005foutputText_005f1);
return true;
}
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody.reuse(_jspx_th_t_005foutputText_005f1);
return false;
}
private boolean _jspx_meth_t_005foutputText_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// t:outputText
org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag _jspx_th_t_005foutputText_005f2 = (org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag) _005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody.get(org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag.class);
_jspx_th_t_005foutputText_005f2.setPageContext(_jspx_page_context);
_jspx_th_t_005foutputText_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f0);
// /prefs/tab.jsp(35,0) name = style type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f2.setStyle("display:none");
// /prefs/tab.jsp(35,0) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f2.setStyleClass("checkboxFromMessFav");
// /prefs/tab.jsp(35,0) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f2.setValue("#{msgs.prefs_fav_sites_short}");
int _jspx_eval_t_005foutputText_005f2 = _jspx_th_t_005foutputText_005f2.doStartTag();
if (_jspx_th_t_005foutputText_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody.reuse(_jspx_th_t_005foutputText_005f2);
return true;
}
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody.reuse(_jspx_th_t_005foutputText_005f2);
return false;
}
private boolean _jspx_meth_t_005foutputText_005f3(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// t:outputText
org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag _jspx_th_t_005foutputText_005f3 = (org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag) _005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody.get(org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag.class);
_jspx_th_t_005foutputText_005f3.setPageContext(_jspx_page_context);
_jspx_th_t_005foutputText_005f3.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f0);
// /prefs/tab.jsp(36,0) name = style type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f3.setStyle("display:none");
// /prefs/tab.jsp(36,0) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f3.setStyleClass("checkboxFromMessAct");
// /prefs/tab.jsp(36,0) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f3.setValue("#{msgs.prefs_active_sites_short}");
int _jspx_eval_t_005foutputText_005f3 = _jspx_th_t_005foutputText_005f3.doStartTag();
if (_jspx_th_t_005foutputText_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody.reuse(_jspx_th_t_005foutputText_005f3);
return true;
}
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody.reuse(_jspx_th_t_005foutputText_005f3);
return false;
}
private boolean _jspx_meth_t_005foutputText_005f4(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// t:outputText
org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag _jspx_th_t_005foutputText_005f4 = (org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag) _005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody.get(org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag.class);
_jspx_th_t_005foutputText_005f4.setPageContext(_jspx_page_context);
_jspx_th_t_005foutputText_005f4.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f0);
// /prefs/tab.jsp(37,0) name = style type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f4.setStyle("display:none");
// /prefs/tab.jsp(37,0) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f4.setStyleClass("checkboxFromMessArc");
// /prefs/tab.jsp(37,0) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f4.setValue("#{msgs.prefs_archive_sites_short}");
int _jspx_eval_t_005foutputText_005f4 = _jspx_th_t_005foutputText_005f4.doStartTag();
if (_jspx_th_t_005foutputText_005f4.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody.reuse(_jspx_th_t_005foutputText_005f4);
return true;
}
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fstyleClass_005fstyle_005fnobody.reuse(_jspx_th_t_005foutputText_005f4);
return false;
}
private boolean _jspx_meth_h_005fform_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005fview_005fcontent_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest)_jspx_page_context.getRequest();
javax.servlet.http.HttpServletResponse response = (javax.servlet.http.HttpServletResponse)_jspx_page_context.getResponse();
// h:form
com.sun.faces.taglib.html_basic.FormTag _jspx_th_h_005fform_005f0 = (com.sun.faces.taglib.html_basic.FormTag) _005fjspx_005ftagPool_005fh_005fform_0026_005fid.get(com.sun.faces.taglib.html_basic.FormTag.class);
_jspx_th_h_005fform_005f0.setPageContext(_jspx_page_context);
_jspx_th_h_005fform_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005fview_005fcontent_005f0);
// /prefs/tab.jsp(40,2) name = id type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fform_005f0.setId("prefs_form");
int _jspx_eval_h_005fform_005f0 = _jspx_th_h_005fform_005f0.doStartTag();
if (_jspx_eval_h_005fform_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
out.write("\n");
out.write("\t\t\t\t");
if (_jspx_meth_sakai_005ftool_005fbar_005f0(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write("\n");
out.write("\t\t\t\t<h3>\n");
out.write("\t\t\t\t\t");
if (_jspx_meth_h_005foutputText_005f0(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write("\t\t\t\t\t");
if (_jspx_meth_h_005fpanelGroup_005f0(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write("\t\t\t\t</h3>\n");
out.write(" <div class=\"act\">\n");
out.write(" ");
if (_jspx_meth_h_005fcommandButton_005f0(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_h_005fcommandButton_005f1(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" </div>\t\t\t\t\n");
out.write("\t\t\t\t\n");
out.write(" ");
if (_jspx_meth_sakai_005fmessages_005f0(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write('\n');
if (_jspx_meth_f_005fverbatim_005f1(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f2(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write('\n');
out.write(' ');
out.write(' ');
if (_jspx_meth_t_005fdataList_005f0(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f7(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f8(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write('\n');
out.write(' ');
out.write(' ');
if (_jspx_meth_t_005fdataList_005f1(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f13(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f14(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write('\n');
out.write(' ');
out.write(' ');
if (_jspx_meth_t_005fdataList_005f2(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f19(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f20(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write('\n');
out.write('\n');
out.write('\n');
if (_jspx_meth_f_005fverbatim_005f21(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write('\n');
if (_jspx_meth_h_005foutputText_005f19(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write('\n');
if (_jspx_meth_h_005fselectOneRadio_005f0(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write('\n');
if (_jspx_meth_f_005fverbatim_005f22(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write("\n");
out.write("\n");
out.write("\t \t");
if (_jspx_meth_h_005fcommandButton_005f2(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write("\t\t ");
if (_jspx_meth_h_005fcommandButton_005f3(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write('\n');
out.write(' ');
out.write(' ');
if (_jspx_meth_h_005finputHidden_005f0(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write('\n');
out.write(' ');
out.write(' ');
if (_jspx_meth_h_005finputHidden_005f1(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write('\n');
out.write(' ');
out.write(' ');
if (_jspx_meth_h_005finputHidden_005f2(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write('\n');
out.write(' ');
out.write(' ');
if (_jspx_meth_h_005finputHidden_005f3(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write('\n');
if (_jspx_meth_f_005fverbatim_005f23(_jspx_th_h_005fform_005f0, _jspx_page_context))
return true;
out.write('\n');
}
if (_jspx_th_h_005fform_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005fform_0026_005fid.reuse(_jspx_th_h_005fform_005f0);
return true;
}
_005fjspx_005ftagPool_005fh_005fform_0026_005fid.reuse(_jspx_th_h_005fform_005f0);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar
org.sakaiproject.jsf.tag.ToolBarTag _jspx_th_sakai_005ftool_005fbar_005f0 = (org.sakaiproject.jsf.tag.ToolBarTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar.get(org.sakaiproject.jsf.tag.ToolBarTag.class);
_jspx_th_sakai_005ftool_005fbar_005f0.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
int _jspx_eval_sakai_005ftool_005fbar_005f0 = _jspx_th_sakai_005ftool_005fbar_005f0.doStartTag();
if (_jspx_eval_sakai_005ftool_005fbar_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
out.write("\n");
out.write("\t\t\t ");
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f0(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f1(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f2(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f3(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f4(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t \n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f5(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f6(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f7(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f8(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f9(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t \n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f10(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f11(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f12(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f13(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f14(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t \n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f15(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f16(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f17(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f18(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f19(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t \n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f20(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f21(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f22(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f23(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t ");
if (_jspx_meth_sakai_005ftool_005fbar_005fitem_005f24(_jspx_th_sakai_005ftool_005fbar_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \t\t \n");
out.write(" \t \t");
}
if (_jspx_th_sakai_005ftool_005fbar_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar.reuse(_jspx_th_sakai_005ftool_005fbar_005f0);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar.reuse(_jspx_th_sakai_005ftool_005fbar_005f0);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f0 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f0.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(43,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f0.setAction("#{UserPrefsTool.processActionNotiFrmEdit}");
// /prefs/tab.jsp(43,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f0.setValue("#{msgs.prefs_noti_title}");
// /prefs/tab.jsp(43,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f0.setRendered("#{UserPrefsTool.noti_selection == 1}");
// /prefs/tab.jsp(43,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f0.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f0 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f0.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f0);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f0);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f1 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f1.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(44,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f1.setValue("#{msgs.prefs_tab_title}");
// /prefs/tab.jsp(44,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f1.setRendered("#{UserPrefsTool.tab_selection == 1}");
// /prefs/tab.jsp(44,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f1.setCurrent("true");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f1 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f1.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f1);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f1);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f2 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f2.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(45,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f2.setAction("#{UserPrefsTool.processActionTZFrmEdit}");
// /prefs/tab.jsp(45,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f2.setValue("#{msgs.prefs_timezone_title}");
// /prefs/tab.jsp(45,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f2.setRendered("#{UserPrefsTool.timezone_selection == 1}");
// /prefs/tab.jsp(45,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f2.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f2 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f2.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f2);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f2);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f3(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f3 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f3.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f3.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(46,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f3.setAction("#{UserPrefsTool.processActionLocFrmEdit}");
// /prefs/tab.jsp(46,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f3.setValue("#{msgs.prefs_lang_title}");
// /prefs/tab.jsp(46,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f3.setRendered("#{UserPrefsTool.language_selection == 1}");
// /prefs/tab.jsp(46,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f3.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f3 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f3.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f3);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f3);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f4(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f4 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f4.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f4.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(47,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f4.setAction("#{UserPrefsTool.processActionPrivFrmEdit}");
// /prefs/tab.jsp(47,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f4.setValue("#{msgs.prefs_privacy}");
// /prefs/tab.jsp(47,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f4.setRendered("#{UserPrefsTool.privacy_selection == 1}");
// /prefs/tab.jsp(47,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f4.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f4 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f4.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f4.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f4);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f4);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f5(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f5 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f5.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f5.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(49,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f5.setAction("#{UserPrefsTool.processActionNotiFrmEdit}");
// /prefs/tab.jsp(49,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f5.setValue("#{msgs.prefs_noti_title}");
// /prefs/tab.jsp(49,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f5.setRendered("#{UserPrefsTool.noti_selection == 2}");
// /prefs/tab.jsp(49,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f5.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f5 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f5.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f5.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f5);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f5);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f6(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f6 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f6.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f6.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(50,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f6.setValue("#{msgs.prefs_tab_title}");
// /prefs/tab.jsp(50,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f6.setRendered("#{UserPrefsTool.tab_selection == 2}");
// /prefs/tab.jsp(50,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f6.setCurrent("true");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f6 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f6.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f6.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f6);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f6);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f7(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f7 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f7.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f7.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(51,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f7.setAction("#{UserPrefsTool.processActionTZFrmEdit}");
// /prefs/tab.jsp(51,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f7.setValue("#{msgs.prefs_timezone_title}");
// /prefs/tab.jsp(51,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f7.setRendered("#{UserPrefsTool.timezone_selection == 2}");
// /prefs/tab.jsp(51,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f7.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f7 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f7.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f7.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f7);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f7);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f8(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f8 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f8.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f8.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(52,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f8.setAction("#{UserPrefsTool.processActionLocFrmEdit}");
// /prefs/tab.jsp(52,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f8.setValue("#{msgs.prefs_lang_title}");
// /prefs/tab.jsp(52,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f8.setRendered("#{UserPrefsTool.language_selection == 2}");
// /prefs/tab.jsp(52,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f8.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f8 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f8.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f8.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f8);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f8);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f9(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f9 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f9.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f9.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(53,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f9.setAction("#{UserPrefsTool.processActionPrivFrmEdit}");
// /prefs/tab.jsp(53,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f9.setValue("#{msgs.prefs_privacy}");
// /prefs/tab.jsp(53,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f9.setRendered("#{UserPrefsTool.privacy_selection == 2}");
// /prefs/tab.jsp(53,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f9.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f9 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f9.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f9.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f9);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f9);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f10(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f10 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f10.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f10.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(55,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f10.setAction("#{UserPrefsTool.processActionNotiFrmEdit}");
// /prefs/tab.jsp(55,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f10.setValue("#{msgs.prefs_noti_title}");
// /prefs/tab.jsp(55,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f10.setRendered("#{UserPrefsTool.noti_selection == 3}");
// /prefs/tab.jsp(55,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f10.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f10 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f10.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f10.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f10);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f10);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f11(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f11 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f11.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f11.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(56,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f11.setValue("#{msgs.prefs_tab_title}");
// /prefs/tab.jsp(56,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f11.setRendered("#{UserPrefsTool.tab_selection == 3}");
// /prefs/tab.jsp(56,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f11.setCurrent("true");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f11 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f11.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f11.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f11);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f11);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f12(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f12 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f12.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f12.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(57,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f12.setAction("#{UserPrefsTool.processActionTZFrmEdit}");
// /prefs/tab.jsp(57,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f12.setValue("#{msgs.prefs_timezone_title}");
// /prefs/tab.jsp(57,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f12.setRendered("#{UserPrefsTool.timezone_selection == 3}");
// /prefs/tab.jsp(57,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f12.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f12 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f12.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f12.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f12);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f12);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f13(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f13 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f13.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f13.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(58,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f13.setAction("#{UserPrefsTool.processActionLocFrmEdit}");
// /prefs/tab.jsp(58,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f13.setValue("#{msgs.prefs_lang_title}");
// /prefs/tab.jsp(58,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f13.setRendered("#{UserPrefsTool.language_selection == 3}");
// /prefs/tab.jsp(58,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f13.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f13 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f13.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f13.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f13);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f13);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f14(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f14 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f14.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f14.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(59,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f14.setAction("#{UserPrefsTool.processActionPrivFrmEdit}");
// /prefs/tab.jsp(59,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f14.setValue("#{msgs.prefs_privacy}");
// /prefs/tab.jsp(59,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f14.setRendered("#{UserPrefsTool.privacy_selection == 3}");
// /prefs/tab.jsp(59,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f14.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f14 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f14.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f14.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f14);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f14);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f15(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f15 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f15.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f15.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(61,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f15.setAction("#{UserPrefsTool.processActionNotiFrmEdit}");
// /prefs/tab.jsp(61,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f15.setValue("#{msgs.prefs_noti_title}");
// /prefs/tab.jsp(61,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f15.setRendered("#{UserPrefsTool.noti_selection == 4}");
// /prefs/tab.jsp(61,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f15.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f15 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f15.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f15.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f15);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f15);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f16(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f16 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f16.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f16.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(62,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f16.setValue("#{msgs.prefs_tab_title}");
// /prefs/tab.jsp(62,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f16.setRendered("#{UserPrefsTool.tab_selection == 4}");
// /prefs/tab.jsp(62,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f16.setCurrent("true");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f16 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f16.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f16.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f16);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f16);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f17(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f17 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f17.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f17.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(63,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f17.setAction("#{UserPrefsTool.processActionTZFrmEdit}");
// /prefs/tab.jsp(63,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f17.setValue("#{msgs.prefs_timezone_title}");
// /prefs/tab.jsp(63,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f17.setRendered("#{UserPrefsTool.timezone_selection == 4}");
// /prefs/tab.jsp(63,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f17.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f17 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f17.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f17.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f17);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f17);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f18(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f18 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f18.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f18.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(64,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f18.setAction("#{UserPrefsTool.processActionLocFrmEdit}");
// /prefs/tab.jsp(64,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f18.setValue("#{msgs.prefs_lang_title}");
// /prefs/tab.jsp(64,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f18.setRendered("#{UserPrefsTool.language_selection == 4}");
// /prefs/tab.jsp(64,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f18.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f18 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f18.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f18.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f18);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f18);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f19(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f19 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f19.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f19.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(65,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f19.setAction("#{UserPrefsTool.processActionPrivFrmEdit}");
// /prefs/tab.jsp(65,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f19.setValue("#{msgs.prefs_privacy}");
// /prefs/tab.jsp(65,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f19.setRendered("#{UserPrefsTool.privacy_selection == 4}");
// /prefs/tab.jsp(65,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f19.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f19 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f19.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f19.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f19);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f19);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f20(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f20 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f20.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f20.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(67,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f20.setAction("#{UserPrefsTool.processActionNotiFrmEdit}");
// /prefs/tab.jsp(67,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f20.setValue("#{msgs.prefs_noti_title}");
// /prefs/tab.jsp(67,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f20.setRendered("#{UserPrefsTool.noti_selection == 5}");
// /prefs/tab.jsp(67,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f20.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f20 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f20.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f20.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f20);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f20);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f21(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f21 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f21.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f21.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(68,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f21.setValue("#{msgs.prefs_tab_title}");
// /prefs/tab.jsp(68,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f21.setRendered("#{UserPrefsTool.tab_selection == 5}");
// /prefs/tab.jsp(68,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f21.setCurrent("true");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f21 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f21.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f21.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f21);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f21);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f22(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f22 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f22.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f22.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(69,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f22.setAction("#{UserPrefsTool.processActionTZFrmEdit}");
// /prefs/tab.jsp(69,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f22.setValue("#{msgs.prefs_timezone_title}");
// /prefs/tab.jsp(69,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f22.setRendered("#{UserPrefsTool.timezone_selection == 5}");
// /prefs/tab.jsp(69,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f22.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f22 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f22.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f22.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f22);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f22);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f23(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f23 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f23.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f23.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(70,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f23.setAction("#{UserPrefsTool.processActionLocFrmEdit}");
// /prefs/tab.jsp(70,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f23.setValue("#{msgs.prefs_lang_title}");
// /prefs/tab.jsp(70,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f23.setRendered("#{UserPrefsTool.language_selection == 5}");
// /prefs/tab.jsp(70,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f23.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f23 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f23.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f23.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f23);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f23);
return false;
}
private boolean _jspx_meth_sakai_005ftool_005fbar_005fitem_005f24(javax.servlet.jsp.tagext.JspTag _jspx_th_sakai_005ftool_005fbar_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:tool_bar_item
org.sakaiproject.jsf.tag.ToolBarItemTag _jspx_th_sakai_005ftool_005fbar_005fitem_005f24 = (org.sakaiproject.jsf.tag.ToolBarItemTag) _005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.get(org.sakaiproject.jsf.tag.ToolBarItemTag.class);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f24.setPageContext(_jspx_page_context);
_jspx_th_sakai_005ftool_005fbar_005fitem_005f24.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_sakai_005ftool_005fbar_005f0);
// /prefs/tab.jsp(71,7) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f24.setAction("#{UserPrefsTool.processActionPrivFrmEdit}");
// /prefs/tab.jsp(71,7) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f24.setValue("#{msgs.prefs_privacy}");
// /prefs/tab.jsp(71,7) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f24.setRendered("#{UserPrefsTool.privacy_selection == 5}");
// /prefs/tab.jsp(71,7) name = current type = boolean reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005ftool_005fbar_005fitem_005f24.setCurrent("false");
int _jspx_eval_sakai_005ftool_005fbar_005fitem_005f24 = _jspx_th_sakai_005ftool_005fbar_005fitem_005f24.doStartTag();
if (_jspx_th_sakai_005ftool_005fbar_005fitem_005f24.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f24);
return true;
}
_005fjspx_005ftagPool_005fsakai_005ftool_005fbar_005fitem_0026_005fvalue_005frendered_005fcurrent_005faction_005fnobody.reuse(_jspx_th_sakai_005ftool_005fbar_005fitem_005f24);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f0 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f0.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
// /prefs/tab.jsp(76,5) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f0.setValue("#{msgs.prefs_tab_title}");
int _jspx_eval_h_005foutputText_005f0 = _jspx_th_h_005foutputText_005f0.doStartTag();
if (_jspx_th_h_005foutputText_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f0);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f0);
return false;
}
private boolean _jspx_meth_h_005fpanelGroup_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest)_jspx_page_context.getRequest();
javax.servlet.http.HttpServletResponse response = (javax.servlet.http.HttpServletResponse)_jspx_page_context.getResponse();
// h:panelGroup
com.sun.faces.taglib.html_basic.PanelGroupTag _jspx_th_h_005fpanelGroup_005f0 = (com.sun.faces.taglib.html_basic.PanelGroupTag) _005fjspx_005ftagPool_005fh_005fpanelGroup_0026_005fstyle_005frendered.get(com.sun.faces.taglib.html_basic.PanelGroupTag.class);
_jspx_th_h_005fpanelGroup_005f0.setPageContext(_jspx_page_context);
_jspx_th_h_005fpanelGroup_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
// /prefs/tab.jsp(77,5) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fpanelGroup_005f0.setRendered("#{UserPrefsTool.tabUpdated}");
// /prefs/tab.jsp(77,5) name = style type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fpanelGroup_005f0.setStyle("margin:0 3em;font-weight:normal");
int _jspx_eval_h_005fpanelGroup_005f0 = _jspx_th_h_005fpanelGroup_005f0.doStartTag();
if (_jspx_eval_h_005fpanelGroup_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
out.write("\n");
out.write("\t\t\t\t\t\t");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "prefUpdatedMsg.jsp", out, false);
out.write("\t\n");
out.write("\t\t\t\t\t");
}
if (_jspx_th_h_005fpanelGroup_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005fpanelGroup_0026_005fstyle_005frendered.reuse(_jspx_th_h_005fpanelGroup_005f0);
return true;
}
_005fjspx_005ftagPool_005fh_005fpanelGroup_0026_005fstyle_005frendered.reuse(_jspx_th_h_005fpanelGroup_005f0);
return false;
}
private boolean _jspx_meth_h_005fcommandButton_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:commandButton
com.sun.faces.taglib.html_basic.CommandButtonTag _jspx_th_h_005fcommandButton_005f0 = (com.sun.faces.taglib.html_basic.CommandButtonTag) _005fjspx_005ftagPool_005fh_005fcommandButton_0026_005fvalue_005fstyleClass_005fid_005faction_005faccesskey_005fnobody.get(com.sun.faces.taglib.html_basic.CommandButtonTag.class);
_jspx_th_h_005fcommandButton_005f0.setPageContext(_jspx_page_context);
_jspx_th_h_005fcommandButton_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
// /prefs/tab.jsp(82,12) name = accesskey type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f0.setAccesskey("s");
// /prefs/tab.jsp(82,12) name = id type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f0.setId("prefAllSub");
// /prefs/tab.jsp(82,12) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f0.setStyleClass("active formButton");
// /prefs/tab.jsp(82,12) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f0.setValue("#{msgs.update_pref}");
// /prefs/tab.jsp(82,12) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f0.setAction("#{UserPrefsTool.processActionSaveOrder}");
int _jspx_eval_h_005fcommandButton_005f0 = _jspx_th_h_005fcommandButton_005f0.doStartTag();
if (_jspx_th_h_005fcommandButton_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005fcommandButton_0026_005fvalue_005fstyleClass_005fid_005faction_005faccesskey_005fnobody.reuse(_jspx_th_h_005fcommandButton_005f0);
return true;
}
_005fjspx_005ftagPool_005fh_005fcommandButton_0026_005fvalue_005fstyleClass_005fid_005faction_005faccesskey_005fnobody.reuse(_jspx_th_h_005fcommandButton_005f0);
return false;
}
private boolean _jspx_meth_h_005fcommandButton_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:commandButton
com.sun.faces.taglib.html_basic.CommandButtonTag _jspx_th_h_005fcommandButton_005f1 = (com.sun.faces.taglib.html_basic.CommandButtonTag) _005fjspx_005ftagPool_005fh_005fcommandButton_0026_005fvalue_005fstyleClass_005fid_005faction_005faccesskey_005fnobody.get(com.sun.faces.taglib.html_basic.CommandButtonTag.class);
_jspx_th_h_005fcommandButton_005f1.setPageContext(_jspx_page_context);
_jspx_th_h_005fcommandButton_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
// /prefs/tab.jsp(83,12) name = accesskey type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f1.setAccesskey("x");
// /prefs/tab.jsp(83,12) name = id type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f1.setId("cancel");
// /prefs/tab.jsp(83,12) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f1.setValue("#{msgs.cancel_pref}");
// /prefs/tab.jsp(83,12) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f1.setAction("#{UserPrefsTool.processActionCancel}");
// /prefs/tab.jsp(83,12) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f1.setStyleClass("formButton");
int _jspx_eval_h_005fcommandButton_005f1 = _jspx_th_h_005fcommandButton_005f1.doStartTag();
if (_jspx_th_h_005fcommandButton_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005fcommandButton_0026_005fvalue_005fstyleClass_005fid_005faction_005faccesskey_005fnobody.reuse(_jspx_th_h_005fcommandButton_005f1);
return true;
}
_005fjspx_005ftagPool_005fh_005fcommandButton_0026_005fvalue_005fstyleClass_005fid_005faction_005faccesskey_005fnobody.reuse(_jspx_th_h_005fcommandButton_005f1);
return false;
}
private boolean _jspx_meth_sakai_005fmessages_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// sakai:messages
org.sakaiproject.jsf.tag.MessagesTag _jspx_th_sakai_005fmessages_005f0 = (org.sakaiproject.jsf.tag.MessagesTag) _005fjspx_005ftagPool_005fsakai_005fmessages_0026_005frendered_005fnobody.get(org.sakaiproject.jsf.tag.MessagesTag.class);
_jspx_th_sakai_005fmessages_005f0.setPageContext(_jspx_page_context);
_jspx_th_sakai_005fmessages_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
// /prefs/tab.jsp(86,26) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_sakai_005fmessages_005f0.setRendered("#{!empty facesContext.maximumSeverity}");
int _jspx_eval_sakai_005fmessages_005f0 = _jspx_th_sakai_005fmessages_005f0.doStartTag();
if (_jspx_th_sakai_005fmessages_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fsakai_005fmessages_0026_005frendered_005fnobody.reuse(_jspx_th_sakai_005fmessages_005f0);
return true;
}
_005fjspx_005ftagPool_005fsakai_005fmessages_0026_005frendered_005fnobody.reuse(_jspx_th_sakai_005fmessages_005f0);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f1 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f1.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
int _jspx_eval_f_005fverbatim_005f1 = _jspx_th_f_005fverbatim_005f1.doStartTag();
if (_jspx_eval_f_005fverbatim_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f1.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f1.doInitBody();
}
do {
out.write("\n");
out.write("<div class=\"layoutReorderer-container fl-container-flex\" id=\"layoutReorderer\" style=\"margin:.5em 0\">\n");
out.write(" <p>\n");
out.write(" ");
if (_jspx_meth_h_005foutputText_005f1(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write("\n");
out.write(" </p>\n");
out.write(" <p>\n");
out.write(" ");
if (_jspx_meth_h_005foutputText_005f2(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write("\n");
out.write(" </p>\n");
out.write(" <p>\n");
out.write(" ");
if (_jspx_meth_h_005foutputText_005f3(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write("\n");
out.write(" <p>\n");
out.write(" ");
if (_jspx_meth_h_005foutputText_005f4(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write("\n");
out.write(" </p>\n");
out.write("\n");
out.write(" <div id=\"movePanel\">\n");
out.write(" <h4 class=\"skip\">");
if (_jspx_meth_h_005foutputText_005f5(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write("</h4>\n");
out.write(" <div id=\"movePanelTop\" style=\"display:none\"><a href=\"#\" accesskey=\"6\" title=\"");
if (_jspx_meth_h_005foutputText_005f6(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write('"');
out.write('>');
if (_jspx_meth_h_005fgraphicImage_005f0(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
if (_jspx_meth_h_005foutputText_005f7(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write("</a></div>\n");
out.write(" <div id=\"movePanelTopDummy\" class=\"dummy\">");
if (_jspx_meth_h_005fgraphicImage_005f1(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write("</div>\n");
out.write(" <div id=\"movePanelLeftRight\">\n");
out.write(" <a href=\"#\" id=\"movePanelLeft\" style=\"display:none\" accesskey=\"7\" title=\"");
if (_jspx_meth_h_005foutputText_005f8(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write('"');
out.write('>');
if (_jspx_meth_h_005fgraphicImage_005f2(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
if (_jspx_meth_h_005foutputText_005f9(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write("</a>\n");
out.write(" <span id=\"movePanelLeftDummy\">");
if (_jspx_meth_h_005fgraphicImage_005f3(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write("</span> \n");
out.write(" \n");
out.write(" <a href=\"#\" id=\"movePanelRight\" style=\"display:none\" accesskey=\"8\" title=\"");
if (_jspx_meth_h_005foutputText_005f10(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write('"');
out.write('>');
if (_jspx_meth_h_005fgraphicImage_005f4(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
if (_jspx_meth_h_005foutputText_005f11(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write("</a>\n");
out.write(" <span id=\"movePanelRightDummy\"class=\"dummy\">");
if (_jspx_meth_h_005fgraphicImage_005f5(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write("</span> \n");
out.write(" </div>\n");
out.write(" \n");
out.write(" <div id=\"movePanelBottom\" style=\"display:none\"><a href=\"#\" accesskey=\"9\" title=\"");
if (_jspx_meth_h_005foutputText_005f12(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write('"');
out.write('>');
if (_jspx_meth_h_005fgraphicImage_005f6(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
if (_jspx_meth_h_005foutputText_005f13(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write("</a></div>\n");
out.write(" <div id=\"movePanelBottomDummy\"class=\"dummy\">");
if (_jspx_meth_h_005fgraphicImage_005f7(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write("</div>\n");
out.write(" </div> \n");
out.write("<div class=\"columnSetup3 fluid-vertical-order\">\n");
out.write("<!-- invalid drag n drop message template -->\n");
out.write("<p class=\"flc-reorderer-dropWarning layoutReorderer-dropWarning\">\n");
if (_jspx_meth_h_005foutputText_005f14(_jspx_th_f_005fverbatim_005f1, _jspx_page_context))
return true;
out.write("\n");
out.write("</p>\n");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f1.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f1);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f1);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f1 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fescape_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f1.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(90,8) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f1.setValue("#{msgs.prefs_mouse_instructions}");
// /prefs/tab.jsp(90,8) name = escape type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f1.setEscape("false");
int _jspx_eval_h_005foutputText_005f1 = _jspx_th_h_005foutputText_005f1.doStartTag();
if (_jspx_th_h_005foutputText_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fescape_005fnobody.reuse(_jspx_th_h_005foutputText_005f1);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fescape_005fnobody.reuse(_jspx_th_h_005foutputText_005f1);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f2 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fescape_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f2.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(93,8) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f2.setValue("#{msgs.prefs_keyboard_instructions}");
// /prefs/tab.jsp(93,8) name = escape type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f2.setEscape("false");
int _jspx_eval_h_005foutputText_005f2 = _jspx_th_h_005foutputText_005f2.doStartTag();
if (_jspx_th_h_005foutputText_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fescape_005fnobody.reuse(_jspx_th_h_005foutputText_005f2);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fescape_005fnobody.reuse(_jspx_th_h_005foutputText_005f2);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f3(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f3 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fescape_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f3.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f3.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(96,8) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f3.setStyleClass("skip");
// /prefs/tab.jsp(96,8) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f3.setValue("#{msgs.prefs_multitples_instructions_scru}");
// /prefs/tab.jsp(96,8) name = escape type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f3.setEscape("false");
int _jspx_eval_h_005foutputText_005f3 = _jspx_th_h_005foutputText_005f3.doStartTag();
if (_jspx_th_h_005foutputText_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fescape_005fnobody.reuse(_jspx_th_h_005foutputText_005f3);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fescape_005fnobody.reuse(_jspx_th_h_005foutputText_005f3);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f4(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f4 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fescape_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f4.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f4.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(98,8) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f4.setValue("#{msgs.prefs_multitples_instructions}");
// /prefs/tab.jsp(98,8) name = escape type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f4.setEscape("false");
int _jspx_eval_h_005foutputText_005f4 = _jspx_th_h_005foutputText_005f4.doStartTag();
if (_jspx_th_h_005foutputText_005f4.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fescape_005fnobody.reuse(_jspx_th_h_005foutputText_005f4);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fescape_005fnobody.reuse(_jspx_th_h_005foutputText_005f4);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f5(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f5 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fescape_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f5.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f5.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(102,25) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f5.setValue("#{msgs.prefs_multitples_instructions_panel_title}");
// /prefs/tab.jsp(102,25) name = escape type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f5.setEscape("false");
int _jspx_eval_h_005foutputText_005f5 = _jspx_th_h_005foutputText_005f5.doStartTag();
if (_jspx_th_h_005foutputText_005f5.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fescape_005fnobody.reuse(_jspx_th_h_005foutputText_005f5);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fescape_005fnobody.reuse(_jspx_th_h_005foutputText_005f5);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f6(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f6 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f6.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f6.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(103,85) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f6.setValue("#{msgs.tabs_move_top}");
int _jspx_eval_h_005foutputText_005f6 = _jspx_th_h_005foutputText_005f6.doStartTag();
if (_jspx_th_h_005foutputText_005f6.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f6);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f6);
return false;
}
private boolean _jspx_meth_h_005fgraphicImage_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:graphicImage
com.sun.faces.taglib.html_basic.GraphicImageTag _jspx_th_h_005fgraphicImage_005f0 = (com.sun.faces.taglib.html_basic.GraphicImageTag) _005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.get(com.sun.faces.taglib.html_basic.GraphicImageTag.class);
_jspx_th_h_005fgraphicImage_005f0.setPageContext(_jspx_page_context);
_jspx_th_h_005fgraphicImage_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(103,132) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fgraphicImage_005f0.setValue("prefs/to-top.png");
// /prefs/tab.jsp(103,132) name = alt type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fgraphicImage_005f0.setAlt("");
int _jspx_eval_h_005fgraphicImage_005f0 = _jspx_th_h_005fgraphicImage_005f0.doStartTag();
if (_jspx_th_h_005fgraphicImage_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.reuse(_jspx_th_h_005fgraphicImage_005f0);
return true;
}
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.reuse(_jspx_th_h_005fgraphicImage_005f0);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f7(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f7 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f7.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f7.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(103,182) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f7.setStyleClass("skip");
// /prefs/tab.jsp(103,182) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f7.setValue("#{msgs.tabs_move_top}");
int _jspx_eval_h_005foutputText_005f7 = _jspx_th_h_005foutputText_005f7.doStartTag();
if (_jspx_th_h_005foutputText_005f7.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fnobody.reuse(_jspx_th_h_005foutputText_005f7);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fnobody.reuse(_jspx_th_h_005foutputText_005f7);
return false;
}
private boolean _jspx_meth_h_005fgraphicImage_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:graphicImage
com.sun.faces.taglib.html_basic.GraphicImageTag _jspx_th_h_005fgraphicImage_005f1 = (com.sun.faces.taglib.html_basic.GraphicImageTag) _005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.get(com.sun.faces.taglib.html_basic.GraphicImageTag.class);
_jspx_th_h_005fgraphicImage_005f1.setPageContext(_jspx_page_context);
_jspx_th_h_005fgraphicImage_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(104,50) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fgraphicImage_005f1.setValue("prefs/to-top-dis.png");
// /prefs/tab.jsp(104,50) name = alt type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fgraphicImage_005f1.setAlt("");
int _jspx_eval_h_005fgraphicImage_005f1 = _jspx_th_h_005fgraphicImage_005f1.doStartTag();
if (_jspx_th_h_005fgraphicImage_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.reuse(_jspx_th_h_005fgraphicImage_005f1);
return true;
}
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.reuse(_jspx_th_h_005fgraphicImage_005f1);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f8(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f8 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f8.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f8.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(106,86) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f8.setValue("#{msgs.tabs_move_left}");
int _jspx_eval_h_005foutputText_005f8 = _jspx_th_h_005foutputText_005f8.doStartTag();
if (_jspx_th_h_005foutputText_005f8.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f8);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f8);
return false;
}
private boolean _jspx_meth_h_005fgraphicImage_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:graphicImage
com.sun.faces.taglib.html_basic.GraphicImageTag _jspx_th_h_005fgraphicImage_005f2 = (com.sun.faces.taglib.html_basic.GraphicImageTag) _005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.get(com.sun.faces.taglib.html_basic.GraphicImageTag.class);
_jspx_th_h_005fgraphicImage_005f2.setPageContext(_jspx_page_context);
_jspx_th_h_005fgraphicImage_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(106,134) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fgraphicImage_005f2.setValue("prefs/to-left.png");
// /prefs/tab.jsp(106,134) name = alt type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fgraphicImage_005f2.setAlt("");
int _jspx_eval_h_005fgraphicImage_005f2 = _jspx_th_h_005fgraphicImage_005f2.doStartTag();
if (_jspx_th_h_005fgraphicImage_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.reuse(_jspx_th_h_005fgraphicImage_005f2);
return true;
}
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.reuse(_jspx_th_h_005fgraphicImage_005f2);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f9(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f9 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f9.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f9.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(106,185) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f9.setStyleClass("skip");
// /prefs/tab.jsp(106,185) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f9.setValue("#{msgs.tabs_move_left}");
int _jspx_eval_h_005foutputText_005f9 = _jspx_th_h_005foutputText_005f9.doStartTag();
if (_jspx_th_h_005foutputText_005f9.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fnobody.reuse(_jspx_th_h_005foutputText_005f9);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fnobody.reuse(_jspx_th_h_005foutputText_005f9);
return false;
}
private boolean _jspx_meth_h_005fgraphicImage_005f3(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:graphicImage
com.sun.faces.taglib.html_basic.GraphicImageTag _jspx_th_h_005fgraphicImage_005f3 = (com.sun.faces.taglib.html_basic.GraphicImageTag) _005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.get(com.sun.faces.taglib.html_basic.GraphicImageTag.class);
_jspx_th_h_005fgraphicImage_005f3.setPageContext(_jspx_page_context);
_jspx_th_h_005fgraphicImage_005f3.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(107,42) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fgraphicImage_005f3.setValue("prefs/to-left-dis.png");
// /prefs/tab.jsp(107,42) name = alt type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fgraphicImage_005f3.setAlt("");
int _jspx_eval_h_005fgraphicImage_005f3 = _jspx_th_h_005fgraphicImage_005f3.doStartTag();
if (_jspx_th_h_005fgraphicImage_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.reuse(_jspx_th_h_005fgraphicImage_005f3);
return true;
}
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.reuse(_jspx_th_h_005fgraphicImage_005f3);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f10(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f10 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f10.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f10.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(109,87) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f10.setValue("#{msgs.tabs_move_right}");
int _jspx_eval_h_005foutputText_005f10 = _jspx_th_h_005foutputText_005f10.doStartTag();
if (_jspx_th_h_005foutputText_005f10.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f10);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f10);
return false;
}
private boolean _jspx_meth_h_005fgraphicImage_005f4(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:graphicImage
com.sun.faces.taglib.html_basic.GraphicImageTag _jspx_th_h_005fgraphicImage_005f4 = (com.sun.faces.taglib.html_basic.GraphicImageTag) _005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.get(com.sun.faces.taglib.html_basic.GraphicImageTag.class);
_jspx_th_h_005fgraphicImage_005f4.setPageContext(_jspx_page_context);
_jspx_th_h_005fgraphicImage_005f4.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(109,136) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fgraphicImage_005f4.setValue("prefs/to-right.png");
// /prefs/tab.jsp(109,136) name = alt type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fgraphicImage_005f4.setAlt("");
int _jspx_eval_h_005fgraphicImage_005f4 = _jspx_th_h_005fgraphicImage_005f4.doStartTag();
if (_jspx_th_h_005fgraphicImage_005f4.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.reuse(_jspx_th_h_005fgraphicImage_005f4);
return true;
}
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.reuse(_jspx_th_h_005fgraphicImage_005f4);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f11(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f11 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f11.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f11.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(109,188) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f11.setStyleClass("skip");
// /prefs/tab.jsp(109,188) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f11.setValue("#{msgs.tabs_move_right}");
int _jspx_eval_h_005foutputText_005f11 = _jspx_th_h_005foutputText_005f11.doStartTag();
if (_jspx_th_h_005foutputText_005f11.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fnobody.reuse(_jspx_th_h_005foutputText_005f11);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fnobody.reuse(_jspx_th_h_005foutputText_005f11);
return false;
}
private boolean _jspx_meth_h_005fgraphicImage_005f5(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:graphicImage
com.sun.faces.taglib.html_basic.GraphicImageTag _jspx_th_h_005fgraphicImage_005f5 = (com.sun.faces.taglib.html_basic.GraphicImageTag) _005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.get(com.sun.faces.taglib.html_basic.GraphicImageTag.class);
_jspx_th_h_005fgraphicImage_005f5.setPageContext(_jspx_page_context);
_jspx_th_h_005fgraphicImage_005f5.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(110,56) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fgraphicImage_005f5.setValue("prefs/to-right-dis.png");
// /prefs/tab.jsp(110,56) name = alt type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fgraphicImage_005f5.setAlt("");
int _jspx_eval_h_005fgraphicImage_005f5 = _jspx_th_h_005fgraphicImage_005f5.doStartTag();
if (_jspx_th_h_005fgraphicImage_005f5.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.reuse(_jspx_th_h_005fgraphicImage_005f5);
return true;
}
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.reuse(_jspx_th_h_005fgraphicImage_005f5);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f12(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f12 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f12.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f12.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(113,88) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f12.setValue("#{msgs.tabs_move_bottom}");
int _jspx_eval_h_005foutputText_005f12 = _jspx_th_h_005foutputText_005f12.doStartTag();
if (_jspx_th_h_005foutputText_005f12.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f12);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f12);
return false;
}
private boolean _jspx_meth_h_005fgraphicImage_005f6(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:graphicImage
com.sun.faces.taglib.html_basic.GraphicImageTag _jspx_th_h_005fgraphicImage_005f6 = (com.sun.faces.taglib.html_basic.GraphicImageTag) _005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.get(com.sun.faces.taglib.html_basic.GraphicImageTag.class);
_jspx_th_h_005fgraphicImage_005f6.setPageContext(_jspx_page_context);
_jspx_th_h_005fgraphicImage_005f6.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(113,138) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fgraphicImage_005f6.setValue("prefs/to-bottom.png");
// /prefs/tab.jsp(113,138) name = alt type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fgraphicImage_005f6.setAlt("");
int _jspx_eval_h_005fgraphicImage_005f6 = _jspx_th_h_005fgraphicImage_005f6.doStartTag();
if (_jspx_th_h_005fgraphicImage_005f6.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.reuse(_jspx_th_h_005fgraphicImage_005f6);
return true;
}
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.reuse(_jspx_th_h_005fgraphicImage_005f6);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f13(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f13 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f13.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f13.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(113,191) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f13.setStyleClass("skip");
// /prefs/tab.jsp(113,191) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f13.setValue("#{msgs.tabs_move_bottom}");
int _jspx_eval_h_005foutputText_005f13 = _jspx_th_h_005foutputText_005f13.doStartTag();
if (_jspx_th_h_005foutputText_005f13.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fnobody.reuse(_jspx_th_h_005foutputText_005f13);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fstyleClass_005fnobody.reuse(_jspx_th_h_005foutputText_005f13);
return false;
}
private boolean _jspx_meth_h_005fgraphicImage_005f7(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:graphicImage
com.sun.faces.taglib.html_basic.GraphicImageTag _jspx_th_h_005fgraphicImage_005f7 = (com.sun.faces.taglib.html_basic.GraphicImageTag) _005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.get(com.sun.faces.taglib.html_basic.GraphicImageTag.class);
_jspx_th_h_005fgraphicImage_005f7.setPageContext(_jspx_page_context);
_jspx_th_h_005fgraphicImage_005f7.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(114,52) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fgraphicImage_005f7.setValue("prefs/to-bottom-dis.png");
// /prefs/tab.jsp(114,52) name = alt type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fgraphicImage_005f7.setAlt("");
int _jspx_eval_h_005fgraphicImage_005f7 = _jspx_th_h_005fgraphicImage_005f7.doStartTag();
if (_jspx_th_h_005fgraphicImage_005f7.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.reuse(_jspx_th_h_005fgraphicImage_005f7);
return true;
}
_005fjspx_005ftagPool_005fh_005fgraphicImage_0026_005fvalue_005falt_005fnobody.reuse(_jspx_th_h_005fgraphicImage_005f7);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f14(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f14 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f14.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f14.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f1);
// /prefs/tab.jsp(119,0) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f14.setValue("#{msgs.prefs_element_locked}");
int _jspx_eval_h_005foutputText_005f14 = _jspx_th_h_005foutputText_005f14.doStartTag();
if (_jspx_th_h_005foutputText_005f14.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f14);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f14);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f2 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f2.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
int _jspx_eval_f_005fverbatim_005f2 = _jspx_th_f_005fverbatim_005f2.doStartTag();
if (_jspx_eval_f_005fverbatim_005f2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f2 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f2.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f2.doInitBody();
}
do {
out.write("\n");
out.write("\t\t\t<!-- Column #1 -->\n");
out.write(" <div class=\"flc-reorderer-column col1\" id=\"reorderCol1\">\n");
out.write(" <div class=\"colTitle layoutReorderer-locked\"><h4>");
if (_jspx_meth_h_005foutputText_005f15(_jspx_th_f_005fverbatim_005f2, _jspx_page_context))
return true;
out.write("</h4></div>\n");
out.write("\n");
out.write("<div class=\"flc-reorderer-module layoutReorderer-module layoutReorderer-locked\">\n");
out.write("<div class=\"demoSelector-layoutReorderer layoutReorderer-module-dragbar\">");
if (_jspx_meth_h_005foutputText_005f16(_jspx_th_f_005fverbatim_005f2, _jspx_page_context))
return true;
out.write("</div></div>\n");
out.write("\n");
out.write("\t\t");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f2.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f2 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f2);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f2);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f15(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f2, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f15 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f15.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f15.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f2);
// /prefs/tab.jsp(125,77) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f15.setValue("#{msgs.prefs_fav_sites}");
int _jspx_eval_h_005foutputText_005f15 = _jspx_th_h_005foutputText_005f15.doStartTag();
if (_jspx_th_h_005foutputText_005f15.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f15);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f15);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f16(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f2, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f16 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f16.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f16.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f2);
// /prefs/tab.jsp(128,73) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f16.setValue("#{msgs.prefs_my_workspace}");
int _jspx_eval_h_005foutputText_005f16 = _jspx_th_h_005foutputText_005f16.doStartTag();
if (_jspx_th_h_005foutputText_005f16.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f16);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f16);
return false;
}
private boolean _jspx_meth_t_005fdataList_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// t:dataList
org.apache.myfaces.custom.datalist.HtmlDataListTag _jspx_th_t_005fdataList_005f0 = (org.apache.myfaces.custom.datalist.HtmlDataListTag) _005fjspx_005ftagPool_005ft_005fdataList_0026_005fvar_005fvalue_005frowIndexVar_005flayout_005fitemStyleClass_005fid.get(org.apache.myfaces.custom.datalist.HtmlDataListTag.class);
_jspx_th_t_005fdataList_005f0.setPageContext(_jspx_page_context);
_jspx_th_t_005fdataList_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
// /prefs/tab.jsp(131,2) name = id type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f0.setId("dt1");
// /prefs/tab.jsp(131,2) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f0.setValue("#{UserPrefsTool.prefTabItems}");
// /prefs/tab.jsp(131,2) name = var type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f0.setVar("item");
// /prefs/tab.jsp(131,2) name = layout type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f0.setLayout("simple");
// /prefs/tab.jsp(131,2) name = rowIndexVar type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f0.setRowIndexVar("counter");
// /prefs/tab.jsp(131,2) name = itemStyleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f0.setItemStyleClass("dataListStyle");
int _jspx_eval_t_005fdataList_005f0 = _jspx_th_t_005fdataList_005f0.doStartTag();
if (_jspx_eval_t_005fdataList_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_t_005fdataList_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_t_005fdataList_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_t_005fdataList_005f0.doInitBody();
}
do {
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f3(_jspx_th_t_005fdataList_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_t_005foutputText_005f5(_jspx_th_t_005fdataList_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f4(_jspx_th_t_005fdataList_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_t_005foutputText_005f6(_jspx_th_t_005fdataList_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f5(_jspx_th_t_005fdataList_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_h_005foutputFormat_005f0(_jspx_th_t_005fdataList_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f6(_jspx_th_t_005fdataList_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write("\n");
out.write("\n");
out.write("\t\t");
int evalDoAfterBody = _jspx_th_t_005fdataList_005f0.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_t_005fdataList_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_t_005fdataList_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ft_005fdataList_0026_005fvar_005fvalue_005frowIndexVar_005flayout_005fitemStyleClass_005fid.reuse(_jspx_th_t_005fdataList_005f0);
return true;
}
_005fjspx_005ftagPool_005ft_005fdataList_0026_005fvar_005fvalue_005frowIndexVar_005flayout_005fitemStyleClass_005fid.reuse(_jspx_th_t_005fdataList_005f0);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f3(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f3 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f3.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f3.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f0);
int _jspx_eval_f_005fverbatim_005f3 = _jspx_th_f_005fverbatim_005f3.doStartTag();
if (_jspx_eval_f_005fverbatim_005f3 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f3 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f3.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f3.doInitBody();
}
do {
out.write("\n");
out.write(" <div class=\"flc-reorderer-module layoutReorderer-module last-login\"\n");
out.write("\t\t\tid=\"");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f3.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f3 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f3);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f3);
return false;
}
private boolean _jspx_meth_t_005foutputText_005f5(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// t:outputText
org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag _jspx_th_t_005foutputText_005f5 = (org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag) _005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fnobody.get(org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag.class);
_jspx_th_t_005foutputText_005f5.setPageContext(_jspx_page_context);
_jspx_th_t_005foutputText_005f5.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f0);
// /prefs/tab.jsp(138,18) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f5.setValue("#{item.value}");
int _jspx_eval_t_005foutputText_005f5 = _jspx_th_t_005foutputText_005f5.doStartTag();
if (_jspx_th_t_005foutputText_005f5.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_t_005foutputText_005f5);
return true;
}
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_t_005foutputText_005f5);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f4(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f4 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f4.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f4.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f0);
int _jspx_eval_f_005fverbatim_005f4 = _jspx_th_f_005fverbatim_005f4.doStartTag();
if (_jspx_eval_f_005fverbatim_005f4 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f4 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f4.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f4.doInitBody();
}
do {
out.write("\">\n");
out.write(" <div class=\"demoSelector-layoutReorderer layoutReorderer-module-dragbar\">\n");
out.write("\t\t");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f4.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f4 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f4.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f4);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f4);
return false;
}
private boolean _jspx_meth_t_005foutputText_005f6(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// t:outputText
org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag _jspx_th_t_005foutputText_005f6 = (org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag) _005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005ftitle_005fstyleClass_005fnobody.get(org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag.class);
_jspx_th_t_005foutputText_005f6.setPageContext(_jspx_page_context);
_jspx_th_t_005foutputText_005f6.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f0);
// /prefs/tab.jsp(142,16) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f6.setValue("#{item.label}");
// /prefs/tab.jsp(142,16) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f6.setStyleClass("siteLabel");
// /prefs/tab.jsp(142,16) name = title type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f6.setTitle("#{item.description}");
int _jspx_eval_t_005foutputText_005f6 = _jspx_th_t_005foutputText_005f6.doStartTag();
if (_jspx_th_t_005foutputText_005f6.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005ftitle_005fstyleClass_005fnobody.reuse(_jspx_th_t_005foutputText_005f6);
return true;
}
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005ftitle_005fstyleClass_005fnobody.reuse(_jspx_th_t_005foutputText_005f6);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f5(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f5 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f5.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f5.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f0);
int _jspx_eval_f_005fverbatim_005f5 = _jspx_th_f_005fverbatim_005f5.doStartTag();
if (_jspx_eval_f_005fverbatim_005f5 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f5 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f5.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f5.doInitBody();
}
do {
out.write("\n");
out.write(" <div class=\"checkBoxContainer\">\n");
out.write(" <input type=\"checkbox\" class=\"selectSiteCheck\" title=\"\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f5.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f5 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f5.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f5);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f5);
return false;
}
private boolean _jspx_meth_h_005foutputFormat_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputFormat
com.sun.faces.taglib.html_basic.OutputFormatTag _jspx_th_h_005foutputFormat_005f0 = (com.sun.faces.taglib.html_basic.OutputFormatTag) _005fjspx_005ftagPool_005fh_005foutputFormat_0026_005fvalue.get(com.sun.faces.taglib.html_basic.OutputFormatTag.class);
_jspx_th_h_005foutputFormat_005f0.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputFormat_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f0);
// /prefs/tab.jsp(147,16) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputFormat_005f0.setValue("#{msgs.prefs_checkbox_select_message}");
int _jspx_eval_h_005foutputFormat_005f0 = _jspx_th_h_005foutputFormat_005f0.doStartTag();
if (_jspx_eval_h_005foutputFormat_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fparam_005f0(_jspx_th_h_005foutputFormat_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fparam_005f1(_jspx_th_h_005foutputFormat_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
}
if (_jspx_th_h_005foutputFormat_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputFormat_0026_005fvalue.reuse(_jspx_th_h_005foutputFormat_005f0);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputFormat_0026_005fvalue.reuse(_jspx_th_h_005foutputFormat_005f0);
return false;
}
private boolean _jspx_meth_f_005fparam_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005foutputFormat_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:param
com.sun.faces.taglib.jsf_core.ParameterTag _jspx_th_f_005fparam_005f0 = (com.sun.faces.taglib.jsf_core.ParameterTag) _005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.jsf_core.ParameterTag.class);
_jspx_th_f_005fparam_005f0.setPageContext(_jspx_page_context);
_jspx_th_f_005fparam_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005foutputFormat_005f0);
// /prefs/tab.jsp(148,20) name = value type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_f_005fparam_005f0.setValue("#{item.label}");
int _jspx_eval_f_005fparam_005f0 = _jspx_th_f_005fparam_005f0.doStartTag();
if (_jspx_th_f_005fparam_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.reuse(_jspx_th_f_005fparam_005f0);
return true;
}
_005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.reuse(_jspx_th_f_005fparam_005f0);
return false;
}
private boolean _jspx_meth_f_005fparam_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005foutputFormat_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:param
com.sun.faces.taglib.jsf_core.ParameterTag _jspx_th_f_005fparam_005f1 = (com.sun.faces.taglib.jsf_core.ParameterTag) _005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.jsf_core.ParameterTag.class);
_jspx_th_f_005fparam_005f1.setPageContext(_jspx_page_context);
_jspx_th_f_005fparam_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005foutputFormat_005f0);
// /prefs/tab.jsp(149,20) name = value type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_f_005fparam_005f1.setValue("#{msgs.prefs_fav_sites_short}");
int _jspx_eval_f_005fparam_005f1 = _jspx_th_f_005fparam_005f1.doStartTag();
if (_jspx_th_f_005fparam_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.reuse(_jspx_th_f_005fparam_005f1);
return true;
}
_005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.reuse(_jspx_th_f_005fparam_005f1);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f6(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f6 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f6.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f6.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f0);
int _jspx_eval_f_005fverbatim_005f6 = _jspx_th_f_005fverbatim_005f6.doStartTag();
if (_jspx_eval_f_005fverbatim_005f6 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f6 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f6.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f6.doInitBody();
}
do {
out.write("\"/></div></div></div>");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f6.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f6 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f6.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f6);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f6);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f7(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f7 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f7.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f7.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
int _jspx_eval_f_005fverbatim_005f7 = _jspx_th_f_005fverbatim_005f7.doStartTag();
if (_jspx_eval_f_005fverbatim_005f7 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f7 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f7.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f7.doInitBody();
}
do {
out.write("</div>");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f7.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f7 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f7.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f7);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f7);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f8(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f8 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f8.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f8.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
int _jspx_eval_f_005fverbatim_005f8 = _jspx_th_f_005fverbatim_005f8.doStartTag();
if (_jspx_eval_f_005fverbatim_005f8 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f8 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f8.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f8.doInitBody();
}
do {
out.write("\n");
out.write("\t\t\t<!-- Column #2 -->\n");
out.write(" <div class=\"flc-reorderer-column col2\" id=\"reorderCol2\">\n");
out.write(" <div class=\"colTitle layoutReorderer-locked\"><h4>");
if (_jspx_meth_h_005foutputText_005f17(_jspx_th_f_005fverbatim_005f8, _jspx_page_context))
return true;
out.write("</h4></div>\n");
out.write("\t\t");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f8.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f8 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f8.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f8);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f8);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f17(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f8, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f17 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f17.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f17.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f8);
// /prefs/tab.jsp(160,77) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f17.setValue("#{msgs.prefs_active_sites}");
int _jspx_eval_h_005foutputText_005f17 = _jspx_th_h_005foutputText_005f17.doStartTag();
if (_jspx_th_h_005foutputText_005f17.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f17);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f17);
return false;
}
private boolean _jspx_meth_t_005fdataList_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// t:dataList
org.apache.myfaces.custom.datalist.HtmlDataListTag _jspx_th_t_005fdataList_005f1 = (org.apache.myfaces.custom.datalist.HtmlDataListTag) _005fjspx_005ftagPool_005ft_005fdataList_0026_005fvar_005fvalue_005frowIndexVar_005flayout_005fitemStyleClass_005fid.get(org.apache.myfaces.custom.datalist.HtmlDataListTag.class);
_jspx_th_t_005fdataList_005f1.setPageContext(_jspx_page_context);
_jspx_th_t_005fdataList_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
// /prefs/tab.jsp(162,2) name = id type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f1.setId("dt2");
// /prefs/tab.jsp(162,2) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f1.setValue("#{UserPrefsTool.prefDrawerItems}");
// /prefs/tab.jsp(162,2) name = var type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f1.setVar("item");
// /prefs/tab.jsp(162,2) name = layout type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f1.setLayout("simple");
// /prefs/tab.jsp(162,2) name = rowIndexVar type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f1.setRowIndexVar("counter");
// /prefs/tab.jsp(162,2) name = itemStyleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f1.setItemStyleClass("dataListStyle");
int _jspx_eval_t_005fdataList_005f1 = _jspx_th_t_005fdataList_005f1.doStartTag();
if (_jspx_eval_t_005fdataList_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_t_005fdataList_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_t_005fdataList_005f1.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_t_005fdataList_005f1.doInitBody();
}
do {
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f9(_jspx_th_t_005fdataList_005f1, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_t_005foutputText_005f7(_jspx_th_t_005fdataList_005f1, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f10(_jspx_th_t_005fdataList_005f1, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_t_005foutputText_005f8(_jspx_th_t_005fdataList_005f1, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f11(_jspx_th_t_005fdataList_005f1, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_h_005foutputFormat_005f1(_jspx_th_t_005fdataList_005f1, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f12(_jspx_th_t_005fdataList_005f1, _jspx_page_context))
return true;
out.write('\n');
out.write(' ');
out.write(' ');
int evalDoAfterBody = _jspx_th_t_005fdataList_005f1.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_t_005fdataList_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_t_005fdataList_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ft_005fdataList_0026_005fvar_005fvalue_005frowIndexVar_005flayout_005fitemStyleClass_005fid.reuse(_jspx_th_t_005fdataList_005f1);
return true;
}
_005fjspx_005ftagPool_005ft_005fdataList_0026_005fvar_005fvalue_005frowIndexVar_005flayout_005fitemStyleClass_005fid.reuse(_jspx_th_t_005fdataList_005f1);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f9(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f9 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f9.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f9.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f1);
int _jspx_eval_f_005fverbatim_005f9 = _jspx_th_f_005fverbatim_005f9.doStartTag();
if (_jspx_eval_f_005fverbatim_005f9 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f9 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f9.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f9.doInitBody();
}
do {
out.write("\n");
out.write(" <div class=\"flc-reorderer-module layoutReorderer-module last-login\"\n");
out.write("\t\t\tid=\"");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f9.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f9 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f9.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f9);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f9);
return false;
}
private boolean _jspx_meth_t_005foutputText_005f7(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// t:outputText
org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag _jspx_th_t_005foutputText_005f7 = (org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag) _005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fnobody.get(org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag.class);
_jspx_th_t_005foutputText_005f7.setPageContext(_jspx_page_context);
_jspx_th_t_005foutputText_005f7.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f1);
// /prefs/tab.jsp(169,18) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f7.setValue("#{item.value}");
int _jspx_eval_t_005foutputText_005f7 = _jspx_th_t_005foutputText_005f7.doStartTag();
if (_jspx_th_t_005foutputText_005f7.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_t_005foutputText_005f7);
return true;
}
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_t_005foutputText_005f7);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f10(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f10 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f10.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f10.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f1);
int _jspx_eval_f_005fverbatim_005f10 = _jspx_th_f_005fverbatim_005f10.doStartTag();
if (_jspx_eval_f_005fverbatim_005f10 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f10 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f10.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f10.doInitBody();
}
do {
out.write("\">\n");
out.write(" <div class=\"demoSelector-layoutReorderer layoutReorderer-module-dragbar\">\n");
out.write("\t\t");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f10.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f10 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f10.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f10);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f10);
return false;
}
private boolean _jspx_meth_t_005foutputText_005f8(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// t:outputText
org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag _jspx_th_t_005foutputText_005f8 = (org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag) _005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005ftitle_005fstyleClass_005fnobody.get(org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag.class);
_jspx_th_t_005foutputText_005f8.setPageContext(_jspx_page_context);
_jspx_th_t_005foutputText_005f8.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f1);
// /prefs/tab.jsp(173,16) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f8.setValue("#{item.label}");
// /prefs/tab.jsp(173,16) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f8.setStyleClass("siteLabel");
// /prefs/tab.jsp(173,16) name = title type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f8.setTitle("#{item.description}");
int _jspx_eval_t_005foutputText_005f8 = _jspx_th_t_005foutputText_005f8.doStartTag();
if (_jspx_th_t_005foutputText_005f8.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005ftitle_005fstyleClass_005fnobody.reuse(_jspx_th_t_005foutputText_005f8);
return true;
}
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005ftitle_005fstyleClass_005fnobody.reuse(_jspx_th_t_005foutputText_005f8);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f11(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f11 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f11.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f11.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f1);
int _jspx_eval_f_005fverbatim_005f11 = _jspx_th_f_005fverbatim_005f11.doStartTag();
if (_jspx_eval_f_005fverbatim_005f11 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f11 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f11.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f11.doInitBody();
}
do {
out.write("\n");
out.write(" <div class=\"checkBoxContainer\">\n");
out.write(" <input type=\"checkbox\" class=\"selectSiteCheck\" title=\"\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f11.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f11 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f11.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f11);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f11);
return false;
}
private boolean _jspx_meth_h_005foutputFormat_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputFormat
com.sun.faces.taglib.html_basic.OutputFormatTag _jspx_th_h_005foutputFormat_005f1 = (com.sun.faces.taglib.html_basic.OutputFormatTag) _005fjspx_005ftagPool_005fh_005foutputFormat_0026_005fvalue.get(com.sun.faces.taglib.html_basic.OutputFormatTag.class);
_jspx_th_h_005foutputFormat_005f1.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputFormat_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f1);
// /prefs/tab.jsp(178,16) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputFormat_005f1.setValue("#{msgs.prefs_checkbox_select_message}");
int _jspx_eval_h_005foutputFormat_005f1 = _jspx_th_h_005foutputFormat_005f1.doStartTag();
if (_jspx_eval_h_005foutputFormat_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fparam_005f2(_jspx_th_h_005foutputFormat_005f1, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fparam_005f3(_jspx_th_h_005foutputFormat_005f1, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
}
if (_jspx_th_h_005foutputFormat_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputFormat_0026_005fvalue.reuse(_jspx_th_h_005foutputFormat_005f1);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputFormat_0026_005fvalue.reuse(_jspx_th_h_005foutputFormat_005f1);
return false;
}
private boolean _jspx_meth_f_005fparam_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005foutputFormat_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:param
com.sun.faces.taglib.jsf_core.ParameterTag _jspx_th_f_005fparam_005f2 = (com.sun.faces.taglib.jsf_core.ParameterTag) _005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.jsf_core.ParameterTag.class);
_jspx_th_f_005fparam_005f2.setPageContext(_jspx_page_context);
_jspx_th_f_005fparam_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005foutputFormat_005f1);
// /prefs/tab.jsp(179,20) name = value type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_f_005fparam_005f2.setValue("#{item.label}");
int _jspx_eval_f_005fparam_005f2 = _jspx_th_f_005fparam_005f2.doStartTag();
if (_jspx_th_f_005fparam_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.reuse(_jspx_th_f_005fparam_005f2);
return true;
}
_005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.reuse(_jspx_th_f_005fparam_005f2);
return false;
}
private boolean _jspx_meth_f_005fparam_005f3(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005foutputFormat_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:param
com.sun.faces.taglib.jsf_core.ParameterTag _jspx_th_f_005fparam_005f3 = (com.sun.faces.taglib.jsf_core.ParameterTag) _005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.jsf_core.ParameterTag.class);
_jspx_th_f_005fparam_005f3.setPageContext(_jspx_page_context);
_jspx_th_f_005fparam_005f3.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005foutputFormat_005f1);
// /prefs/tab.jsp(180,20) name = value type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_f_005fparam_005f3.setValue("#{msgs.prefs_active_sites_short}");
int _jspx_eval_f_005fparam_005f3 = _jspx_th_f_005fparam_005f3.doStartTag();
if (_jspx_th_f_005fparam_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.reuse(_jspx_th_f_005fparam_005f3);
return true;
}
_005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.reuse(_jspx_th_f_005fparam_005f3);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f12(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f1, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f12 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f12.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f12.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f1);
int _jspx_eval_f_005fverbatim_005f12 = _jspx_th_f_005fverbatim_005f12.doStartTag();
if (_jspx_eval_f_005fverbatim_005f12 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f12 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f12.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f12.doInitBody();
}
do {
out.write("\"/></div></div></div>");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f12.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f12 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f12.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f12);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f12);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f13(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f13 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f13.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f13.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
int _jspx_eval_f_005fverbatim_005f13 = _jspx_th_f_005fverbatim_005f13.doStartTag();
if (_jspx_eval_f_005fverbatim_005f13 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f13 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f13.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f13.doInitBody();
}
do {
out.write("</div>");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f13.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f13 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f13.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f13);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f13);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f14(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f14 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f14.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f14.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
int _jspx_eval_f_005fverbatim_005f14 = _jspx_th_f_005fverbatim_005f14.doStartTag();
if (_jspx_eval_f_005fverbatim_005f14 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f14 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f14.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f14.doInitBody();
}
do {
out.write("\n");
out.write("\t\t\t<!-- Column #3 -->\n");
out.write(" <div class=\"flc-reorderer-column fl-container-flex25 fl-force-left col3\" id=\"reorderCol3\">\n");
out.write(" <div class=\"colTitle layoutReorderer-locked\"><h4>");
if (_jspx_meth_h_005foutputText_005f18(_jspx_th_f_005fverbatim_005f14, _jspx_page_context))
return true;
out.write("</h4></div>\n");
out.write("\t\t");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f14.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f14 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f14.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f14);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f14);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f18(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f14, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f18 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f18.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f18.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f14);
// /prefs/tab.jsp(189,77) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f18.setValue("#{msgs.prefs_archive_sites}");
int _jspx_eval_h_005foutputText_005f18 = _jspx_th_h_005foutputText_005f18.doStartTag();
if (_jspx_th_h_005foutputText_005f18.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f18);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f18);
return false;
}
private boolean _jspx_meth_t_005fdataList_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// t:dataList
org.apache.myfaces.custom.datalist.HtmlDataListTag _jspx_th_t_005fdataList_005f2 = (org.apache.myfaces.custom.datalist.HtmlDataListTag) _005fjspx_005ftagPool_005ft_005fdataList_0026_005fvar_005fvalue_005frowIndexVar_005flayout_005fitemStyleClass_005fid.get(org.apache.myfaces.custom.datalist.HtmlDataListTag.class);
_jspx_th_t_005fdataList_005f2.setPageContext(_jspx_page_context);
_jspx_th_t_005fdataList_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
// /prefs/tab.jsp(191,2) name = id type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f2.setId("dt3");
// /prefs/tab.jsp(191,2) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f2.setValue("#{UserPrefsTool.prefHiddenItems}");
// /prefs/tab.jsp(191,2) name = var type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f2.setVar("item");
// /prefs/tab.jsp(191,2) name = layout type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f2.setLayout("simple");
// /prefs/tab.jsp(191,2) name = rowIndexVar type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f2.setRowIndexVar("counter");
// /prefs/tab.jsp(191,2) name = itemStyleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005fdataList_005f2.setItemStyleClass("dataListStyle");
int _jspx_eval_t_005fdataList_005f2 = _jspx_th_t_005fdataList_005f2.doStartTag();
if (_jspx_eval_t_005fdataList_005f2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_t_005fdataList_005f2 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_t_005fdataList_005f2.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_t_005fdataList_005f2.doInitBody();
}
do {
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f15(_jspx_th_t_005fdataList_005f2, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_t_005foutputText_005f9(_jspx_th_t_005fdataList_005f2, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f16(_jspx_th_t_005fdataList_005f2, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_t_005foutputText_005f10(_jspx_th_t_005fdataList_005f2, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f17(_jspx_th_t_005fdataList_005f2, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_h_005foutputFormat_005f2(_jspx_th_t_005fdataList_005f2, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fverbatim_005f18(_jspx_th_t_005fdataList_005f2, _jspx_page_context))
return true;
out.write("\n");
out.write("\n");
out.write("\t\t");
int evalDoAfterBody = _jspx_th_t_005fdataList_005f2.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_t_005fdataList_005f2 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_t_005fdataList_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ft_005fdataList_0026_005fvar_005fvalue_005frowIndexVar_005flayout_005fitemStyleClass_005fid.reuse(_jspx_th_t_005fdataList_005f2);
return true;
}
_005fjspx_005ftagPool_005ft_005fdataList_0026_005fvar_005fvalue_005frowIndexVar_005flayout_005fitemStyleClass_005fid.reuse(_jspx_th_t_005fdataList_005f2);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f15(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f2, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f15 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f15.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f15.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f2);
int _jspx_eval_f_005fverbatim_005f15 = _jspx_th_f_005fverbatim_005f15.doStartTag();
if (_jspx_eval_f_005fverbatim_005f15 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f15 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f15.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f15.doInitBody();
}
do {
out.write("\n");
out.write(" <div class=\"flc-reorderer-module layoutReorderer-module last-login\"\n");
out.write("\t\t\tid=\"");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f15.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f15 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f15.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f15);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f15);
return false;
}
private boolean _jspx_meth_t_005foutputText_005f9(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f2, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// t:outputText
org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag _jspx_th_t_005foutputText_005f9 = (org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag) _005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fnobody.get(org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag.class);
_jspx_th_t_005foutputText_005f9.setPageContext(_jspx_page_context);
_jspx_th_t_005foutputText_005f9.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f2);
// /prefs/tab.jsp(198,18) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f9.setValue("#{item.value}");
int _jspx_eval_t_005foutputText_005f9 = _jspx_th_t_005foutputText_005f9.doStartTag();
if (_jspx_th_t_005foutputText_005f9.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_t_005foutputText_005f9);
return true;
}
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_t_005foutputText_005f9);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f16(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f2, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f16 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f16.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f16.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f2);
int _jspx_eval_f_005fverbatim_005f16 = _jspx_th_f_005fverbatim_005f16.doStartTag();
if (_jspx_eval_f_005fverbatim_005f16 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f16 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f16.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f16.doInitBody();
}
do {
out.write("\">\n");
out.write(" <div class=\"demoSelector-layoutReorderer layoutReorderer-module-dragbar\">\n");
out.write("\t\t");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f16.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f16 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f16.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f16);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f16);
return false;
}
private boolean _jspx_meth_t_005foutputText_005f10(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f2, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// t:outputText
org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag _jspx_th_t_005foutputText_005f10 = (org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag) _005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005ftitle_005fstyleClass_005fnobody.get(org.apache.myfaces.generated.taglib.html.ext.HtmlOutputTextTag.class);
_jspx_th_t_005foutputText_005f10.setPageContext(_jspx_page_context);
_jspx_th_t_005foutputText_005f10.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f2);
// /prefs/tab.jsp(202,16) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f10.setValue("#{item.label}");
// /prefs/tab.jsp(202,16) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f10.setStyleClass("siteLabel");
// /prefs/tab.jsp(202,16) name = title type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_t_005foutputText_005f10.setTitle("#{item.description}");
int _jspx_eval_t_005foutputText_005f10 = _jspx_th_t_005foutputText_005f10.doStartTag();
if (_jspx_th_t_005foutputText_005f10.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005ftitle_005fstyleClass_005fnobody.reuse(_jspx_th_t_005foutputText_005f10);
return true;
}
_005fjspx_005ftagPool_005ft_005foutputText_0026_005fvalue_005ftitle_005fstyleClass_005fnobody.reuse(_jspx_th_t_005foutputText_005f10);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f17(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f2, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f17 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f17.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f17.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f2);
int _jspx_eval_f_005fverbatim_005f17 = _jspx_th_f_005fverbatim_005f17.doStartTag();
if (_jspx_eval_f_005fverbatim_005f17 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f17 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f17.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f17.doInitBody();
}
do {
out.write("\n");
out.write(" <div class=\"checkBoxContainer\">\n");
out.write(" <input type=\"checkbox\" class=\"selectSiteCheck\" title=\"\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f17.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f17 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f17.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f17);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f17);
return false;
}
private boolean _jspx_meth_h_005foutputFormat_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f2, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputFormat
com.sun.faces.taglib.html_basic.OutputFormatTag _jspx_th_h_005foutputFormat_005f2 = (com.sun.faces.taglib.html_basic.OutputFormatTag) _005fjspx_005ftagPool_005fh_005foutputFormat_0026_005fvalue.get(com.sun.faces.taglib.html_basic.OutputFormatTag.class);
_jspx_th_h_005foutputFormat_005f2.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputFormat_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f2);
// /prefs/tab.jsp(207,16) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputFormat_005f2.setValue("#{msgs.prefs_checkbox_select_message}");
int _jspx_eval_h_005foutputFormat_005f2 = _jspx_th_h_005foutputFormat_005f2.doStartTag();
if (_jspx_eval_h_005foutputFormat_005f2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fparam_005f4(_jspx_th_h_005foutputFormat_005f2, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fparam_005f5(_jspx_th_h_005foutputFormat_005f2, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
}
if (_jspx_th_h_005foutputFormat_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputFormat_0026_005fvalue.reuse(_jspx_th_h_005foutputFormat_005f2);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputFormat_0026_005fvalue.reuse(_jspx_th_h_005foutputFormat_005f2);
return false;
}
private boolean _jspx_meth_f_005fparam_005f4(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005foutputFormat_005f2, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:param
com.sun.faces.taglib.jsf_core.ParameterTag _jspx_th_f_005fparam_005f4 = (com.sun.faces.taglib.jsf_core.ParameterTag) _005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.jsf_core.ParameterTag.class);
_jspx_th_f_005fparam_005f4.setPageContext(_jspx_page_context);
_jspx_th_f_005fparam_005f4.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005foutputFormat_005f2);
// /prefs/tab.jsp(208,20) name = value type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_f_005fparam_005f4.setValue("#{item.label}");
int _jspx_eval_f_005fparam_005f4 = _jspx_th_f_005fparam_005f4.doStartTag();
if (_jspx_th_f_005fparam_005f4.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.reuse(_jspx_th_f_005fparam_005f4);
return true;
}
_005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.reuse(_jspx_th_f_005fparam_005f4);
return false;
}
private boolean _jspx_meth_f_005fparam_005f5(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005foutputFormat_005f2, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:param
com.sun.faces.taglib.jsf_core.ParameterTag _jspx_th_f_005fparam_005f5 = (com.sun.faces.taglib.jsf_core.ParameterTag) _005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.jsf_core.ParameterTag.class);
_jspx_th_f_005fparam_005f5.setPageContext(_jspx_page_context);
_jspx_th_f_005fparam_005f5.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005foutputFormat_005f2);
// /prefs/tab.jsp(209,20) name = value type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_f_005fparam_005f5.setValue("#{msgs.prefs_archive_sites_short}");
int _jspx_eval_f_005fparam_005f5 = _jspx_th_f_005fparam_005f5.doStartTag();
if (_jspx_th_f_005fparam_005f5.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.reuse(_jspx_th_f_005fparam_005f5);
return true;
}
_005fjspx_005ftagPool_005ff_005fparam_0026_005fvalue_005fnobody.reuse(_jspx_th_f_005fparam_005f5);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f18(javax.servlet.jsp.tagext.JspTag _jspx_th_t_005fdataList_005f2, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f18 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f18.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f18.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_t_005fdataList_005f2);
int _jspx_eval_f_005fverbatim_005f18 = _jspx_th_f_005fverbatim_005f18.doStartTag();
if (_jspx_eval_f_005fverbatim_005f18 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f18 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f18.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f18.doInitBody();
}
do {
out.write("\"/></div></div></div>");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f18.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f18 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f18.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f18);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f18);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f19(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f19 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f19.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f19.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
int _jspx_eval_f_005fverbatim_005f19 = _jspx_th_f_005fverbatim_005f19.doStartTag();
if (_jspx_eval_f_005fverbatim_005f19 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f19 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f19.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f19.doInitBody();
}
do {
out.write("</div>");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f19.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f19 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f19.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f19);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f19);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f20(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f20 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f20.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f20.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
int _jspx_eval_f_005fverbatim_005f20 = _jspx_th_f_005fverbatim_005f20.doStartTag();
if (_jspx_eval_f_005fverbatim_005f20 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f20 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f20.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f20.doInitBody();
}
do {
out.write("</div></div>\n");
out.write("<div style=\"float:none;clear:both;margin:2em 0\">\n");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f20.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f20 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f20.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f20);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f20);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f21(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f21 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f21.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f21.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
int _jspx_eval_f_005fverbatim_005f21 = _jspx_th_f_005fverbatim_005f21.doStartTag();
if (_jspx_eval_f_005fverbatim_005f21 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f21 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f21.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f21.doInitBody();
}
do {
out.write("\n");
out.write("<div id=\"top-text\">\n");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f21.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f21 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f21.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f21);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f21);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f19(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f19 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005frendered_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f19.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f19.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
// /prefs/tab.jsp(223,0) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f19.setValue("#{msgs.tabDisplay_prompt}");
// /prefs/tab.jsp(223,0) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f19.setRendered("#{UserPrefsTool.prefShowTabLabelOption==true}");
int _jspx_eval_h_005foutputText_005f19 = _jspx_th_h_005foutputText_005f19.doStartTag();
if (_jspx_th_h_005foutputText_005f19.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005frendered_005fnobody.reuse(_jspx_th_h_005foutputText_005f19);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005frendered_005fnobody.reuse(_jspx_th_h_005foutputText_005f19);
return false;
}
private boolean _jspx_meth_h_005fselectOneRadio_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:selectOneRadio
com.sun.faces.taglib.html_basic.SelectOneRadioTag _jspx_th_h_005fselectOneRadio_005f0 = (com.sun.faces.taglib.html_basic.SelectOneRadioTag) _005fjspx_005ftagPool_005fh_005fselectOneRadio_0026_005fvalue_005frendered_005flayout.get(com.sun.faces.taglib.html_basic.SelectOneRadioTag.class);
_jspx_th_h_005fselectOneRadio_005f0.setPageContext(_jspx_page_context);
_jspx_th_h_005fselectOneRadio_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
// /prefs/tab.jsp(224,0) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fselectOneRadio_005f0.setValue("#{UserPrefsTool.selectedTabLabel}");
// /prefs/tab.jsp(224,0) name = layout type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fselectOneRadio_005f0.setLayout("pageDirection");
// /prefs/tab.jsp(224,0) name = rendered type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fselectOneRadio_005f0.setRendered("#{UserPrefsTool.prefShowTabLabelOption==true}");
int _jspx_eval_h_005fselectOneRadio_005f0 = _jspx_th_h_005fselectOneRadio_005f0.doStartTag();
if (_jspx_eval_h_005fselectOneRadio_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fselectItem_005f0(_jspx_th_h_005fselectOneRadio_005f0, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_f_005fselectItem_005f1(_jspx_th_h_005fselectOneRadio_005f0, _jspx_page_context))
return true;
out.write('\n');
}
if (_jspx_th_h_005fselectOneRadio_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005fselectOneRadio_0026_005fvalue_005frendered_005flayout.reuse(_jspx_th_h_005fselectOneRadio_005f0);
return true;
}
_005fjspx_005ftagPool_005fh_005fselectOneRadio_0026_005fvalue_005frendered_005flayout.reuse(_jspx_th_h_005fselectOneRadio_005f0);
return false;
}
private boolean _jspx_meth_f_005fselectItem_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fselectOneRadio_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:selectItem
com.sun.faces.taglib.jsf_core.SelectItemTag _jspx_th_f_005fselectItem_005f0 = (com.sun.faces.taglib.jsf_core.SelectItemTag) _005fjspx_005ftagPool_005ff_005fselectItem_0026_005fitemValue_005fitemLabel_005fnobody.get(com.sun.faces.taglib.jsf_core.SelectItemTag.class);
_jspx_th_f_005fselectItem_005f0.setPageContext(_jspx_page_context);
_jspx_th_f_005fselectItem_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fselectOneRadio_005f0);
// /prefs/tab.jsp(225,24) name = itemValue type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_f_005fselectItem_005f0.setItemValue("1");
// /prefs/tab.jsp(225,24) name = itemLabel type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_f_005fselectItem_005f0.setItemLabel("#{msgs.tabDisplay_coursecode}");
int _jspx_eval_f_005fselectItem_005f0 = _jspx_th_f_005fselectItem_005f0.doStartTag();
if (_jspx_th_f_005fselectItem_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fselectItem_0026_005fitemValue_005fitemLabel_005fnobody.reuse(_jspx_th_f_005fselectItem_005f0);
return true;
}
_005fjspx_005ftagPool_005ff_005fselectItem_0026_005fitemValue_005fitemLabel_005fnobody.reuse(_jspx_th_f_005fselectItem_005f0);
return false;
}
private boolean _jspx_meth_f_005fselectItem_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fselectOneRadio_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:selectItem
com.sun.faces.taglib.jsf_core.SelectItemTag _jspx_th_f_005fselectItem_005f1 = (com.sun.faces.taglib.jsf_core.SelectItemTag) _005fjspx_005ftagPool_005ff_005fselectItem_0026_005fitemValue_005fitemLabel_005fnobody.get(com.sun.faces.taglib.jsf_core.SelectItemTag.class);
_jspx_th_f_005fselectItem_005f1.setPageContext(_jspx_page_context);
_jspx_th_f_005fselectItem_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fselectOneRadio_005f0);
// /prefs/tab.jsp(226,24) name = itemValue type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_f_005fselectItem_005f1.setItemValue("2");
// /prefs/tab.jsp(226,24) name = itemLabel type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_f_005fselectItem_005f1.setItemLabel("#{msgs.tabDisplay_coursename}");
int _jspx_eval_f_005fselectItem_005f1 = _jspx_th_f_005fselectItem_005f1.doStartTag();
if (_jspx_th_f_005fselectItem_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fselectItem_0026_005fitemValue_005fitemLabel_005fnobody.reuse(_jspx_th_f_005fselectItem_005f1);
return true;
}
_005fjspx_005ftagPool_005ff_005fselectItem_0026_005fitemValue_005fitemLabel_005fnobody.reuse(_jspx_th_f_005fselectItem_005f1);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f22(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f22 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f22.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f22.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
int _jspx_eval_f_005fverbatim_005f22 = _jspx_th_f_005fverbatim_005f22.doStartTag();
if (_jspx_eval_f_005fverbatim_005f22 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f22 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f22.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f22.doInitBody();
}
do {
out.write("\n");
out.write("</div>\n");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f22.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f22 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f22.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f22);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f22);
return false;
}
private boolean _jspx_meth_h_005fcommandButton_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:commandButton
com.sun.faces.taglib.html_basic.CommandButtonTag _jspx_th_h_005fcommandButton_005f2 = (com.sun.faces.taglib.html_basic.CommandButtonTag) _005fjspx_005ftagPool_005fh_005fcommandButton_0026_005fvalue_005fstyleClass_005fid_005faction_005faccesskey_005fnobody.get(com.sun.faces.taglib.html_basic.CommandButtonTag.class);
_jspx_th_h_005fcommandButton_005f2.setPageContext(_jspx_page_context);
_jspx_th_h_005fcommandButton_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
// /prefs/tab.jsp(233,3) name = accesskey type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f2.setAccesskey("s");
// /prefs/tab.jsp(233,3) name = id type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f2.setId("prefAllSub");
// /prefs/tab.jsp(233,3) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f2.setStyleClass("active formButton");
// /prefs/tab.jsp(233,3) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f2.setValue("#{msgs.update_pref}");
// /prefs/tab.jsp(233,3) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f2.setAction("#{UserPrefsTool.processActionSaveOrder}");
int _jspx_eval_h_005fcommandButton_005f2 = _jspx_th_h_005fcommandButton_005f2.doStartTag();
if (_jspx_th_h_005fcommandButton_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005fcommandButton_0026_005fvalue_005fstyleClass_005fid_005faction_005faccesskey_005fnobody.reuse(_jspx_th_h_005fcommandButton_005f2);
return true;
}
_005fjspx_005ftagPool_005fh_005fcommandButton_0026_005fvalue_005fstyleClass_005fid_005faction_005faccesskey_005fnobody.reuse(_jspx_th_h_005fcommandButton_005f2);
return false;
}
private boolean _jspx_meth_h_005fcommandButton_005f3(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:commandButton
com.sun.faces.taglib.html_basic.CommandButtonTag _jspx_th_h_005fcommandButton_005f3 = (com.sun.faces.taglib.html_basic.CommandButtonTag) _005fjspx_005ftagPool_005fh_005fcommandButton_0026_005fvalue_005fstyleClass_005fid_005faction_005faccesskey_005fnobody.get(com.sun.faces.taglib.html_basic.CommandButtonTag.class);
_jspx_th_h_005fcommandButton_005f3.setPageContext(_jspx_page_context);
_jspx_th_h_005fcommandButton_005f3.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
// /prefs/tab.jsp(234,3) name = accesskey type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f3.setAccesskey("x");
// /prefs/tab.jsp(234,3) name = id type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f3.setId("cancel");
// /prefs/tab.jsp(234,3) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f3.setValue("#{msgs.cancel_pref}");
// /prefs/tab.jsp(234,3) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f3.setAction("#{UserPrefsTool.processActionCancel}");
// /prefs/tab.jsp(234,3) name = styleClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005fcommandButton_005f3.setStyleClass("formButton");
int _jspx_eval_h_005fcommandButton_005f3 = _jspx_th_h_005fcommandButton_005f3.doStartTag();
if (_jspx_th_h_005fcommandButton_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005fcommandButton_0026_005fvalue_005fstyleClass_005fid_005faction_005faccesskey_005fnobody.reuse(_jspx_th_h_005fcommandButton_005f3);
return true;
}
_005fjspx_005ftagPool_005fh_005fcommandButton_0026_005fvalue_005fstyleClass_005fid_005faction_005faccesskey_005fnobody.reuse(_jspx_th_h_005fcommandButton_005f3);
return false;
}
private boolean _jspx_meth_h_005finputHidden_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:inputHidden
com.sun.faces.taglib.html_basic.InputHiddenTag _jspx_th_h_005finputHidden_005f0 = (com.sun.faces.taglib.html_basic.InputHiddenTag) _005fjspx_005ftagPool_005fh_005finputHidden_0026_005fvalue_005fid_005fnobody.get(com.sun.faces.taglib.html_basic.InputHiddenTag.class);
_jspx_th_h_005finputHidden_005f0.setPageContext(_jspx_page_context);
_jspx_th_h_005finputHidden_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
// /prefs/tab.jsp(235,2) name = id type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005finputHidden_005f0.setId("prefTabString");
// /prefs/tab.jsp(235,2) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005finputHidden_005f0.setValue("#{UserPrefsTool.prefTabString}");
int _jspx_eval_h_005finputHidden_005f0 = _jspx_th_h_005finputHidden_005f0.doStartTag();
if (_jspx_th_h_005finputHidden_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005finputHidden_0026_005fvalue_005fid_005fnobody.reuse(_jspx_th_h_005finputHidden_005f0);
return true;
}
_005fjspx_005ftagPool_005fh_005finputHidden_0026_005fvalue_005fid_005fnobody.reuse(_jspx_th_h_005finputHidden_005f0);
return false;
}
private boolean _jspx_meth_h_005finputHidden_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:inputHidden
com.sun.faces.taglib.html_basic.InputHiddenTag _jspx_th_h_005finputHidden_005f1 = (com.sun.faces.taglib.html_basic.InputHiddenTag) _005fjspx_005ftagPool_005fh_005finputHidden_0026_005fvalue_005fid_005fnobody.get(com.sun.faces.taglib.html_basic.InputHiddenTag.class);
_jspx_th_h_005finputHidden_005f1.setPageContext(_jspx_page_context);
_jspx_th_h_005finputHidden_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
// /prefs/tab.jsp(236,2) name = id type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005finputHidden_005f1.setId("prefDrawerString");
// /prefs/tab.jsp(236,2) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005finputHidden_005f1.setValue("#{UserPrefsTool.prefDrawerString}");
int _jspx_eval_h_005finputHidden_005f1 = _jspx_th_h_005finputHidden_005f1.doStartTag();
if (_jspx_th_h_005finputHidden_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005finputHidden_0026_005fvalue_005fid_005fnobody.reuse(_jspx_th_h_005finputHidden_005f1);
return true;
}
_005fjspx_005ftagPool_005fh_005finputHidden_0026_005fvalue_005fid_005fnobody.reuse(_jspx_th_h_005finputHidden_005f1);
return false;
}
private boolean _jspx_meth_h_005finputHidden_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:inputHidden
com.sun.faces.taglib.html_basic.InputHiddenTag _jspx_th_h_005finputHidden_005f2 = (com.sun.faces.taglib.html_basic.InputHiddenTag) _005fjspx_005ftagPool_005fh_005finputHidden_0026_005fvalue_005fid_005fnobody.get(com.sun.faces.taglib.html_basic.InputHiddenTag.class);
_jspx_th_h_005finputHidden_005f2.setPageContext(_jspx_page_context);
_jspx_th_h_005finputHidden_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
// /prefs/tab.jsp(237,2) name = id type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005finputHidden_005f2.setId("prefHiddenString");
// /prefs/tab.jsp(237,2) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005finputHidden_005f2.setValue("#{UserPrefsTool.prefHiddenString}");
int _jspx_eval_h_005finputHidden_005f2 = _jspx_th_h_005finputHidden_005f2.doStartTag();
if (_jspx_th_h_005finputHidden_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005finputHidden_0026_005fvalue_005fid_005fnobody.reuse(_jspx_th_h_005finputHidden_005f2);
return true;
}
_005fjspx_005ftagPool_005fh_005finputHidden_0026_005fvalue_005fid_005fnobody.reuse(_jspx_th_h_005finputHidden_005f2);
return false;
}
private boolean _jspx_meth_h_005finputHidden_005f3(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:inputHidden
com.sun.faces.taglib.html_basic.InputHiddenTag _jspx_th_h_005finputHidden_005f3 = (com.sun.faces.taglib.html_basic.InputHiddenTag) _005fjspx_005ftagPool_005fh_005finputHidden_0026_005fvalue_005fid_005fnobody.get(com.sun.faces.taglib.html_basic.InputHiddenTag.class);
_jspx_th_h_005finputHidden_005f3.setPageContext(_jspx_page_context);
_jspx_th_h_005finputHidden_005f3.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
// /prefs/tab.jsp(238,2) name = id type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005finputHidden_005f3.setId("reloadTop");
// /prefs/tab.jsp(238,2) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005finputHidden_005f3.setValue("#{UserPrefsTool.reloadTop}");
int _jspx_eval_h_005finputHidden_005f3 = _jspx_th_h_005finputHidden_005f3.doStartTag();
if (_jspx_th_h_005finputHidden_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005finputHidden_0026_005fvalue_005fid_005fnobody.reuse(_jspx_th_h_005finputHidden_005f3);
return true;
}
_005fjspx_005ftagPool_005fh_005finputHidden_0026_005fvalue_005fid_005fnobody.reuse(_jspx_th_h_005finputHidden_005f3);
return false;
}
private boolean _jspx_meth_f_005fverbatim_005f23(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// f:verbatim
com.sun.faces.taglib.jsf_core.VerbatimTag _jspx_th_f_005fverbatim_005f23 = (com.sun.faces.taglib.jsf_core.VerbatimTag) _005fjspx_005ftagPool_005ff_005fverbatim.get(com.sun.faces.taglib.jsf_core.VerbatimTag.class);
_jspx_th_f_005fverbatim_005f23.setPageContext(_jspx_page_context);
_jspx_th_f_005fverbatim_005f23.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
int _jspx_eval_f_005fverbatim_005f23 = _jspx_th_f_005fverbatim_005f23.doStartTag();
if (_jspx_eval_f_005fverbatim_005f23 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_005fverbatim_005f23 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_005fverbatim_005f23.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_f_005fverbatim_005f23.doInitBody();
}
do {
out.write("\n");
out.write("<p>\n");
if (_jspx_meth_h_005foutputText_005f20(_jspx_th_f_005fverbatim_005f23, _jspx_page_context))
return true;
out.write("\n");
out.write("</p>\n");
out.write("</div>\n");
out.write("<script type=\"text/javascript\">\n");
out.write(" initlayoutReorderer();\n");
out.write("</script>\n");
out.write("\n");
int evalDoAfterBody = _jspx_th_f_005fverbatim_005f23.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_f_005fverbatim_005f23 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_f_005fverbatim_005f23.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f23);
return true;
}
_005fjspx_005ftagPool_005ff_005fverbatim.reuse(_jspx_th_f_005fverbatim_005f23);
return false;
}
private boolean _jspx_meth_h_005foutputText_005f20(javax.servlet.jsp.tagext.JspTag _jspx_th_f_005fverbatim_005f23, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// h:outputText
com.sun.faces.taglib.html_basic.OutputTextTag _jspx_th_h_005foutputText_005f20 = (com.sun.faces.taglib.html_basic.OutputTextTag) _005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.get(com.sun.faces.taglib.html_basic.OutputTextTag.class);
_jspx_th_h_005foutputText_005f20.setPageContext(_jspx_page_context);
_jspx_th_h_005foutputText_005f20.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_f_005fverbatim_005f23);
// /prefs/tab.jsp(241,0) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_h_005foutputText_005f20.setValue("#{msgs.prefs_auto_refresh}");
int _jspx_eval_h_005foutputText_005f20 = _jspx_th_h_005foutputText_005f20.doStartTag();
if (_jspx_th_h_005foutputText_005f20.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f20);
return true;
}
_005fjspx_005ftagPool_005fh_005foutputText_0026_005fvalue_005fnobody.reuse(_jspx_th_h_005foutputText_005f20);
return false;
}
}
| freedomkk-qfeng/docker-sakai | demo/10.2-fudan/sakai-demo-10.2/work/Catalina/localhost/sakai-user-tool-prefs/org/apache/jsp/prefs/tab_jsp.java | Java | apache-2.0 | 292,251 |
package com.hotcloud.util;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class CookieUtil {
public static Map<String, String> getCookies(HttpServletRequest request) {
Map<String, String> sCookie = new HashMap<>();
Cookie[] cookies = request.getCookies();
if (cookies != null) {
String cookiePre = ConfigUtil.config.get("cookiePre");
int prelength = Common.strlen(cookiePre);
for (Cookie cookie : cookies) {
String name = cookie.getName();
if (name != null && name.startsWith(cookiePre)) {
sCookie.put(name.substring(prelength), Common.urlDecode(Common.addSlashes(cookie.getValue())));
}
}
}
return sCookie;
}
public static Cookie getCookie(HttpServletRequest request, String name) {
Cookie[] cookies = request.getCookies();
if (cookies != null) {
for (Cookie cookie : cookies) {
if (name != null && cookie.getName().equals(name)) {
return cookie;
}
}
}
return null;
}
public static void removeCookie(HttpServletRequest request, HttpServletResponse response, String key) {
setCookie(request, response, key, "", 0);
}
public static void setCookie(HttpServletRequest request, HttpServletResponse response, String key, String value) {
setCookie(request, response, key, value, -1);/*-1表示关闭浏览器时立即清除cookie*/
}
/** 将cookie写入到response中 */
public static void setCookie(HttpServletRequest request, HttpServletResponse response, String key, String value,
int maxAge) {
Cookie cookie = new Cookie(ConfigUtil.config.get("cookiePre") + key, Common.urlEncode(value));
cookie.setMaxAge(maxAge);
cookie.setPath(ConfigUtil.config.get("cookiePath"));
if (!Common.empty(ConfigUtil.config.get("cookieDomain"))) {
cookie.setDomain(ConfigUtil.config.get("cookieDomain"));
}
cookie.setSecure(request.getServerPort() == 443 ? true : false);
response.addCookie(cookie);
}
@SuppressWarnings("unchecked")
public static void clearCookie(HttpServletRequest request, HttpServletResponse response) {
removeCookie(request, response, "auth");
Map<String, Object> sGlobal = (Map<String, Object>) request.getAttribute("sGlobal");
sGlobal.put("supe_uid", 0);
sGlobal.put("supe_username", "");
sGlobal.remove("member");
}
} | shizicheng/spring_mvc_template | src/main/java/com/hotcloud/util/CookieUtil.java | Java | apache-2.0 | 2,493 |
/********************************************************************************
* Copyright (c) 2019 Stephane Bastian
*
* This program and the accompanying materials are made available under the 2
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0 3
*
* Contributors: 4
* Stephane Bastian - initial API and implementation
********************************************************************************/
package io.vertx.ext.auth.authorization.impl;
import java.util.Objects;
import io.vertx.ext.auth.authorization.Authorization;
import io.vertx.ext.auth.authorization.AuthorizationContext;
import io.vertx.ext.auth.authorization.PermissionBasedAuthorization;
import io.vertx.ext.auth.User;
import io.vertx.ext.auth.authorization.WildcardPermissionBasedAuthorization;
public class PermissionBasedAuthorizationImpl implements PermissionBasedAuthorization {
private final String permission;
private VariableAwareExpression resource;
public PermissionBasedAuthorizationImpl(String permission) {
this.permission = Objects.requireNonNull(permission);
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!(obj instanceof PermissionBasedAuthorizationImpl))
return false;
PermissionBasedAuthorizationImpl other = (PermissionBasedAuthorizationImpl) obj;
return Objects.equals(permission, other.permission) && Objects.equals(resource, other.resource);
}
@Override
public String getPermission() {
return permission;
}
@Override
public int hashCode() {
return Objects.hash(permission, resource);
}
@Override
public boolean match(AuthorizationContext context) {
Objects.requireNonNull(context);
User user = context.user();
if (user != null) {
Authorization resolvedAuthorization = getResolvedAuthorization(context);
for (String providerId: user.authorizations().getProviderIds()) {
for (Authorization authorization : user.authorizations().get(providerId)) {
if (authorization.verify(resolvedAuthorization)) {
return true;
}
}
}
}
return false;
}
private PermissionBasedAuthorization getResolvedAuthorization(AuthorizationContext context) {
if (resource == null || !resource.hasVariable()) {
return this;
}
return PermissionBasedAuthorization.create(this.permission).setResource(resource.resolve(context));
}
@Override
public boolean verify(Authorization otherAuthorization) {
Objects.requireNonNull(otherAuthorization);
if (otherAuthorization instanceof PermissionBasedAuthorization) {
PermissionBasedAuthorization otherPermissionBasedAuthorization = (PermissionBasedAuthorization) otherAuthorization;
if (permission.equals(otherPermissionBasedAuthorization.getPermission())) {
if (getResource() == null) {
return otherPermissionBasedAuthorization.getResource() == null;
}
return getResource().equals(otherPermissionBasedAuthorization.getResource());
}
}
else if (otherAuthorization instanceof WildcardPermissionBasedAuthorization) {
WildcardPermissionBasedAuthorization otherWildcardPermissionBasedAuthorization = (WildcardPermissionBasedAuthorization) otherAuthorization;
if (permission.equals(otherWildcardPermissionBasedAuthorization.getPermission())) {
if (getResource() == null) {
return otherWildcardPermissionBasedAuthorization.getResource() == null;
}
return getResource().equals(otherWildcardPermissionBasedAuthorization.getResource());
}
}
return false;
}
@Override
public String getResource() {
return resource != null ? resource.getValue() : null;
}
@Override
public PermissionBasedAuthorization setResource(String resource) {
Objects.requireNonNull(resource);
this.resource = new VariableAwareExpression(resource);
return this;
}
}
| vert-x3/vertx-auth | vertx-auth-common/src/main/java/io/vertx/ext/auth/authorization/impl/PermissionBasedAuthorizationImpl.java | Java | apache-2.0 | 4,026 |
package org.polyglotted.xpathstax.model;
import com.google.common.base.Splitter;
import com.google.common.collect.Iterables;
import org.codehaus.stax2.XMLStreamReader2;
import org.polyglotted.xpathstax.data.Value;
import javax.annotation.concurrent.ThreadSafe;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.concurrent.atomic.AtomicInteger;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
@SuppressWarnings("WeakerAccess")
@ThreadSafe
public class XmlAttribute {
private static final String NP_SPACE = String.valueOf((char) 22);
private static final String EQUALS = "=";
private static final Splitter SPACE_SPLITTER = Splitter.on(" ").trimResults().omitEmptyStrings();
private static final Splitter NPSPACE_SPLITTER = Splitter.on(NP_SPACE).trimResults().omitEmptyStrings();
private static final Splitter EQUALS_SPLITTER = Splitter.on(EQUALS).trimResults().omitEmptyStrings();
public static final XmlAttribute EMPTY = XmlAttribute.from("");
private final StringBuffer buffer = new StringBuffer();
private AtomicInteger count = new AtomicInteger(0);
public static XmlAttribute from(String attributeString) {
XmlAttribute attr = new XmlAttribute();
Iterable<String> attributes = SPACE_SPLITTER.split(attributeString);
for (String value : attributes) {
Iterator<String> iter = splitByEquals(value);
attr.add(iter.next(), iter.hasNext() ? iter.next() : "");
}
return attr;
}
public static XmlAttribute from(XMLStreamReader2 xmlr) {
XmlAttribute attr = new XmlAttribute();
for (int i = 0; i < xmlr.getAttributeCount(); i++) {
attr.add(xmlr.getAttributeLocalName(i), xmlr.getAttributeValue(i));
}
return attr;
}
public void add(String name, String value) {
checkArgument(!name.contains(EQUALS));
buffer.append(buildKey(name));
buffer.append(buildValue(value));
count.incrementAndGet();
}
public int count() {
return count.get();
}
public boolean contains(String name) {
return buffer.indexOf(buildKey(name)) >= 0;
}
public boolean contains(String name, String value) {
return buffer.indexOf(buildKey(name) + buildValue(value)) >= 0;
}
public boolean contains(XmlAttribute inner) {
if (inner == null)
return false;
if (inner == this)
return true;
if (inner.count() == 1) {
return buffer.indexOf(inner.buffer.toString()) >= 0;
}
boolean result = true;
for (String part : NPSPACE_SPLITTER.split(inner.buffer)) {
if (buffer.indexOf(NP_SPACE + part) < 0) {
result = false;
break;
}
}
return result;
}
public Value get(String name) {
String result = null;
final String key = buildKey(name);
int keyIndex = buffer.indexOf(key);
if (keyIndex >= 0) {
int fromIndex = keyIndex + key.length();
int lastIndex = buffer.indexOf(NP_SPACE, fromIndex);
result = (lastIndex >= 0) ? buffer.substring(fromIndex, lastIndex) : buffer.substring(fromIndex);
}
return Value.of(result);
}
public Iterable<Entry<String, Value>> iterate() {
return Iterables.transform(NPSPACE_SPLITTER.split(buffer), AttrEntry::new);
}
@Override
public String toString() {
return buffer.toString();
}
private static String buildKey(String name) {
return NP_SPACE + checkNotNull(name) + EQUALS;
}
private static String buildValue(String value) {
return checkNotNull(value).replaceAll("'", "").replaceAll("\"", "");
}
private static Iterator<String> splitByEquals(String value) {
Iterator<String> iter = EQUALS_SPLITTER.split(value).iterator();
checkArgument(iter.hasNext(), "unable to parse attribute " + value);
return iter;
}
private static class AttrEntry implements Entry<String, Value> {
private final String key;
private final Value value;
AttrEntry(String data) {
Iterator<String> iter = splitByEquals(data);
this.key = iter.next();
this.value = iter.hasNext() ? Value.of(iter.next()) : Value.of(null);
}
@Override
public String getKey() {
return key;
}
@Override
public Value getValue() {
return value;
}
@Override
public Value setValue(Value value) {
throw new UnsupportedOperationException();
}
}
}
| polyglotted/xpath-stax | src/main/java/org/polyglotted/xpathstax/model/XmlAttribute.java | Java | apache-2.0 | 4,780 |
package com.caozeal.practice;
import static org.assertj.core.api.Assertions.*;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class TestTryTest {
// @OdevityMain2
// public void seleniumTest(){
// WebDriver driver = new FirefoxDriver();
// driver.get("http://www.baidu.com");
//// WebElement query = driver.findElement(By.name("search"));
//// query.sendKeys("傲然绝唳的测试");
////
//// WebElement goButton = driver.findElement(By.name("go"));
//// goButton.click();
////
//// assertThat(driver.getTitle()).startsWith("傲然绝唳的测试");
// driver.quit();
// }
}
| caozeal/Utopia | Source/UtopiaLand/test/com/caozeal/someTry/TestTryTest.java | Java | apache-2.0 | 786 |
package org.javarosa.model.xform;
import org.javarosa.core.data.IDataPointer;
import org.javarosa.core.model.IAnswerDataSerializer;
import org.javarosa.core.model.instance.FormInstance;
import org.javarosa.core.model.instance.TreeElement;
import org.javarosa.core.model.instance.TreeReference;
import org.javarosa.core.model.utils.IInstanceSerializingVisitor;
import org.javarosa.core.services.transport.payload.ByteArrayPayload;
import org.javarosa.core.services.transport.payload.DataPointerPayload;
import org.javarosa.core.services.transport.payload.IDataPayload;
import org.javarosa.core.services.transport.payload.MultiMessagePayload;
import org.javarosa.xform.util.XFormAnswerDataSerializer;
import org.javarosa.xform.util.XFormSerializer;
import org.kxml2.kdom.Document;
import org.kxml2.kdom.Element;
import org.kxml2.kdom.Node;
import java.io.IOException;
import java.util.Enumeration;
import java.util.Vector;
/**
* A visitor-esque class which walks a FormInstance and constructs an XML document
* containing its instance.
*
* The XML node elements are constructed in a depth-first manner, consistent with
* standard XML document parsing.
*
* @author Clayton Sims
*/
public class XFormSerializingVisitor implements IInstanceSerializingVisitor {
/**
* The XML document containing the instance that is to be returned
*/
Document theXmlDoc;
/**
* The serializer to be used in constructing XML for AnswerData elements
*/
IAnswerDataSerializer serializer;
/**
* The root of the xml document which should be included in the serialization *
*/
TreeReference rootRef;
Vector<IDataPointer> dataPointers;
boolean respectRelevance = true;
public XFormSerializingVisitor() {
this(true);
}
public XFormSerializingVisitor(boolean respectRelevance) {
this.respectRelevance = respectRelevance;
}
private void init() {
theXmlDoc = null;
dataPointers = new Vector<IDataPointer>();
}
@Override
public byte[] serializeInstance(FormInstance model) throws IOException {
return serializeInstance(model, new XPathReference("/"));
}
@Override
public byte[] serializeInstance(FormInstance model, XPathReference ref) throws IOException {
init();
rootRef = FormInstance.unpackReference(ref);
if (this.serializer == null) {
this.setAnswerDataSerializer(new XFormAnswerDataSerializer());
}
model.accept(this);
if (theXmlDoc != null) {
return XFormSerializer.getUtfBytesFromDocument(theXmlDoc);
} else {
return null;
}
}
@Override
public IDataPayload createSerializedPayload(FormInstance model) throws IOException {
return createSerializedPayload(model, new XPathReference("/"));
}
@Override
public IDataPayload createSerializedPayload(FormInstance model, XPathReference ref) throws IOException {
init();
rootRef = FormInstance.unpackReference(ref);
if (this.serializer == null) {
this.setAnswerDataSerializer(new XFormAnswerDataSerializer());
}
model.accept(this);
if (theXmlDoc != null) {
//TODO: Did this strip necessary data?
byte[] form = XFormSerializer.getUtfBytesFromDocument(theXmlDoc);
if (dataPointers.size() == 0) {
return new ByteArrayPayload(form, null, IDataPayload.PAYLOAD_TYPE_XML);
}
MultiMessagePayload payload = new MultiMessagePayload();
payload.addPayload(new ByteArrayPayload(form, "xml_submission_file", IDataPayload.PAYLOAD_TYPE_XML));
Enumeration en = dataPointers.elements();
while (en.hasMoreElements()) {
IDataPointer pointer = (IDataPointer)en.nextElement();
payload.addPayload(new DataPointerPayload(pointer));
}
return payload;
} else {
return null;
}
}
@Override
public void visit(FormInstance tree) {
theXmlDoc = new Document();
TreeElement root = tree.resolveReference(rootRef);
//For some reason resolveReference won't ever return the root, so we'll
//catch that case and just start at the root.
if (root == null) {
root = tree.getRoot();
}
if (root != null) {
theXmlDoc.addChild(Node.ELEMENT, serializeNode(root));
}
Element top = theXmlDoc.getElement(0);
String[] prefixes = tree.getNamespacePrefixes();
for (String prefix : prefixes) {
top.setPrefix(prefix, tree.getNamespaceURI(prefix));
}
if (tree.schema != null) {
top.setNamespace(tree.schema);
top.setPrefix("", tree.schema);
}
}
private Element serializeNode(TreeElement instanceNode) {
Element e = new Element(); //don't set anything on this element yet, as it might get overwritten
//don't serialize template nodes or non-relevant nodes
if ((respectRelevance && !instanceNode.isRelevant()) || instanceNode.getMult() == TreeReference.INDEX_TEMPLATE) {
return null;
}
if (instanceNode.getValue() != null) {
Object serializedAnswer = serializer.serializeAnswerData(instanceNode.getValue(), instanceNode.getDataType());
if (serializedAnswer instanceof Element) {
e = (Element)serializedAnswer;
} else if (serializedAnswer instanceof String) {
e = new Element();
e.addChild(Node.TEXT, serializedAnswer);
} else {
throw new RuntimeException("Can't handle serialized output for" + instanceNode.getValue().toString() + ", " + serializedAnswer);
}
if (serializer.containsExternalData(instanceNode.getValue()).booleanValue()) {
IDataPointer[] pointers = serializer.retrieveExternalDataPointer(instanceNode.getValue());
for (IDataPointer pointer : pointers) {
dataPointers.addElement(pointer);
}
}
} else {
//make sure all children of the same tag name are written en bloc
Vector<String> childNames = new Vector<String>();
for (int i = 0; i < instanceNode.getNumChildren(); i++) {
String childName = instanceNode.getChildAt(i).getName();
if (!childNames.contains(childName))
childNames.addElement(childName);
}
for (int i = 0; i < childNames.size(); i++) {
String childName = childNames.elementAt(i);
int mult = instanceNode.getChildMultiplicity(childName);
for (int j = 0; j < mult; j++) {
Element child = serializeNode(instanceNode.getChild(childName, j));
if (child != null) {
e.addChild(Node.ELEMENT, child);
}
}
}
}
e.setName(instanceNode.getName());
// add hard-coded attributes
for (int i = 0; i < instanceNode.getAttributeCount(); i++) {
String namespace = instanceNode.getAttributeNamespace(i);
String name = instanceNode.getAttributeName(i);
String val = instanceNode.getAttributeValue(i);
// is it legal for getAttributeValue() to return null? playing it safe for now and assuming yes
if (val == null) {
val = "";
}
e.setAttribute(namespace, name, val);
}
if (instanceNode.getNamespace() != null) {
e.setNamespace(instanceNode.getNamespace());
}
return e;
}
@Override
public void setAnswerDataSerializer(IAnswerDataSerializer ads) {
this.serializer = ads;
}
@Override
public IInstanceSerializingVisitor newInstance() {
XFormSerializingVisitor modelSerializer = new XFormSerializingVisitor();
modelSerializer.setAnswerDataSerializer(this.serializer);
return modelSerializer;
}
}
| dimagi/javarosa | javarosa/core/src/main/java/org/javarosa/model/xform/XFormSerializingVisitor.java | Java | apache-2.0 | 8,206 |
package io.silverspoon.bulldog.beagleboneblack.devicetree;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
public class DeviceTreeCompiler {
private static final String FIRMWARE_PATH = "/lib/firmware/";
private static final String OBJECT_FILE_PATTERN = "%s%s.dtbo";
private static final String DEFINITION_FILE_PATTERN = "%s%s.dts";
private static final String COMPILER_CALL = "dtc -O dtb -o %s -b 0 -@ %s";
public static void compileOverlay(String overlay, String deviceName) throws IOException, InterruptedException {
String objectFile = String.format(OBJECT_FILE_PATTERN, FIRMWARE_PATH, deviceName);
String overlayFile = String.format(DEFINITION_FILE_PATTERN, FIRMWARE_PATH, deviceName);
File file = new File(overlayFile);
FileOutputStream outputStream = new FileOutputStream(file);
PrintWriter writer = new PrintWriter(outputStream);
writer.write(overlay);
writer.close();
Process compile = Runtime.getRuntime().exec(String.format(COMPILER_CALL, objectFile, overlayFile));
int code = compile.waitFor();
if (code > 0) {
throw new RuntimeException("Device Tree Overlay compilation failed: " + overlayFile + " could not be compiled");
}
}
}
| xjaros1/bulldog | bulldog-board-beagleboneblack/src/main/java/io/silverspoon/bulldog/beagleboneblack/devicetree/DeviceTreeCompiler.java | Java | apache-2.0 | 1,303 |
package com.xyp.sapidoc.idoc.enumeration;
import java.util.HashSet;
import java.util.Set;
/**
*
* @author Yunpeng_Xu
*/
public enum TagEnum {
FIELDS("FIELDS"),
RECORD_SECTION("RECORD_SECTION"),
CONTROL_RECORD("CONTROL_RECORD"),
DATA_RECORD("DATA_RECORD"),
STATUS_RECORD("STATUS_RECORD"),
SEGMENT_SECTION("SEGMENT_SECTION"),
IDOC("IDOC"),
SEGMENT("SEGMENT"),
GROUP("GROUP"),
;
private String tag;
private TagEnum(String tag) {
this.tag = tag;
}
public String getTagBegin() {
return "BEGIN_" + tag;
}
public String getTagEnd() {
return "END_" + tag;
}
public static Set<String> getAllTags(){
Set<String> tags = new HashSet<String>();
TagEnum[] tagEnums = TagEnum.values();
for (TagEnum tagEnum : tagEnums) {
tags.add(tagEnum.getTagBegin());
tags.add(tagEnum.getTagEnd());
}
return tags;
}
}
| PeterXyp/sapidoc | src/main/java/com/xyp/sapidoc/idoc/enumeration/TagEnum.java | Java | apache-2.0 | 1,036 |
/*******************************************************************************
* Copyright 2016 Intuit
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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 com.intuit.wasabi.auditlogobjects;
import com.intuit.wasabi.eventlog.events.BucketCreateEvent;
import com.intuit.wasabi.eventlog.events.BucketEvent;
import com.intuit.wasabi.eventlog.events.ChangeEvent;
import com.intuit.wasabi.eventlog.events.EventLogEvent;
import com.intuit.wasabi.eventlog.events.ExperimentChangeEvent;
import com.intuit.wasabi.eventlog.events.ExperimentCreateEvent;
import com.intuit.wasabi.eventlog.events.ExperimentEvent;
import com.intuit.wasabi.eventlog.events.SimpleEvent;
import com.intuit.wasabi.experimentobjects.Bucket;
import com.intuit.wasabi.experimentobjects.Experiment;
import org.junit.Assert;
import org.junit.Test;
import org.mockito.Mockito;
import java.lang.reflect.Field;
/**
* Tests for {@link AuditLogEntryFactory}.
*/
public class AuditLogEntryFactoryTest {
@Test
public void testCreateFromEvent() throws Exception {
new AuditLogEntryFactory();
EventLogEvent[] events = new EventLogEvent[]{
new SimpleEvent("SimpleEvent"),
new ExperimentChangeEvent(Mockito.mock(Experiment.class), "Property", "before", "after"),
new ExperimentCreateEvent(Mockito.mock(Experiment.class)),
new BucketCreateEvent(Mockito.mock(Experiment.class), Mockito.mock(Bucket.class))
};
Field[] fields = AuditLogEntry.class.getFields();
for (Field field : fields) {
field.setAccessible(true);
}
for (EventLogEvent event : events) {
AuditLogEntry aleFactory = AuditLogEntryFactory.createFromEvent(event);
AuditLogEntry aleManual = new AuditLogEntry(
event.getTime(), event.getUser(), AuditLogAction.getActionForEvent(event),
event instanceof ExperimentEvent ? ((ExperimentEvent) event).getExperiment() : null,
event instanceof BucketEvent ? ((BucketEvent) event).getBucket().getLabel() : null,
event instanceof ChangeEvent ? ((ChangeEvent) event).getPropertyName() : null,
event instanceof ChangeEvent ? ((ChangeEvent) event).getBefore() : null,
event instanceof ChangeEvent ? ((ChangeEvent) event).getAfter() : null
);
for (Field field : fields) {
Assert.assertEquals(field.get(aleManual), field.get(aleFactory));
}
}
}
}
| intuit/wasabi | modules/auditlog-objects/src/test/java/com/intuit/wasabi/auditlogobjects/AuditLogEntryFactoryTest.java | Java | apache-2.0 | 3,157 |
package org.artifactory.ui.rest.service.admin.configuration.mail;
import org.artifactory.api.config.CentralConfigService;
import org.artifactory.descriptor.config.MutableCentralConfigDescriptor;
import org.artifactory.rest.common.service.ArtifactoryRestRequest;
import org.artifactory.rest.common.service.RestResponse;
import org.artifactory.rest.common.service.RestService;
import org.artifactory.ui.rest.model.admin.configuration.mail.MailServer;
import org.artifactory.ui.rest.service.utils.AolUtils;
import org.artifactory.util.HttpUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
/**
* @author Chen Keinan
*/
@Component
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class GetMailService implements RestService {
@Autowired
private CentralConfigService centralConfigService;
@Override
public void execute(ArtifactoryRestRequest request, RestResponse response) {
AolUtils.assertNotAol("GetMail");
String contextUrl = HttpUtils.getServletContextUrl(request.getServletRequest());
MailServer mailServer = getMailServerFromConfigDescriptor(contextUrl);
// update response with mail server model
response.iModel(mailServer);
}
/**
* get mail server from config descriptor and populate data to mail server model
*
* @return mail server model
* @param contextUrl
*/
private MailServer getMailServerFromConfigDescriptor(String contextUrl) {
MutableCentralConfigDescriptor configDescriptor = centralConfigService.getMutableDescriptor();
if (configDescriptor.getMailServer() != null) {
return new MailServer(configDescriptor.getMailServer());
} else {
MailServer mailServer = new MailServer();
mailServer.setArtifactoryUrl(contextUrl);
return mailServer;
}
}
}
| alancnet/artifactory | web/rest-ui/src/main/java/org/artifactory/ui/rest/service/admin/configuration/mail/GetMailService.java | Java | apache-2.0 | 2,025 |
/*
* Copyright (c) 2009, Rickard Öberg. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.qi4j.bootstrap;
/**
* Base class for assembly visitors. Subclass and override
* the particular methods you are interested in.
*/
public class AssemblyVisitorAdapter<ThrowableType extends Throwable>
implements AssemblyVisitor<ThrowableType>
{
public void visitApplication( ApplicationAssembly assembly )
throws ThrowableType
{
}
public void visitLayer( LayerAssembly assembly )
throws ThrowableType
{
}
public void visitModule( ModuleAssembly assembly )
throws ThrowableType
{
}
public void visitComposite( TransientDeclaration declaration )
throws ThrowableType
{
}
public void visitEntity( EntityDeclaration declaration )
throws ThrowableType
{
}
public void visitService( ServiceDeclaration declaration )
throws ThrowableType
{
}
public void visitImportedService( ImportedServiceDeclaration declaration )
throws ThrowableType
{
}
public void visitValue( ValueDeclaration declaration )
throws ThrowableType
{
}
public void visitObject( ObjectDeclaration declaration )
throws ThrowableType
{
}
}
| Qi4j/qi4j-core | bootstrap/src/main/java/org/qi4j/bootstrap/AssemblyVisitorAdapter.java | Java | apache-2.0 | 1,820 |
package com.ctrip.framework.cs.enterprise;
import com.ctrip.framework.cs.configuration.ConfigurationManager;
import com.ctrip.framework.cs.configuration.InitConfigurationException;
import com.ctrip.framework.cs.util.HttpUtil;
import com.ctrip.framework.cs.util.PomUtil;
import com.google.gson.Gson;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* Created by jiang.j on 2016/10/20.
*/
public class NexusEnMaven implements EnMaven {
class NexusPomInfo{
String groupId;
String artifactId;
String version;
}
class RepoDetail{
String repositoryURL;
String repositoryKind;
}
class SearchResult{
RepoDetail[] repoDetails;
NexusPomInfo[] data;
}
class ResourceResult{
ResourceInfo[] data;
}
class ResourceInfo{
String text;
}
Logger logger = LoggerFactory.getLogger(getClass());
private InputStream getContentByName(String[] av,String fileName) throws InitConfigurationException {
InputStream rtn = null;
String endsWith = ".pom";
if(av == null && fileName == null){
return null;
}else if(av==null) {
endsWith = "-sources.jar";
av = PomUtil.getArtifactIdAndVersion(fileName);
}
if(av == null){
return null;
}
String searchUrl = (ConfigurationManager.getConfigInstance().getString("vi.maven.repository.url") +
"/nexus/service/local/lucene/search?a=" + av[0] + "&v=" + av[1]);
if(av.length >2){
searchUrl += "&g="+av[2];
}
logger.debug(searchUrl);
try {
URL url = new URL(searchUrl);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setConnectTimeout(200);
conn.setReadTimeout(500);
conn.setRequestMethod("GET");
conn.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
conn.setRequestProperty("Accept", "application/json");
try (Reader rd = new InputStreamReader(conn.getInputStream(), "UTF-8")) {
Gson gson = new Gson();
SearchResult results = gson.fromJson(rd, SearchResult.class);
if(results.repoDetails!=null && results.data !=null && results.repoDetails.length>0 && results.data.length>0){
NexusPomInfo pomInfo = results.data[0];
String repositoryUrl = null;
if(results.repoDetails.length>1){
for(RepoDetail repoDetail:results.repoDetails){
if("hosted".equalsIgnoreCase(repoDetail.repositoryKind)){
repositoryUrl = repoDetail.repositoryURL;
break;
}
}
}
if(repositoryUrl == null)
{
repositoryUrl = results.repoDetails[0].repositoryURL;
}
String pomUrl = repositoryUrl +"/content/"+pomInfo.groupId.replace(".","/")+"/"+pomInfo.artifactId+"/"
+pomInfo.version+"/";
if(fileName == null){
ResourceResult resourceResult = HttpUtil.doGet(new URL(pomUrl), ResourceResult.class);
for(ResourceInfo rinfo:resourceResult.data){
if(rinfo.text.endsWith(endsWith) && (
fileName == null || fileName.compareTo(rinfo.text)>0)){
fileName = rinfo.text;
}
}
pomUrl += fileName;
}else {
pomUrl += fileName + endsWith;
}
logger.debug(pomUrl);
HttpURLConnection pomConn = (HttpURLConnection) new URL(pomUrl).openConnection();
pomConn.setRequestMethod("GET");
rtn = pomConn.getInputStream();
}
}
}catch (Throwable e){
logger.warn("get pominfo by jar name["+av[0] + ' '+av[1]+"] failed",e);
}
return rtn;
}
@Override
public InputStream getPomInfoByFileName(String[] av, String fileName) {
try {
return getContentByName(av, fileName);
}catch (Throwable e){
logger.warn("getPomInfoByFileName failed!",e);
return null;
}
}
@Override
public InputStream getSourceJarByFileName(String fileName) {
try {
return getContentByName(null,fileName);
}catch (Throwable e){
logger.warn("getPomInfoByFileName failed!",e);
return null;
}
}
}
| ctripcorp/cornerstone | cornerstone/src/main/java/com/ctrip/framework/cs/enterprise/NexusEnMaven.java | Java | apache-2.0 | 5,024 |
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.speech.v1.model;
/**
* Word-specific information for recognized words.
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Cloud Speech-to-Text API. For a detailed explanation
* see:
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
* </p>
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class WordInfo extends com.google.api.client.json.GenericJson {
/**
* The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater
* likelihood that the recognized words are correct. This field is set only for the top
* alternative of a non-streaming result or, of a streaming result where `is_final=true`. This
* field is not guaranteed to be accurate and users should not rely on it to be always provided.
* The default of 0.0 is a sentinel value indicating `confidence` was not set.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Float confidence;
/**
* Time offset relative to the beginning of the audio, and corresponding to the end of the spoken
* word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis.
* This is an experimental feature and the accuracy of the time offset can vary.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private String endTime;
/**
* Output only. A distinct integer value is assigned for every speaker within the audio. This
* field specifies which one of those speakers was detected to have spoken this word. Value ranges
* from '1' to diarization_speaker_count. speaker_tag is set if enable_speaker_diarization =
* 'true' and only in the top alternative.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Integer speakerTag;
/**
* Time offset relative to the beginning of the audio, and corresponding to the start of the
* spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top
* hypothesis. This is an experimental feature and the accuracy of the time offset can vary.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private String startTime;
/**
* The word corresponding to this set of information.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String word;
/**
* The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater
* likelihood that the recognized words are correct. This field is set only for the top
* alternative of a non-streaming result or, of a streaming result where `is_final=true`. This
* field is not guaranteed to be accurate and users should not rely on it to be always provided.
* The default of 0.0 is a sentinel value indicating `confidence` was not set.
* @return value or {@code null} for none
*/
public java.lang.Float getConfidence() {
return confidence;
}
/**
* The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater
* likelihood that the recognized words are correct. This field is set only for the top
* alternative of a non-streaming result or, of a streaming result where `is_final=true`. This
* field is not guaranteed to be accurate and users should not rely on it to be always provided.
* The default of 0.0 is a sentinel value indicating `confidence` was not set.
* @param confidence confidence or {@code null} for none
*/
public WordInfo setConfidence(java.lang.Float confidence) {
this.confidence = confidence;
return this;
}
/**
* Time offset relative to the beginning of the audio, and corresponding to the end of the spoken
* word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis.
* This is an experimental feature and the accuracy of the time offset can vary.
* @return value or {@code null} for none
*/
public String getEndTime() {
return endTime;
}
/**
* Time offset relative to the beginning of the audio, and corresponding to the end of the spoken
* word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis.
* This is an experimental feature and the accuracy of the time offset can vary.
* @param endTime endTime or {@code null} for none
*/
public WordInfo setEndTime(String endTime) {
this.endTime = endTime;
return this;
}
/**
* Output only. A distinct integer value is assigned for every speaker within the audio. This
* field specifies which one of those speakers was detected to have spoken this word. Value ranges
* from '1' to diarization_speaker_count. speaker_tag is set if enable_speaker_diarization =
* 'true' and only in the top alternative.
* @return value or {@code null} for none
*/
public java.lang.Integer getSpeakerTag() {
return speakerTag;
}
/**
* Output only. A distinct integer value is assigned for every speaker within the audio. This
* field specifies which one of those speakers was detected to have spoken this word. Value ranges
* from '1' to diarization_speaker_count. speaker_tag is set if enable_speaker_diarization =
* 'true' and only in the top alternative.
* @param speakerTag speakerTag or {@code null} for none
*/
public WordInfo setSpeakerTag(java.lang.Integer speakerTag) {
this.speakerTag = speakerTag;
return this;
}
/**
* Time offset relative to the beginning of the audio, and corresponding to the start of the
* spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top
* hypothesis. This is an experimental feature and the accuracy of the time offset can vary.
* @return value or {@code null} for none
*/
public String getStartTime() {
return startTime;
}
/**
* Time offset relative to the beginning of the audio, and corresponding to the start of the
* spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top
* hypothesis. This is an experimental feature and the accuracy of the time offset can vary.
* @param startTime startTime or {@code null} for none
*/
public WordInfo setStartTime(String startTime) {
this.startTime = startTime;
return this;
}
/**
* The word corresponding to this set of information.
* @return value or {@code null} for none
*/
public java.lang.String getWord() {
return word;
}
/**
* The word corresponding to this set of information.
* @param word word or {@code null} for none
*/
public WordInfo setWord(java.lang.String word) {
this.word = word;
return this;
}
@Override
public WordInfo set(String fieldName, Object value) {
return (WordInfo) super.set(fieldName, value);
}
@Override
public WordInfo clone() {
return (WordInfo) super.clone();
}
}
| googleapis/google-api-java-client-services | clients/google-api-services-speech/v1/1.31.0/com/google/api/services/speech/v1/model/WordInfo.java | Java | apache-2.0 | 7,866 |
/*
* PartitioningOperators.java Feb 3 2014, 03:44
*
* Copyright 2014 Drunken Dev.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.drunkendev.lambdas;
import com.drunkendev.lambdas.domain.DomainService;
import com.drunkendev.lambdas.domain.Order;
import com.drunkendev.lambdas.helper.IndexHolder;
import com.drunkendev.lambdas.helper.MutableBoolean;
import java.util.ArrayList;
import java.util.Arrays;
/**
*
* @author Brett Ryan
*/
public class PartitioningOperators {
private final DomainService ds;
/**
* Creates a new {@code PartitioningOperators} instance.
*/
public PartitioningOperators() {
this.ds = new DomainService();
}
public static void main(String[] args) {
PartitioningOperators po = new PartitioningOperators();
po.lambda20();
po.lambda21();
po.lambda22();
po.lambda23();
po.lambda24();
po.lambda25();
po.lambda26();
po.lambda27();
}
public void lambda20() {
System.out.println("\nFirst 3 numbers:");
int[] numbers = {5, 4, 1, 3, 9, 8, 6, 7, 2, 0};
Arrays.stream(numbers)
.limit(3)
.forEach(System.out::println);
}
public void lambda21() {
System.out.println("\nFirst 3 orders in WA:");
ds.getCustomerList().stream()
.filter(c -> "WA".equalsIgnoreCase(c.getRegion()))
.flatMap(c -> c.getOrders().stream()
.map(n -> new CustOrder(c.getCustomerId(), n))
).limit(3)
.forEach(System.out::println);
}
public void lambda22() {
System.out.println("\nAll but first 4 numbers:");
int[] numbers = {5, 4, 1, 3, 9, 8, 6, 7, 2, 0};
Arrays.stream(numbers)
.skip(4)
.forEach(System.out::println);
}
public void lambda23() {
System.out.println("\nAll but first 2 orders in WA:");
ds.getCustomerList().stream()
.filter(c -> "WA".equalsIgnoreCase(c.getRegion()))
.flatMap(c -> c.getOrders().stream()
.map(n -> new CustOrder(c.getCustomerId(), n))
).skip(2)
.forEach(System.out::println);
}
/**
* Unfortunately this method will not short circuit and will continue to
* iterate until the end of the stream. I need to figure out a better way to
* handle this.
*/
public void lambda24() {
System.out.println("\nFirst numbers less than 6:");
int[] numbers = {5, 4, 1, 3, 9, 8, 6, 7, 2, 0};
MutableBoolean mb = new MutableBoolean(true);
Arrays.stream(numbers)
.collect(ArrayList<Integer>::new,
(output, v) -> {
if (mb.isTrue()) {
if (v < 6) {
output.add(v);
} else {
mb.flip();
}
}
},
(c1, c2) -> c1.addAll(c2))
.forEach(System.out::println);
}
public void lambda25() {
System.out.println("\nFirst numbers not less than their position:");
int[] numbers = {5, 4, 1, 3, 9, 8, 6, 7, 2, 0};
IndexHolder i = new IndexHolder();
MutableBoolean mb = new MutableBoolean(true);
Arrays.stream(numbers)
.collect(ArrayList<Integer>::new,
(output, v) -> {
if (mb.isTrue()) {
if (v > i.postIncrement()) {
output.add(v);
} else {
mb.flip();
}
}
},
(c1, c2) -> c1.addAll(c2))
.forEach(System.out::println);
}
public void lambda26() {
System.out.println("\nAll elements starting from first element divisible by 3:");
int[] numbers = {5, 4, 1, 3, 9, 8, 6, 7, 2, 0};
MutableBoolean mb = new MutableBoolean(false);
Arrays.stream(numbers)
.collect(ArrayList<Integer>::new,
(output, v) -> {
if (mb.isTrue()) {
output.add(v);
} else if (v % 3 == 0) {
output.add(v);
mb.flip();
}
},
(c1, c2) -> c1.addAll(c2))
.forEach(System.out::println);
}
public void lambda27() {
System.out.println("\nAll elements starting from first element less than its position:");
int[] numbers = {5, 4, 1, 3, 9, 8, 6, 7, 2, 0};
IndexHolder i = new IndexHolder();
MutableBoolean mb = new MutableBoolean(false);
Arrays.stream(numbers)
.collect(ArrayList<Integer>::new,
(output, v) -> {
if (mb.isTrue()) {
output.add(v);
} else if (v < i.postIncrement()) {
output.add(v);
mb.flip();
}
},
(c1, c2) -> c1.addAll(c2)
)
.forEach(System.out::println);
}
private static class CustOrder {
private final String customerId;
private final Order order;
public CustOrder(String customerId, Order order) {
this.customerId = customerId;
this.order = order;
}
public String getCustomerId() {
return customerId;
}
public Order getOrder() {
return order;
}
@Override
public String toString() {
return String.format("CustOrder[customerId=%s,orderId=%d,orderDate=%s]",
customerId, order.getOrderId(), order.getOrderDate());
}
}
}
| brettryan/jdk8-lambda-samples | src/main/java/com/drunkendev/lambdas/PartitioningOperators.java | Java | apache-2.0 | 6,846 |
package com.esri.mapred;
import com.esri.io.PointFeatureWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.mapred.InputSplit;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.RecordReader;
import org.apache.hadoop.mapred.Reporter;
import java.io.IOException;
/**
*/
public class PointFeatureInputFormat
extends AbstractInputFormat<PointFeatureWritable>
{
private final class PointFeatureReader
extends AbstractFeatureReader<PointFeatureWritable>
{
private final PointFeatureWritable m_pointFeatureWritable = new PointFeatureWritable();
public PointFeatureReader(
final InputSplit inputSplit,
final JobConf jobConf) throws IOException
{
super(inputSplit, jobConf);
}
@Override
public PointFeatureWritable createValue()
{
return m_pointFeatureWritable;
}
@Override
protected void next() throws IOException
{
m_shpReader.queryPoint(m_pointFeatureWritable.point);
putAttributes(m_pointFeatureWritable.attributes);
}
}
@Override
public RecordReader<LongWritable, PointFeatureWritable> getRecordReader(
final InputSplit inputSplit,
final JobConf jobConf,
final Reporter reporter) throws IOException
{
return new PointFeatureReader(inputSplit, jobConf);
}
}
| syntelos/shapefile-java | src/com/esri/mapred/PointFeatureInputFormat.java | Java | apache-2.0 | 1,483 |
/* Copyright 2018 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.google.swarm.sqlserver.migration.common;
import java.util.HashMap;
public enum SqlDataType {
VARCHAR(0),
NVARCHAR(1),
CHAR(2),
NCHAR(3),
TEXT(4),
NTEXT(5),
BIGINT(6),
INT(7),
TINYINT(8),
SMALLINT(9),
NUMERIC(10),
DECIMAL(11),
MONEY(12),
SMALLMONEY(13),
FLOAT(14),
REAL(15),
BIT(16),
DATE(17),
TIME(18),
DATETIME(19),
DATETIME2(20),
DATETIMEOFFSET(21),
SMALLDATETIME(22),
BINARY(23),
IMAGE(24),
VARBINARY(25),
UNIQUEIDENTIFIER(26),
TIMESTAMP(27);
private int codeValue;
private static HashMap<Integer, SqlDataType> codeValueMap = new HashMap<Integer, SqlDataType>();
private SqlDataType(int codeValue) {
this.codeValue = codeValue;
}
static {
for (SqlDataType type : SqlDataType.values()) {
codeValueMap.put(type.codeValue, type);
}
}
public static SqlDataType getInstanceFromCodeValue(int codeValue) {
return codeValueMap.get(codeValue);
}
public int getCodeValue() {
return codeValue;
}
}
| GoogleCloudPlatform/dlp-rdb-bq-import | src/main/java/com/google/swarm/sqlserver/migration/common/SqlDataType.java | Java | apache-2.0 | 1,596 |
/*
* Copyright 2004-2013 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.docksidestage.mysql.dbflute.bsentity;
import java.util.List;
import java.util.ArrayList;
import org.dbflute.dbmeta.DBMeta;
import org.dbflute.dbmeta.AbstractEntity;
import org.dbflute.dbmeta.accessory.DomainEntity;
import org.docksidestage.mysql.dbflute.allcommon.DBMetaInstanceHandler;
import org.docksidestage.mysql.dbflute.exentity.*;
/**
* The entity of WHITE_IMPLICIT_REVERSE_FK_REF as TABLE. <br>
* <pre>
* [primary-key]
* WHITE_IMPLICIT_REVERSE_FK_REF_ID
*
* [column]
* WHITE_IMPLICIT_REVERSE_FK_REF_ID, WHITE_IMPLICIT_REVERSE_FK_ID, VALID_BEGIN_DATE, VALID_END_DATE
*
* [sequence]
*
*
* [identity]
* WHITE_IMPLICIT_REVERSE_FK_REF_ID
*
* [version-no]
*
*
* [foreign table]
*
*
* [referrer table]
*
*
* [foreign property]
*
*
* [referrer property]
*
*
* [get/set template]
* /= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
* Integer whiteImplicitReverseFkRefId = entity.getWhiteImplicitReverseFkRefId();
* Integer whiteImplicitReverseFkId = entity.getWhiteImplicitReverseFkId();
* java.time.LocalDate validBeginDate = entity.getValidBeginDate();
* java.time.LocalDate validEndDate = entity.getValidEndDate();
* entity.setWhiteImplicitReverseFkRefId(whiteImplicitReverseFkRefId);
* entity.setWhiteImplicitReverseFkId(whiteImplicitReverseFkId);
* entity.setValidBeginDate(validBeginDate);
* entity.setValidEndDate(validEndDate);
* = = = = = = = = = =/
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsWhiteImplicitReverseFkRef extends AbstractEntity implements DomainEntity {
// ===================================================================================
// Definition
// ==========
/** The serial version UID for object serialization. (Default) */
private static final long serialVersionUID = 1L;
// ===================================================================================
// Attribute
// =========
/** WHITE_IMPLICIT_REVERSE_FK_REF_ID: {PK, ID, NotNull, INT(10)} */
protected Integer _whiteImplicitReverseFkRefId;
/** WHITE_IMPLICIT_REVERSE_FK_ID: {UQ+, NotNull, INT(10)} */
protected Integer _whiteImplicitReverseFkId;
/** VALID_BEGIN_DATE: {+UQ, NotNull, DATE(10)} */
protected java.time.LocalDate _validBeginDate;
/** VALID_END_DATE: {NotNull, DATE(10)} */
protected java.time.LocalDate _validEndDate;
// ===================================================================================
// DB Meta
// =======
/** {@inheritDoc} */
public DBMeta asDBMeta() {
return DBMetaInstanceHandler.findDBMeta(asTableDbName());
}
/** {@inheritDoc} */
public String asTableDbName() {
return "white_implicit_reverse_fk_ref";
}
// ===================================================================================
// Key Handling
// ============
/** {@inheritDoc} */
public boolean hasPrimaryKeyValue() {
if (_whiteImplicitReverseFkRefId == null) { return false; }
return true;
}
/**
* To be unique by the unique column. <br>
* You can update the entity by the key when entity update (NOT batch update).
* @param whiteImplicitReverseFkId : UQ+, NotNull, INT(10). (NotNull)
* @param validBeginDate : +UQ, NotNull, DATE(10). (NotNull)
*/
public void uniqueBy(Integer whiteImplicitReverseFkId, java.time.LocalDate validBeginDate) {
__uniqueDrivenProperties.clear();
__uniqueDrivenProperties.addPropertyName("whiteImplicitReverseFkId");
__uniqueDrivenProperties.addPropertyName("validBeginDate");
setWhiteImplicitReverseFkId(whiteImplicitReverseFkId);setValidBeginDate(validBeginDate);
}
// ===================================================================================
// Foreign Property
// ================
// ===================================================================================
// Referrer Property
// =================
protected <ELEMENT> List<ELEMENT> newReferrerList() { // overriding to import
return new ArrayList<ELEMENT>();
}
// ===================================================================================
// Basic Override
// ==============
@Override
protected boolean doEquals(Object obj) {
if (obj instanceof BsWhiteImplicitReverseFkRef) {
BsWhiteImplicitReverseFkRef other = (BsWhiteImplicitReverseFkRef)obj;
if (!xSV(_whiteImplicitReverseFkRefId, other._whiteImplicitReverseFkRefId)) { return false; }
return true;
} else {
return false;
}
}
@Override
protected int doHashCode(int initial) {
int hs = initial;
hs = xCH(hs, asTableDbName());
hs = xCH(hs, _whiteImplicitReverseFkRefId);
return hs;
}
@Override
protected String doBuildStringWithRelation(String li) {
return "";
}
@Override
protected String doBuildColumnString(String dm) {
StringBuilder sb = new StringBuilder();
sb.append(dm).append(xfND(_whiteImplicitReverseFkRefId));
sb.append(dm).append(xfND(_whiteImplicitReverseFkId));
sb.append(dm).append(xfND(_validBeginDate));
sb.append(dm).append(xfND(_validEndDate));
if (sb.length() > dm.length()) {
sb.delete(0, dm.length());
}
sb.insert(0, "{").append("}");
return sb.toString();
}
@Override
protected String doBuildRelationString(String dm) {
return "";
}
@Override
public WhiteImplicitReverseFkRef clone() {
return (WhiteImplicitReverseFkRef)super.clone();
}
// ===================================================================================
// Accessor
// ========
/**
* [get] WHITE_IMPLICIT_REVERSE_FK_REF_ID: {PK, ID, NotNull, INT(10)} <br>
* @return The value of the column 'WHITE_IMPLICIT_REVERSE_FK_REF_ID'. (basically NotNull if selected: for the constraint)
*/
public Integer getWhiteImplicitReverseFkRefId() {
checkSpecifiedProperty("whiteImplicitReverseFkRefId");
return _whiteImplicitReverseFkRefId;
}
/**
* [set] WHITE_IMPLICIT_REVERSE_FK_REF_ID: {PK, ID, NotNull, INT(10)} <br>
* @param whiteImplicitReverseFkRefId The value of the column 'WHITE_IMPLICIT_REVERSE_FK_REF_ID'. (basically NotNull if update: for the constraint)
*/
public void setWhiteImplicitReverseFkRefId(Integer whiteImplicitReverseFkRefId) {
registerModifiedProperty("whiteImplicitReverseFkRefId");
_whiteImplicitReverseFkRefId = whiteImplicitReverseFkRefId;
}
/**
* [get] WHITE_IMPLICIT_REVERSE_FK_ID: {UQ+, NotNull, INT(10)} <br>
* @return The value of the column 'WHITE_IMPLICIT_REVERSE_FK_ID'. (basically NotNull if selected: for the constraint)
*/
public Integer getWhiteImplicitReverseFkId() {
checkSpecifiedProperty("whiteImplicitReverseFkId");
return _whiteImplicitReverseFkId;
}
/**
* [set] WHITE_IMPLICIT_REVERSE_FK_ID: {UQ+, NotNull, INT(10)} <br>
* @param whiteImplicitReverseFkId The value of the column 'WHITE_IMPLICIT_REVERSE_FK_ID'. (basically NotNull if update: for the constraint)
*/
public void setWhiteImplicitReverseFkId(Integer whiteImplicitReverseFkId) {
registerModifiedProperty("whiteImplicitReverseFkId");
_whiteImplicitReverseFkId = whiteImplicitReverseFkId;
}
/**
* [get] VALID_BEGIN_DATE: {+UQ, NotNull, DATE(10)} <br>
* @return The value of the column 'VALID_BEGIN_DATE'. (basically NotNull if selected: for the constraint)
*/
public java.time.LocalDate getValidBeginDate() {
checkSpecifiedProperty("validBeginDate");
return _validBeginDate;
}
/**
* [set] VALID_BEGIN_DATE: {+UQ, NotNull, DATE(10)} <br>
* @param validBeginDate The value of the column 'VALID_BEGIN_DATE'. (basically NotNull if update: for the constraint)
*/
public void setValidBeginDate(java.time.LocalDate validBeginDate) {
registerModifiedProperty("validBeginDate");
_validBeginDate = validBeginDate;
}
/**
* [get] VALID_END_DATE: {NotNull, DATE(10)} <br>
* @return The value of the column 'VALID_END_DATE'. (basically NotNull if selected: for the constraint)
*/
public java.time.LocalDate getValidEndDate() {
checkSpecifiedProperty("validEndDate");
return _validEndDate;
}
/**
* [set] VALID_END_DATE: {NotNull, DATE(10)} <br>
* @param validEndDate The value of the column 'VALID_END_DATE'. (basically NotNull if update: for the constraint)
*/
public void setValidEndDate(java.time.LocalDate validEndDate) {
registerModifiedProperty("validEndDate");
_validEndDate = validEndDate;
}
}
| dbflute-test/dbflute-test-dbms-mysql | src/main/java/org/docksidestage/mysql/dbflute/bsentity/BsWhiteImplicitReverseFkRef.java | Java | apache-2.0 | 10,962 |
/**
* Copyright (c) 2016 Lemur Consulting Ltd.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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 uk.co.flax.biosolr.elasticsearch;
import org.apache.commons.lang3.StringUtils;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.threadpool.ThreadPool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import uk.co.flax.biosolr.elasticsearch.mapper.ontology.ElasticOntologyHelperFactory;
import uk.co.flax.biosolr.elasticsearch.mapper.ontology.OntologySettings;
import uk.co.flax.biosolr.ontology.core.OntologyHelper;
import uk.co.flax.biosolr.ontology.core.OntologyHelperException;
import java.io.Closeable;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* Created by mlp on 09/02/16.
* @author mlp
*/
public class OntologyHelperBuilder implements Closeable {
private static final Logger LOGGER = LoggerFactory.getLogger(OntologyHelperBuilder.class);
private ThreadPool threadPool;
private static OntologyHelperBuilder instance;
private Map<String, OntologyHelper> helpers = new ConcurrentHashMap<>();
@Inject
public OntologyHelperBuilder(ThreadPool threadPool) {
this.threadPool = threadPool;
setInstance(this);
}
private static void setInstance(OntologyHelperBuilder odb) {
instance = odb;
}
public static OntologyHelperBuilder getInstance() {
return instance;
}
private OntologyHelper getHelper(OntologySettings settings) throws OntologyHelperException {
String helperKey = buildHelperKey(settings);
OntologyHelper helper = helpers.get(helperKey);
if (helper == null) {
helper = new ElasticOntologyHelperFactory(settings).buildOntologyHelper();
OntologyCheckRunnable checker = new OntologyCheckRunnable(helperKey, settings.getThreadCheckMs());
threadPool.scheduleWithFixedDelay(checker, TimeValue.timeValueMillis(settings.getThreadCheckMs()));
helpers.put(helperKey, helper);
helper.updateLastCallTime();
}
return helper;
}
public static OntologyHelper getOntologyHelper(OntologySettings settings) throws OntologyHelperException {
OntologyHelperBuilder builder = getInstance();
return builder.getHelper(settings);
}
@Override
public void close() {
// Explicitly dispose of any remaining helpers
for (Map.Entry<String, OntologyHelper> helperEntry : helpers.entrySet()) {
if (helperEntry.getValue() != null) {
LOGGER.info("Disposing of helper for {}", helperEntry.getKey());
helperEntry.getValue().dispose();
}
}
}
private static String buildHelperKey(OntologySettings settings) {
String key;
if (StringUtils.isNotBlank(settings.getOntologyUri())) {
key = settings.getOntologyUri();
} else {
if (StringUtils.isNotBlank(settings.getOlsOntology())) {
key = settings.getOlsBaseUrl() + "_" + settings.getOlsOntology();
} else {
key = settings.getOlsBaseUrl();
}
}
return key;
}
private final class OntologyCheckRunnable implements Runnable {
final String threadKey;
final long deleteCheckMs;
public OntologyCheckRunnable(String threadKey, long deleteCheckMs) {
this.threadKey = threadKey;
this.deleteCheckMs = deleteCheckMs;
}
@Override
public void run() {
OntologyHelper helper = helpers.get(threadKey);
if (helper != null) {
// Check if the last call time was longer ago than the maximum
if (System.currentTimeMillis() - deleteCheckMs > helper.getLastCallTime()) {
// Assume helper is out of use - dispose of it to allow memory to be freed
helper.dispose();
helpers.remove(threadKey);
}
}
}
}
}
| flaxsearch/BioSolr | ontology/ontology-annotator/elasticsearch-ontology-annotator/es-ontology-annotator-es2.2/src/main/java/uk/co/flax/biosolr/elasticsearch/OntologyHelperBuilder.java | Java | apache-2.0 | 4,116 |
/*
* Copyright 2004-2013 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.docksidestage.mysql.dbflute.immuhama.bsbhv.loader;
import java.util.List;
import org.dbflute.bhv.*;
import org.docksidestage.mysql.dbflute.immuhama.exbhv.*;
import org.docksidestage.mysql.dbflute.immuhama.exentity.*;
/**
* The referrer loader of (会員ログイン情報)MEMBER_LOGIN as TABLE. <br>
* <pre>
* [primary key]
* MEMBER_LOGIN_ID
*
* [column]
* MEMBER_LOGIN_ID, MEMBER_ID, LOGIN_DATETIME, MOBILE_LOGIN_FLG, LOGIN_MEMBER_STATUS_CODE
*
* [sequence]
*
*
* [identity]
* MEMBER_LOGIN_ID
*
* [version-no]
*
*
* [foreign table]
* MEMBER_STATUS, MEMBER
*
* [referrer table]
*
*
* [foreign property]
* memberStatus, member
*
* [referrer property]
*
* </pre>
* @author DBFlute(AutoGenerator)
*/
public class ImmuLoaderOfMemberLogin {
// ===================================================================================
// Attribute
// =========
protected List<ImmuMemberLogin> _selectedList;
protected BehaviorSelector _selector;
protected ImmuMemberLoginBhv _myBhv; // lazy-loaded
// ===================================================================================
// Ready for Loading
// =================
public ImmuLoaderOfMemberLogin ready(List<ImmuMemberLogin> selectedList, BehaviorSelector selector)
{ _selectedList = selectedList; _selector = selector; return this; }
protected ImmuMemberLoginBhv myBhv()
{ if (_myBhv != null) { return _myBhv; } else { _myBhv = _selector.select(ImmuMemberLoginBhv.class); return _myBhv; } }
// ===================================================================================
// Pull out Foreign
// ================
protected ImmuLoaderOfMemberStatus _foreignMemberStatusLoader;
public ImmuLoaderOfMemberStatus pulloutMemberStatus() {
if (_foreignMemberStatusLoader == null)
{ _foreignMemberStatusLoader = new ImmuLoaderOfMemberStatus().ready(myBhv().pulloutMemberStatus(_selectedList), _selector); }
return _foreignMemberStatusLoader;
}
protected ImmuLoaderOfMember _foreignMemberLoader;
public ImmuLoaderOfMember pulloutMember() {
if (_foreignMemberLoader == null)
{ _foreignMemberLoader = new ImmuLoaderOfMember().ready(myBhv().pulloutMember(_selectedList), _selector); }
return _foreignMemberLoader;
}
// ===================================================================================
// Accessor
// ========
public List<ImmuMemberLogin> getSelectedList() { return _selectedList; }
public BehaviorSelector getSelector() { return _selector; }
}
| dbflute-test/dbflute-test-dbms-mysql | src/main/java/org/docksidestage/mysql/dbflute/immuhama/bsbhv/loader/ImmuLoaderOfMemberLogin.java | Java | apache-2.0 | 3,938 |
/*
* Copyright © 2009 HotPads (admin@hotpads.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.datarouter.webappinstance.storage.webappinstancelog;
import java.util.List;
import javax.inject.Inject;
import javax.inject.Singleton;
import io.datarouter.model.databean.FieldlessIndexEntry;
import io.datarouter.scanner.Scanner;
import io.datarouter.storage.Datarouter;
import io.datarouter.storage.client.ClientId;
import io.datarouter.storage.dao.BaseDao;
import io.datarouter.storage.dao.BaseRedundantDaoParams;
import io.datarouter.storage.node.factory.IndexingNodeFactory;
import io.datarouter.storage.node.factory.NodeFactory;
import io.datarouter.storage.node.op.combo.IndexedSortedMapStorage.IndexedSortedMapStorageNode;
import io.datarouter.storage.node.op.index.IndexReader;
import io.datarouter.storage.tag.Tag;
import io.datarouter.util.tuple.Range;
import io.datarouter.virtualnode.redundant.RedundantIndexedSortedMapStorageNode;
import io.datarouter.webappinstance.storage.webappinstancelog.WebappInstanceLog.WebappInstanceLogFielder;
@Singleton
public class DatarouterWebappInstanceLogDao extends BaseDao{
public static class DatarouterWebappInstanceLogDaoParams extends BaseRedundantDaoParams{
public DatarouterWebappInstanceLogDaoParams(List<ClientId> clientIds){
super(clientIds);
}
}
private final IndexedSortedMapStorageNode<WebappInstanceLogKey,WebappInstanceLog,WebappInstanceLogFielder> node;
private final IndexReader<WebappInstanceLogKey,WebappInstanceLog,WebappInstanceLogByBuildInstantKey,
FieldlessIndexEntry<WebappInstanceLogByBuildInstantKey,WebappInstanceLogKey,WebappInstanceLog>>
byBuildInstant;
@Inject
public DatarouterWebappInstanceLogDao(
Datarouter datarouter,
NodeFactory nodeFactory,
IndexingNodeFactory indexingNodeFactory,
DatarouterWebappInstanceLogDaoParams params){
super(datarouter);
node = Scanner.of(params.clientIds)
.map(clientId -> {
IndexedSortedMapStorageNode<WebappInstanceLogKey,WebappInstanceLog,WebappInstanceLogFielder> node =
nodeFactory.create(clientId, WebappInstanceLog::new, WebappInstanceLogFielder::new)
.withTag(Tag.DATAROUTER)
.build();
return node;
})
.listTo(RedundantIndexedSortedMapStorageNode::makeIfMulti);
byBuildInstant = indexingNodeFactory.createKeyOnlyManagedIndex(WebappInstanceLogByBuildInstantKey::new, node)
.build();
datarouter.register(node);
}
public void put(WebappInstanceLog log){
node.put(log);
}
public Scanner<WebappInstanceLog> scan(){
return node.scan();
}
public Scanner<WebappInstanceLog> scanWithPrefix(WebappInstanceLogKey key){
return node.scanWithPrefix(key);
}
public Scanner<WebappInstanceLog> scanDatabeans(Range<WebappInstanceLogByBuildInstantKey> range){
return byBuildInstant.scanDatabeans(range);
}
}
| hotpads/datarouter | datarouter-webapp-instance/src/main/java/io/datarouter/webappinstance/storage/webappinstancelog/DatarouterWebappInstanceLogDao.java | Java | apache-2.0 | 3,351 |
package nl.galesloot_ict.efjenergy.MeterReading;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.util.ArrayList;
/**
* Created by FlorisJan on 23-11-2014.
*/
public class MeterReadingsList extends ArrayList<MeterReading> {
@JsonCreator
public static MeterReadingsList Create(String jsonString) throws JsonParseException, JsonMappingException, IOException {
ObjectMapper mapper = new ObjectMapper();
MeterReadingsList meterReading = null;
meterReading = mapper.readValue(jsonString, MeterReadingsList.class);
return meterReading;
}
}
| fjgalesloot/eFJenergy | Android/app/src/main/java/nl/galesloot_ict/efjenergy/MeterReading/MeterReadingsList.java | Java | apache-2.0 | 794 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.