/** * Check if a property with this name already exists in the collection of custom properties * * @param name the name to check * @return whether a property with the given name exists in the custom properties */ public boolean contains(String name) { for(CTProperty p : props.getProperties().getPropertyList()) { if(p.getName().equals(name)) return true; } return false; }
/** * Retrieve the custom property with this name, or null if none exists. * * You will need to test the various isSetX methods to work out * what the type of the property is, before fetching the * appropriate value for it. * * @param name the name of the property to fetch * * @return the custom property with this name, or null if none exists */ public CTProperty getProperty(String name) { for(CTProperty p : props.getProperties().getPropertyList()) { if(p.getName().equals(name)) { return p; } } return null; } }
/** * Generate next id that uniquely relates a custom property * * @return next property id starting with 2 */ protected int nextPid() { int propid = 1; for(CTProperty p : props.getProperties().getPropertyList()) { if(p.getPid() > propid) propid = p.getPid(); } return propid + 1; }
props = document.getProperties().getCustomProperties().getUnderlyingProperties(); for (CTProperty property : props.getPropertyList()) { String val = "(not implemented!)";
/** * Check if a property with this name already exists in the collection of custom properties * * @param name the name to check * @return whether a property with the given name exists in the custom properties */ public boolean contains(String name) { for(CTProperty p : props.getProperties().getPropertyList()) { if(p.getName().equals(name)) return true; } return false; }
/** * Check if a property with this name already exists in the collection of custom properties * * @param name the name to check * @return whether a property with the given name exists in the custom properties */ public boolean contains(String name){ for(CTProperty p : props.getProperties().getPropertyList()){ if(p.getName().equals(name)) return true; } return false; } }
/** * Retrieve the custom property with this name, or null if none exists. * * You will need to test the various isSetX methods to work out * what the type of the property is, before fetching the * appropriate value for it. * * @param name the name of the property to fetch * * @return the custom property with this name, or null if none exists */ public CTProperty getProperty(String name) { for(CTProperty p : props.getProperties().getPropertyList()) { if(p.getName().equals(name)) { return p; } } return null; } }
/** * Generate next id that uniquely relates a custom property * * @return next property id starting with 2 */ protected int nextPid(){ int propid = 1; for(CTProperty p : props.getProperties().getPropertyList()){ if(p.getPid() > propid) propid = p.getPid(); } return propid + 1; }
/** * Generate next id that uniquely relates a custom property * * @return next property id starting with 2 */ protected int nextPid() { int propid = 1; for(CTProperty p : props.getProperties().getPropertyList()) { if(p.getPid() > propid) propid = p.getPid(); } return propid + 1; }
props = document.getProperties().getCustomProperties().getUnderlyingProperties(); for (CTProperty property : props.getPropertyList()) { String val = "(not implemented!)";
props = getDocument().getProperties().getCustomProperties().getUnderlyingProperties(); List<CTProperty> properties = props.getPropertyList(); for(CTProperty property : properties) { String val = "(not implemented!)";