String prefixUri = prefixToUriMap.get(prefix);
if(prefixUri!=null){
qNameMap.put(obj, QualifiedName.create(prefixUri, Optional.fromNullable(((QNameDef) obj).getId()).or("")));
}
} else if(obj instanceof UriDef){
QualifiedName qName=resolve(currentBaseUri, ((UriDef) obj).getUri());
if(qName!=null){
qNameMap.put(obj, qName);
}
} else if(obj instanceof QNameRef){
String prefix=getPrefixText(obj, XturtlePackage.Literals.QNAME_REF__PREFIX);
List<INode> refNodes = NodeModelUtils.findNodesForFeature(obj, XturtlePackage.Literals.RESOURCE_REF__REF);
String ref=NodeModelUtils.getTokenText(refNodes.get(0));
if(ref!=null&& ref.length()>0&& ref.charAt(0)==':'){
String nsUri=prefixToUriMap.get(prefix);
if(nsUri!=null){
qNameMap.put(obj, QualifiedName.create(nsUri, ref.substring(1)));
}
}
} else if(obj instanceof UriRef){
QualifiedName qName;
List<INode> refNodes = NodeModelUtils.findNodesForFeature(obj, XturtlePackage.Literals.RESOURCE_REF__REF);
if(refNodes.size()==1){
String ref = refNodes.get(0).getText();
ref=ref.substring(1, ref.length()-1);
qName=resolve(currentBaseUri, ref);