View Javadoc

1   /*
2    * Copyright (c) 2008, the JUNG Project and the Regents of the University
3    * of California
4    * All rights reserved.
5    *
6    * This software is open-source under the BSD license; see either
7    * "license.txt" or
8    * http://jung.sourceforge.net/license.txt for a description.
9    */
10  
11  package edu.uci.ics.jung.io.graphml;
12  
13  import java.util.ArrayList;
14  import java.util.List;
15  
16  /**
17   * Metadata structure for the 'hyperedge' GraphML element.
18   *
19   * @author Nathan Mittler - nathan.mittler@gmail.com
20   *
21   * @see "http://graphml.graphdrawing.org/specification.html"
22   */
23  public class HyperEdgeMetadata extends AbstractMetadata {
24  
25      private String id;
26      private String description;
27      private Object edge;
28      final private List<EndpointMetadata> endpoints = new ArrayList<EndpointMetadata>();
29      
30      public String getId() {
31          return id;
32      }
33  
34      public void setId(String id) {
35          this.id = id;
36      }
37  
38      public String getDescription() {
39          return description;
40      }
41  
42      public void setDescription(String description) {
43          this.description = description;
44      }
45  
46      public void addEndpoint( EndpointMetadata endpoint ) {
47          endpoints.add(endpoint);
48      }
49      
50      public List<EndpointMetadata> getEndpoints() {
51          return endpoints;
52      }
53  
54      public Object getEdge() {
55          return edge;
56      }
57  
58      public void setEdge(Object edge) {
59          this.edge = edge;
60      }
61  
62      public MetadataType getMetadataType() {
63          return MetadataType.HYPEREDGE;
64      }
65      
66  }