use of com.google.cloud.compute.v1.Operation in project osate2 by osate.
the class AbstractPropertiesSemanticSequencer method sequence.
@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
EPackage epackage = semanticObject.eClass().getEPackage();
ParserRule rule = context.getParserRule();
Action action = context.getAssignedAction();
Set<Parameter> parameters = context.getEnabledBooleanParameters();
if (epackage == Aadl2Package.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case Aadl2Package.ARRAY_RANGE:
sequence_ArrayRange(context, (ArrayRange) semanticObject);
return;
case Aadl2Package.BASIC_PROPERTY_ASSOCIATION:
sequence_FieldPropertyAssociation(context, (BasicPropertyAssociation) semanticObject);
return;
case Aadl2Package.BOOLEAN_LITERAL:
sequence_BooleanLiteral(context, (BooleanLiteral) semanticObject);
return;
case Aadl2Package.CLASSIFIER_VALUE:
sequence_ComponentClassifierTerm(context, (ClassifierValue) semanticObject);
return;
case Aadl2Package.COMPUTED_VALUE:
sequence_ComputedTerm(context, (ComputedValue) semanticObject);
return;
case Aadl2Package.CONTAINED_NAMED_ELEMENT:
sequence_ContainmentPath(context, (ContainedNamedElement) semanticObject);
return;
case Aadl2Package.CONTAINMENT_PATH_ELEMENT:
sequence_ContainmentPathElement(context, (ContainmentPathElement) semanticObject);
return;
case Aadl2Package.INTEGER_LITERAL:
sequence_IntegerTerm(context, (IntegerLiteral) semanticObject);
return;
case Aadl2Package.LIST_VALUE:
sequence_ListTerm(context, (ListValue) semanticObject);
return;
case Aadl2Package.MODAL_PROPERTY_VALUE:
if (rule == grammarAccess.getModalPropertyValueRule()) {
sequence_ModalPropertyValue(context, (ModalPropertyValue) semanticObject);
return;
} else if (rule == grammarAccess.getOptionalModalPropertyValueRule()) {
sequence_OptionalModalPropertyValue(context, (ModalPropertyValue) semanticObject);
return;
} else if (rule == grammarAccess.getPropertyValueRule()) {
sequence_PropertyValue(context, (ModalPropertyValue) semanticObject);
return;
} else
break;
case Aadl2Package.NAMED_VALUE:
if (rule == grammarAccess.getConstantValueRule() || rule == grammarAccess.getNumAltRule()) {
sequence_ConstantValue(context, (NamedValue) semanticObject);
return;
} else if (rule == grammarAccess.getPropertyExpressionRule() || rule == grammarAccess.getLiteralorReferenceTermRule()) {
sequence_LiteralorReferenceTerm(context, (NamedValue) semanticObject);
return;
} else
break;
case Aadl2Package.OPERATION:
sequence_SignedConstant(context, (Operation) semanticObject);
return;
case Aadl2Package.PROPERTY_ASSOCIATION:
if (rule == grammarAccess.getBasicPropertyAssociationRule()) {
sequence_BasicPropertyAssociation(context, (PropertyAssociation) semanticObject);
return;
} else if (rule == grammarAccess.getPModelRule() || rule == grammarAccess.getContainedPropertyAssociationRule()) {
sequence_ContainedPropertyAssociation(context, (PropertyAssociation) semanticObject);
return;
} else if (rule == grammarAccess.getPropertyAssociationRule()) {
sequence_PropertyAssociation(context, (PropertyAssociation) semanticObject);
return;
} else
break;
case Aadl2Package.RANGE_VALUE:
sequence_NumericRangeTerm(context, (RangeValue) semanticObject);
return;
case Aadl2Package.REAL_LITERAL:
sequence_RealTerm(context, (RealLiteral) semanticObject);
return;
case Aadl2Package.RECORD_VALUE:
if (rule == grammarAccess.getOldRecordTermRule()) {
sequence_OldRecordTerm(context, (RecordValue) semanticObject);
return;
} else if (rule == grammarAccess.getPropertyExpressionRule() || rule == grammarAccess.getRecordTermRule()) {
sequence_RecordTerm(context, (RecordValue) semanticObject);
return;
} else
break;
case Aadl2Package.REFERENCE_VALUE:
sequence_ReferenceTerm(context, (ReferenceValue) semanticObject);
return;
case Aadl2Package.STRING_LITERAL:
sequence_StringTerm(context, (StringLiteral) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of com.google.cloud.compute.v1.Operation in project oracle-db-examples by oracle.
the class MultiOperation method processChildRowOperation.
/**
* Process next resultset. Get the child operation from the queue (if any submitted) and pass
* the resultset to it for the processing. If no child operation in the queue then process resultset
* with the help of user supplied row handler or the default one. Wait for the child operation or
* the handler to process all rows of a resultset.
*
* @return the completion stage of the child operation.
* @throws SQLException
*/
private CompletionStage<T> processChildRowOperation() throws SQLException {
// Get the result set
ResultSet resultSet = jdbcStatement.getResultSet();
// Remove child operation, if any exist
Operation operationFromQueue = resultOperations.poll();
// Keep as effective final, because it uses in lambda expression
Operation operation;
boolean onRowsHandler = (operationFromQueue == null);
if (onRowsHandler) {
// Handle using onRows handler.
operation = new MultiRowOperation<T>(session, group, true);
} else
operation = operationFromQueue;
if (!(operation instanceof ChildRowOperation)) {
// Throw invalid state
throw new IllegalStateException("TODO");
}
// Trigger child operation to process the resultset
resultStage = ((ChildRowOperation) operation).setResultSet(resultSet, resultStage);
if (onRowsHandler)
resultStage = resultStage.thenRun(() -> rowsHandler.accept(resultNum, (RowOperation<T>) operation));
// Then again move to moreResult stage to process next resultset.
return resultStage.thenComposeAsync(((ChildRowOperation) operation)::resultProcessed, getExecutor()).thenComposeAsync(this::checkForMoreResults, getExecutor());
}
use of com.google.cloud.compute.v1.Operation in project ddf by codice.
the class TestCswCqlFilter method getOperation.
private static Operation getOperation() {
List<DomainType> getRecordsParameters = new ArrayList<>(6);
DomainType typeName = new DomainType();
typeName.setName(CswConstants.TYPE_NAME_PARAMETER);
getRecordsParameters.add(typeName);
DomainType outputSchema = new DomainType();
outputSchema.setName(CswConstants.OUTPUT_SCHEMA_PARAMETER);
getRecordsParameters.add(outputSchema);
DomainType constraintLang = new DomainType();
constraintLang.setName(CswConstants.CONSTRAINT_LANGUAGE_PARAMETER);
getRecordsParameters.add(constraintLang);
DomainType outputFormat = new DomainType();
outputFormat.setName(CswConstants.OUTPUT_FORMAT_PARAMETER);
getRecordsParameters.add(outputFormat);
DomainType resultType = new DomainType();
resultType.setName(CswConstants.RESULT_TYPE_PARAMETER);
getRecordsParameters.add(resultType);
DomainType elementSetName = new DomainType();
elementSetName.setName(CswConstants.ELEMENT_SET_NAME_PARAMETER);
getRecordsParameters.add(elementSetName);
Operation getRecords = new Operation();
getRecords.setName(CswConstants.GET_RECORDS);
getRecords.setParameter(getRecordsParameters);
List<Operation> operations = new ArrayList<>(1);
operations.add(getRecords);
return getRecords;
}
use of com.google.cloud.compute.v1.Operation in project oxTrust by GluuFederation.
the class Scim2UserService method patchUser.
public User patchUser(String id, ScimPatchUser patchUser) throws Exception {
for (Operation operation : patchUser.getOperatons()) {
String val = operation.getOperationName();
if (val.equalsIgnoreCase("replace")) {
replaceUserPatch(operation, id);
}
if (val.equalsIgnoreCase("remove")) {
removeUserPatch(operation, id);
}
if (val.equalsIgnoreCase("add")) {
addUserPatch(operation, id);
}
}
GluuCustomPerson gluuPerson = personService.getPersonByInum(id);
User updatedUser = copyUtils2.copy(gluuPerson, null);
return updatedUser;
}
use of com.google.cloud.compute.v1.Operation in project ddf by codice.
the class TestCswFilterDelegate method getOperation.
private static Operation getOperation() {
List<DomainType> getRecordsParameters = new ArrayList<>(6);
DomainType typeName = new DomainType();
typeName.setName(CswConstants.TYPE_NAME_PARAMETER);
getRecordsParameters.add(typeName);
DomainType outputSchema = new DomainType();
outputSchema.setName(CswConstants.OUTPUT_SCHEMA_PARAMETER);
getRecordsParameters.add(outputSchema);
DomainType constraintLang = new DomainType();
constraintLang.setName(CswConstants.CONSTRAINT_LANGUAGE_PARAMETER);
getRecordsParameters.add(constraintLang);
DomainType outputFormat = new DomainType();
outputFormat.setName(CswConstants.OUTPUT_FORMAT_PARAMETER);
getRecordsParameters.add(outputFormat);
DomainType resultType = new DomainType();
resultType.setName(CswConstants.RESULT_TYPE_PARAMETER);
getRecordsParameters.add(resultType);
DomainType elementSetName = new DomainType();
elementSetName.setName(CswConstants.ELEMENT_SET_NAME_PARAMETER);
getRecordsParameters.add(elementSetName);
Operation getRecords = new Operation();
getRecords.setName(CswConstants.GET_RECORDS);
getRecords.setParameter(getRecordsParameters);
List<Operation> operations = new ArrayList<>(1);
operations.add(getRecords);
return getRecords;
}
Aggregations