@Override protected void addNameProperty(final String labelPrefix) { final EIEntity namePropEntity = EIEntity.create( RDFS_LABEL_ENTITY.getURI(), InstanceWidgetUtils.getExtendedPropertyLabel( labelPrefix, RDFS_LABEL_ENTITY.getLabel(), true ) ); drawDataProperty( namePropEntity, "", true, makeSetFromSingle( eiInstance.getInstanceLabel() ), ontologyPanel ); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((entity == null) ? 0 : entity.hashCode()); return result; }
public List<EIURI> getEmbeddedInstanceUriList() { if ( hasEmbeddedInstances() ) { final List<EIURI> uris = new ArrayList<EIURI>(); for (final EIEntity entity : embeddedInstances.keySet()) { uris.add( entity.getURI() ); } return uris; } else { return Collections.emptyList(); } }
public EIExchangeInstance(EIURI specificType, String instanceLabel, String source, String foreignKey) { this.specificTypeUri = specificType; this.instanceEntity = EIEntity.create(EIURI.NULL_EIURI, instanceLabel); this.source = source; this.foreignKey = foreignKey; }
@Override public String toString() { return classEntity.getLabel() + " Class Panel ("+count+")"; } }
public boolean isFiltered() { boolean result = false; result = result || ( ( filterByCreator != null ) && filterByCreator ); result = result || ( ( filterByOwner != null ) && filterByOwner ) ; result = result || ( ( filterWorkflowEntity != null ) && !filterWorkflowEntity.equals(EIEntity.NULL_ENTITY) ); result = result || ( ( filterTypeEntity != null ) && !filterTypeEntity.equals(EIEntity.NULL_ENTITY) ); result = result || ( ( filterProviderEntity != null ) && !filterProviderEntity.equals(EIEntity.NULL_ENTITY) ); return result; }
private void setLabel(final SearchResult result) { for (final EIURI prop : prefLabelProperties) { final Set<String> values = result.getDataTypeProperty( prop ); if ( values != null ) { final EIEntity newEntity = EIEntity.create( result.getEntity().getURI(), values.iterator().next() ); result.setEntity( newEntity ); break; } } }
/** * Creates a new EIEntity that is a safe copy of the input. * @param eiEntity * @return */ public static EIEntity clone(final EIEntity eiEntity) { if ( (eiEntity == null) || (eiEntity.equals(NULL_ENTITY)) ) { return NULL_ENTITY; } final EIURI uriCopy = EIURI.clone(eiEntity.uri); return new EIEntity(uriCopy, eiEntity.label); }
@Override public String toString() { return entity.toString() + " (" + count + ")"; }
/** * @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 ); }
public void replaceObjectPropertyValue(final EIEntity property, final EIURI oldValue, final EIEntity newValue) { Set<EIEntity> pValues = objectProperties.get( property ); if ( pValues == null ) { //See comment in addObjectProperty pValues = new HashSet<EIEntity>(); objectProperties.put( property, pValues ); } pValues.remove( EIEntity.create( oldValue, "" ) ); if ( newValue != null && newValue != EIEntity.NULL_ENTITY ) { pValues.add( newValue ); } }
/** * Appends an * to the label if this is a required field. * @return Contents of the label ({@link com.google.gwt.user.client.ui.Label Label}) */ protected String getLabel() { return propertyEntity.getLabel() + ( isRequired ? "*" : "" ); }
@Override public boolean isAddedInstanceEntity(final EIEntity entity) { for (final EIInstance inner : newInnerInstances) { if ( inner.getEntity().equals( entity ) ) { return true; } } return false; }