Package com.linkedin.data.schema

Examples of com.linkedin.data.schema.DataSchemaLocation


    super.parseFile(schemaSourceFile);
  }

  private boolean isImported(JDefinedClass clazz)
  {
    DataSchemaLocation loc = _classToDataSchemaLocationMap.get(clazz);
    if (loc != null)
    {
      return _sourceFiles.contains(loc.getSourceFile()) == false;
    }
    //assume local
    return false;
  }
View Full Code Here


    Map<String, NamedDataSchema> nameToSchema = resolver.bindings();

    for (Map.Entry<String, DataSchemaLocation> entry : nameToLocations.entrySet())
    {
      String fullName = entry.getKey();
      DataSchemaLocation location = entry.getValue();
      if (_sourceLocations.contains(location) || _sources.contains(fullName))
      {
        NamedDataSchema schema = nameToSchema.get(fullName);
        if (schema instanceof RecordDataSchema)
        {
View Full Code Here

  }

  @Override
  protected NamedDataSchema locateDataSchema(String className, StringBuilder errorMessageBuilder)
  {
    final DataSchemaLocation location = new ClassNameDataSchemaLocation(className);
    if (isBadLocation(location))
    {
      return null;
    }
View Full Code Here

  {
    NamedDataSchema schema = null;
    Iterator<DataSchemaLocation> locations = possibleLocations(name);
    while (locations.hasNext())
    {
      DataSchemaLocation location = locations.next();
      if (location == null || isBadLocation(location))
      {
        continue;
      }
View Full Code Here

   */
  protected void appendSourceFilesFromSchemaResolver(List<File> sourceFiles)
  {
    for (Map.Entry<String, DataSchemaLocation> entry : getSchemaResolver().nameToDataSchemaLocations().entrySet())
    {
      DataSchemaLocation location = entry.getValue();
      File sourceFile = location.getSourceFile();
      if (sourceFile != null)
      {
        sourceFiles.add(sourceFile);
      }
    }
View Full Code Here

        assertEquals(namedSchema.getFullName(), name);
        assertTrue(schemaText.contains(expected));
        assertTrue(resolver.bindings().containsKey(name));
        assertSame(resolver.bindings().get(name), namedSchema);
        String location = entry[3];
        DataSchemaLocation namedSchemalocation = resolver.nameToDataSchemaLocations().get(name);
        String locationNorm;
        if (namedSchemalocation.toString().contains(".jar"))
        {
          locationNorm = location.replace(separator, '/');
        }
        else
        {
          locationNorm = location.replace('/', separator);
        }
        assertNotNull(namedSchemalocation);
        assertEquals(namedSchemalocation.toString().indexOf(locationNorm),
                     namedSchemalocation.toString().length() - locationNorm.length());
        assertTrue(resolver.locationResolved(namedSchemalocation));
      }
      else if (expectFound == NOT_FOUND)
      {
        assertTrue(schema == null);
View Full Code Here

TOP

Related Classes of com.linkedin.data.schema.DataSchemaLocation

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.