@Override public Collection<PlatformUser> getUsers() { SecurityService securityService = Register.getComponent(SecurityService.class); if (securityService == null) return Collections.emptyList(); PlatformUser currentUser = securityService.getCurrentUser(); XSPReply reply = getAccess(currentUser.getIdentifier()).getPlatformUsers(); if (!reply.isSuccess()) return Collections.emptyList(); Collection<PlatformUser> result = new ArrayList<>(); for (PlatformUser remoterUser : ((XSPReplyResultCollection<PlatformUser>) reply).getData()) { result.add(getUser(remoterUser.getIdentifier(), remoterUser.getName())); } return result; }
@Override public Collection<RemoteCollaboration> getNeighbours() { SecurityService securityService = Register.getComponent(SecurityService.class); if (securityService == null) return Collections.emptyList(); XSPReply reply = securityService.checkAction(ACTION_GET_NEIGHBOURS); if (!reply.isSuccess()) return Collections.emptyList(); if (!(securityService.getRealm() instanceof RemotePlatformAccessProvider)) return Collections.emptyList(); RemotePlatformAccess remotePlatform = ((RemotePlatformAccessProvider) securityService.getRealm()).getAccess(securityService.getCurrentUser().getIdentifier()); if (remotePlatform == null) return Collections.emptyList(); reply = remotePlatform.getCollaborationNeighbours(); if (!reply.isSuccess()) return Collections.emptyList(); return ((XSPReplyResultCollection<RemoteCollaboration>) reply).getData(); }
if (!reply.isSuccess()) return reply; Collection<XOWLConsistencyRule> rules = ((XSPReplyResultCollection<XOWLConsistencyRule>) reply).getData();
return XSPReplyUtils.toHttpResponse(reply, null); Collection<Quad> quads = ((XSPReplyResultCollection<Quad>) reply).getData(); Artifact artifact = new ArtifactSimple( resource, name, base, version, archetype, identifier, DateFormat.getDateTimeInstance().format(new Date()), superseded,
if (!reply.isSuccess()) return reply; Collection<Quad> quads = ((XSPReplyResultCollection<Quad>) reply).getData(); StringWriter writer = new StringWriter(); RDFSerializer serializer = new NQuadsSerializer(writer);
StringBuilder builder = new StringBuilder("["); boolean first = true; for (Inconsistency inconsistency : ((XSPReplyResultCollection<Inconsistency>) reply).getData()) { if (!first) builder.append(", "); StringBuilder builder = new StringBuilder("["); boolean first = true; for (ConsistencyRule rule : ((XSPReplyResultCollection<ConsistencyRule>) reply).getData()) { if (!first) builder.append(", ");
if (!reply.isSuccess()) return reply; Collection<XOWLRule> rules = new ArrayList<>(((XSPReplyResultCollection<XOWLRule>) reply).getData()); reply = live.sparql("SELECT DISTINCT ?r ?n ?d WHERE { GRAPH <" + TextUtils.escapeAbsoluteURIW3C(IRI_RULE_METADATA) +
if (!((XSPReplyResultCollection<?>) reply).getData().isEmpty()) {
if (!reply.isSuccess()) return reply; Collection<Quad> quads = ((XSPReplyResultCollection<Quad>) reply).getData(); Artifact artifact = new ArtifactSimple(metadata, artifactId, SemanticWebImporter.class.getCanonicalName(), quads); reply = storageService.store(artifact);