if (expansions == null) {
expansions = new HashMap<String, Collection<String>>();
terms = new HashSet<String>();
}
StreamProcessor rdfaSp = new StreamProcessor(RdfaParser.connect(vocabParser));
rdfaSp.setProperty(RdfaParser.ENABLE_VOCAB_EXPANSION, false);
parseVocabWithDp(vocabUrl, rdfaSp);
if (!terms.isEmpty() || !expansions.isEmpty()) {
return;
}
// TODO: add format detection
StreamProcessor rdfXmlSp = new StreamProcessor(RdfXmlParser.connect(vocabParser));
rdfaSp.setProperty(RdfaParser.ENABLE_VOCAB_EXPANSION, false);
parseVocabWithDp(vocabUrl, rdfXmlSp);
if (terms.isEmpty() && expansions.isEmpty()) {
terms = null;