Problem in importing two different classes with same name...

I have to import two different classes in my program with the same name....
import org.apache.lucene.document.Document;
import org.w3c.dom.Document;
//    I AM USING THE DOCUMENT FROM W3C PACKAGE HERE....
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                 DocumentBuilder builder = factory.newDocumentBuilder();
                 InputSource is = new InputSource( new StringReader( tempString ) );
                 d = builder.parse( is );
                 NodeList images = d.getElementsByTagName("img");
                 int length = images.getLength();
                 for(int i = 0;i<length;i++)
                     Node image = images.item(i);
                     String tempAltText = image.getAttributes().getNamedItem("alt").getNodeValue();
                     altText = altText.concat(" ").concat(tempAltText);
                 }and the error i am getting is
[javac] C:\Documents and Settings\sumit-i\WolframWorkspaces\Base\WolframNutch\src\java\com\wolfram\nutch\indexer\InfoCenterFilter.java:20: org.apache.lucene.document.Document is already defined in a single-type import
    [javac] import org.w3c.dom.Document;
    [javac] ^
    [javac] C:\Documents and Settings\sumit-i\WolframWorkspaces\Base\WolframNutch\src\java\com\wolfram\nutch\indexer\InfoCenterFilter.java:132: incompatible types
    [javac] found   : org.w3c.dom.Document
    [javac] required: org.apache.lucene.document.Document
    [javac] d = builder.parse( is );
    [javac] ^
    [javac] C:\Documents and Settings\sumit-i\WolframWorkspaces\Base\WolframNutch\src\java\com\wolfram\nutch\indexer\InfoCenterFilter.java:133: cannot find symbol
    [javac] symbol  : method getElementsByTagName(java.lang.String)
    [javac] location: class org.apache.lucene.document.Document
    [javac] NodeList images = d.getElementsByTagName("img");
    [javac] ^
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 3 errorsany idea ..how to resolve it
Edited by: ping.sumit on Jul 16, 2008 3:39 PM
Edited by: ping.sumit on Jul 16, 2008 3:40 PM

now i changed the code to
import org.apache.lucene.document.Document;
import org.w3c.dom.Document;
org.w3c.dom.Document d = null;
try{
     System.out.println("in author");
               URL url = new java.net.URL(urlString);
               java.net.URLConnection conn = url.openConnection();
               BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
               while ((in.readLine()) != null)
                    //tempString = tempString.concat(in.readLine());
                    String temp = in.readLine();
                    tempString = tempString + " " + temp;
               System.out.println("the string in author" + tempString);
                in.close();
                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                 DocumentBuilder builder = factory.newDocumentBuilder();
                 InputSource is = new InputSource( new StringReader( tempString ) );
                 d = builder.parse( is );
                 NodeList images = d.getElementsByTagName("img");and their is only one error i am getting ...and that is
[javac] C:\Documents and Settings\sumit-i\WolframWorkspaces\Base\WolframNutch\src\java\com\wolfram\nutch\indexer\InfoCenterFilter.java:20: org.apache.lucene.document.Document is already defined in a single-type import
    [javac] import org.w3c.dom.Document;
    [javac] ^
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 1 error

Similar Messages

  • Reflection - Two packages/classes with same name

    Hi There !
    I am in a situation and I need some help, if anyone can help me.
    I have two tools to work with different version of a server application. Now, the admin wants to have only one tool to work with both server app.
    The problem is that the server app has a jar file with the API to be used to access it. One jar for each version.
    Inside those jars files I have the same package and the same class ! But the implementation is diferent. So I will need to access one jar when accessing the old server app and another jar to access the new server app.
    I have no idea how to do it.
    I search arround google and I found that I can load a class at runtime and then with Reflection call its methods.
    I made a test app (simple, just 2 different jars with same package and class name just printing a Hello World and Bye World) and it worked very well.
    But when I tried to apply this to my code, I realize that one class need the reference of the other class...
    For example, I have a class named Server and other called ServerStatus.
    The Server class do the connection to the server and the ServerStatus get some server information. But the method that give me this information has a argument asking for an object of Server... like this:
    Server serv = new Server();
    serv.connect();
    ServerStatus servStat = new ServerStatus();
    servStat.getServerStatus(serv);I tried to do this with reflection but in the part that I need to invoke the method getServerStatus, I do not have the name of the class that is the argument (in this case Server).
    Something like this:
       Method  m = serverClass.getMethod("getServerStatus", new Class[] {?????.class});
             result = (Boolean)m.invoke(server, new Object[] {serverStatus});Do you have any ideiias to resolve this ?
    Or something different from reflection to access two different implementations with same package and class name ?
    If you need any other information, please ask me..
    Thank you so much !
    Regards,
    Thiago

    Thiago wrote:
    Hi.
    But now, how can I handle the object (because the newInstance() return a Object object.... not the class that I want (Server, for example)).
    When you declare a reference to be something more narrow than "Object" you're telling the compiler what methods and fields the referenced object supports. With a dynamically loaded class you can't do that at compile time, because the nature of the class isn't known until you load it at runtime.
    That's why it's very handy if you know that the class you are to load implements some interface which is known at compile time. Then you can access the object through a reference to that interface.
    Otherwise there's really no option but to handle the object through reflection. Find methods with getMethod() on the Class object and invoke them with Method.invoke().
    There are tricks to impose an interface onto a dynamically loaded class at runtime, but they are just neat ways of working through reflection.

  • Two soa domain with same name "TestSOADomain" sharing same SOA schema ?

    I tried creating two soa domain with same name "TestSOADomain" (different path) sharing same SOA schema .However one domain came UP to Running mode and other domain going to AdminMode and "soa-infra" application of that domain is not active.
    I do want to understand can this be possible with SOA ,ie. two soa domain sharing same SOA schema ?
    If possible what are all the problems might come
    1. While executing soa composites with asyncronous behaviour ?
    2. How the polling services will work ?
    3. will the XREF_DATA table ROW_NUMBER column inserted uniquely while inserting data from two different domain into same SOA schema ?
    4. Other issues ?
    Thanks

    Each domain is expected to refer to its own unique database schema. Same SOA schema should not be shared by multiple SOA clusters/domains. It is technically possible though, I suppose, and still can run fine any one SOA environment at any given time with the other SOA environments/domains (sharing the same SOA schema) shutdown. It is not the general/recommended practice to share SOA schema across domains and there could be potential implications and unexpected behavior, particularly when the SOA environments pointing to the same schema are all running at a time.

  • Can I run 2 different domains with same name but on 2 different machines?

    I am trying to setup 2 domains with same name (sharedcds1) on 2 different machines (Machine1 and Machine2).
              When I start the weblogic managed server 1 (sharedcds1managedserver1) on Machine2, it throws an error saying it has some conflicts with the managed server 1 running on Machine1. How did the managed server of one machine know about the other server. Can I run 2 different domains with same name but on 2 different machines?
              Here is the error in the log -
              <Jun 14, 2005 10:53:29 AM EDT> <Error> <Cluster> <BEA-000123> <Conflict start: You tried to bind an
              object under the name weblogic.transaction.coordinators.sharedcds1managedserver1 in the JNDI tree.
              The object from 4596206652609838848S:130.170.61.153:[9505,9505,-1,-1,9505,-1,-1,0,0]:sharedcds1:s
              haredcds1managedserver1 is non-clusterable, and you have tried to bind more than once from two or m
              ore servers. Such objects can only be deployed from one server.>
              <Jun 14, 2005 10:53:29 AM EDT> <Error> <Cluster> <BEA-000123> <Conflict start: You tried to bind an
              object under the name weblogic.transaction.coordinators.sharedcds1managedserver1 in the JNDI tree.
              The object from 8842351474821025197S:130.170.61.154:[9505,9505,-1,-1,9505,-1,-1,0,0]:sharedcds1:s
              haredcds1managedserver1 is non-clusterable, and you have tried to bind more than once from two or m
              ore servers. Such objects can only be deployed from one server.>
              Thanks
              Satish

    Yes you can. Make sure that domains configured to use different multicast address. WLS uses multicast for communications between nodes in domain.
              although your configuration will work, you could have troubles if you going to execute inter-domain calls between domains/servers with the same names.

  • Requesting license for two different ssystem with same SID

    Hello,
    Is it possible to request 2 license for two systems with same SID. The systems are on different machines and their HW key are different but both have same SID. While requesting license, will it permit to create 2 different license with SAME SID.
    Regards
    Deb

    Hi Anil,
    The one for which the license is already requested is the main development portal with SID EP2. I have installed one local version of SAP EP with the same SID EP2. Now we need a license for the second system.
    If we change the HW key of the original license which is already applied in the main development portal under SMP and apply for a new license for the new local version, can it have any future implications, if any.
    What is the best way to deal with the situation. Is there a full proof way to change the SID of the EP system, which I can try in the local EP system.
    Regards
    Deb

  • Distringuishing between 2 classes with same name

    Hi,
    I have just recently begun programming in Java on a software project with more than one programmer. On of my coworkers had us use the directory structure such that our packages are name with our domain backwards (ie, an example package is gov.lanl.gui). He was under the impression that by structuring things in this manner one would not have to worry about duplicate class names. So to test it he made a class called Point (knowing such a class existed in the Java API). When he tried to compile the code the compiler was confused as to which Point.java he wanted to use.
    Is there a way to reconcile this without having to make sure a class doesn't already exist with the same name?
    thanks,
    Keri

    I am confused by the statement:
    When he tried to compile the code the compiler
    was confused as to which Point.java he wanted to use.Why would there be more than one Point.java on his workstation? Did he extract the src.jar to his local file system? Please post the actual compiler error.
    He is correct that the package structure allows for two different classes to have the same name. If you import java.util.* and java.sql.* into a class and then try to reference the Date class you will get a complier error. This is because there is a java.util.Date class and also a java.sql.Date class. This is one of the reasons that you shouldn't usually import an entire package. Another is that it can make complilation really slow. If you have to import both classes you can do so using the entire package structure in front of the class name e.g.
    java.util.Date utilDate;
    java.sql.Date sqlDate;

  • Are Multiple Classes with Same name in a single Class valid ?

    package inheritance;
    interface Foo
         int bar();
    public class Inh6 {
         class A implements Foo  // THis is the first class
              public int bar()
                   return 1;
         public int fubar(Foo foo)
              return foo.bar();     
         public void testFoo()
              class A implements Foo // THis is the second class
                   public int bar()
                        return 2;
              System.out.println(fubar(new A()));
         public void testFooModified()
              class A implements Foo // THis is the first class
                   public int bar()
                        return 4;
              System.out.println(fubar(new A()));
         public static void main(String[] args) {
              new Inh6().testFoo();
              new Inh6().testFooModified();
    O/P :
    2
    4My question is this class "A" which is present in the different methods like testFoo() and testFooModified() different declarations of the same class or altogether different classes local to each method,something like err...Local Class ?
    Thanks in Advance.

    kajbj wrote:
    My question is this class "A" which is present in the different methods like testFoo() and testFooModified() different declarations of the same class Why would it be the same class? They have different scopes.
    KajSo you mean to say they are actually different classes with the same name,which will be invisible out of the respective methods in which they are defined ?
    Thanks.

  • Problem when importing two photo galleries with the same name. Please Help!

    Hi Guys,
    I'm not a pro in dreamweaver so I would appreciate if your answer wouldn't be too technical...
    Anyway I have experienced a problem. Heres the sotory, I have been making a websie in DW and used Adobe Bridge CS5 to create a photo gallery SWF file that I would use for my website. The problem is that I want to use two different photo galleries on two different pages however when I save my second photo gallery in bridge, it saves every file with the exact name as the first photo gallery I created and is working fine... Thus when I try to import the photo gallery files into my website folder structure, I find that it asks me to rename them because the files from the first photo gallery are called the exact same names.. Now obviously when I try to rename them dreamweaver gets confused and goes to the wrong folder and uses the images from my first photo gallery in the second one.
    So I guess my question is how can I organize my folder structure to be able to import multiple galleries without dreamweaver getting confused because bridge names all the files the same. Or how could I save the files through bridge so that they have different names and will work fine when I import into DW...
    Thanks and sorry for the essay,
    Patrick

    #1 You cannot have two files / folders or galleries with the same name.  Redo your image Galleries with different names.
    #2 SWF (flash) is not visible to iPhone, iPad, iTouch, Android or other web devices that don't support Flash Player.  These users will see nothing.  You might wish to explore other photo gallery / slideshow options that rely on jQuery instead of Flash technology.  Some links below.  A Google search will reveal many others.
    jQuery WOW Slider
    http://wowslider.com/
    jQuery Cycle
    http://www.malsup.com/jquery/cycle2/
    jQuery Nivo Slider
    http://dev7studios.com/nivo-slider/
    Nancy O.

  • How to work with two different backend with same MI Server and war file

    Hi All,
    We have a requirement that we need to work with one Middleware for two backends. For that we had to copy MAM30 sync bo's to zsync BO'S with the name ZMAM30. Now both sync BO'S will point to different backends.
    I have a standard war file which was working well with standards sync bo's. Now to work on zsync bo's what all the changes do I have to do in the standard war file(code).
    As per my knowledge we have a file called "syncbonamelist.properties" which maps the sync bo keys. Also there is another file called "mapping.xml" file which maps the package name with BO name.
    Can any body please tell me, are there any other files needed to be change like "meRepMeta.xml", other than any existing code like java objects are also needed to be changed.
    Your help in this regard is highly appreciable.
    Regards
    Murthy

    Hi Murthy,
    I try to get my head around the question:WHY?
    The reason for my question is, that this influences the answer!
    Because of several reasons it is NOT possible to handle MAM and zMAM Bos at the SAME TIME on the SAME MACHINE in the way you describe it - and it makes no sence to do so at all! But anyway......
    Lets say you have two backends, cause you have two different areas of the company. But both want to use the same MI server - but the client should be independend.
    So you need two apps. One uses the MAM BOs and the second one uses the zMAMBos.
    If this is the case, dev should be straight forward I think and you solution should work already......... so I ask myself, what is the problem you have? Do you get an error?
    - First create a new MEREPMETA-XML with just the zMAMBOs instead of the MAM BOs.
    - Change the two files you mentioned above.
    This should be all then.
    If you have a look into the implementation for MAM001Impl for example, there you find a line like:
         private static final String SYNC_BO_NAME
              = ResourceBundle.getBundle("com.sap.mbs.mam.bo.impl.syncbonamelist").getString("MAM30_040");
    This takes the name from the properties file and maps it to the real BO. So changing the name in the property file to
    MAM30_040 = zMAM30_040
    will result in MAM uses the zMAM BOs.
    Be aware: after you place the WAR file in the WEBAPPS folder and do a restart to deploy the file, you need to do a data reset to make sure the new MEREPMETA.XML is read.
    AND: two apps! one for MAM and one for zMAM BOs. One APP is not possible! Cause if you have something like that in the properties file:
    MAM30_040 = MAM30_040
    MAM30_040 = zMAM30_040
    if will only take the first reading.
    But I think this is clear to you anyway
    Regards,
    Oliver

  • Different cpuspeednw on two different hosts with same cpu config. Why?

    Hi,
    there are two hosts.
    They are different, but have same CPU configuration (I guess it from the output below).
    Host1: Solaris 10, 4 cpu, 4 core in each cpu.
    psrinfo -v
    Status of virtual processor 0 as of: 03/04/2010 08:57:45
    on-line since 12/25/2009 11:03:23.
    The i386 processor operates at 2133 MHz,
    and has an i387 compatible floating point processor.
    Status of virtual processor 15 as of: 03/04/2010 08:57:45
    on-line since 12/25/2009 11:03:25.
    The i386 processor operates at 2133 MHz,
    and has an i387 compatible floating point processor.
    Host2: CentOS 5.3. Also 4 cpu, 4 cores in each spu
    cat /proc/cpuinfo
    processor : 0
    vendor_id : GenuineIntel
    cpu family : 6
    model : 15
    model name : Intel(R) Xeon(R) CPU E7320 @ 2.13GHz
    stepping : 11
    cpu MHz : 2133.413[b]
    cache size : 2048 KB
    physical id : 0
    siblings : 4
    core id : 0
    cpu cores : 4
    apicid : 0
    fpu : yes
    fpu_exception : yes
    cpuid level : 10
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca c
    mov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constan
    t_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
    bogomips : 4270.09
    clflush size : 64
    cache_alignment : 64
    address sizes : 40 bits physical, 48 bits virtual
    processor : 15
    vendor_id : GenuineIntel
    cpu family : 6
    model : 15
    model name : Intel(R) Xeon(R) CPU E7320 @ 2.13GHz
    stepping : 11
    cpu MHz : [b]2133.413
    cache size : 2048 KB
    physical id : 6
    siblings : 4
    core id : 3
    cpu cores : 4
    apicid : 27
    fpu : yes
    fpu_exception : yes
    cpuid level : 10
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
    bogomips : 4266.82
    clflush size : 64
    cache_alignment : 64
    address sizes : 40 bits physical, 48 bits virtual
    QUESTION:
    Host1 (Solaris) has cpuspeednw = 700
    Host2 (CentOS) has cpuspeednw = 1700
    WHY?
    What should I do to find out why this is happening?
    Edited by: user10944480 on Mar 14, 2010 7:22 AM
    Edited by: user10944480 on Mar 14, 2010 7:24 AM

    user10944480 wrote:
    QUESTION:
    Host1 (Solaris) has cpuspeednw = 700
    Host2 (CentOS) has cpuspeednw = 1700
    WHY?
    What should I do to find out why this is happening?
    The CPUSPEEDNW is measured in "millions of Oracle operations per second" - but we don't know what "operation" Oracle is using for measuring. Since you have two difference operating systems, it's possible that the "operation" that Oracle uses is one that makes use of the "OSD" (operating system dependant) code and has a very different code path on the two machines that results in a very different speed of completion.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    There is a +"Preview"+ tab at the top of the text entry panel. Use this to check what your message will look like before you post the message. If it looks a complete mess you're unlikely to get a response. (Click on the +"Plain text"+ tab if you want to edit the text to tidy it up.)
    +"Science is more than a body of knowledge; it is a way of thinking"+
    +Carl Sagan+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Itunes places imported tracks in different albums with same name

    When I import a CD, itunes can't seem to keep these files in the same album if they happen to be by different artists.  I've tried manually editing the track information using the "get info" screen, but just can't get it.  The initial download places the tracks together, but after I use the "get track titles" option and download the track titles from Gracenote, I'm left with multiple albums, even though the albums show as having the same name.

    Generally all you need to do is fill in an appropriate Album Artist. For more details see my article on Grouping Tracks Into Albums, in particular the topic One album, too many covers.
    tt2

  • Same query takes different time for two different users with same privileges

    Hi,
    Just wanted to know if it is possible for an INSERT query to take different amount of time for two different users for the same volume of data. If so, what could be the reason? I would like to add that we are not executing the query simultaneously. But it is always faster for user1(within 10-20 seconds) and slower for user2(takes around 8-10 minutes).

    Show execution plan for each user. I think there is other reasons which you didn't not tell

  • Does alias exist to differentiate between 2 classes with same name?

    I have 2 classes (a domainmodel-class and a webpage-class) with the same name. Of course I get a naming-conflict when I want to reference the domainmodel-class from the webpage-class (because they have the same name).
    I was wondering if there's a language construct in java to import my domainmodel-class under a different name / alias in the webpage-class.
    Of course I could simply rename my webpage-class, but that has some impact which I'd rather avoid.
    Thanks,
    Geert-Jan

    gbrits wrote:
    I have 2 classes (a domainmodel-class and a webpage-class) with the same name. Of course I get a naming-conflict when I want to reference the domainmodel-class from the webpage-class (because they have the same name).
    I was wondering if there's a language construct in java to import my domainmodel-class under a different name / alias in the webpage-class.
    Of course I could simply rename my webpage-class, but that has some impact which I'd rather avoid.
    Thanks,
    Geert-JanNo, you can't do that. But one class can be imported, and the other one be used with fully qualified name all of the time.

  • Responding to two user events with same name

    LV 2013, Win 7, & LVRT 2013, PharLap OS
    I have a situation where I create an ARRAY of User Events, one for each "domain" .  
    A "domain" is an area of DAQ: there is a SCXI domain, a CDAQ domain, an EtherCAT domain, several domains dealing with TCP instruments etc., about 25 domains all told. The name of the event is "New Channels This Domain".
    When a new configuration comes to the PXI from the host, I sort out the channels by their domain and generate a user event for whichever domains have channels that have changed: more channels, fewer channels, differences. If a domain has no channels that have changed, I do not generate an event for it.
    There is a handler for each domain: in that handler, I pick out the event for this domain from the array, and register to receive it.  I have an event structure that responds to the NEW CHANNELS THIS DOMAIN event.  Since it is an array, then no matter which domain I select, the name of the array is "New Channels This Domain".
    All this works fine.
    Now I have a situation where it makes sense to have one handler for TWO domains.
    I can pick out TWO elements of the array just fine, and register them both.   (See attached pic)  But now, in the EDIT EVENTS FOR THIS CASE list, I have TWO events called "New Channels This Domain".  I can select one for one case, and the other for the other case and it seems to work.
    --- Is there any heartache ahead with this scheme?  
    --- If I change the events in the clusters before, is it going to confuse LabVIEW?  
    --- Is there something I can do to change the name of the event after I pick it out of the array?  
    --- Is there something I SHOULD do at that point?
    Like I said, it seems to work, but I'm leery of it staying that way - I've had event structures disturbed before (LV2010) when changing cluster order.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

    CoastalMaineBird wrote:
    Thanks, Greg for that link.  I gave kudos to the idea of the COERCE TO TYPE function, and it seems like it would do the trick, but as of LV2014 it's still not on the palette.
    My question still remains: is it necessary?  Will the event structure remember that it's supposed to use the SECOND event named "X", through all edits and recompiles?  My guess is no, but I'll listen to alternative stories.
    I've been using the Coerce to type for this and enums in versions 2011 through 2014 since learning about it.  I've seen no issue using it in these cases.  I'm guessing it doesn't behave in an expected way for extreame uses which is why NI doesn't release it yet.
    As for would it always know to go to the second event if they are named the same?  My guess is yes.  They maybe named the same but they have different references.  I would think it would be just like having two controls with the same label.  You should never do this, but if you did, and made a local variables on one and wrote to it, it would always write to the correct control.  It would never write to the different control with the same name.  Now even if this is the case it could be confusing to a developer looking at the code, which is why I strongly suggest having unique names.  But if you don't I suspect every thing would work fine, just have a bold comment or something explaining what each case actually is handling.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Can I have two Aperture projects with same name?

    Hi. I'm new to Aperture and an advanced iPhoto user. I started using Aperture sharing the same library with iPhoto (that new functionallity).
    I've read lots of manuals and tutorials (Apple's and others) as well as this support topics. I understand iPhoto Events are now Aperture Projects and I've read a lot about how should it be organized and so on.
    My problem is: I got, for example, 4 iPhoto Events with the name "Friends". The appear in Apperture as 4 Projects named "Friends". I decided to rename one of them and the I came back to "Friends" name. Aperture won't let me: it appends "(1)". It seems I cannot name to Projects the same way, although I have that.
    Before: Friends, Friends, Friends, Friends
    After renaming one of them and trying to get back to original name: Friends, Friends, Friends, Friends (1)
    I have that duplicated name because it is like a title, photos of my friends in different time (one Friends is from 2005, other from 2010, and so on, for example).
    It seems pretty bad I have to come up with a new name for each new Project, considering I have hundreds of them today. Any tips? Thanks.

    If there is nothing separating the images then put them all in the same project. If you have a project Friends you know all your friends images are in there and you can find the ones you want by date or keyword or even Face.
    There is no requirement to have the images from different times at the bar to be in different projects. I personally wouldn't work that way but if having a project called Friends at Bar works for you then place all the images of your friends at the bar in that project.
    Of course another way to look at this is to use albums to pull all the images of your Friends at Bars together. Don't have the name of the project organize your library, create albums and/or smart albums to collect the images into meaningful groupings.
    regards

Maybe you are looking for