addTo.add(name);
}
}
final Iterator<GenericName> it = iterator(object.getAlias());
if (it != null) while (it.hasNext()) {
final GenericName alias = it.next();
if (alias != null) {
final String name = (alias instanceof Identifier) ?
((Identifier) alias).getCode() : alias.toString();
if (name != null) {
if (addTo == null) {
return name;
}
addTo.add(name);
}
}
}
} else {
if (identifier != null) {
if (identifierMatches(authority, identifier.getAuthority())) {
final String name = identifier.getCode();
if (name != null) {
if (addTo == null) {
return name;
}
addTo.add(name);
}
}
}
final Iterator<GenericName> it = iterator(object.getAlias());
if (it != null) while (it.hasNext()) {
final GenericName alias = it.next();
if (alias != null) {
if (alias instanceof Identifier) {
identifier = (Identifier) alias;
if (identifierMatches(authority, identifier.getAuthority())) {
final String name = identifier.getCode();
if (name != null) {
if (addTo == null) {
return name;
}
addTo.add(name);
}
}
} else {
final NameSpace ns = alias.scope();
if (ns != null) {
final GenericName scope = ns.name();
if (scope != null) {
if (identifierMatches(authority, scope.toString())) {
final String name = alias.toString();
if (name != null) {
if (addTo == null) {
return name;
}