public boolean hasProviderURI() { return providerURI != null && !EIURI.NULL_EIURI.equals( providerURI ); }
/** * @return old value as an EIURI */ public EIURI getOldValueEIURI() { return EIURI.create( oldValue ); } }
/** * Update the old value using an EIURI * @param oldValue */ protected void updateOldValue(final EIURI oldValue) { this.oldValue = oldValue.toString(); }
private boolean oldValueMissingFromResult(final List<EIInstanceMinimal> fetchedInstances) { // DBW - remove final EIURI oldUri = EIURI.create( oldValue ); for (final EIInstanceMinimal instance : fetchedInstances) { if ( instance.getInstanceURI().equals( oldUri ) ) { return false; } } log.debug( "Old value missing from result: " + oldValue ); return true; }
public String toString() { if (instance == null) { return ""; } final EIEntity instanceEntity = instance.getEntity(); final EIEntity classEntity = instance.getInstanceClass().getEntity(); final String hostname = instanceEntity.getURI().getNamespace(); return "{ " + toJsonFragment(RESOURCE_LABEL, instanceEntity.getLabel()) + ", " + toJsonFragment(RESOURCE_URI, instanceEntity.getURI().toString()) + ", " + toJsonFragment(CLASS, classEntity.getURI().toString()) + ", " + toJsonFragment(DEFINITION, classEntity.getLabel()) + ", " + toJsonFragment(LOCATION, hostname) + " }"; } }
@Override public int hashCode() { return uri.hashCode(); }
public EIURI getGraphURI() { return EIURI.clone(graphURI); }
private boolean isPropertyValueInDifferentNamespace( final EIURI propertyValue) { return eiInstanceNamespace != propertyValue.getNamespace(); } }
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 ); } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ( ( query == null ) ? 0 : query.hashCode() ); result = prime * result + ( ( uri == null ) ? 0 : uri.hashCode() ); return result; }
public EIURI getInstitutionURI() { return EIURI.clone(institutionURI); }
public OntologyPropViewRenderer(final EIInstance eiInstance, final FlowPanel ontologyPanel) { super( eiInstance, ontologyPanel ); eiInstanceNamespace = eiInstance.getInstanceURI().getNamespace(); }
@XmlTransient public boolean isNullEIURI() { return this.equals(NULL_EIURI); }
@Override public EIURI deserialize(final JsonElement element, final Type type, final JsonDeserializationContext context) throws JsonParseException { final String strValue = element.getAsString(); if ( NullInstanceString.equals( strValue ) ) { return null; } else { return EIURI.create( strValue ); } } }
/** * 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 ); }
private List<EIResourceProvider> commonGetEIResourceProviders(EIURI type) { authenticate(); final List<EIResourceProvider> providers = new ArrayList<EIResourceProvider>(); final String query = EIURI.NULL_EIURI.equals( type ) ? getQueryForAllProviders() : getQueryForType( type.toString() ); final String rdfString = fixedQueryProvider.query( user.getSessionId(), query, READ_PUBLISHED_VIEW, null ); final Model model = ModelFactory.createDefaultModel(); model.read( new StringReader( rdfString ), null, RDF_FORMAT ); final List<EIInstance> instances = create( model ); for (final EIInstance instance : instances) { providers.add( new EIResourceProvider( instance, null ) ); } Collections.sort(providers); return providers; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ( ( text == null ) ? 0 : text.hashCode() ); result = prime * result + ( ( uri == null ) ? 0 : uri.hashCode() ); result = prime * result + ( ( property == null ) ? 0 : property.hashCode() ); result = prime * result + maxMatches; return result; }
public InstitutionGroupConfigBuilder addInstitutionURI(final EIURI institutionURI) { this.nestedInstitutionURIs.add(EIURI.clone(institutionURI)); return this; }