Examples of Name


Examples of org.gedcomx.conclusion.Name

    if (dqName == null) {
      return nameList;
    }

    Name gedxName = new Name();
    //gedxName.setId(); // no equivalent; probably system dependent anyway

    gedxName.setNameForms(new ArrayList<NameForm>());
    NameForm primaryForm = new NameForm();
    primaryForm.setFullText(getNameValue(dqName));
    List<NamePart> parts = getNameParts(dqName);
    if (parts != null) {
      primaryForm.setParts(parts);
    }
    gedxName.getNameForms().add(primaryForm);
    nameList.add(gedxName);

    if (dqName.getNickname() != null) {
      Name gedxNickname = new Name();
      gedxNickname.setKnownType(NameType.Nickname);
      NameForm nickname = new NameForm();
      nickname.setFullText(dqName.getNickname());
      gedxNickname.setNameForms(Arrays.asList(nickname));
      nameList.add(gedxNickname);
    }

    if (dqName.getMarriedName() != null) {
      Name gedxMarriedName = new Name();
      gedxMarriedName.setKnownType(NameType.MarriedName);
      NameForm marriedName = new NameForm();
      marriedName.setFullText(dqName.getMarriedName());
      gedxMarriedName.setNameForms(Arrays.asList(marriedName));
      nameList.add(gedxMarriedName);
    }

    if (dqName.getAka() != null) {
      Name gedxAka = new Name();
      gedxAka.setKnownType(NameType.AlsoKnownAs);
      NameForm alias = new NameForm();
      alias.setFullText(dqName.getMarriedName());
      gedxAka.setNameForms(Arrays.asList(alias));
      nameList.add(gedxAka);
    }

    if ((dqName.getSourceCitations() != null) && (dqName.getSourceCitations().size() > 0)) {
      List<SourceReference> sources = CommonMapper.toSourcesAndSourceReferences(dqName.getSourceCitations(), result);
View Full Code Here

Examples of org.geotools.feature.FeatureComparators.Name

        SimpleFeature f1 = b.buildFeature(null, new Object[] { "Steve", 32 });
        SimpleFeature f2 = b.buildFeature(null, new Object[] { null, null });
        SimpleFeature f3 = b.buildFeature(null, new Object[] { null, null });

        Name compareName = new FeatureComparators.Name("name");

        // f1 has name, f2 has null name, expecting that f1 is greater g2
        assertTrue(compareName.compare(f1, f2) > 0);
        assertTrue(compareName.compare(f2, f1) < 0);
        assertTrue(compareName.compare(f2, f3) == 0);

        Name compareNumber = new FeatureComparators.Name("name");
        // f1 has number, f2 has null number, expecting that f1 is greater g2
        assertTrue(compareNumber.compare(f1, f2) > 0);
        assertTrue(compareNumber.compare(f2, f1) < 0);
        assertTrue(compareNumber.compare(f2, f3) == 0);
    }
View Full Code Here

Examples of org.gwtoolbox.sample.mail.client.Name

    private Contact createContact(String firstName, String middleName, String lastName, String email,
                                  boolean privateContact, Date birthDate,
                                  AbstractImagePrototype image, AbstractImagePrototype thumb) {
        Contact contact = (Contact) GWT.create(Contact.class);
        Name name = (Name) GWT.create(Name.class);
        name.setFirstName(firstName);
        name.setMiddleName(middleName);
        name.setLastName(lastName);
        contact.setName(name);
        contact.setEmail(email);
        contact.setPrivateContact(privateContact);
        contact.setBirthDate(birthDate);
        contact.setImage(image.createImage());
View Full Code Here

Examples of org.identityconnectors.framework.common.objects.Name

        Long result = null;

        final AttributableUtil attrUtil = AttributableUtil.getInstance(objectClass);

        final List<ConnectorObject> found = connector.search(objectClass,
                new EqualsFilter(new Name(name)), connector.getOperationOptions(
                attrUtil.getMappingItems(syncTask.getResource(), MappingPurpose.SYNCHRONIZATION)));

        if (found.isEmpty()) {
            LOG.debug("No {} found on {} with __NAME__ {}", objectClass, syncTask.getResource(), name);
        } else {
View Full Code Here

Examples of org.infoset.xml.Name

      }
      public void attach(Router router,Element child,boolean defaultRoute) {
         attach(router,null,child,defaultRoute);
      }
      protected void attach(Router router,Filter filter,Element child,boolean defaultRoute) {
         Name name = child.getName();
         Context parentContext = router==null ? filter.getContext() : router.getContext();
         if (name.equals(ROUTER)) {
            String match = child.getAttributeValue("match");
            if (match==null && filter==null && !defaultRoute) {
               LOG.severe("The router element does not have the required match attribute.");
               return;
            }
            if (defaultRoute) {
               router.attachDefault(createRouter(parentContext,child));
            } else if (router!=null) {
               router.attach(match,createRouter(parentContext,child));
            } else {
               filter.setNext(createRouter(parentContext,child));
            }
         } else if (name.equals(ROUTE)) {
            String match = child.getAttributeValue("match");
            if (match==null && filter==null && !defaultRoute) {
               LOG.severe("The route element does not have the required match attribute.");
               return;
            }
            Class def = getTargetClass(child);
            if (def==null) {
               return;
            }
            if (isServerResource(def)) {
               Restlet finder = Finder.createFinder(def, Finder.class, hasParametersOrAttributes(child) ? createContext(parentContext,child) : parentContext,parentContext.getLogger());
               if (defaultRoute) {
                  LOG.fine("Mapping default -> "+def.getName());
                  router.attachDefault(finder);
               } else if (router!=null) {
                  LOG.fine("Mapping "+match+" -> "+def.getName());
                  router.attach(match,finder);
               } else {
                  filter.setNext(finder);
               }
            } else {
               try {
                  Restlet restlet = createRestlet(parentContext,def,child);
                  if (defaultRoute) {
                     LOG.fine("Mapping default -> "+def.getName());
                     router.attachDefault(restlet);
                  } else if (router!=null) {
                     LOG.fine("Mapping "+match+" -> "+def.getName());
                     router.attach(match,restlet);
                  } else {
                     filter.setNext(restlet);
                  }
               } catch (Exception ex) {
                  LOG.log(Level.SEVERE,"Cannot instantiate class: "+def.getName(),ex);
               }
            }
         } else if (name.equals(FILTER)) {
            String match = child.getAttributeValue("match");
            if (match==null && filter==null && !defaultRoute) {
               LOG.severe("The filter element does not have the required match attribute.");
               return;
            }
            Class def = getTargetClass(child);
            if (def==null) {
               return;
            }
            Filter childFilter = null;
            try {
               childFilter = createFilter(parentContext,def,child);
            } catch (Exception ex) {
               LOG.log(Level.SEVERE,"Cannot instantiate filter.",ex);
               return;
            }
            if (defaultRoute) {
               router.attachDefault(childFilter);
            } else if (router!=null) {
               router.attach(match,childFilter);
            } else {
               filter.setNext(childFilter);
            }
            Iterator<Element> elements = child.getElementChildren();
            while (elements.hasNext()) {
               Element nextChild = elements.next();
               if (nextChild.getName().equals(NEXT)) {
                  Iterator<Element> nextChildren = nextChild.getElementChildren();
                  while (nextChildren.hasNext()) {
                     attachNext(childFilter,nextChildren.next());
                  }
               }
            }
         } else if (name.equals(CONTENT)) {
            String match = child.getAttributeValue("match");
            if (match==null && filter==null && !defaultRoute) {
               LOG.severe("The content element does not have the required match attribute.");
               return;
            }
            Restlet restlet = createContent(parentContext,child);
            if (defaultRoute) {
               router.attachDefault(restlet);
            } else if (router!=null) {
               router.attach(match,restlet);
            } else {
               filter.setNext(restlet);
            }
         } else if (name.equals(REDIRECT)) {
            String match = child.getAttributeValue("match");
            if (match==null && filter==null && !defaultRoute) {
               LOG.severe("The content element does not have the required match attribute.");
               return;
            }
            String to = child.getAttributeValue("to");
            if (to==null) {
               LOG.severe("The redirect element is missing the required 'to' attribute.");
               return;
            }
           
            Reference targetRef = new Reference(to);
            Restlet restlet = null;
            if (targetRef.isAbsolute() && targetRef.getScheme().equals("riap")) {
               restlet = new Redirector(parentContext,to,Redirector.MODE_SERVER_INBOUND);
            } else {
               restlet = new Redirector(parentContext,to,Redirector.MODE_CLIENT_SEE_OTHER);
            }
            if (defaultRoute) {
               router.attachDefault(restlet);
            } else if (router!=null) {
               String [] extraction = null;
               if (match.charAt(match.length()-1)=='}') {
                  // seek to start of bracket expression
                  int pos = match.length()-2;
                  for (; pos>0 && match.charAt(pos)!='{'; pos--);
                  if (pos>=0 && match.charAt(pos+1)=='?') {
                     String expr = match.substring(pos+2,match.length()-1);
                     extraction = expr.split(",");
                     match = match.substring(0,pos);
                     LOG.fine("redirect extraction, match="+match+", expr="+expr);
                  }
               }
               if (extraction!=null) {
                  Extractor extractor = new Extractor(parentContext,restlet);
                  for (int i=0; i<extraction.length; i++) {
                     extractor.extractFromQuery(extraction[i], extraction[i], true);
                  }
                  router.attach(match,extractor);
               } else {
                  router.attach(match,restlet);
               }
            } else {
               filter.setNext(restlet);
            }
         } else if (name.equals(DEFAULT)) {
            Iterator<Element> elements = child.getElementChildren();
            while (elements.hasNext()) {
               attach(router,elements.next(),true);
            }
           
View Full Code Here

Examples of org.jacorb.naming.Name

            throw new InvalidName();

        if (obj == null)
            throw new org.omg.CORBA.BAD_PARAM();

        Name n = new Name(nc);
        Name ctx = n.ctxName();
        NameComponent nb = n.baseNameComponent();

        if (ctx == null) {
            if (this.names.containsKey(n)) {
                // if the name is still in use, try to ping the object
                org.omg.CORBA.Object ref = (org.omg.CORBA.Object) this.names.get(n);
                if (isDead(ref)) {
                    rebind(n.components(), obj);
                    return;
                }
                throw new AlreadyBound();
            } else if (this.contexts.containsKey(n)) {
                // if the name is still in use, try to ping the object
                org.omg.CORBA.Object ref = (org.omg.CORBA.Object) this.contexts.get(n);
                if (isDead(ref))
                    unbind(n.components());
                throw new AlreadyBound();
            }

            if ((this.names.put(n, obj)) != null)
                throw new CannotProceed(_this(), n.components());

            log.debugf("Bound name: " + n.toString());
        } else {
            NameComponent[] ncx = new NameComponent[]{nb};
            org.omg.CORBA.Object context = this.resolve(ctx.components());

            // try first to call the context implementation object directly.
            String contextOID = this.getObjectOID(context);
            JBossNamingContext jbossContext = (contextOID == null ? null : contextImpls.get(contextOID));
            if (jbossContext != null)
View Full Code Here

Examples of org.jahia.services.content.nodetypes.Name

                long lastModifiedTime = fileObject.getContent().getLastModifiedTime();
                if (lastModifiedTime > 0) {
                    ValueFactory valueFactory = session.getValueFactory();
                    Calendar calendar = Calendar.getInstance();
                    calendar.setTimeInMillis(lastModifiedTime);
                    properties.put(Constants.JCR_CREATED, new VFSPropertyImpl(new Name("created", org.apache.jackrabbit.spi.Name.NS_JCR_PREFIX, org.apache.jackrabbit.spi.Name.NS_JCR_URI), this, session, valueFactory.createValue(calendar)));
                    properties.put(Constants.JCR_LASTMODIFIED, new VFSPropertyImpl(new Name("lastModified", org.apache.jackrabbit.spi.Name.NS_JCR_PREFIX, org.apache.jackrabbit.spi.Name.NS_JCR_URI), this, session, valueFactory.createValue(calendar)));
                }
            }
        } catch (FileSystemException e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
        } catch (UnsupportedRepositoryOperationException e) {
View Full Code Here

Examples of org.jboss.dna.graph.properties.Name

        Path parentPath = path.getParent();
        BasicGetNodeCommand getNodeCommand = new BasicGetNodeCommand(parentPath);
        execute(getNodeCommand);
        // First search for a child with the last name in the path
        Segment lastSeg = path.getLastSegment();
        Name name = lastSeg.getName();
        for (Segment seg : getNodeCommand.getChildren()) {
            if (seg.getName().equals(name)) {
                return getNode(path);
            }
        }
View Full Code Here

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

    protected String value( Object value ) {
        return context.getValueFactories().getStringFactory().create(value);
    }
   
    private boolean verifyProperty(SubgraphNode node, String propNameStr, String expectedValue) {
        Name propName = name(propNameStr);
        for( Property prop : node.getProperties()) {
            if (prop.getName().equals(propName) ) {
                for (Object nextVal : prop.getValuesAsArray()) {
                    String valueStr = value(nextVal);
                    if( valueStr.equals(expectedValue)) {
View Full Code Here

Examples of org.jboss.metatype.api.types.Name

         String v2 = String.class.cast(sv.getValue());
         compare = v1.compareTo(v2);
      }
      else if(getMetaType() == SimpleMetaType.NAMEDOBJECT && sv.getMetaType() == SimpleMetaType.NAMEDOBJECT)
      {
         Name v1 = Name.class.cast(value);
         Name v2 = Name.class.cast(sv.getValue());
         compare = v1.compareTo(v2);
      }
      else if(getMetaType() == SimpleMetaType.VOID && sv.getMetaType() == SimpleMetaType.VOID)
      {
         compare = 0;
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.