use of alluxio.shaded.client.org.apache.commons.lang3.NotImplementedException in project toolkit by googleapis.
the class MainDiscoGapicProviderFactory method defaultCreate.
/**
* Create the DiscoGapicProvider based on the given id
*/
public static List<GapicProvider> defaultCreate(DiscoApiModel model, GapicProductConfig productConfig, GapicGeneratorConfig generatorConfig, PackageMetadataConfig packageConfig) {
ArrayList<GapicProvider> providers = new ArrayList<>();
String id = generatorConfig.id();
// Please keep the following IDs in alphabetical order
if (id.equals(JAVA)) {
if (generatorConfig.enableSurfaceGenerator()) {
GapicCodePathMapper javaPathMapper = CommonGapicCodePathMapper.newBuilder().setPrefix("src/main/java").setShouldAppendPackage(true).build();
List<DocumentToViewTransformer> transformers = Arrays.asList(new JavaDiscoGapicResourceNameToViewTransformer(javaPathMapper, packageConfig), new JavaDiscoGapicSchemaToViewTransformer(javaPathMapper, packageConfig), new JavaDiscoGapicRequestToViewTransformer(javaPathMapper, packageConfig), new JavaDiscoGapicSurfaceTransformer(javaPathMapper, packageConfig));
DiscoGapicProvider provider = DiscoGapicProvider.newBuilder().setDiscoApiModel(model).setProductConfig(productConfig).setSnippetSetRunner(new CommonSnippetSetRunner(new JavaRenderingUtil())).setDocumentToViewTransformers(transformers).build();
providers.add(provider);
}
if (generatorConfig.enableTestGenerator()) {
GapicCodePathMapper javaTestPathMapper = CommonGapicCodePathMapper.newBuilder().setPrefix("src/test/java").setShouldAppendPackage(true).build();
GapicProvider testProvider = ViewModelDiscoGapicProvider.newBuilder().setModel(model).setProductConfig(productConfig).setSnippetSetRunner(new CommonSnippetSetRunner(new CommonRenderingUtil())).setModelToViewTransformer(new JavaSurfaceTestTransformer(javaTestPathMapper, new JavaDiscoGapicSurfaceTransformer(javaTestPathMapper, packageConfig), "java/http_test.snip")).build();
providers.add(testProvider);
}
return providers;
} else {
throw new NotImplementedException("DiscoGapicProviderFactory: invalid id \"" + id + "\"");
}
}
use of alluxio.shaded.client.org.apache.commons.lang3.NotImplementedException in project SilentGems by SilentChaos512.
the class ItemChaosOrb method addRecipes.
@Override
public void addRecipes(RecipeMaker recipes) {
String chaosEssence = "gemChaos";
ItemStack chaosEssenceEnriched = ModItems.craftingMaterial.chaosEssenceEnriched;
ItemStack chaosEssenceCrystallized = ModItems.craftingMaterial.chaosEssenceCrystallized;
String chaosEssenceShard = "nuggetChaos";
for (Type type : Type.values()) {
ItemStack result = new ItemStack(this, 1, type.ordinal());
switch(type) {
case FRAGILE:
recipes.addShapedOre("chaos_orb_fragile", result, "ccc", "cdc", "ccc", 'c', chaosEssence, 'd', "gemDiamond");
break;
case POTATO:
recipes.addShapedOre("chaos_orb_potato", result, "ccc", "cpc", "ccc", 'c', chaosEssenceShard, 'p', Items.POTATO);
break;
case REFINED:
recipes.addShaped("chaos_orb_refined", result, " c ", "coc", " c ", 'c', chaosEssenceEnriched, 'o', new ItemStack(this, 1, Type.FRAGILE.ordinal()));
break;
case SUPREME:
recipes.addShaped("chaos_orb_supreme", result, " c ", "coc", " c ", 'c', chaosEssenceCrystallized, 'o', new ItemStack(this, 1, Type.REFINED.ordinal()));
break;
default:
throw new NotImplementedException("No recipe for chaos orb of type " + type);
}
}
}
use of alluxio.shaded.client.org.apache.commons.lang3.NotImplementedException in project iri by iotaledger.
the class Iota method initializeTangle.
private void initializeTangle() {
String dbPath = configuration.string(Configuration.DefaultConfSettings.DB_PATH);
if (testnet) {
if (dbPath.isEmpty() || dbPath.equals("mainnetdb")) {
// testnetusers must not use mainnetdb, overwrite it unless an explicit name is set.
configuration.put(Configuration.DefaultConfSettings.DB_PATH.name(), "testnetdb");
configuration.put(Configuration.DefaultConfSettings.DB_LOG_PATH.name(), "testnetdb.log");
}
} else {
if (dbPath.isEmpty() || dbPath.equals("testnetdb")) {
// mainnetusers must not use testnetdb, overwrite it unless an explicit name is set.
configuration.put(Configuration.DefaultConfSettings.DB_PATH.name(), "mainnetdb");
configuration.put(Configuration.DefaultConfSettings.DB_LOG_PATH.name(), "mainnetdb.log");
}
}
switch(configuration.string(Configuration.DefaultConfSettings.MAIN_DB)) {
case "rocksdb":
{
tangle.addPersistenceProvider(new RocksDBPersistenceProvider(configuration.string(Configuration.DefaultConfSettings.DB_PATH), configuration.string(Configuration.DefaultConfSettings.DB_LOG_PATH), configuration.integer(Configuration.DefaultConfSettings.DB_CACHE_SIZE)));
break;
}
default:
{
throw new NotImplementedException("No such database type.");
}
}
if (configuration.booling(Configuration.DefaultConfSettings.EXPORT)) {
tangle.addPersistenceProvider(new FileExportProvider());
}
if (configuration.booling(Configuration.DefaultConfSettings.ZMQ_ENABLED)) {
tangle.addPersistenceProvider(new ZmqPublishProvider(messageQ));
}
}
use of alluxio.shaded.client.org.apache.commons.lang3.NotImplementedException in project SilentGems by SilentChaos512.
the class GemsClientProxy method spawnParticles.
// Particles
@Override
public void spawnParticles(EnumModParticles type, Color color, World world, double x, double y, double z, double motionX, double motionY, double motionZ) {
Particle fx = null;
float r = color.getRed();
float g = color.getGreen();
float b = color.getBlue();
switch(type) {
case CHAOS:
// fx = new EntityFXChaos(world, x, y, z, motionX, motionY, motionZ, 2.0f, 25, r, g, b);
fx = new FXChaos(world, x, y, z, .2f, r, g, b, 25).setSpeed(motionX, motionY, motionZ);
break;
case CHAOS_PROJECTILE_BODY:
// fx = new EntityFXChaos(world, x, y, z, 0f, 0f, 0f, 3.0f, 1, r, g, b);
fx = new FXChaos(world, x, y, z, .3f, r, g, b, 2);
break;
case CHAOS_PACKET_HEAD:
// fx = new EntityFXChaos(world, x, y, z, motionX, motionY, motionZ, 2.0f, 0, r, g, b);
fx = new FXChaos(world, x, y, z, .2f, r, g, b, 1).setSpeed(motionX, motionY, motionZ);
break;
case CHAOS_PACKET_TAIL:
// fx = new EntityFXChaos(world, x, y, z, motionX, motionY, motionZ, 1.0f, 25, r, g, b);
fx = new FXChaos(world, x, y, z, .1f, r, g, b, 15).setSpeed(motionX, motionY, motionZ);
break;
case CHAOS_NODE:
// fx = new EntityFXChaos(world, x, y, z, motionX, motionY, motionZ, 3.0f, 20, r, g, b);
fx = new FXChaos(world, x, y, z, .3f, r, g, b, 20).setSpeed(motionX, motionY, motionZ);
break;
case PHANTOM_LIGHT:
// fx = new EntityFXChaos(world, x, y, z, motionX, motionY, motionZ, 1.0f, 15, r, g, b);
fx = new FXChaos(world, x, y, z, .1f, r, g, b, 15).setSpeed(motionX, motionY, motionZ);
break;
case DRAWING_COMPASS:
fx = new EntityFXCompass(world, x, y, z, motionX, motionY, motionZ, 1.0f, 10, r, g, b);
break;
default:
throw new NotImplementedException("Unknown particle type: " + type);
}
if (fx != null) {
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
}
}
use of alluxio.shaded.client.org.apache.commons.lang3.NotImplementedException in project BIMserver by opensourceBIM.
the class PluginConfiguration method fromDefaults.
public static PluginConfiguration fromDefaults(ObjectDefinition settingsDefinition) {
if (settingsDefinition == null) {
return null;
}
PluginConfiguration pluginConfiguration = new PluginConfiguration();
for (ParameterDefinition parameterDefinition : settingsDefinition.getParameters()) {
if (parameterDefinition.getDefaultValue() != null) {
Type value = parameterDefinition.getDefaultValue();
Object newValue = null;
if (value instanceof PrimitiveType) {
if (value instanceof BooleanType) {
newValue = ((BooleanType) value).isValue();
} else if (value instanceof StringType) {
newValue = ((StringType) value).getValue();
} else if (value instanceof DoubleType) {
newValue = ((DoubleType) value).getValue();
} else if (value instanceof LongType) {
newValue = ((LongType) value).getValue();
} else if (value instanceof ByteArrayType) {
newValue = ((ByteArrayType) value).getValue();
}
} else if (value instanceof ArrayType) {
throw new NotImplementedException("ArrayType not implemented");
} else if (value instanceof ObjectType) {
throw new NotImplementedException("ObjectType not implemented");
}
pluginConfiguration.values.put(parameterDefinition.getIdentifier(), newValue);
}
}
return pluginConfiguration;
}
Aggregations