Examples of Identifiable


Examples of org.cedj.geekseek.domain.model.Identifiable

        if(source == null) {
            return;
        }

        if(representation instanceof Identifiable) {
            Identifiable sourceObject = (Identifiable)representation;
            if(sourceObject.getId() != null) {
                representation.addLink(
                    generateResourceLink(
                        source,
                        sourceObject.getId(),
                        representation.getUriInfo()));
            }
        }
    }
View Full Code Here

Examples of org.cedj.geekseek.domain.model.Identifiable

    @Override
    public void appendLinks(LinkableRepresentation<?> representation) {
        if(!(representation instanceof Identifiable)) {
            return;
        }
        Identifiable sourceIdentifiable = (Identifiable)representation; // TODO: Remove need for cast

        Collection<RelationMatch> matches = service.getMatchingRelations(representation.getSourceType());

        for(RelationMatch target: matches) {
            UriBuilder buidler = representation.getUriInfo().getBaseUriBuilder().segment(
                                            "rel",
                                            getTypeName(target.getSourceModel()),
                                            sourceIdentifiable.getId(),
                                            target.getSource().getType(),
                                            getTypeName(target.getTargetModel()));

            // TODO: Dynamically lookup MediaType
            representation.addLink(
View Full Code Here

Examples of org.cedj.geekseek.domain.model.Identifiable

        RepresentationConverter<Object, Object> converter = locateCoverterForType(manager, targetRepo.getType());
        if(converter == null) {
            return Response.status(Status.INTERNAL_SERVER_ERROR).build();
        }

        Identifiable source = sourceRepo.get(sourceId);
        if(source == null) {
            return Response.status(Status.NOT_FOUND).build();
        }

        Collection<? extends Identifiable> targets = repositry.findTargets(source, relationship, targetRepo.getType());
View Full Code Here

Examples of org.cedj.geekseek.domain.model.Identifiable

        }

        // TODO: quick and dirty
        String targetId = findLastId(link.getHref());

        Identifiable source = sourceRepo.get(sourceId);
        Identifiable target = targetRepo.get(targetId);
        if(source == null || target == null) {
            return Response.status(Status.NOT_FOUND).build();
        }

        Relation relation = repositry.add(source, relationship, target);
View Full Code Here

Examples of org.cedj.geekseek.domain.model.Identifiable

        }

        // TODO: quick and dirty
        String targetId = findLastId(link.getHref());

        Identifiable source = sourceRepo.get(sourceId);
        Identifiable target = targetRepo.get(targetId);
        if(source == null || target == null) {
            return Response.status(Status.NOT_FOUND).build();
        }

        repositry.remove(source, relationship, target);
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.Identifiable

    {
      EList<TextOrMarkup> _contents = ref.getContents();
      boolean _isEmpty = _contents.isEmpty();
      if (_isEmpty) {
        _builder.append("\\autoref{");
        Identifiable _ref = ref.getRef();
        String _name = _ref.getName();
        _builder.append(_name, "");
        _builder.append("}");
      } else {
        _builder.append("\\hyperref[");
        Identifiable _ref_1 = ref.getRef();
        String _name_1 = _ref_1.getName();
        _builder.append(_name_1, "");
        _builder.append("]{");
        EList<TextOrMarkup> _contents_1 = ref.getContents();
        final Function1<TextOrMarkup, CharSequence> _function = new Function1<TextOrMarkup, CharSequence>() {
          public CharSequence apply(final TextOrMarkup e) {
            return LatexGenerator.this.genNonParContent(e);
          }
        };
        List<CharSequence> _map = ListExtensions.<TextOrMarkup, CharSequence>map(_contents_1, _function);
        String _join = IterableExtensions.join(_map);
        _builder.append(_join, "");
        _builder.append("~(�\\ref*{");
        Identifiable _ref_2 = ref.getRef();
        String _name_2 = _ref_2.getName();
        _builder.append(_name_2, "");
        _builder.append("})}");
      }
    }
    return _builder;
View Full Code Here

Examples of org.eurekastreams.server.domain.Identifiable

        final String sourceUniqueId = "Source Unique ID";
        final EntityType sourceType = EntityType.GROUP;
        final String actorUniqueId = "Actor Unique ID";
        final EntityType actorType = EntityType.PERSON;

        final Identifiable source = context.mock(Identifiable.class, "source");
        final Identifiable actor = context.mock(Identifiable.class, "actor");

        context.checking(new Expectations()
        {
            {
                oneOf(placeholderPersonMapper).execute(RECIPIENT1);
View Full Code Here

Examples of org.jboss.ejb3.cache.Identifiable

/*     */     {
/* 173 */       FileInputStream fis = FISAction.open(file);
/* 174 */       ObjectInputStream in = new JBossObjectInputStream(fis);
/*     */       try
/*     */       {
/* 177 */         Identifiable localIdentifiable = (Identifiable)in.readObject();
/*     */         return localIdentifiable;
/*     */       }
/*     */       finally
/*     */       {
/* 181 */         in.close();
View Full Code Here

Examples of org.jboss.ejb3.cache.Identifiable

/* 49 */     this.cache = new HashMap();
/*    */   }
/*    */
/*    */   public T create(Class<?>[] initTypes, Object[] initValues)
/*    */   {
/* 54 */     Identifiable obj = (Identifiable)this.factory.create(initTypes, initValues);
/* 55 */     synchronized (this.cache)
/*    */     {
/* 57 */       this.cache.put(obj.getId(), obj);
/*    */     }
/* 59 */     return obj;
/*    */   }
View Full Code Here

Examples of org.jboss.ejb3.cache.Identifiable

/*    */   }
/*    */
/*    */   public T get(Object key)
/*    */     throws NoSuchEJBException
/*    */   {
/*    */     Identifiable obj;
/* 65 */     synchronized (this.cache)
/*    */     {
/* 67 */       obj = (Identifiable)this.cache.get(key);
/*    */     }
/* 69 */     if (obj == null)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.