@Override public Relation relation(final String name, final String[] tags) throws NoSuchRelationException { // log.info("OLD-BROWSE: relation({}, {})", name, tags); final RelationsInfoResponse resp = service.getRelationsInfo(new RelationsInfoRequest(new String[] { name }, tags)); checkOther(resp); final RelationInfo info = resp.getInfo(name); if (info == null) { throw new NoSuchRelationException(name); } return new RelationImpl(service, info, showWorkingCopyData); }
@Override public Relation relation(final String name) throws NoSuchRelationException { // log.info("OLD-BROWSE: relation({})", name); final RelationsInfoResponse resp = service.getRelationsInfo(new RelationsInfoRequest(name)); checkOther(resp); final RelationInfo info = resp.getInfo(name); if (info == null) { throw new NoSuchRelationException(name); } return new RelationImpl(service, info, showWorkingCopyData); }
@Override public Relation create(final RelationInfo relation) throws InvalidNameException { // log.info("OLD-BROWSE: create"); final EditStructureResponse resp = service .editStructure(new EditStructureRequest(new CreateRelation(relation))); checkOther(check(resp, InvalidNameException.class)); return new RelationImpl(service, resp.getInfo(), showWorkingCopyData); }