All Downloads are FREE. Search and download functionalities are using the official Maven repository.

us.ihmc.scs2.definition.robot.urdf.items.URDFModel Maven / Gradle / Ivy

package us.ihmc.scs2.definition.robot.urdf.items;

import java.util.List;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name="robot")
public class URDFModel implements URDFItem
{
   private String name;
   private List materials;
   private List links;
   private List joints;
   private List gazebos;

   @XmlAttribute(name = "name")
   public void setName(String name)
   {
      this.name = name;
   }

   @XmlElement(name = "material")
   public void setMaterials(List materials)
   {
      this.materials = materials;
   }

   @XmlElement(name = "link")
   public void setLinks(List links)
   {
      this.links = links;
   }

   @XmlElement(name = "joint")
   public void setJoints(List joints)
   {
      this.joints = joints;
   }

   @XmlElement(name = "gazebo")
   public void setGazebos(List gazebos)
   {
      this.gazebos = gazebos;
   }

   public String getName()
   {
      return name;
   }

   public List getMaterials()
   {
      return materials;
   }

   public List getLinks()
   {
      return links;
   }

   public List getJoints()
   {
      return joints;
   }

   public List getGazebos()
   {
      return gazebos;
   }

   @Override
   public String getContentAsString()
   {
      return format("[name: %s, materials: %s, links: %s, joints: %s]", name, materials, links, joints);
   }

   @Override
   public String toString()
   {
      return itemToString();
   }

   @Override
   public List getFilenameHolders()
   {
      return URDFItem.combineItemListsFilenameHolders(materials, links, joints);
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy