Seol mar théacs é seo: Inferring the Principal Type and the Schema Requirements of an OQL Query