A1: Yes, you can. You need to use a wrapper API (such as JSON) or your own customized data-structure with set and get methods. It will depend a lot on your data model.
A2: You can use OWL API for querying ontology. You can also inject SPARQL query via Jena API. If you are querying an RDF store then StarDog is a very good option.