Examples of AttrDef


Examples of org.mmisw.orrclient.gwt.client.vocabulary.AttrDef

    Map<String, AttrDef> uriAttrDefMap = Orr.getMetadataBaseInfo().getUriAttrDefMap();
   
    for ( Detail detail : details ) {
      HTML propLabel = new HTML();
      String uri = detail.key;
      AttrDef attrDef = uriAttrDefMap.get(uri);
     
      if ( attrDef == null || attrDef.isInternal() || attrDef.getLabel() == null ) {
        // we are only interested in the fields that are shown in the metadata sections;
        // so, ignore this detail:
        continue;
      }
     
      String lbl = attrDef.getLabel().replaceAll(" ", "&nbsp;");
      propLabel.setHTML(lbl);
      propLabel.setTitle(uri);
     
      table.getFlexCellFormatter().setAlignment(row, 0,
          HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_TOP);
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.vocabulary.AttrDef

    int row = 0;
    this.add(flexPanel);

    //////////////////////////////////////////////////////////////
    // handle the related attribute
    AttrDef attr2 = relatedAttrs.get(0);
    String label = attr2.getLabel();
    int nl = attr2.getNumberOfLines();
    resourceTypeRelatedField = OrrUtil.createTextBoxBase(nl, "400", cl);
    String tooltip = "<b>" +label+ "</b>:<br/>" +
              attr2.getTooltip() +
              "<br/><br/><div align=\"right\">(" +attr2.getUri()+ ")</div>";

    flexPanel.setWidget(row, 0, new TLabel("Name:", editing && attr.isRequired(), tooltip ));
    flexPanel.getFlexCellFormatter().setColSpan(row, 1, 2);
    flexPanel.setWidget(row, 1, resourceTypeFieldWithChoose);
    flexPanel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    flexPanel.getFlexCellFormatter().setAlignment(row, 1,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    row++;

    flexPanel.setWidget(row, 0, new TLabel(label, editing && attr2.isRequired(), tooltip ));
    flexPanel.getFlexCellFormatter().setColSpan(row, 1, 2);
    flexPanel.setWidget(row, 1, resourceTypeRelatedField);
//    flexPanel.getFlexCellFormatter().setWidth(row, 0, "250");
    flexPanel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.vocabulary.AttrDef

   
    vp.add(resourceTypeFieldWithChoose);

    //////////////////////////////////////////////////////////////
    // handle the related attribute
    AttrDef attr2 = relatedAttrs.get(0);
    String label = attr2.getLabel();
    FlexTable panel = new FlexTable();
    int row = 0;
    int nl = attr2.getNumberOfLines();
    resourceTypeRelatedField = OrrUtil.createTextBoxBase(nl, "330", cl);
    String tooltip = "<b>" +label+ "</b>:<br/>" +
              attr2.getTooltip() +
              "<br/><br/><div align=\"right\">(" +attr2.getUri()+ ")</div>";
   
    TLabel tlabel = new TLabel(label, editing && attr2.isRequired(), tooltip);
   
    HorizontalPanel hpRelated = new HorizontalPanel();
    hpRelated.add(tlabel);
    hpRelated.add(resourceTypeRelatedField);
    panel.setWidget(row, 0, hpRelated);
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.vocabulary.AttrDef

    elems.add(elem);
  }
 
  protected void createElements() {
    for (int i = 0; i < attrDefs.length; i++) {
      AttrDef attrDef = attrDefs[i];
      Elem elem = new Elem(attrDef, OrrUtil.createTextBoxBase(1, "200px", cl));
      addElem(elem);
    }
  }
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.vocabulary.AttrDef

  protected void createForm() {
    flexTable = new FlexTable();
    int row = 0;
   
    for ( Elem elem : elems ) {
      AttrDef attrDef = elem.attrDef;
      Widget widget = elem.widget;
     
      String label = attrDef.getLabel();
      String tooltip = "<b>" +label+ "</b>:<br/>" +
          attrDef.getTooltip() +
          "<br/><br/><div align=\"right\">(" +attrDef.getUri()+ ")</div>";
      flexTable.setWidget(row, 0, new TLabel(label, attrDef.isRequired(), tooltip ));
     
      flexTable.setWidget(row, 1, widget);
      flexTable.getFlexCellFormatter().setWidth(row, 0, "250px");
      flexTable.getFlexCellFormatter().setAlignment(row, 0,
          HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.vocabulary.AttrDef

public class MetadataSection1 extends MetadataSection {

  private static Map<String, AttrDef> uriAttrDefMap = Orr.getMetadataBaseInfo().getUriAttrDefMap();
 
  private static AttrDef _getAttrDef(String uri) {
    AttrDef attrDef = uriAttrDefMap.get(uri);
    assert attrDef != null;
    return attrDef;
  }
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.vocabulary.AttrDef

public class MetadataSection2 extends MetadataSection {

  private static Map<String, AttrDef> uriAttrDefMap = Orr.getMetadataBaseInfo().getUriAttrDefMap();
 
  private static AttrDef _getAttrDef(String uri) {
    AttrDef attrDef = uriAttrDefMap.get(uri);
    assert attrDef != null;
    return attrDef;
  }
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.vocabulary.AttrDef

public class MetadataSection3 extends MetadataSection {

  private static Map<String, AttrDef> uriAttrDefMap = Orr.getMetadataBaseInfo().getUriAttrDefMap();
 
  private static AttrDef _getAttrDef(String uri) {
    AttrDef attrDef = uriAttrDefMap.get(uri);
    assert attrDef != null;
    return attrDef;
  }
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.vocabulary.AttrDef

    return uriAttrDefMap;
  }

 
  private static AttrDef createAttrDef(Property prop) {
    AttrDef attrDef = new AttrDef(prop.getURI(), prop.getNameSpace(), prop.getLocalName());
    uriPropMap.put(prop.getURI(), prop);
    uriAttrDefMap.put(prop.getURI(), attrDef);
    return attrDef;
  }
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.vocabulary.AttrDef

    uriAttrDefMap.put(prop.getURI(), attrDef);
    return attrDef;
  }
 
  private static AttrDef createAttrDef(Property prop, boolean required) {
    AttrDef attrDef = createAttrDef(prop);
    attrDef.setRequired(required);
    return attrDef;
  }
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.