Examples of PropertyDefinition


Examples of org.andromda.core.namespace.PropertyDefinition

    private PropertyDefinition getPropertyDefinition(
        final String namespace,
        final String name)
    {
        final NamespaceRegistry registry = this.getRegistry(namespace);
        PropertyDefinition definition = null;
        if (registry != null)
        {
            definition = registry.getPropertyDefinition(name);
        }
        if (definition == null)
View Full Code Here

Examples of org.apache.stanbol.cmsadapter.servicesapi.model.web.PropertyDefinition

    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        // initialize a dummy repository
        repository = new ArrayList<Object>();
        PropertyDefinition pd1 = new PropertyDefinitionBuilder(PX_PD_1).build();
        PropertyDefinition pd2 = new PropertyDefinitionBuilder(PX_PD_2).build();
        PropertyDefinition pd3 = new PropertyDefinitionBuilder(PX_PD_3).build();
        Property p1 = new PropertyBuilder(PX_P_1).propertyDefinition(pd1).build();
        Property p2 = new PropertyBuilder(PX_P_2).propertyDefinition(pd2).build();
        CMSObject root = new CMSObjectBuilder(PX_ROOT).build();
        CMSObject child11 = new CMSObjectBuilder(PX_O_11).build();
        CMSObject child12 = new CMSObjectBuilder(PX_O_12).build();
View Full Code Here

Examples of org.jfree.xml.util.PropertyDefinition

            writer.startBlock();

            final PropertyDefinition[] propertyDefs = this.factory.getPropertyDefinitions();
            final RootXmlWriteHandler rootHandler = getRootHandler();
            for (int i = 0; i < propertyDefs.length; i++) {
                final PropertyDefinition pDef = propertyDefs[i];
                final String elementName = pDef.getElementName();
                rootHandler.write
                    (elementName, this.factory.getProperty(pDef.getPropertyName()),
                            this.factory.getTypeForTagName(elementName), writer);
            }
            writer.endBlock();
            writer.writeCloseTag(tagName);
        }
View Full Code Here

Examples of org.joda.beans.PropertyDefinition

  private static boolean nullable(MetaProperty<?> property) {
    if (property.propertyType().isPrimitive()) {
      return false;
    } else {
      PropertyDefinition definitionAnnotation = property.annotation(PropertyDefinition.class);
      return !definitionAnnotation.validate().equals("notNull");
    }
  }
View Full Code Here

Examples of org.mantikhor.llapi.PropertyDefinition

    for (int index = propertyDefinitionImpls.size()-1; index > 0; index--)
    {
      assertTrue(propertyDefinitionImpls.get(index).compareTo(propertyDefinitionImpls.get(index-1)) > 0);
    }
   
    PropertyDefinition newOne = new PropertyDefinitionImpl(PropertyCategory.TYPEDEF, map.get(PropertyCategory.TYPEDEF));
    assertEquals(0, propertyDefinitionImpls.get(PropertyCategory.TYPEDEF.ordinal()).compareTo(newOne));

    // More tests not described above ...
    try
    {
      // This is a new DomainURI that we haven't used yet ...
      DomainURI domainURI = DomainURI.valueByString(uris[5]);

      // Make up a PropertyDefinition that matches propertyDefinitionImpls.get(0) in
      // PropertyCategory but not DomainURI.
      PropertyDefinition newPropDef =
        new PropertyDefinitionImpl(propertyDefinitionImpls.get(0).getCategory(), domainURI);
     
      // Calculate the result from a compareTo of this new PropertyDefinition (anotherOne) and the
      // pre-constructed one that has the same PropertyCategory.
      int result =
        newPropDef.compareTo(propertyDefinitionImpls.get(0));
     
      // The above result should be equal to the compareTo for the DomainURI
      assertTrue
      ( result ==
         (domainURI.compareTo(propertyDefinitionImpls.get(0).getTypedefURI()))
View Full Code Here

Examples of org.nasutekds.server.admin.PropertyDefinition

    Class<LocalDBBackendCfg> configClass = LocalDBBackendCfg.class;
    LocalDBBackendCfgDefn defn = LocalDBBackendCfgDefn.getInstance();
    Class<? extends LocalDBBackendCfgDefn> defClass = defn.getClass();

    PropertyDefinition propDefn =
         (PropertyDefinition)defClass.getMethod("get" + methodBaseName +
         "PropertyDefinition").invoke(defn);

    String methodName;
    if (propDefn instanceof BooleanPropertyDefinition)
View Full Code Here

Examples of org.rhq.core.domain.configuration.definition.PropertyDefinition

        {
            Property mapMemberProp = propMap.get(propName);
            ManagedProperty managedProp = managedObject.getProperty(propName);
            MetaType metaType = managedProp.getMetaType();
            PropertyAdapter propertyAdapter = PropertyAdapterFactory.getPropertyAdapter(metaType);
            PropertyDefinition mapMemberPropDef = propDefMap.get(propName);
            if (managedProp.getValue() == null)
            {
                MetaValue managedPropMetaValue = propertyAdapter.convertToMetaValue(mapMemberProp, mapMemberPropDef, metaType);
                managedProp.setValue(managedPropMetaValue);
            }
View Full Code Here

Examples of org.rhq.core.domain.configuration.definition.PropertyDefinition

{
    private static final Log LOG = LogFactory.getLog(PluginConstants.DEFAULT_LOGGER_CATEGORY);

    public void populateMetaValueFromProperty(PropertyList property, MetaValue metaValue, PropertyDefinitionList propertyDefinition)
    {
        PropertyDefinition listMemberPropDef = propertyDefinition.getMemberDefinition();
        List<Property> listMemberProps = property.getList();
        CollectionValueSupport collectionValue = (CollectionValueSupport)metaValue;
        MetaType listMemberMetaType = collectionValue.getMetaType().getElementType();
        MetaValue[] listMemberValues = new MetaValue[listMemberProps.size()];
        PropertyAdapter propertyAdapter = PropertyAdapterFactory.getPropertyAdapter(listMemberMetaType);
View Full Code Here

Examples of org.rhq.core.domain.configuration.definition.PropertyDefinition

        return collectionValue;
    }

    public void populatePropertyFromMetaValue(PropertyList propList, MetaValue metaValue, PropertyDefinitionList propDefList)
    {
        PropertyDefinition memberPropDef = propDefList.getMemberDefinition();
        if (propList != null)
        {
            // Since we want to load the PropertyList with fresh values, we want it cleared out.
            propList.getList().clear();
            if (metaValue != null)
View Full Code Here

Examples of org.rhq.core.domain.configuration.definition.PropertyDefinition

            TableValueSupport tableValueSupport = (TableValueSupport)metaValue;
            Map<String, PropertyDefinition> map = propertyDefinition.getPropertyDefinitions();
            Map<String, Property> properties = property.getMap();
            for (String key : map.keySet())
            {
                PropertyDefinition definition = map.get(key);
                MetaValue[] getKey = new MetaValue[]{SimpleValueSupport.wrap(key)};
                MetaValue value = tableValueSupport.get(getKey);
                Property innerProperty = properties.get(key);
                PropertyAdapter adapter = PropertyAdapterFactory.getPropertyAdapter(value);
                adapter.populateMetaValueFromProperty(innerProperty, value, definition);
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.