/** * Create a fullname element containing the fullname of the given AnnotatatedObject. * * @param session * @param parent the names element, not null. * @param object the annotatedObject from which we get the fullname, not null. */ protected void createFullname( UserSessionDownload session, Element parent, AnnotatedObject object ) { // fullname is NOT mandatory in the IntAct API. if ( object.getFullName() != null && !"".equals( object.getFullName().trim() ) ) { Element fullname = session.createElement( "fullName" ); Text fullnameText = session.createTextNode( object.getFullName() ); fullname.appendChild( fullnameText ); parent.appendChild( fullname ); } }
/** * Create a fullname element containing the fullname of the given AnnotatatedObject. * * @param session * @param parent the names element, not null. * @param object the annotatedObject from which we get the fullname, not null. */ protected void createFullname( UserSessionDownload session, Element parent, AnnotatedObject object ) { // fullname is NOT mandatory in the IntAct API. if ( object.getFullName() != null && !"".equals( object.getFullName().trim() ) ) { Element fullname = session.createElement( "fullName" ); Text fullnameText = session.createTextNode( object.getFullName() ); fullname.appendChild( fullnameText ); parent.appendChild( fullname ); } }
/** * Create a fullname element containing the fullname of the given AnnotatatedObject. * * @param session * @param parent the names element, not null. * @param object the annotatedObject from which we get the fullname, not null. */ protected void createFullname( UserSessionDownload session, Element parent, AnnotatedObject object ) { // fullname is NOT mandatory in the IntAct API. if ( object.getFullName() != null && !"".equals( object.getFullName().trim() ) ) { Element fullname = session.createElement( "fullName" ); Text fullnameText = session.createTextNode( object.getFullName() ); fullname.appendChild( fullnameText ); parent.appendChild( fullname ); } }
private static List<SearchItem> searchItemsForAnnotatedObject( AnnotatedObject<? extends Xref, ? extends Alias> ao, boolean includeAliases ) { List<SearchItem> searchItems = new ArrayList<SearchItem>(); searchItems.add( new SearchItem( ao.getAc(), ao.getAc(), ao.getClass().getName(), "ac" ) ); searchItems.add( new SearchItem( ao.getAc(), ao.getShortLabel(), ao.getClass().getName(), "shortlabel" ) ); if ( ao.getFullName() != null ) { searchItems.add( new SearchItem( ao.getAc(), ao.getFullName(), ao.getClass().getName(), "fullname" ) ); } if ( includeAliases ) { for ( Alias alias : ao.getAliases() ) { if ( alias.getCvAliasType() != null ) { searchItems.add( new SearchItem( ao.getAc(), alias.getName(), ao.getClass().getName(), alias.getCvAliasType().getShortLabel() ) ); } else { log.warn( "Couldn't insert SearchItem for Alias, as it cvAliasType is null: " + alias.getName() ); } } } return searchItems; }
if ( !fullName.equals( annotatedObject.getFullName() ) ) { return false; if ( annotatedObject.getFullName() != null ) { return false;
protected static void populateNames( AnnotatedObject<?, ?> annotatedObject, NamesContainer namesContainer ) { Names names = namesContainer.getNames(); if ( names == null ) { names = new Names(); } String shortLabel = annotatedObject.getShortLabel(); String fullName = annotatedObject.getFullName(); names.setShortLabel( shortLabel ); names.setFullName( fullName ); if ( !ConverterContext.getInstance().getInteractorConfig().isExcludeInteractorAliases() ) { AliasConverter aliasConverter = new AliasConverter( annotatedObject.getOwner(), AnnotatedObjectUtils.getAliasClassType( annotatedObject.getClass() ) ); for ( Alias alias : IntactCore.ensureInitializedAliases(annotatedObject)) { names.getAliases().add( aliasConverter.intactToPsi( alias ) ); } } namesContainer.setNames( names ); }
public static void populateNames( AnnotatedObject<?, ?> annotatedObject, NamesContainer namesContainer, AliasConverter aliasConverter ) { Names names = namesContainer.getNames(); if ( names == null ) { names = new Names(); } String shortLabel = annotatedObject.getShortLabel(); String fullName = annotatedObject.getFullName(); names.setShortLabel( shortLabel ); names.setFullName( fullName ); if ( !ConverterContext.getInstance().getInteractorConfig().isExcludeInteractorAliases() ) { Collection<? extends Alias> aliases; if (aliasConverter.isCheckInitializedCollections()){ aliases = IntactCore.ensureInitializedAliases(annotatedObject); } else { aliases = annotatedObject.getAliases(); } for ( Alias alias : aliases) { names.getAliases().add( aliasConverter.intactToPsi( alias ) ); } } namesContainer.setNames( names ); }
clone.setFullName(ao.getFullName());
clone.setFullName(ao.getFullName());