com.bazaarvoice.jolt.Sortr Java Examples

The following examples show how to use com.bazaarvoice.jolt.Sortr. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TransformFactory.java    From localization_nifi with Apache License 2.0 6 votes vote down vote up
public static JoltTransform getTransform(final ClassLoader classLoader,final String transformType, final Object specJson) throws Exception {

        if (transformType.equals("jolt-transform-default")) {
            return new Defaultr(specJson);
        } else if (transformType.equals("jolt-transform-shift")) {
            return new Shiftr(specJson);
        } else if (transformType.equals("jolt-transform-remove")) {
            return new Removr(specJson);
        } else if (transformType.equals("jolt-transform-card")) {
            return new CardinalityTransform(specJson);
        } else if(transformType.equals("jolt-transform-sort")){
            return new Sortr();
        } else if(transformType.equals("jolt-transform-modify-default")){
          return new Modifier.Defaultr(specJson);
        } else if(transformType.equals("jolt-transform-modify-overwrite")){
            return new Modifier.Overwritr(specJson);
        } else if(transformType.equals("jolt-transform-modify-define")){
            return new Modifier.Definr(specJson);
        } else{
            return new Chainr(getChainrJoltTransformations(classLoader,specJson));
        }

    }
 
Example #2
Source File: TransformFactory.java    From nifi with Apache License 2.0 6 votes vote down vote up
public static JoltTransform getTransform(final ClassLoader classLoader,final String transformType, final Object specJson) throws Exception {

        if (transformType.equals("jolt-transform-default")) {
            return new Defaultr(specJson);
        } else if (transformType.equals("jolt-transform-shift")) {
            return new Shiftr(specJson);
        } else if (transformType.equals("jolt-transform-remove")) {
            return new Removr(specJson);
        } else if (transformType.equals("jolt-transform-card")) {
            return new CardinalityTransform(specJson);
        } else if(transformType.equals("jolt-transform-sort")){
            return new Sortr();
        } else if(transformType.equals("jolt-transform-modify-default")){
          return new Modifier.Defaultr(specJson);
        } else if(transformType.equals("jolt-transform-modify-overwrite")){
            return new Modifier.Overwritr(specJson);
        } else if(transformType.equals("jolt-transform-modify-define")){
            return new Modifier.Definr(specJson);
        } else{
            return new Chainr(getChainrJoltTransformations(classLoader,specJson));
        }

    }
 
Example #3
Source File: TransformFactory.java    From nifi with Apache License 2.0 6 votes vote down vote up
public static JoltTransform getTransform(final ClassLoader classLoader,final String transformType, final Object specJson) throws Exception {

        if (transformType.equals("jolt-transform-default")) {
            return new Defaultr(specJson);
        } else if (transformType.equals("jolt-transform-shift")) {
            return new Shiftr(specJson);
        } else if (transformType.equals("jolt-transform-remove")) {
            return new Removr(specJson);
        } else if (transformType.equals("jolt-transform-card")) {
            return new CardinalityTransform(specJson);
        } else if(transformType.equals("jolt-transform-sort")){
            return new Sortr();
        } else if(transformType.equals("jolt-transform-modify-default")){
          return new Modifier.Defaultr(specJson);
        } else if(transformType.equals("jolt-transform-modify-overwrite")){
            return new Modifier.Overwritr(specJson);
        } else if(transformType.equals("jolt-transform-modify-define")){
            return new Modifier.Definr(specJson);
        } else{
            return new Chainr(getChainrJoltTransformations(classLoader,specJson));
        }

    }
 
Example #4
Source File: TestTransformFactory.java    From localization_nifi with Apache License 2.0 4 votes vote down vote up
@Test
public void testGetSortTransform() throws Exception{
    JoltTransform transform = TransformFactory.getTransform(getClass().getClassLoader(), "jolt-transform-sort",null);
    assertTrue(transform instanceof Sortr);
}
 
Example #5
Source File: TestTransformFactory.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Test
public void testGetSortTransform() throws Exception {
    JoltTransform transform = TransformFactory.getTransform(getClass().getClassLoader(), "jolt-transform-sort", null);
    assertTrue(transform instanceof Sortr);
}
 
Example #6
Source File: TestTransformFactory.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Test
public void testGetSortTransform() throws Exception{
    JoltTransform transform = TransformFactory.getTransform(getClass().getClassLoader(), "jolt-transform-sort",null);
    assertTrue(transform instanceof Sortr);
}