Examples of normalize()


Examples of org.apache.pig.newplan.logical.relational.LogicalSchema.normalize()

     * @return modified schema
     * @throws FrontendException
     */
    public static Schema fixSchemaAddTupleInBag(Schema sch) throws FrontendException{
        LogicalSchema logSch = translateSchema(sch);
        logSch.normalize();
        return translateSchema(logSch);
    }


    public static Schema.FieldSchema translateFieldSchema(LogicalSchema.LogicalFieldSchema fs) {
View Full Code Here

Examples of org.apache.tika.mime.MediaTypeRegistry.normalize()

        registry.addSuperType(new MediaType("text", "csv"), new MediaType(
            "text", "plain"));
        MediaType parsedType = MediaType.parse(metadata
            .get(Metadata.CONTENT_TYPE));
   
        if (registry.isSpecializationOf(registry.normalize(type), registry
            .normalize(parsedType).getBaseType())) {
          metadata.set(Metadata.CONTENT_TYPE, type.toString());
        }
        logger.info("Detected " + metadata.get(Metadata.CONTENT_TYPE));
        inputType = getInputType(metadata);
View Full Code Here

Examples of org.apache.tools.ant.util.FileUtils.normalize()

            throw new BuildException("Missing nested <classpath>!");
        }

        // Normalize the reference directory (containing the jar)
        final FileUtils fileUtils = FileUtils.getFileUtils();
        dir = fileUtils.normalize(dir.getAbsolutePath());

        // Create as many directory prefixes as parent levels to traverse,
        // in addition to the reference directory itself
        File currDir = dir;
        String[] dirs = new String[maxParentLevels + 1];
View Full Code Here

Examples of org.apache.ws.policy.Policy.normalize()

                // TODO Auto-generated catch block
                e.printStackTrace();
            }

            Policy newPolicy = prdr.readPolicy(fis);
            newPolicy = (Policy) newPolicy.normalize();

            if (merged == null) {
                merged = newPolicy;
            } else {
                merged = (Policy) merged.merge(newPolicy);
View Full Code Here

Examples of org.apache.xerces.dom.DocumentImpl.normalize()

        try {
            DOMParser p = new DOMParser();
            p.setFeature("http://xml.org/sax/features/validation", true);
            p.parse(fileName);
            doc = p.getDocument();
            doc.normalize();
            System.out.println("Parse success.. " + fileName);
        } catch (Exception e) {
            System.out.println(fileName + ": Parse error: " + e);
            doc = null;
        }
View Full Code Here

Examples of org.apache.xmlbeans.GDurationBuilder.normalize()

        gdurb.setSecond( maxExclusive.getSecond() );
      if( gdurb.getFraction().compareTo( maxExclusive.getFraction() ) > 0 )
        gdurb.setFraction( maxExclusive.getFraction() );
    }

    gdurb.normalize();
    return gdurb.toString();
  }

  private String formatDate( SchemaType sType )
  {
View Full Code Here

Examples of org.bukkit.util.Vector.normalize()

           
            double a = Math.abs(bLoc.getX() - loc.getX());
            double b = Math.abs(bLoc.getZ() - loc.getZ());
            double c = Math.sqrt((a*a + b*b));
           
            p.setVelocity(v.normalize().multiply(c*0.3).setY(0.8));
        }
    }
}
View Full Code Here

Examples of org.cmj.flowy.simulation.math.Vector2.normalize()

    private Vector2 getEmittedParticleVelocity() {
        float dist = (float) RAND.nextDouble() * theDistribution - theDistribution * 0.5f;
        Vector2 normal = theDirection.PerpendicularRight();
        normal = Vector2.Mult(normal, dist);
        Vector2 particleVelocity = Vector2.Add(theDirection, normal);
        particleVelocity.normalize();
        float velLen = (float) RAND.nextDouble() * (theMaxVelocity - theMinVelocity) + theMinVelocity;
        particleVelocity.multiply(velLen);
        return particleVelocity;
    }

View Full Code Here

Examples of org.codelibs.robot.helper.EncodingHelper.normalize()

        }

        try {
            final EncodingHelper encodingHelper = SingletonS2Container
                    .getComponent(EncodingHelper.class);
            encoding = encodingHelper.normalize(encoding);
        } catch (final Exception e) {
            // NOP
        }

        return encoding;
View Full Code Here

Examples of org.codemap.internal.LayoutAlgorithm.normalize()

        return new Configuration(locations).normalize();
    }

    private Collection<Point> runLayout(LatentSemanticIndex lsi, double[] x, double[] y) {
        LayoutAlgorithm mds = LayoutAlgorithm.fromCorrelationMatrix(lsi, x, y);
        mds.normalize();
        Collection<Point> locations = new ArrayList<Point>();
        int index = 0;
        for (String each: lsi.documents()) {
            locations.add(new Point(mds.x[index], mds.y[index], each));
            index++;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.