
java.fedora.client.objecteditor.DisseminatorsPane Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fcrepo-client Show documentation
Show all versions of fcrepo-client Show documentation
The Fedora Client is a Java Library that allows API access to a Fedora Repository. The client is typically one part of a full Fedora installation.
The newest version!
/*
* -----------------------------------------------------------------------------
*
* License and Copyright: The contents of this file are subject to the
* Apache License, Version 2.0 (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of
* the License at
* http://www.fedora-commons.org/licenses.
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
*
* The entire file consists of original code.
* Copyright © 2008 Fedora Commons, Inc.
*
Copyright © 2002-2007 The Rector and Visitors of the University of
* Virginia and Cornell University
* All rights reserved.
*
* -----------------------------------------------------------------------------
*/
package fedora.client.objecteditor;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
import javax.swing.*;
import org.apache.log4j.Logger;
import fedora.client.Administrator;
import fedora.client.actions.ViewObject;
import fedora.server.types.gen.DatastreamBindingMap;
import fedora.server.types.gen.Disseminator;
/**
* Shows a tabbed pane, one for each disseminator in the object.
*
* @author [email protected]
* @version $Id: DisseminatorsPane.java 5301 2006-12-05 05:44:57Z cwilper $
*/
public class DisseminatorsPane
extends JPanel
implements PotentiallyDirty, TabDrawer {
/** Logger for this class. */
private static final Logger LOG = Logger.getLogger(
DisseminatorsPane.class.getName());
private static final long serialVersionUID = 1L;
static ImageIcon newIcon=new ImageIcon(Administrator.cl.getResource("images/standard/general/New16.gif"));
private String m_pid;
private JTabbedPane m_tabbedPane;
private ObjectEditorFrame m_owner;
private DisseminatorPane[] m_disseminatorPanes;
private Map m_currentVersionMap;
public Map allBDefLabels;
/**
* Build the pane.
*/
public DisseminatorsPane(ObjectEditorFrame owner, String pid)
throws Exception {
m_pid=pid;
m_owner=owner;
m_currentVersionMap=new HashMap();
m_tabbedPane=new JTabbedPane(SwingConstants.LEFT);
allBDefLabels=Util.getBDefLabelMap();
Disseminator[] currentVersions=Administrator.APIM.
getDisseminators(pid, null, null);
if (currentVersions == null) currentVersions = new Disseminator[0];
m_disseminatorPanes=new DisseminatorPane[currentVersions.length];
for (int i=0; ii) {
newArray[x-1]=m_disseminatorPanes[x-1];
}
}
m_disseminatorPanes=newArray;
// then make sure dirtiness indicators are corrent
m_owner.indicateDirtiness();
}
public boolean isDirty() {
for (int i=0; i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy