Skip to content

Commit

Permalink
Fixed javadocs errors (closes #94)
Browse files Browse the repository at this point in the history
  • Loading branch information
palemieux committed Nov 12, 2016
1 parent 1a44a9b commit f39b7fa
Show file tree
Hide file tree
Showing 49 changed files with 206 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
*/
public class KLVInputStream extends InputStream implements DataInput {

/**
* Possible byte ordering of a KLV packet
*/
public enum ByteOrder {
LITTLE_ENDIAN,
BIG_ENDIAN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
*/
package com.sandflow.smpte.klv.exceptions;

/**
* Exceptions raised when processing KLV packets
*/
public class KLVException extends Exception {

public static String MAX_LENGTH_EXCEEED = "Maximum in-memory KLV size exceeded.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@

package com.sandflow.smpte.klv.exceptions;

/**
* Raised when the length of a KLV triplet is not valid
*/
public class TripletLengthException extends RuntimeException {

public TripletLengthException() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,19 @@ public static RandomIndexPack fromTriplet(Triplet triplet) throws KLVException {
return pp;
}

/**
* @return Ordered array containing the offsets stored in the RIP
*/
public ArrayList<PartitionOffset> getOffsets() {
return offsets;
}

private final ArrayList<PartitionOffset> offsets = new ArrayList<>();

static public class PartitionOffset {
/**
* Represents one partition offset entry stored in the RIP
*/
static public class PartitionOffset {
private final long bodySID;
private final long offset;

Expand All @@ -103,10 +109,18 @@ public PartitionOffset(long bodySID, long offset) {
this.offset = offset;
}

/**
*
* @return Identifies the partition
*/
public long getBodySID() {
return bodySID;
}

/**
*
* @return Offset (in bytes) of the partition
*/
public long getOffset() {
return offset;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,17 @@ public QualifiedSymbol(String symbol, URI namespace) {
this.namespace = namespace;
}

/**
* @return Namespace component of the Qualified Symbol
*/
public String getSymbol() {
return symbol;
}

/**
*
* @return Namespace component of the Qualified Symbol
*/
public URI getNamespace() {
return namespace;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
package com.sandflow.smpte.register.exceptions;

/**
*
* @author Pierre-Anthony Lemieux ([email protected])
* Raised when two entries have identical ULs and/or symbols
*/
public class DuplicateEntryException extends Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
package com.sandflow.smpte.register.exceptions;

/**
*
* @author Pierre-Anthony Lemieux ([email protected])
* Raised when an entry is not valid
*/
public class InvalidEntryException extends Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@
*/
public class FragmentBuilder {

/**
* Defines all events raised by this class
*/
public static enum EventCodes {

/**
Expand Down Expand Up @@ -173,7 +176,10 @@ private EventCodes(Event.Severity severity) {
}

}


/**
* All events raised by this class are instances of this class
*/
public static class FragmentEvent extends com.sandflow.util.events.BasicEvent {

final String reason;
Expand Down Expand Up @@ -287,8 +293,8 @@ public FragmentBuilder(DefinitionResolver defresolver,
* Instantiates a FragmentBuilder
*
* @deprecated Replaced by
* {@link FragmentBuilder(DefinitionResolver, Map<UUID, Set>,
* AUIDNameResolver, EventHandler)}. This constructor does not allow the
* {@link #FragmentBuilder(com.sandflow.smpte.regxml.dict.DefinitionResolver, java.util.Map, com.sandflow.smpte.regxml.FragmentBuilder.AUIDNameResolver, com.sandflow.util.events.EventHandler)}.
* This constructor does not allow the
* caller to provide an event handler, and instead uses java.util.logging to
* output events.
*
Expand Down Expand Up @@ -332,8 +338,7 @@ public boolean handle(com.sandflow.util.events.Event evt) {
* Instantiates a FragmentBuilder.
*
* @deprecated Replaced by
* {@link FragmentBuilder(DefinitionResolver, Map<UUID, Set>,
* AUIDNameResolver, EventHandler)}. This constructor does not allow the
* {@link #FragmentBuilder(com.sandflow.smpte.regxml.dict.DefinitionResolver, java.util.Map, com.sandflow.smpte.regxml.FragmentBuilder.AUIDNameResolver, com.sandflow.util.events.EventHandler) }. This constructor does not allow the
* caller to provide an event handler, and instead uses java.util.logging to
* output events.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public class MXFFragmentBuilder {
private static final UL PREFACE_KEY
= UL.fromURN("urn:smpte:ul:060e2b34.027f0101.0d010101.01012f00");

/**
* Defines all events raised by this class
*/
public static enum EventCodes {

/**
Expand Down Expand Up @@ -97,7 +100,10 @@ private EventCodes(Event.Severity severity) {
}

}


/**
* All events raised by this class are instance of this class
*/
public static class MXFEvent extends BasicEvent {

public MXFEvent(EventCodes kind, String message) {
Expand Down Expand Up @@ -130,8 +136,7 @@ static void handleEvent(EventHandler handler, com.sandflow.util.events.Event evt
}

/**
* @deprecated Replaced by {@link fromInputStreamfromInputStream(InputStream,DefinitionResolver,
* FragmentBuilder.AUIDNameResolver,UL,Document)}. This constructor does not allow the
* @deprecated Replaced by {@link #fromInputStream(java.io.InputStream, com.sandflow.smpte.regxml.dict.DefinitionResolver, com.sandflow.smpte.regxml.FragmentBuilder.AUIDNameResolver, com.sandflow.util.events.EventHandler, com.sandflow.smpte.util.UL, org.w3c.dom.Document) }. This constructor does not allow the
* caller to provide an event handler, and instead uses java.util.logging to
* output events.
*
Expand Down Expand Up @@ -160,8 +165,10 @@ public static DocumentFragment fromInputStream(InputStream mxfpartition,
}

/**
* @deprecated Replaced by {@link fromInputStreamfromInputStream(InputStream,DefinitionResolver,
* FragmentBuilder.AUIDNameResolver,UL,Document)}. This constructor does not allow the
* @deprecated Replaced by {@link #fromInputStream(java.io.InputStream, com.sandflow.smpte.regxml.dict.DefinitionResolver,
* com.sandflow.smpte.regxml.FragmentBuilder.AUIDNameResolver, com.sandflow.util.events.EventHandler,
* com.sandflow.smpte.util.UL, org.w3c.dom.Document)}
* This constructor does not allow the
* caller to provide an event handler, and instead uses java.util.logging to
* output events.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ public class XMLSchemaBuilder {
private final NamespacePrefixMapper prefixes = new NamespacePrefixMapper();
private final EventHandler evthandler;

/**
* Defines the events returned by this class
*/
public static enum EventCodes {

/**
Expand All @@ -114,6 +117,9 @@ private EventCodes(Event.Severity severity) {

}

/**
* All events raised by this class are instances of this class.
*/
public static class SchemaEvent extends BasicEvent {

final String reason;
Expand Down Expand Up @@ -189,7 +195,7 @@ public XMLSchemaBuilder(DefinitionResolver resolver, EventHandler handler) {
* any metadictionary covered by the resolver.
*
* @deprecated Replaced by
* {@link XMLSchemaBuilder(DefinitionResolver resolver, EventHandler handler)}
* {@link #XMLSchemaBuilder(com.sandflow.smpte.regxml.dict.DefinitionResolver, com.sandflow.util.events.EventHandler) }
* This constructor does not allow the caller to provide an event handler,
* and instead uses java.util.logging to output events.
*
Expand Down Expand Up @@ -240,7 +246,6 @@ private String createQName(URI uri, String name) {
* @throws com.sandflow.smpte.regxml.XMLSchemaBuilder.RuleException
* @throws org.xml.sax.SAXException
* @throws java.io.IOException
* @throws java.net.URISyntaxException
*/
public Document fromDictionary(MetaDictionary dict) throws ParserConfigurationException, KLVException, RuleException, SAXException, IOException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,23 @@ public void add(Definition def) throws IllegalDefinitionException {
this.definitions.add(def);
}

/**
* @return SchemeID field of the MetaDictionay
*/
public UUID getSchemeID() {
return schemeID;
}

/**
* @return SchemeURI field of the MetaDictionay
*/
public URI getSchemeURI() {
return schemeURI;
}

/**
* @return Description field of the MetaDictionay
*/
public String getDescription() {
return description;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;

/**
* Character Type Definition as defined in ST 2001-1
*/
@XmlAccessorType(XmlAccessType.NONE)
public class CharacterTypeDefinition extends Definition {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
* Class Definition as defined in ST 2001-1
*/
@XmlAccessorType(XmlAccessType.NONE)
public class ClassDefinition extends Definition {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ public void setName(String name) {
* Supports the visitor design pattern.
* @see DefinitionVisitor
* @param visitor Visitor instance that will process the definition
* @throws com.sandflow.smpte.regxml.dict.definitions.DefinitionVisitor.VisitorException
*/
abstract public void accept(DefinitionVisitor visitor) throws DefinitionVisitor.VisitorException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@
import org.w3c.dom.Document;
import static org.w3c.dom.Node.ELEMENT_NODE;

/**
* Enumeration Type Definition as defined in ST 2001-1
*/
@XmlAccessorType(XmlAccessType.NONE)
public class EnumerationTypeDefinition extends Definition {

private static class EnumerationElementAdapter extends XmlAdapter<Object, ArrayList<Element>> {

@Override
public ArrayList<Element> unmarshal(Object v) throws Exception {

ArrayList<Element> al = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
* Extendible Type Definition as defined in ST 2001-1
*/
@XmlAccessorType(XmlAccessType.NONE)
public class ExtendibleEnumerationTypeDefinition extends Definition {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
* Fixed Array Type Definition as defined in ST 2001-1
*/
@XmlAccessorType(XmlAccessType.NONE)
public class FixedArrayTypeDefinition extends Definition {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;

/**
* Float Type Definition as defined in ST 2001-1
*/
@XmlAccessorType(XmlAccessType.NONE)
public class FloatTypeDefinition extends Definition {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;

/**
* Indirect Type Definition as defined in ST 2001-1
*/
@XmlAccessorType(XmlAccessType.NONE)
public class IndirectTypeDefinition extends Definition {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;

/**
* Integer Type Definition as defined in ST 2001-1
*/
@XmlAccessorType(XmlAccessType.NONE)
public class IntegerTypeDefinition extends Definition {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import javax.xml.bind.annotation.XmlAccessorType;

/**
* Corresponds to a type defined in RDD 18 and erroneously added to Class 13.
* Corresponds to a type defined in RDD 18.
* @deprecated
*/
@XmlAccessorType(XmlAccessType.NONE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;

/**
* Opaque Type Definition as defined in ST 2001-1
*/
@XmlAccessorType(XmlAccessType.NONE)
public class OpaqueTypeDefinition extends Definition {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
* Property Alias Definition as defined in ST 2001-1
*/
@XmlAccessorType(XmlAccessType.NONE)
public class PropertyAliasDefinition extends PropertyDefinition {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
* Property Definition as defined in ST 2001-1
*/
@XmlAccessorType(XmlAccessType.NONE)
public class PropertyDefinition extends Definition {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
import org.w3c.dom.Document;
import static org.w3c.dom.Node.ELEMENT_NODE;

/**
* Record Type Definition as defined in ST 2001-1
*/
@XmlAccessorType(XmlAccessType.NONE)
public class RecordTypeDefinition extends Definition {

Expand Down
Loading

0 comments on commit f39b7fa

Please sign in to comment.