Examples of TypeInformation


Examples of de.lmu.ifi.dbs.elki.data.type.TypeInformation

    return new Pair<WritableDataStore<Double>, DoubleMinMax>(lofs, lofminmax);
  }

  @Override
  public TypeInformation[] getInputTypeRestriction() {
    final TypeInformation type;
    if(reachabilityDistanceFunction.equals(neighborhoodDistanceFunction)) {
      type = reachabilityDistanceFunction.getInputTypeRestriction();
    }
    else {
      type = new CombinedTypeInformation(neighborhoodDistanceFunction.getInputTypeRestriction(), reachabilityDistanceFunction.getInputTypeRestriction());
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.type.TypeInformation

    return new OutlierResult(scoreMeta, scoreResult);
  }

  @Override
  public TypeInformation[] getInputTypeRestriction() {
    final TypeInformation type;
    if(reachabilityDistanceFunction.equals(comparisonDistanceFunction)) {
      type = reachabilityDistanceFunction.getInputTypeRestriction();
    }
    else {
      type = new CombinedTypeInformation(reachabilityDistanceFunction.getInputTypeRestriction(), comparisonDistanceFunction.getInputTypeRestriction());
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.type.TypeInformation

    return new Pair<WritableDoubleDataStore, DoubleMinMax>(lofs, lofminmax);
  }

  @Override
  public TypeInformation[] getInputTypeRestriction() {
    final TypeInformation type;
    if(reachabilityDistanceFunction.equals(neighborhoodDistanceFunction)) {
      type = reachabilityDistanceFunction.getInputTypeRestriction();
    }
    else {
      type = new CombinedTypeInformation(neighborhoodDistanceFunction.getInputTypeRestriction(), reachabilityDistanceFunction.getInputTypeRestriction());
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.type.TypeInformation

    return new OutlierResult(scoreMeta, scoreResult);
  }

  @Override
  public TypeInformation[] getInputTypeRestriction() {
    final TypeInformation type;
    if(reachabilityDistanceFunction.equals(comparisonDistanceFunction)) {
      type = reachabilityDistanceFunction.getInputTypeRestriction();
    }
    else {
      type = new CombinedTypeInformation(reachabilityDistanceFunction.getInputTypeRestriction(), comparisonDistanceFunction.getInputTypeRestriction());
View Full Code Here

Examples of org.neo4j.rest.graphdb.converter.TypeInformation

        assertEquals(Object.class, typeInfo.getGenericArguments()[1]);
    }

    @Test
    public void testMapIntegerNode(){
        TypeInformation typeInfo = createTypeInfo("testMapIntegerNode");
        assertEquals(Map.class, typeInfo.getType());
        assertEquals(2, typeInfo.getGenericArguments().length);
        assertEquals(Integer.class, typeInfo.getGenericArguments()[0]);
        assertEquals(Node.class, typeInfo.getGenericArguments()[1]);
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.converter.TypeInformation

        assertEquals(Node.class, typeInfo.getGenericArguments()[1]);
    }

    @Test
    public void testTypeInformationBasicMethods(){
        TypeInformation typeInfoBasic = createTypeInfo("testSingleValueNode");
        assertTrue(typeInfoBasic.isInstance("test", String.class));
        assertTrue(typeInfoBasic.isSingleType());
        assertTrue(typeInfoBasic.isGraphEntity(Node.class));

        TypeInformation typeInfoCollection = createTypeInfo("testCollectionObject");
        assertTrue(typeInfoCollection.isCollectionType());
        assertTrue(typeInfoCollection.isCollection());

        TypeInformation typeInfoMap = createTypeInfo("testMapStringObject");
        assertTrue(typeInfoMap.isCollectionType());
        assertTrue(typeInfoMap.isMap());
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.converter.TypeInformation

        assertTrue(typeInfoMap.isMap());
    }

    @Test
    public void testCreateTypeInformationByIterable(){
        TypeInformation typeInfoIterable = new TypeInformation(asList("test","test2"));
        assertTrue(typeInfoIterable.isCollectionType());
        assertTrue(typeInfoIterable.isCollection());
        assertEquals(1, typeInfoIterable.getGenericArguments().length);
        assertEquals(String.class, typeInfoIterable.getGenericArguments()[0]);
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.converter.TypeInformation

        assertEquals(String.class, typeInfoIterable.getGenericArguments()[0]);
    }

    @Test
    public void testCreateTypeInformationByMap(){
        TypeInformation typeInfoMap = new TypeInformation(MapUtil.map("test",1));
        assertTrue(typeInfoMap.isCollectionType());
        assertTrue(typeInfoMap.isMap());
        assertEquals(2, typeInfoMap.getGenericArguments().length);
        assertEquals(String.class, typeInfoMap.getGenericArguments()[0]);
        assertEquals(Integer.class, typeInfoMap.getGenericArguments()[1]);
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.converter.TypeInformation



    public TypeInformation createTypeInfo(String methodName){
          try {
            return new TypeInformation(TypeInformationTestInterface.class.getMethod(methodName).getGenericReturnType());
          } catch (NoSuchMethodException e) {
            return null;
          }
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.converter.TypeInformation

    }


    @Test
    public void testConvertJSONDataToNode(){
        Object result = converter.convertToResultType(MapUtil.map("self","http://localhost:7474/db/data/node/2", "data", MapUtil.map("propname", "testprop")), new TypeInformation(RestNode.class));
        assertEquals(RestNode.class, result.getClass());
        assertEquals("testprop", ((Node)result).getProperty("propname"));
    }
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.