/** Sets the URL string. This will be called from * DataEntryURLBox. */ protected void setURL(String url) { _urlProp = new Property ("URL", PropertyType.STRING, url); }
/** Returns a Property which describes the Box, for use * by Association boxes and perhaps others. */ protected Property getSelfPropDesc () { return new Property (DESCRIPTION_NAME, PropertyType.STRING, xmlData); }
/** Returns a Property which describes the Box, for use * by Association boxes and perhaps others. */ protected Property getSelfPropDesc () { return new Property (DESCRIPTION_NAME, PropertyType.STRING, _label); }
/** Returns a Property which describes the box. This is * used as a subproperty of the Property returned by * selfDescProperty. */ protected Property getSelfPropDesc (){ Property descProp; if (roiProp != null) { return new Property (DESCRIPTION_NAME, PropertyType.PROPERTY, roiProp); } return null; }
/** Returns a Property which describes the Box, for use * by Association boxes and perhaps others. */ protected Property getSelfPropDesc () { if (propArray != null) { return new Property (DESCRIPTION_NAME, PropertyType.PROPERTY, PropertyArity.ARRAY, propArray); } // A number list with no numbers isn't explicitly illegal return null; }
/** Standard IFD property header. */ protected Property propertyHeader(String type, List entries) { Property [] array = new Property [3]; array[0] = new Property("Offset", PropertyType.LONG, new Long(_offset)); array[1] = new Property("Type", PropertyType.STRING, type); array[2] = new Property("Entries", PropertyType.PROPERTY, PropertyArity.LIST, entries); return new Property("IFD", PropertyType.PROPERTY, PropertyArity.ARRAY, array); }
/** Make a Property from the association list. * Returns null if the list is empty. */ protected Property makeAssocProperty () { if (associations.isEmpty ()) { return null; } return new Property ("Associations", PropertyType.PROPERTY, PropertyArity.LIST, associations); }
private void addNisoProperties (List<Property> entries, boolean rawOutput) { entries.add (new Property ("NisoImageMetadata", PropertyType.NISOIMAGEMETADATA, _niso)); }
/** Adds the ListInfo property, which is a List of String Properties. */ public void addListInfo(List l) { _propList.add(new Property("ListInfo", PropertyType.PROPERTY, PropertyArity.LIST, l)); }
public Property loopProp (String name) { Property[] propArr = new Property[3]; propArr[0] = _module.addIntegerProperty("PlayMode", playMode, AiffStrings.LOOP_TYPE); propArr[1] = new Property ("BeginLoop", PropertyType.INTEGER, new Integer (beginLoop)); propArr[2] = new Property ("EndLoop", PropertyType.INTEGER, new Integer (endLoop)); return new Property (name, PropertyType.PROPERTY, PropertyArity.ARRAY, propArr); } }
protected Property addRationalArrayProperty(String name, Rational [] r, boolean rawOutput) { Property prop = null; if (!rawOutput) { String [] s = new String[r.length]; for (int i=0; i<r.length; i++) { s[i] = _format.format(r[i].toDouble()); } prop = new Property(name, PropertyType.STRING, PropertyArity.ARRAY, s); } if (prop == null) { prop = new Property(name, PropertyType.RATIONAL, PropertyArity.ARRAY, r); } return prop; }
/** Processes metadata from the CITE element. * This will require PCData, so we deposit the Property * temporarily in the Metadata. */ private static void processCite (HtmlMetadata mdata, Attributes atts) { Property p = new Property ("cite", PropertyType.STRING, ""); // store property with placeholder value mdata.setPropUnderConstruction (p); }
/** Get the IFD properties. */ public Property getProperty(boolean rawOutput) { List entries = new LinkedList(); entries.add (new Property("Index", PropertyType.STRING, _interoperabilityIndex)); return propertyHeader("Exif Interoperability", entries); }
/** Processes metadata from the TITLE element. * This will require PCData, so we deposit the Property * temporarily in the Metadata. */ private static void processTitle (HtmlMetadata mdata, Attributes atts) { Property p = new Property ("title", PropertyType.STRING, ""); // store property with placeholder value mdata.setPropUnderConstruction (p); }
/** Set a property indexed by component. * If a property for that component doesn't already * exist, it is created. <code>prop</code> is then * added to the property list of that property. */ public void setCompProperty (int idx, Property prop) { if (_components != null && _components.length > idx) { if (_components[idx] == null) { // Have to create the component property _components[idx] = new Property ("Component", PropertyType.PROPERTY, PropertyArity.LIST, new LinkedList ()); } List pList = (List) _components[idx].getValue (); pList.add (prop); } }
/** Reads a chunk and puts a BroadcastAudioExtension Property into * the RepInfo object. * * @return <code>false</code> if the chunk is structurally * invalid, otherwise <code>true</code> */ public boolean readChunk(RepInfo info) throws IOException { WaveModule module = (WaveModule) _module; byte[] bbuf = new byte[(int) bytesLeft]; ModuleBase.readByteBuf (_dstream, bbuf, _module); String xmlData = new String (bbuf); module.addWaveProperty (new Property ("XML", PropertyType.STRING, xmlData)); return true; } }
/** Reads a chunk and puts appropriate information into * the RepInfo object. * * This method works for TextChunk, CopyrightChunk and * AuthorChunk. AnnotationChunk overrides it, since there * can be multiple annotations. */ public boolean readChunk (RepInfo info) throws IOException { AiffModule module = (AiffModule) _module; String name = readText (); module.addAiffProperty (new Property (propName, PropertyType.STRING, name)); return true; }
/** Reads a chunk and adds an Annotation property to the * module's list of annotations. * * There can be multiple Annotation Chunks, so we don't * create a property here directly. * * @return <code>false</code> if the chunk is structurally * invalid, otherwise <code>true</code> */ public boolean readChunk(RepInfo info) throws IOException { String name = readText (); ((AiffModule) _module).addAnnotation (new Property (propName, PropertyType.STRING, name)); return true; }
/** * Processes a GZIP entry. * Extracts all the properties of the entry into a map, and puts this map on the list. * @param entry GZIP entry from GZIP reader * @throws EOFException if EOF occurs prematurely * @throws IOException if an IO error occurs while processing * @throws JhoveException if a serious problem needs to be reported */ protected void processEntry(GzipEntry entry) throws EOFException, IOException, JhoveException { GzipEntryProperties properties = new GzipEntryProperties(entry); Property p = new Property("Record", PropertyType.STRING, PropertyArity.MAP, properties.getProperties()); entryProperties.add(p); entry.close(); }