/** * Update the old value using an EIURI * @param oldValue */ protected void updateOldValue(final EIURI oldValue) { this.oldValue = oldValue.toString(); }
/** * Checks to see if the uri is only temporary. Temporary uri is assigned for linked instances * to provide a handle into the objectPropertyValue set. * @param uri * @return */ private boolean isTempUri(EIURI uri) { return uri.toString().startsWith( TEMP_URI_PREFIX ); }
@Override public String toString() { final StringBuilder sb = new StringBuilder("InstitutionGroupConfig{displayName="+displayName+", "+ "institutionURIs={"); if (institutionURIs != null) { for (EIURI uri : institutionURIs) { sb.append(uri.toString()+", "); } } sb.append("} }"); return sb.toString(); }
public void setProperty(final EIURI classURI, final EIURI propertyURI) { this.classURI = classURI; property = propertyURI.toString(); computeParamList(); }
@Override public JsonElement serialize(final EIURI uri, final Type type, final JsonSerializationContext context) { if ( uri == null ) { return new JsonNull(); } return new JsonPrimitive( uri.toString() ); }
public void replaceSameAsValue(EIURI oldValue, final EIURI newValue) { if( sameAsValues == null ) { sameAsValues = new HashSet<EIURI>(); } sameAsValues.remove( oldValue ); if( newValue != null && !EIURI.NULL_EIURI.equals(newValue) && newValue.toString().length()>0) { sameAsValues.add( newValue ); } }
/** * @return <b>true</b> if old value is not null, not equal to * {@link org.eaglei.model.EIEntity#NULL_ENTITY NULL_ENTITY} and not equal to an empty string. */ public boolean hasOldValue() { return oldValue != null && !oldValue.equals( EIEntity.NULL_ENTITY.getURI().toString() ) && !"".equals( oldValue ); }
private void processTextProperties(Map<EIEntity, Set<String>> textPropertiesByEIEntity) { if(textPropertiesByEIEntity != null && !textPropertiesByEIEntity.isEmpty()) { for(Map.Entry<EIEntity, Set<String>> entry : textPropertiesByEIEntity.entrySet()) { this.textProperties.put( entry.getKey().getURI().toString(), entry.getValue() ); } } }
private String entityToRawString(final EIEntity entity) { final StringBuffer buf = new StringBuffer( entity.getLabel() ); buf.append( SearchRequestTokens.ENTITY_VALUE_DELIMITER ); buf.append( entity.getURI().toString() ); return buf.toString(); }
protected void addToMap(final EIEntity newEntity, final String uriVariable, final String labelVariable) { if ( newEntity != null && hasUri( newEntity ) ) { variableMap.put( uriVariable, newEntity.getURI().toString() ); variableMap.put( labelVariable, newEntity.getLabel().toString() ); } else { variableMap.remove( uriVariable ); variableMap.remove( labelVariable ); } }
public static boolean isInstance(final EIEntity selectedEntity) { if ( selectedEntity == null || selectedEntity.equals( EIEntity.NULL_ENTITY ) ) { return false; } return selectedEntity.getURI().toString().indexOf( "/i/" ) != -1; // TODO: TOTAL // HACK }
private void initClassMap() { List<EIClass> topClasses = eiModelProvider.getClassesInGroup( EIOntConstants.CG_INSTANCE_CREATE ); for(EIClass eiClass : topClasses) { if(excludeFromSearchResults.contains(eiClass.getEntity().getURI().toString())) { continue; } mapURIToPlural.put(eiClass.getEntity().getURI().toString(), "in " + EIOntPlurals.plurals.get(eiClass.getEntity().getLabel())); } //Add core lab, which is an outlier mapURIToPlural.put(EIOntConstants.CORE_LABORATORY_URI.toString(), "in " + EIOntPlurals.plurals.get(EIOntConstants.CORE_LABORATORY_ENTITY.getLabel())); }
@Override public SafeHtml getValue(StemCellSparqlResult resultRow) { SafeUri href = getLink( resultRow.getHumanSubjectURI().toString() ); return cell.anchor( href, resultRow.getHumanSubjectName() ); }
@Override public int compareTo(EIResourceProvider o) { if(o == null || o.getInstance() == null) { return -1; } if( this.instance.getInstanceLabel().equals( o.getInstance().getInstanceLabel())) { return this.instance.getInstanceURI().toString().compareTo( o.getInstance().getInstanceURI().toString() ); } return this.instance.getInstanceLabel().compareTo( o.getInstance().getInstanceLabel() ); }
protected void addTermRequestWidget() { final TextWidget termRequestWidget = TextWidget.makeTermRequestWidget( eiInstance ); termRequestWidget.setStyleName( "inlineBlock" ); // Include the root class of the range in the name // in order to differentiate term request fields for testing termRequestWidget.setName( range.getEntity().getURI().toString() + "_" + SweetUIConstants.termRequestEntity.getURI().toString() ); widgetPanel.add( termRequestWidget ); }
private void appendRCU(StringBuilder builder) { Set<EIEntity> rcuEntitySet = cellLine.getObjectProperty( inCollectionProperty.getEntity() ); if ( rcuEntitySet == null || rcuEntitySet.isEmpty() ) { return; } EIEntity rcuEntity = rcuEntitySet.iterator().next(); String rcuLabel = urlEncodeDecodeParamLabels ? URL.encodeQueryString( rcuEntity.getLabel() ) : rcuEntity.getLabel(); appendParam( builder, COLLECTION_LABEL_KEY, rcuLabel ); appendParam( builder, COLLECTION_KEY, rcuEntity.getURI().toString() ); }
@Override public void onClick(ClickEvent event) { final String eventLabel = eiInstance.getEntity().getURI().toString(); if ( hasExchangeFacilitator ) { Window.alert( EXCHANGE_FACILITATOR_MESSAGE ); } contactPanel.focus(); } };
private Affiliations fillAffiliations(final EIResourceProvider eiProvider) { final Affiliations affiliations = new Affiliations(); final List<EIEntity> institutionValues = eiProvider.getAffiliation(); for (final EIEntity value : institutionValues) { final Affiliation affiliation = new Affiliation(); affiliation.setEiuri( value.getURI().toString() ); affiliation.setName( value.getLabel() ); affiliations.getAffiliation().add( affiliation ); } return affiliations; }
protected void setup() { valueField.setName( propertyEntity.getURI().toString() ); if ( hasOldValue() ) { valueField.setText( InstanceWidgetUtils.formatText( oldValue ) ); } // widgetPanel.add(propLabel); widgetPanel.add( valueField ); valueField.addValueChangeHandler( getValueChangeHandler() ); }
private void initWorkflowFilter(final EIEntity filterWorkflowEntity) { statusFilter.setVisible( true ); statusLabel.setVisible( true ); statusFilter.addItem( genericOption ); for (final WorkflowState state : WorkflowState.values()) { statusFilter.addItem( state.getLabel(), state.getUri().toString() ); if ( state.getEntity().equals( filterWorkflowEntity ) ) { statusFilter.setSelectedIndex( statusFilter.getItemCount() - 1 ); } } }