public void setInstanceClass(final EIClass instanceClass) { this.instanceClass = instanceClass; instanceType = instanceClass.getEntity(); }
private List<EIClass> getDeepSubClasses(EIClass eiClass) { if(!eiClass.hasSubClass()) { return Collections.emptyList(); } List <EIClass> directSubClasses = eiModelProvider.getSubClasses( eiClass.getEntity().getURI() ); List <EIClass> allSubClasses = new ArrayList<EIClass>(); allSubClasses.addAll(directSubClasses); for(EIClass subClass : directSubClasses ) { allSubClasses.addAll(getDeepSubClasses(subClass)); } return allSubClasses; }
if ( !resource.hasProperty() || resource.getProperties() != null ) { DeferredCommand.addCommand( new Command() { modelService.getProperties( resource.getEntity().getURI(), new AsyncCallback<List<EIProperty>>() {
@Override public void onSuccess(final List<EIClass> result) { for (final EIClass eclass : result) { definitions.put( eclass.getEntity(), eclass.getDefinition() ); } createPanel(); }
if ( !resource.hasSubClass() || resource.getSubClasses() != null ) { DeferredCommand.addCommand( new Command() { modelService.getSubClasses( resource.getEntity().getURI(), new AsyncCallback<List<EIClass>>() {
public ResourceTreeWidget(final EIClass resource) { this.resource = resource; l = new Label( resource.getEntity().getLabel() ); if ( resource.isInferred() ) { l.setStyleName( "InferredResourceTreeItem" ); } else { l.setStyleName( "ResourceTreeItem" ); } l.addMouseOverHandler( this ); l.addMouseOutHandler( this ); l.addClickHandler( this ); initWidget( l ); }
if ( !resource.hasEquivalentClass() || resource.getEquivalentClasses() != null ) { DeferredCommand.addCommand( new Command() { modelService.getEquivalentClasses( resource.getEntity().getURI(), new AsyncCallback<List<EIEquivalentClass>>() {
if ( !needsSuperClass.hasSuperClass() ) { } else if ( needsSuperClass.getSuperClass() != null ) { needsSuperClass = needsSuperClass.getSuperClass(); } else { } else { final EIClass targetClass = needsSuperClass; modelService.getSuperClasses( targetClass.getEntity().getURI(), new AsyncCallback<List<EIClass>>() {
EIClass eiClass = eiModelProvider.getEIClass( term.getURI() ); if ( eiClass != null ) { String prefLabel = eiClass.getEntity().getLabel(); sb.append( prefLabel + " " ); List<String> synonyms = eiClass.getSynonyms(); if ( synonyms != null ) { for (final String label : synonyms) {
@Override public List<EIClass> getSubClasses(final EIURI classId) throws LoggedException { EIClass eiClass = eiModelProvider.getEIClass( classId ); if(!eiClass.hasSubClass()) { return Collections.emptyList(); } try { return eiModelProvider.getSubClasses( classId ); } catch (final Throwable t) { logger.error( "Error in getSubClasses: " + classId, t ); throw new LoggedException(); } }
if ( eclass == null || eclass.getEntity() == null || eclass.getEntity().getURI() == null && !eclass.getEntity().getURI().equals( EIURI.NULL_EIURI ) ) { return; if ( !eclass.hasSuperClass() ) { modelService.getSuperClasses( eclass.getEntity().getURI(), new AsyncCallback<List<EIClass>>() {
if ( eiInstance.getRootSuperType().equals( eiInstance.getInstanceClass() ) ) { if ( eiInstance.getRootSuperType().hasSubClass() ) { selectedClass = EIClass.NULL_CLASS; } else {
@Override public void onSuccess(final EIClass c) { final List<EIClass> result = c.getSubClasses(); // Check that the child list hasn't already been // populated by another thread. if ( !w.childListLoading ) { return; } populateChildList( item, w, result ); }
@Override public void onSuccess(final EIClass result) { ClientModelManager.INSTANCE.getPropertyDefinitions( result.getProperties(), new ModelRootAsyncCallback<List<EIProperty>>() { @Override public void onSuccess(final List<EIProperty> fetchedProperties) { formProperties = fetchedProperties; for (final EIProperty property : formProperties) { formPropertyMap.put( property.getEntity(), property ); } finishSetup(); } } ); } } );
@Override public void onSuccess(final EIClass result) { if(result == null || EIClass.NULL_CLASS.equals( result)) { callback.onFailure( new LoggedException("Class was not found in model") ); } callback.onSuccess( getCachedClass( result ) ); }
@Override public List<String> getClassDefinitions(final List<EIURI> classURIs) throws LoggedException { try { List<String> result = new ArrayList<String>(classURIs.size()); for (EIURI uri : classURIs) { EIClass eiClass = eiModelProvider.getEIClass( uri ); if(eiClass != null) { result.add( eiClass.getDefinition() ); } } return result; } catch (final Throwable t) { logger.error( "Error in getClassDefinitions: ", t ); throw new LoggedException(); } }
private void setup() { final FlowPanel temp = new FlowPanel(); classChooser.setClass( range, false); classChooser.setTextBoxStyle( "textSuggest" ); if ( selectedClass != null && !EIClass.NULL_CLASS.equals( selectedClass ) ) { classChooser.setSelectedEntity( selectedClass.getEntity() ); updateOldValue( selectedClass.getEntity().getURI() ); } widgetPanel.add( temp ); temp.add( classChooser ); temp.addStyleName( "inlineBlock" ); if ( shouldHaveTermRequest ) { addTermRequestAnchor(); } //addTermRequestWidget(); makeSelectionHandler( classChooser ); }
public ResourceTreeWidget(final EIClass resource) { this.resource = resource; l = new Label( resource.getEntity().getLabel() ); if ( resource.isInferred() ) { l.setStyleName( "InferredResourceTreeItem" ); } else { l.setStyleName( "ResourceTreeItem" ); } l.addMouseOverHandler( this ); l.addMouseOutHandler( this ); l.addClickHandler( this ); initWidget( l ); }
public void setClass(final EIClass rClass, final boolean readOnly) { boxType.setResource( rClass ); // Even if there are no sub-classes, show the widget. ontologyBrowser.setVisible( true ); if ( rClass.hasSubClass() ) { ontologyBrowser.setResource( rClass ); // ontologyBrowser.setVisible(true); } else { ontologyBrowser.setResource( null ); // ontologyBrowser.setVisible(false); } }