Examples of Mapping


Examples of org.exolab.castor.mapping.Mapping

  {
    NodeList list =
      step.getElementsByTagNameNS("http://chaperon.sourceforge.net/schema/grammar/2.0", "grammar");
    Node node = list.item(0);

    Mapping mapping = new Mapping();
    mapping.loadMapping(new InputSource(ExtendedGrammar.class.getResource("mapping.xml").openStream()));

    Unmarshaller unmarshaller = new Unmarshaller(ExtendedGrammar.class);
    unmarshaller.setMapping(mapping);

    ExtendedGrammar grammar = (ExtendedGrammar)unmarshaller.unmarshal(node);
View Full Code Here

Examples of org.exolab.castor.mapping.Mapping

    private WebServicesFactory() {
        ClassLoader classLoader = WebServicesFactory.class.getClassLoader();
        URL mappingUrl = classLoader.getResource("org/apache/geronimo/webservices/webservices_1_1.xml");

        try {
            mapping = new Mapping(classLoader);
            mapping.loadMapping(mappingUrl);
            unmarshaller = new Unmarshaller(mapping);
        } catch (Exception e) {
            throw (IllegalStateException)new IllegalStateException("Unable to initialize xml unmarshaller").initCause(e);
        }
View Full Code Here

Examples of org.hibernate.engine.Mapping

   
    binder.readFromDatabase(null, null, buildMapping(this));
  }

  static private Mapping buildMapping(final Configuration cfg) {
    return new Mapping() {
      /**
       * Returns the identifier type of a mapped class
       */
      public Type getIdentifierType(String persistentClass) throws MappingException {
        PersistentClass pc = cfg.getClassMapping( persistentClass );
View Full Code Here

Examples of org.hibernate.engine.spi.Mapping

  public MutableIdentifierGeneratorFactory getIdentifierGeneratorFactory() {
    return identifierGeneratorFactory;
  }

  public Mapping buildMapping() {
    return new Mapping() {
      public IdentifierGeneratorFactory getIdentifierGeneratorFactory() {
        return identifierGeneratorFactory;
      }

      /**
 
View Full Code Here

Examples of org.hibernate.engine.spi.Mapping

    setProperty( AvailableSettings.QUERY_TRANSLATOR, OgmQueryTranslatorFactory.class.getName() );
  }

  @Override
  public Mapping buildMapping() {
    final Mapping delegate = super.buildMapping();
    return new Mapping() {

      @Override
      public IdentifierGeneratorFactory getIdentifierGeneratorFactory() {
        return identifierGeneratorFactory;
      }

      @Override
      public Type getIdentifierType(String entityName) throws MappingException {
        return delegate.getIdentifierType( entityName );
      }

      @Override
      public String getIdentifierPropertyName(String entityName) throws MappingException {
        return delegate.getIdentifierPropertyName( entityName );
      }

      @Override
      public Type getReferencedPropertyType(String entityName, String propertyName) throws MappingException {
        return delegate.getReferencedPropertyType( entityName, propertyName );
      }
    };
  }
View Full Code Here

Examples of org.jasig.portal.layout.profile.UserAgentProfileMapper.Mapping

       
        mapper.setDefaultProfileName("profile");
        mapper.setUserAgentHeader("agent");
       
        List<Mapping> mappings = new ArrayList<Mapping>();
        Mapping mapping1 = new Mapping();
        mapping1.setPattern(".*iPad.*");
        mapping1.setProfileName("tablet");
        Mapping mapping2 = new Mapping();
        mapping2.setPattern(".*iOS.*");
        mapping2.setProfileName("mobile");
        mappings.add(mapping1);
        mappings.add(mapping2);
        mapper.setMappings(mappings);
    }
View Full Code Here

Examples of org.jboss.jmx.adaptor.snmp.config.notification.Mapping

      this.notificationWrapperCache =
         new ArrayList(notificationMapList.size());
       
      for (Iterator i = notificationMapList.iterator(); i.hasNext(); )
      {
         Mapping mapping = (Mapping)i.next();
        
         // Compile and add the regular expression
         String notificationType = mapping.getNotificationType();
        
         try
         {
            Pattern re = Pattern.compile(notificationType);
            this.mappingRegExpCache.add(re);
         }
         catch (PatternSyntaxException e)
         {
            // Fill the slot to keep index count correct
            this.mappingRegExpCache.add(null);
               
            log.warn("Error compiling notification mapping for type: " + notificationType, e);
         }
           
         // Instantiate and add the wrapper
         // Read wrapper class name
         String wrapperClassName = mapping.getVarBindList().getWrapperClass();
               
         log.debug("notification wrapper class: " + wrapperClassName);
        
         try
         {
View Full Code Here

Examples of org.jboss.jmx.adaptor.snmp.config.notification.Mapping

      {
         Object child = null;

         if ("mapping".equals(localName))
         {
            Mapping m = new Mapping();
            child = m;
         }
         else if ("var-bind-list".equals(localName))
         {
            VarBindList vblist = new VarBindList();
View Full Code Here

Examples of org.jboss.jmx.adaptor.snmp.config.notification.Mapping

               notifList.add(child);
            }
         }
         else if (parent instanceof Mapping)
         {
            Mapping m = (Mapping)parent;
           
            if (child instanceof VarBindList)
            {
               m.setVarBindList((VarBindList)child);
            }
         }
         else if (parent instanceof VarBindList)
         {
            VarBindList vblist = (VarBindList)parent;
View Full Code Here

Examples of org.jboss.jmx.adaptor.snmp.config.notification.Mapping

      public void setValue(Object o, UnmarshallingContext navigator, String namespaceURI,
                           String localName, String value)
      {
         if (o instanceof Mapping)
         {
            Mapping m = (Mapping)o;
           
            if ("notification-type".equals(localName))
            {
               m.setNotificationType(value);
            }
            else if ("generic".equals(localName))
            {
               m.setGeneric(Integer.parseInt(value));
            }
            else if ("specific".equals(localName))
            {
               m.setSpecific(Integer.parseInt(value));
            }
            else if ("enterprise".equals(localName))
            {
               m.setEnterprise(value);
            }
         }
         else if (o instanceof VarBind)
         {
            VarBind vb = (VarBind)o;
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.