Code example for Vector

Methods: firstElement, get

0
    @Override 
    public String toString() {
        if( this.type == TargetType.DIGITAL_OBJECT ) {
            return lookupFileName(digitalObjects.firstElement());
        } else if( this.type == TargetType.DIGITAL_OBJECT_PAIR ) {
            return lookupFileName(digitalObjects.firstElement())
            +" "+this.lookupFileName(digitalObjects.get(1));
        } else if( this.type == TargetType.SERVICE ) {
            return "Service"; 
        } else { 
            return "MeasurementTarget [digitalObjects=" + digitalObjects
                + ", type=" + type + "]";
        } 
    } 
     
    private String lookupFileName( String dobUri ) {
        DataHandler dh = DataHandlerImpl.findDataHandler();
        DigitalObjectRefBean dorb;
        try { 
            dorb = dh.get(dobUri);
        } catch (FileNotFoundException e) {