public class Source extends Object
Source precisely describes the source of a ScorePartwise.
Within a given input file (or uri), perhaps composed of several sheet images, the relevant sheets are listed, each with the systems processed for the ScorePartwise instance at hand.
A sheet with no system processed (for example because it is made of text only), could explicitly appear but with an empty sequence of system numbers (this is recommended), or the sheet could not appear at all in this source structure.
In the following example, the ScorePartwise spans the first 3 sheets of the input file, with sheet #2 being "empty", and only the first system in sheet #3. Another ScorePartwise instance, typically representing a following movement, could start with the same sheet #3, but from system 2.
In MusicXML, such Source data is encoded using the miscellaneous element.
Using file:
<miscellaneous>
<miscellaneous-field name="source-file">D:\soft\scores\morphology\recordare\MozartTrio.png</miscellaneous-field>
<miscellaneous-field name="source-offset">4</miscellaneous-field>
<miscellaneous-field name="source-sheet-1">1 2</miscellaneous-field>
<miscellaneous-field name="source-sheet-2"></miscellaneous-field>
<miscellaneous-field name="source-sheet-3">1</miscellaneous-field>
</miscellaneous>
Using uri:
<miscellaneous>
<miscellaneous-field name="source-uri">file:///MozartTrio.png</miscellaneous-field>
<miscellaneous-field name="source-offset">4</miscellaneous-field>
<miscellaneous-field name="source-sheet-1">1 2</miscellaneous-field>
<miscellaneous-field name="source-sheet-2"></miscellaneous-field>
<miscellaneous-field name="source-sheet-3">1</miscellaneous-field>
</miscellaneous>
| Modifier and Type | Class and Description |
|---|---|
static class |
Source.SheetSystems
Describes which systems were processed in this sheet.
|
| Constructor and Description |
|---|
Source() |
| Modifier and Type | Method and Description |
|---|---|
static Source |
decode(ScorePartwise scorePartwise) |
void |
encode(ScorePartwise scorePartwise) |
String |
getFile() |
int |
getOffset() |
List<Source.SheetSystems> |
getSheets() |
URI |
getUri() |
void |
setFile(String file) |
void |
setOffset(int offset) |
void |
setUri(URI uri) |
String |
toString() |
public static Source decode(ScorePartwise scorePartwise)
public void encode(ScorePartwise scorePartwise)
public String getFile()
public int getOffset()
public List<Source.SheetSystems> getSheets()
public URI getUri()
public void setFile(String file)
file - the file to setpublic void setOffset(int offset)
offset - the offset to setpublic void setUri(URI uri)
uri - the uri to setCopyright © 2016 Audiveris Ltd. All rights reserved.