I don't know the exact grammatical reasoning for this, but the correct way is "Nokia is a cellphone company."
That is not always the case though. Your second sentence sounds alright because you used the plural "cars." Thus, both of your second sentences are correct, but may imply different meanings. If you were to say "This is a magazine of car" that would be incorrect.
In the third case, it is correct to say "This is a Japanese book" to say that the book is from Japan. And even though "Japanese" can also be a plural form, it is ambiguous in the second example and therefore incorrect.