Package com.thinkaurelius.titan.core

Examples of com.thinkaurelius.titan.core.DefaultTypeMaker


        }

        @Override
        public void reduce(final LongWritable key, final Iterable<FaunusVertex> value, final Reducer<LongWritable, FaunusVertex, NullWritable, FaunusVertex>.Context context) throws IOException, InterruptedException {
            if (key.get() == funnyLong) {
                final DefaultTypeMaker typeMaker = BlueprintsDefaultTypeMaker.INSTANCE;
                for (final FaunusVertex vertex : value) {
                    for (final String property : vertex.getPropertyKeys()) {
                        final String property2 = property.substring(1);
                        if (property.startsWith("t")) {
                            if (null == graph.getType(property2)) {
                                // TODO: Automated type inference
                                // typeMaker.makeKey(property2, graph.makeType().dataType(Class.forName(vertex.getProperty(property).toString())));
                                typeMaker.makeKey(graph.makeKey(property2));
                                context.getCounter(Counters.PROPERTY_KEYS_CREATED).increment(1l);
                            }
                        } else {
                            if (null == graph.getType(property2)) {
                                //typeMaker.makeLabel(property2, graph.makeType());
                                typeMaker.makeLabel(graph.makeLabel(property2));
                                context.getCounter(Counters.EDGE_LABELS_CREATED).increment(1l);
                            }
                        }
                    }
                }
View Full Code Here

TOP

Related Classes of com.thinkaurelius.titan.core.DefaultTypeMaker

Copyright © 2018 www.massapicom. 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.