Search in sources :

Example 1 with NotImplementedException

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 + "\"");
    }
}
Also used : JavaDiscoGapicResourceNameToViewTransformer(com.google.api.codegen.discogapic.transformer.java.JavaDiscoGapicResourceNameToViewTransformer) JavaDiscoGapicRequestToViewTransformer(com.google.api.codegen.discogapic.transformer.java.JavaDiscoGapicRequestToViewTransformer) CommonGapicCodePathMapper(com.google.api.codegen.gapic.CommonGapicCodePathMapper) GapicCodePathMapper(com.google.api.codegen.gapic.GapicCodePathMapper) CommonSnippetSetRunner(com.google.api.codegen.rendering.CommonSnippetSetRunner) JavaRenderingUtil(com.google.api.codegen.util.java.JavaRenderingUtil) NotImplementedException(org.apache.commons.lang3.NotImplementedException) GapicProvider(com.google.api.codegen.gapic.GapicProvider) ArrayList(java.util.ArrayList) JavaSurfaceTestTransformer(com.google.api.codegen.transformer.java.JavaSurfaceTestTransformer) JavaDiscoGapicSchemaToViewTransformer(com.google.api.codegen.discogapic.transformer.java.JavaDiscoGapicSchemaToViewTransformer) JavaDiscoGapicSurfaceTransformer(com.google.api.codegen.discogapic.transformer.java.JavaDiscoGapicSurfaceTransformer) CommonRenderingUtil(com.google.api.codegen.util.CommonRenderingUtil) DocumentToViewTransformer(com.google.api.codegen.discogapic.transformer.DocumentToViewTransformer)

Example 2 with NotImplementedException

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);
        }
    }
}
Also used : TransformType(net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType) BaubleType(baubles.api.BaubleType) NotImplementedException(org.apache.commons.lang3.NotImplementedException) TextComponentString(net.minecraft.util.text.TextComponentString) ItemStack(net.minecraft.item.ItemStack)

Example 3 with NotImplementedException

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));
    }
}
Also used : FileExportProvider(com.iota.iri.storage.FileExportProvider) NotImplementedException(org.apache.commons.lang3.NotImplementedException) RocksDBPersistenceProvider(com.iota.iri.storage.rocksDB.RocksDBPersistenceProvider) ZmqPublishProvider(com.iota.iri.storage.ZmqPublishProvider)

Example 4 with NotImplementedException

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);
    }
}
Also used : Particle(net.minecraft.client.particle.Particle) FXChaos(net.silentchaos512.gems.client.fx.FXChaos) NotImplementedException(org.apache.commons.lang3.NotImplementedException) EntityFXCompass(net.silentchaos512.gems.client.render.particle.EntityFXCompass)

Example 5 with NotImplementedException

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;
}
Also used : SLongType(org.bimserver.interfaces.objects.SLongType) LongType(org.bimserver.models.store.LongType) SStringType(org.bimserver.interfaces.objects.SStringType) StringType(org.bimserver.models.store.StringType) NotImplementedException(org.apache.commons.lang3.NotImplementedException) SBooleanType(org.bimserver.interfaces.objects.SBooleanType) BooleanType(org.bimserver.models.store.BooleanType) ByteArrayType(org.bimserver.models.store.ByteArrayType) SArrayType(org.bimserver.interfaces.objects.SArrayType) SByteArrayType(org.bimserver.interfaces.objects.SByteArrayType) ArrayType(org.bimserver.models.store.ArrayType) ObjectType(org.bimserver.models.store.ObjectType) SObjectType(org.bimserver.interfaces.objects.SObjectType) SBooleanType(org.bimserver.interfaces.objects.SBooleanType) SStringType(org.bimserver.interfaces.objects.SStringType) SLongType(org.bimserver.interfaces.objects.SLongType) BooleanType(org.bimserver.models.store.BooleanType) PrimitiveType(org.bimserver.models.store.PrimitiveType) SDoubleType(org.bimserver.interfaces.objects.SDoubleType) SType(org.bimserver.interfaces.objects.SType) ByteArrayType(org.bimserver.models.store.ByteArrayType) DoubleType(org.bimserver.models.store.DoubleType) LongType(org.bimserver.models.store.LongType) ObjectType(org.bimserver.models.store.ObjectType) Type(org.bimserver.models.store.Type) SArrayType(org.bimserver.interfaces.objects.SArrayType) SByteArrayType(org.bimserver.interfaces.objects.SByteArrayType) StringType(org.bimserver.models.store.StringType) SObjectType(org.bimserver.interfaces.objects.SObjectType) ArrayType(org.bimserver.models.store.ArrayType) SDoubleType(org.bimserver.interfaces.objects.SDoubleType) DoubleType(org.bimserver.models.store.DoubleType) ByteArrayType(org.bimserver.models.store.ByteArrayType) SByteArrayType(org.bimserver.interfaces.objects.SByteArrayType) PrimitiveType(org.bimserver.models.store.PrimitiveType) ParameterDefinition(org.bimserver.models.store.ParameterDefinition)

Aggregations

NotImplementedException (org.apache.commons.lang3.NotImplementedException)28 TagsList (io.pravega.controller.server.rest.generated.model.TagsList)3 BaubleType (baubles.api.BaubleType)2 CommonSnippetSetRunner (com.google.api.codegen.rendering.CommonSnippetSetRunner)2 JavaSurfaceTestTransformer (com.google.api.codegen.transformer.java.JavaSurfaceTestTransformer)2 RuntimeConfigBuilder (de.flapdoodle.embed.mongo.config.RuntimeConfigBuilder)2 IRuntimeConfig (de.flapdoodle.embed.process.config.IRuntimeConfig)2 IOException (java.io.IOException)2 Map (java.util.Map)2 Logger (org.slf4j.Logger)2 BreakendSummary (au.edu.wehi.idsv.BreakendSummary)1 ExceptionMetered (com.codahale.metrics.annotation.ExceptionMetered)1 Timed (com.codahale.metrics.annotation.Timed)1 JsonNode (com.fasterxml.jackson.databind.JsonNode)1 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)1 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)1 InterfaceView (com.google.api.codegen.InterfaceView)1 ClientConfigGapicContext (com.google.api.codegen.clientconfig.ClientConfigGapicContext)1 ClientConfigSnippetSetRunner (com.google.api.codegen.clientconfig.ClientConfigSnippetSetRunner)1 PhpClientConfigGapicContext (com.google.api.codegen.clientconfig.php.PhpClientConfigGapicContext)1