Examples of Reference


Examples of org.brixcms.web.reference.Reference

        super(id);
        init(configuration);
    }

    private void init(ReferenceEditorConfiguration configuration) {
        Reference old = getModelObject();

        reference = old != null ? new Reference(old) : new Reference();

        add(new ReferenceEditor("editor", new PropertyModel<Reference>(this, "reference"), configuration));

        add(new AjaxLink<Void>("ok") {
            @Override

Examples of org.codehaus.preon.el.Reference

    }

    @Test
    public void testSelectIndex() {
        String index = "pi";
        Reference selected1 = createMock(Reference.class);
        Reference selected2 = createMock(Reference.class);
        expect(reference1.getReferenceContext()).andReturn(context);
        expect(reference2.getReferenceContext()).andReturn(context);
        expect(reference1.getType()).andReturn(String.class);
        expect(reference2.getType()).andReturn(String.class);
        expect(selected1.getType()).andReturn(String.class);
        expect(selected2.getType()).andReturn(String.class);
        expect(reference1.selectItem(index)).andReturn(selected1);
        expect(reference2.selectItem(index)).andReturn(selected2);
        expect(selected1.getReferenceContext()).andReturn(context);
        expect(selected2.getReferenceContext()).andReturn(context);
        replay(reference1, reference2, selected1, selected2);
        MultiReference multi = new MultiReference(reference1, reference2);
        assertNotNull(multi.selectItem(index));
        verify(reference1, reference2, selected1, selected2);
    }

Examples of org.dspace.app.xmlui.wing.element.Reference

        {
          Division viewer = home.addDivision("community-view","secondary");
         
            ReferenceSet referenceSet = viewer.addReferenceSet("community-view",
                    ReferenceSet.TYPE_DETAIL_VIEW);
            Reference communityInclude = referenceSet.addReference(community);

            // If the community has any children communities also refrence them.
            if (subCommunities != null && subCommunities.length > 0)
            {
                ReferenceSet communityReferenceSet = communityInclude
                        .addReferenceSet(ReferenceSet.TYPE_SUMMARY_LIST,null,"hierarchy");

                communityReferenceSet.setHead(T_head_sub_communities);

                // Sub communities
                for (Community subCommunity : subCommunities)
                {
                    communityReferenceSet.addReference(subCommunity);
                }
            }
            if (collections != null && collections.length > 0)
            {
                ReferenceSet communityReferenceSet = communityInclude
                        .addReferenceSet(ReferenceSet.TYPE_SUMMARY_LIST,null,"hierarchy");

                communityReferenceSet.setHead(T_head_sub_collections);
                      

Examples of org.eclipse.egit.github.core.Reference

                  + getExceptionMessage(e), e);
        }
      entries.add(entry);
    }

    Reference ref = null;
    try {
      ref = service.getReference(repository, branch);
    } catch (RequestException e) {
      if (404 != e.getStatus())
        throw new MojoExecutionException("Error getting reference: "
            + getExceptionMessage(e), e);
    } catch (IOException e) {
      throw new MojoExecutionException("Error getting reference: "
          + getExceptionMessage(e), e);
    }

    if (ref != null && !TYPE_COMMIT.equals(ref.getObject().getType()))
      throw new MojoExecutionException(
          MessageFormat
              .format("Existing ref {0} points to a {1} ({2}) instead of a commmit",
                  ref.getRef(), ref.getObject().getType(),
                  ref.getObject().getSha()));

    // Write tree
    Tree tree;
    try {
      int size = entries.size();
      if (size != 1)
        info(MessageFormat.format(
            "Creating tree with {0} blob entries", size));
      else
        info("Creating tree with 1 blob entry");
      String baseTree = null;
      if (merge && ref != null) {
        Tree currentTree = service.getCommit(repository,
            ref.getObject().getSha()).getTree();
        if (currentTree != null)
          baseTree = currentTree.getSha();
        info(MessageFormat.format("Merging with tree {0}", baseTree));
      }
      if (!dryRun)
        tree = service.createTree(repository, entries, baseTree);
      else
        tree = new Tree();
    } catch (IOException e) {
      throw new MojoExecutionException("Error creating tree: "
          + getExceptionMessage(e), e);
    }

    // Build commit
    Commit commit = new Commit();
    commit.setMessage(message);
    commit.setTree(tree);

    // Set parent commit SHA-1 if reference exists
    if (ref != null)
      commit.setParents(Collections.singletonList(new Commit().setSha(ref
          .getObject().getSha())));

    Commit created;
    try {
      if (!dryRun)
        created = service.createCommit(repository, commit);
      else
        created = new Commit();
      info(MessageFormat.format("Creating commit with SHA-1: {0}",
          created.getSha()));
    } catch (IOException e) {
      throw new MojoExecutionException("Error creating commit: "
          + getExceptionMessage(e), e);
    }

    TypedResource object = new TypedResource();
    object.setType(TYPE_COMMIT).setSha(created.getSha());
    if (ref != null) {
      // Update existing reference
      ref.setObject(object);
      try {
        info(MessageFormat.format(
            "Updating reference {0} from {1} to {2}", branch,
            commit.getParents().get(0).getSha(), created.getSha()));
        if (!dryRun)
          service.editReference(repository, ref, force);
      } catch (IOException e) {
        throw new MojoExecutionException("Error editing reference: "
            + getExceptionMessage(e), e);
      }
    } else {
      // Create new reference
      ref = new Reference().setObject(object).setRef(branch);
      try {
        info(MessageFormat.format(
            "Creating reference {0} starting at commit {1}",
            branch, created.getSha()));
        if (!dryRun)

Examples of org.eclipse.jdt.internal.compiler.ast.Reference

public boolean isNullcheckedFieldAccess(Reference reference) {
  if (this.nullCheckedFieldReferences == null// always null unless CompilerOptions.enableSyntacticNullAnalysisForFields
    return false;
  int len = this.nullCheckedFieldReferences.length;
  for (int i=0; i<len; i++) {
    Reference checked = this.nullCheckedFieldReferences[i];
    if (checked == null) {
      return false;
    }
    if (checked.isEquivalent(reference)) {
      return true;
    }
  }
  return false;
}

Examples of org.eclipse.persistence.internal.oxm.Reference

        // relevant for cache lookup - it must match the ordering of the
        // reference descriptor's primary key entries
        ClassDescriptor clsDescriptor = session.getClassDescriptor(getReferenceClass());
        Vector pkFieldNames = clsDescriptor.getPrimaryKeyFieldNames();
        // if reference is null, create a new instance and set it on the resolver
        Reference reference = resolver.getReference(this, srcObject);
        if (reference == null) {
            Vector pks = new Vector();
            pks.setSize(pkFieldNames.size());
            reference = new Reference(this, srcObject, getReferenceClass(), pks);
            resolver.addReference(reference);
            record.reference(reference);
        }
        XMLField tgtFld = (XMLField) getSourceToTargetKeyFieldAssociations().get(xmlField);
        int idx = pkFieldNames.indexOf(tgtFld.getXPath());
        Vector primaryKeys = reference.getPrimaryKeys();
        // fix for bug# 5687430
        // need to get the actual type of the target (i.e. int, String, etc.)
        // and use the converted value when checking the cache.
        Object value = session.getDatasourcePlatform().getConversionManager().convertObject(object, clsDescriptor.getTypedField(tgtFld).getType());
        if (value != null) {

Examples of org.eclipse.php.internal.core.ast.nodes.Reference

    List<ForEachStatement> statements = getAllOfType(program,
        ForEachStatement.class);
    Assert.assertTrue("Unexpected list size.", statements.size() == 1);

    statements.get(0).setKey(ast.newVariable("bar"));
    Reference ref = ast.newReference(ast.newVariable("val"));
    statements.get(0).setValue(ref);
    rewrite();
    checkResult("<?php foreach ($arr as $bar=>&$val) { $value = $value * 2; } ?>");
  }

Examples of org.eclipse.sapphire.modeling.annotations.Reference

    {
        final PropertyDef property = part.property().definition();
       
        if( property instanceof ValueProperty && property.isOfType( JavaTypeName.class ) )
        {
            final Reference referenceAnnotation = property.getAnnotation( Reference.class );
           
            if( referenceAnnotation != null && referenceAnnotation.target() == JavaType.class )
            {
                return true;
            }
        }
       

Examples of org.jboss.dna.common.jdbc.model.api.Reference

        super.tearDown();
    }

    public void testSetReference() {
        // create reference
        Reference reference = new DefaultModelFactory().createReference();
        // set
        bean.setReference(reference);
        // check
        assertSame("Unable to set reference", reference, bean.getReference());
    }

Examples of org.jboss.dna.graph.property.Reference

     * @see javax.jcr.Property#getNode()
     */
    public final Node getNode() throws RepositoryException {
        try {
            ValueFactories factories = context().getValueFactories();
            Reference dnaReference = factories.getReferenceFactory().create(property().getFirstValue());
            UUID uuid = factories.getUuidFactory().create(dnaReference);
            return cache.findJcrNode(Location.create(uuid));
        } catch (org.jboss.dna.graph.property.ValueFormatException e) {
            throw new ValueFormatException(e.getMessage(), e);
        }
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.