mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-17 02:57:35 -05:00
Updates PlaylistManager to use faster jackson XML serialization.
Removes native xml.bind serialization for improved compatibility with Java 9. Global optimize imports on the entire project.
This commit is contained in:
3
.idea/compiler.xml
generated
3
.idea/compiler.xml
generated
@@ -1,9 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="CompilerConfiguration">
|
<component name="CompilerConfiguration">
|
||||||
<annotationProcessing>
|
|
||||||
<profile default="true" name="Default" enabled="true" />
|
|
||||||
</annotationProcessing>
|
|
||||||
<bytecodeTargetLevel>
|
<bytecodeTargetLevel>
|
||||||
<module name="sdr-trunk_main" target="1.8" />
|
<module name="sdr-trunk_main" target="1.8" />
|
||||||
<module name="sdr-trunk_test" target="1.8" />
|
<module name="sdr-trunk_test" target="1.8" />
|
||||||
|
|||||||
8
.idea/misc.xml
generated
8
.idea/misc.xml
generated
@@ -1,10 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<component name="PreferredVcsStorage">
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
<preferredVcsName>ApexVCS</preferredVcsName>
|
|
||||||
</component>
|
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="9-ea" project-jdk-type="JavaSDK">
|
|
||||||
<output url="file://$PROJECT_DIR$/classes" />
|
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
2
.idea/vcs.xml
generated
2
.idea/vcs.xml
generated
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="" vcs="Git" />
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -53,7 +53,7 @@ dependencies {
|
|||||||
compile 'org.apache.mina:mina-http:2.0.16'
|
compile 'org.apache.mina:mina-http:2.0.16'
|
||||||
compile 'org.apache.axis:axis-jaxrpc:1.4'
|
compile 'org.apache.axis:axis-jaxrpc:1.4'
|
||||||
compile 'org.apache.axis:axis:1.4'
|
compile 'org.apache.axis:axis:1.4'
|
||||||
|
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.3'
|
||||||
}
|
}
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
task wrapper(type: Wrapper) {
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias;
|
package io.github.dsheirer.alias;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||||
import io.github.dsheirer.alias.action.AliasAction;
|
import io.github.dsheirer.alias.action.AliasAction;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
@@ -24,283 +27,184 @@ import io.github.dsheirer.alias.id.broadcast.BroadcastChannel;
|
|||||||
import io.github.dsheirer.alias.id.nonrecordable.NonRecordable;
|
import io.github.dsheirer.alias.id.nonrecordable.NonRecordable;
|
||||||
import io.github.dsheirer.alias.id.priority.Priority;
|
import io.github.dsheirer.alias.id.priority.Priority;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
|
||||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
|
||||||
import javax.xml.bind.annotation.XmlTransient;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
@XmlSeeAlso( { AliasID.class, AliasAction.class } )
|
@JacksonXmlRootElement(localName = "alias")
|
||||||
@XmlRootElement( name = "alias")
|
|
||||||
public class Alias
|
public class Alias
|
||||||
{
|
{
|
||||||
private String mList;
|
private String mList;
|
||||||
private String mGroup;
|
private String mGroup;
|
||||||
private String mName;
|
private String mName;
|
||||||
private int mColor;
|
private int mColor;
|
||||||
private String mIconName;
|
private String mIconName;
|
||||||
private List<AliasID> mAliasIDs = new ArrayList<AliasID>();
|
private List<AliasID> mAliasIDs = new ArrayList<AliasID>();
|
||||||
private List<AliasAction> mAliasActions = new ArrayList<AliasAction>();
|
private List<AliasAction> mAliasActions = new ArrayList<AliasAction>();
|
||||||
|
|
||||||
public Alias()
|
public Alias()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public Alias( String name )
|
public Alias(String name)
|
||||||
{
|
{
|
||||||
mName = name;
|
mName = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return getName();
|
return getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute( name="name" )
|
@JacksonXmlProperty(isAttribute = true, localName = "name")
|
||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
return mName;
|
return mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setName( String name )
|
public void setName(String name)
|
||||||
{
|
{
|
||||||
mName = name;
|
mName = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute( name="list" )
|
@JacksonXmlProperty(isAttribute = true, localName = "list")
|
||||||
public String getList()
|
public String getList()
|
||||||
{
|
{
|
||||||
return mList;
|
return mList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setList( String list )
|
public void setList(String list)
|
||||||
{
|
{
|
||||||
mList = list;
|
mList = list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasList()
|
public boolean hasList()
|
||||||
{
|
{
|
||||||
return mList != null;
|
return mList != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute( name="group" )
|
@JacksonXmlProperty(isAttribute = true, localName = "group")
|
||||||
public String getGroup()
|
public String getGroup()
|
||||||
{
|
{
|
||||||
return mGroup;
|
return mGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGroup( String group )
|
public void setGroup(String group)
|
||||||
{
|
{
|
||||||
mGroup = group;
|
mGroup = group;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasGroup()
|
public boolean hasGroup()
|
||||||
{
|
{
|
||||||
return mGroup != null;
|
return mGroup != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute
|
@JacksonXmlProperty(isAttribute = true, localName = "color")
|
||||||
public int getColor()
|
public int getColor()
|
||||||
{
|
{
|
||||||
return mColor;
|
return mColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setColor( int color )
|
public void setColor(int color)
|
||||||
{
|
{
|
||||||
mColor = color;
|
mColor = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Color getDisplayColor()
|
@JsonIgnore
|
||||||
{
|
public Color getDisplayColor()
|
||||||
return new Color( getColor() );
|
{
|
||||||
}
|
return new Color(getColor());
|
||||||
|
}
|
||||||
|
|
||||||
@XmlAttribute
|
@JacksonXmlProperty(isAttribute = true, localName = "iconName")
|
||||||
public String getIconName()
|
public String getIconName()
|
||||||
{
|
{
|
||||||
return mIconName;
|
return mIconName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIconName( String iconName )
|
public void setIconName(String iconName)
|
||||||
{
|
{
|
||||||
mIconName = iconName;
|
mIconName = iconName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlElement( name="id" )
|
@JacksonXmlProperty(isAttribute = false, localName = "id")
|
||||||
public List<AliasID> getId()
|
public List<AliasID> getId()
|
||||||
{
|
{
|
||||||
return mAliasIDs;
|
return mAliasIDs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId( ArrayList<AliasID> id )
|
public void setId(ArrayList<AliasID> id)
|
||||||
{
|
{
|
||||||
mAliasIDs = id;
|
mAliasIDs = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addAliasID( AliasID id )
|
public void addAliasID(AliasID id)
|
||||||
{
|
{
|
||||||
mAliasIDs.add( id );
|
mAliasIDs.add(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeAliasID( AliasID id )
|
public void removeAliasID(AliasID id)
|
||||||
{
|
{
|
||||||
mAliasIDs.remove( id );
|
mAliasIDs.remove(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlElement( name="action" )
|
@JacksonXmlProperty(isAttribute = false, localName = "action")
|
||||||
public List<AliasAction> getAction()
|
public List<AliasAction> getAction()
|
||||||
{
|
{
|
||||||
return mAliasActions;
|
return mAliasActions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAction( List<AliasAction> actions )
|
public void setAction(List<AliasAction> actions)
|
||||||
{
|
{
|
||||||
mAliasActions = actions;
|
mAliasActions = actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addAliasAction( AliasAction action )
|
public void addAliasAction(AliasAction action)
|
||||||
{
|
{
|
||||||
mAliasActions.add( action );
|
mAliasActions.add(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeAliasAction( AliasAction action )
|
public void removeAliasAction(AliasAction action)
|
||||||
{
|
{
|
||||||
mAliasActions.remove( action );
|
mAliasActions.remove(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasActions()
|
public boolean hasActions()
|
||||||
{
|
{
|
||||||
return !mAliasActions.isEmpty();
|
return !mAliasActions.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Perform any validation/cleanup actions on this alias.
|
|
||||||
*/
|
|
||||||
public void validate()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Returns the priority level of this alias, if defined, or the default priority
|
|
||||||
*/
|
|
||||||
@XmlTransient
|
|
||||||
public int getCallPriority()
|
|
||||||
{
|
|
||||||
for( AliasID id: mAliasIDs )
|
|
||||||
{
|
|
||||||
if( id.getType() == AliasIDType.PRIORITY)
|
|
||||||
{
|
|
||||||
return ((Priority)id).getPriority();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Priority.DEFAULT_PRIORITY;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean hasCallPriority()
|
|
||||||
{
|
|
||||||
for( AliasID id: mAliasIDs )
|
|
||||||
{
|
|
||||||
if( id.getType() == AliasIDType.PRIORITY)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets or updates the call priority
|
|
||||||
*/
|
|
||||||
public void setCallPriority( int priority )
|
|
||||||
{
|
|
||||||
if( priority == Priority.DO_NOT_MONITOR ||
|
|
||||||
( Priority.MIN_PRIORITY <= priority && priority <= Priority.MAX_PRIORITY ) )
|
|
||||||
{
|
|
||||||
for( AliasID id: mAliasIDs )
|
|
||||||
{
|
|
||||||
if( id.getType() == AliasIDType.PRIORITY)
|
|
||||||
{
|
|
||||||
((Priority)id).setPriority( priority );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//If we don't find a priority id, create one
|
|
||||||
Priority p = new Priority();
|
|
||||||
p.setPriority( priority );
|
|
||||||
addAliasID( p );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Inspects the alias for a non-recordable alias id. Default is true;
|
|
||||||
*/
|
|
||||||
@XmlTransient
|
|
||||||
public boolean isRecordable()
|
|
||||||
{
|
|
||||||
for( AliasID id: getId() )
|
|
||||||
{
|
|
||||||
if( id.getType() == AliasIDType.NON_RECORDABLE)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets or removes the non-recordable alias ID for this alias.
|
|
||||||
*/
|
|
||||||
public void setRecordable( boolean recordable )
|
|
||||||
{
|
|
||||||
if( recordable )
|
|
||||||
{
|
|
||||||
AliasID toRemove = null;
|
|
||||||
|
|
||||||
for( AliasID id: getId() )
|
|
||||||
{
|
|
||||||
if( id.getType() == AliasIDType.NON_RECORDABLE)
|
|
||||||
{
|
|
||||||
toRemove = id;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if( toRemove != null )
|
|
||||||
{
|
|
||||||
removeAliasID( toRemove );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for( AliasID id: getId() )
|
|
||||||
{
|
|
||||||
if( id.getType() == AliasIDType.NON_RECORDABLE)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
addAliasID( new NonRecordable() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inspects the alias for broadcast channel/streamable alias ids. Default is false;
|
* Perform any validation/cleanup actions on this alias.
|
||||||
*/
|
*/
|
||||||
@XmlTransient
|
public void validate()
|
||||||
public boolean isStreamable()
|
|
||||||
{
|
{
|
||||||
for( AliasID id: getId() )
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the priority level of this alias, if defined, or the default priority
|
||||||
|
*/
|
||||||
|
@JsonIgnore
|
||||||
|
public int getCallPriority()
|
||||||
|
{
|
||||||
|
for(AliasID id : mAliasIDs)
|
||||||
{
|
{
|
||||||
if( id.getType() == AliasIDType.BROADCAST_CHANNEL)
|
if(id.getType() == AliasIDType.PRIORITY)
|
||||||
|
{
|
||||||
|
return ((Priority)id).getPriority();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Priority.DEFAULT_PRIORITY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasCallPriority()
|
||||||
|
{
|
||||||
|
for(AliasID id : mAliasIDs)
|
||||||
|
{
|
||||||
|
if(id.getType() == AliasIDType.PRIORITY)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -310,43 +214,138 @@ public class Alias
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of broadcast channels specified for this alias.
|
* Sets or updates the call priority
|
||||||
*/
|
*/
|
||||||
@XmlTransient
|
public void setCallPriority(int priority)
|
||||||
public Set<BroadcastChannel> getBroadcastChannels()
|
{
|
||||||
{
|
if(priority == Priority.DO_NOT_MONITOR ||
|
||||||
Set<BroadcastChannel> broadcastChannels = new TreeSet<>();
|
(Priority.MIN_PRIORITY <= priority && priority <= Priority.MAX_PRIORITY))
|
||||||
|
{
|
||||||
|
for(AliasID id : mAliasIDs)
|
||||||
|
{
|
||||||
|
if(id.getType() == AliasIDType.PRIORITY)
|
||||||
|
{
|
||||||
|
((Priority)id).setPriority(priority);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for(AliasID id: getId())
|
//If we don't find a priority id, create one
|
||||||
{
|
Priority p = new Priority();
|
||||||
if(id.getType() == AliasIDType.BROADCAST_CHANNEL)
|
p.setPriority(priority);
|
||||||
{
|
addAliasID(p);
|
||||||
broadcastChannels.add((BroadcastChannel)id);
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return broadcastChannels;
|
/**
|
||||||
}
|
* Inspects the alias for a non-recordable alias id. Default is true;
|
||||||
|
*/
|
||||||
|
@JsonIgnore
|
||||||
|
public boolean isRecordable()
|
||||||
|
{
|
||||||
|
for(AliasID id : getId())
|
||||||
|
{
|
||||||
|
if(id.getType() == AliasIDType.NON_RECORDABLE)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
return true;
|
||||||
* Indicates if this alias contains a broadcast channel alias id with the channel name.
|
}
|
||||||
*/
|
|
||||||
public boolean hasBroadcastChannel(String channel)
|
|
||||||
{
|
|
||||||
if(channel == null || channel.isEmpty())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(AliasID id: getId())
|
/**
|
||||||
{
|
* Sets or removes the non-recordable alias ID for this alias.
|
||||||
if(id.getType() == AliasIDType.BROADCAST_CHANNEL &&
|
*/
|
||||||
((BroadcastChannel)id).getChannelName().contentEquals(channel))
|
public void setRecordable(boolean recordable)
|
||||||
{
|
{
|
||||||
return true;
|
if(recordable)
|
||||||
}
|
{
|
||||||
}
|
AliasID toRemove = null;
|
||||||
|
|
||||||
return false;
|
for(AliasID id : getId())
|
||||||
}
|
{
|
||||||
|
if(id.getType() == AliasIDType.NON_RECORDABLE)
|
||||||
|
{
|
||||||
|
toRemove = id;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(toRemove != null)
|
||||||
|
{
|
||||||
|
removeAliasID(toRemove);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for(AliasID id : getId())
|
||||||
|
{
|
||||||
|
if(id.getType() == AliasIDType.NON_RECORDABLE)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
addAliasID(new NonRecordable());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inspects the alias for broadcast channel/streamable alias ids. Default is false;
|
||||||
|
*/
|
||||||
|
@JsonIgnore
|
||||||
|
public boolean isStreamable()
|
||||||
|
{
|
||||||
|
for(AliasID id : getId())
|
||||||
|
{
|
||||||
|
if(id.getType() == AliasIDType.BROADCAST_CHANNEL)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of broadcast channels specified for this alias.
|
||||||
|
*/
|
||||||
|
@JsonIgnore
|
||||||
|
public Set<BroadcastChannel> getBroadcastChannels()
|
||||||
|
{
|
||||||
|
Set<BroadcastChannel> broadcastChannels = new TreeSet<>();
|
||||||
|
|
||||||
|
for(AliasID id : getId())
|
||||||
|
{
|
||||||
|
if(id.getType() == AliasIDType.BROADCAST_CHANNEL)
|
||||||
|
{
|
||||||
|
broadcastChannels.add((BroadcastChannel)id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return broadcastChannels;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates if this alias contains a broadcast channel alias id with the channel name.
|
||||||
|
*/
|
||||||
|
public boolean hasBroadcastChannel(String channel)
|
||||||
|
{
|
||||||
|
if(channel == null || channel.isEmpty())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(AliasID id : getId())
|
||||||
|
{
|
||||||
|
if(id.getType() == AliasIDType.BROADCAST_CHANNEL &&
|
||||||
|
((BroadcastChannel)id).getChannelName().contentEquals(channel))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,12 +19,12 @@ package io.github.dsheirer.alias;
|
|||||||
|
|
||||||
import com.jidesoft.swing.JideTabbedPane;
|
import com.jidesoft.swing.JideTabbedPane;
|
||||||
import io.github.dsheirer.alias.action.AliasActionEditor;
|
import io.github.dsheirer.alias.action.AliasActionEditor;
|
||||||
|
import io.github.dsheirer.alias.id.AliasIdentifierEditor;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastModel;
|
import io.github.dsheirer.audio.broadcast.BroadcastModel;
|
||||||
import io.github.dsheirer.gui.editor.Editor;
|
import io.github.dsheirer.gui.editor.Editor;
|
||||||
import io.github.dsheirer.icon.IconManager;
|
import io.github.dsheirer.icon.IconManager;
|
||||||
import io.github.dsheirer.sample.Listener;
|
import io.github.dsheirer.sample.Listener;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import io.github.dsheirer.alias.id.AliasIdentifierEditor;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|||||||
@@ -17,31 +17,25 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias;
|
package io.github.dsheirer.alias;
|
||||||
|
|
||||||
import io.github.dsheirer.alias.action.AliasActionType;
|
|
||||||
import io.github.dsheirer.alias.action.clip.ClipAction;
|
|
||||||
import io.github.dsheirer.alias.id.broadcast.BroadcastChannel;
|
|
||||||
import io.github.dsheirer.alias.id.fleetsync.FleetsyncIDEditor;
|
|
||||||
import io.github.dsheirer.alias.id.lojack.LoJackIDEditor;
|
|
||||||
import io.github.dsheirer.alias.id.mdc.MDC1200ID;
|
|
||||||
import io.github.dsheirer.alias.id.priority.Priority;
|
|
||||||
import io.github.dsheirer.alias.id.siteID.SiteID;
|
|
||||||
import io.github.dsheirer.alias.id.uniqueID.UniqueIDEditor;
|
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastModel;
|
|
||||||
import io.github.dsheirer.gui.editor.Editor;
|
|
||||||
import io.github.dsheirer.gui.editor.EmptyEditor;
|
|
||||||
import io.github.dsheirer.alias.action.AliasAction;
|
import io.github.dsheirer.alias.action.AliasAction;
|
||||||
|
import io.github.dsheirer.alias.action.AliasActionType;
|
||||||
import io.github.dsheirer.alias.action.beep.BeepAction;
|
import io.github.dsheirer.alias.action.beep.BeepAction;
|
||||||
import io.github.dsheirer.alias.action.beep.BeepActionEditor;
|
import io.github.dsheirer.alias.action.beep.BeepActionEditor;
|
||||||
|
import io.github.dsheirer.alias.action.clip.ClipAction;
|
||||||
import io.github.dsheirer.alias.action.clip.ClipActionEditor;
|
import io.github.dsheirer.alias.action.clip.ClipActionEditor;
|
||||||
import io.github.dsheirer.alias.action.script.ScriptAction;
|
import io.github.dsheirer.alias.action.script.ScriptAction;
|
||||||
import io.github.dsheirer.alias.action.script.ScriptActionEditor;
|
import io.github.dsheirer.alias.action.script.ScriptActionEditor;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
|
import io.github.dsheirer.alias.id.broadcast.BroadcastChannel;
|
||||||
import io.github.dsheirer.alias.id.broadcast.BroadcastChannelEditor;
|
import io.github.dsheirer.alias.id.broadcast.BroadcastChannelEditor;
|
||||||
import io.github.dsheirer.alias.id.esn.ESNEditor;
|
import io.github.dsheirer.alias.id.esn.ESNEditor;
|
||||||
import io.github.dsheirer.alias.id.esn.Esn;
|
import io.github.dsheirer.alias.id.esn.Esn;
|
||||||
import io.github.dsheirer.alias.id.fleetsync.FleetsyncID;
|
import io.github.dsheirer.alias.id.fleetsync.FleetsyncID;
|
||||||
|
import io.github.dsheirer.alias.id.fleetsync.FleetsyncIDEditor;
|
||||||
import io.github.dsheirer.alias.id.lojack.LoJackFunctionAndID;
|
import io.github.dsheirer.alias.id.lojack.LoJackFunctionAndID;
|
||||||
|
import io.github.dsheirer.alias.id.lojack.LoJackIDEditor;
|
||||||
|
import io.github.dsheirer.alias.id.mdc.MDC1200ID;
|
||||||
import io.github.dsheirer.alias.id.mdc.MDC1200IDEditor;
|
import io.github.dsheirer.alias.id.mdc.MDC1200IDEditor;
|
||||||
import io.github.dsheirer.alias.id.mobileID.MINEditor;
|
import io.github.dsheirer.alias.id.mobileID.MINEditor;
|
||||||
import io.github.dsheirer.alias.id.mobileID.Min;
|
import io.github.dsheirer.alias.id.mobileID.Min;
|
||||||
@@ -49,13 +43,19 @@ import io.github.dsheirer.alias.id.mpt1327.MPT1327ID;
|
|||||||
import io.github.dsheirer.alias.id.mpt1327.MPT1327IDEditor;
|
import io.github.dsheirer.alias.id.mpt1327.MPT1327IDEditor;
|
||||||
import io.github.dsheirer.alias.id.nonrecordable.NonRecordable;
|
import io.github.dsheirer.alias.id.nonrecordable.NonRecordable;
|
||||||
import io.github.dsheirer.alias.id.nonrecordable.NonRecordableEditor;
|
import io.github.dsheirer.alias.id.nonrecordable.NonRecordableEditor;
|
||||||
|
import io.github.dsheirer.alias.id.priority.Priority;
|
||||||
import io.github.dsheirer.alias.id.priority.PriorityEditor;
|
import io.github.dsheirer.alias.id.priority.PriorityEditor;
|
||||||
|
import io.github.dsheirer.alias.id.siteID.SiteID;
|
||||||
import io.github.dsheirer.alias.id.siteID.SiteIDEditor;
|
import io.github.dsheirer.alias.id.siteID.SiteIDEditor;
|
||||||
import io.github.dsheirer.alias.id.status.StatusID;
|
import io.github.dsheirer.alias.id.status.StatusID;
|
||||||
import io.github.dsheirer.alias.id.status.StatusIDEditor;
|
import io.github.dsheirer.alias.id.status.StatusIDEditor;
|
||||||
import io.github.dsheirer.alias.id.talkgroup.TalkgroupID;
|
import io.github.dsheirer.alias.id.talkgroup.TalkgroupID;
|
||||||
import io.github.dsheirer.alias.id.talkgroup.TalkgroupIDEditor;
|
import io.github.dsheirer.alias.id.talkgroup.TalkgroupIDEditor;
|
||||||
import io.github.dsheirer.alias.id.uniqueID.UniqueID;
|
import io.github.dsheirer.alias.id.uniqueID.UniqueID;
|
||||||
|
import io.github.dsheirer.alias.id.uniqueID.UniqueIDEditor;
|
||||||
|
import io.github.dsheirer.audio.broadcast.BroadcastModel;
|
||||||
|
import io.github.dsheirer.gui.editor.Editor;
|
||||||
|
import io.github.dsheirer.gui.editor.EmptyEditor;
|
||||||
|
|
||||||
public class AliasFactory
|
public class AliasFactory
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias;
|
package io.github.dsheirer.alias;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.alias.id.WildcardID;
|
import io.github.dsheirer.alias.id.WildcardID;
|
||||||
import io.github.dsheirer.alias.id.esn.Esn;
|
import io.github.dsheirer.alias.id.esn.Esn;
|
||||||
@@ -35,7 +36,6 @@ import io.github.dsheirer.sample.Listener;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -625,7 +625,7 @@ public class AliasList implements Listener<AliasEvent>
|
|||||||
/**
|
/**
|
||||||
* Alias list name
|
* Alias list name
|
||||||
*/
|
*/
|
||||||
@XmlAttribute
|
@JacksonXmlProperty(isAttribute = true, localName = "name")
|
||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
return mName;
|
return mName;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package io.github.dsheirer.alias;
|
package io.github.dsheirer.alias;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
import io.github.dsheirer.alias.id.broadcast.BroadcastChannel;
|
import io.github.dsheirer.alias.id.broadcast.BroadcastChannel;
|
||||||
import io.github.dsheirer.alias.id.priority.Priority;
|
import io.github.dsheirer.alias.id.priority.Priority;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastModel;
|
import io.github.dsheirer.audio.broadcast.BroadcastModel;
|
||||||
@@ -11,7 +12,6 @@ import io.github.dsheirer.sample.Listener;
|
|||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.event.ChangeEvent;
|
import javax.swing.event.ChangeEvent;
|
||||||
|
|||||||
@@ -20,12 +20,12 @@ package io.github.dsheirer.alias;
|
|||||||
|
|
||||||
import io.github.dsheirer.alias.action.AliasAction;
|
import io.github.dsheirer.alias.action.AliasAction;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
import io.github.dsheirer.alias.id.broadcast.BroadcastChannel;
|
import io.github.dsheirer.alias.id.broadcast.BroadcastChannel;
|
||||||
import io.github.dsheirer.alias.id.priority.Priority;
|
import io.github.dsheirer.alias.id.priority.Priority;
|
||||||
import io.github.dsheirer.alias.id.talkgroup.TalkgroupID;
|
import io.github.dsheirer.alias.id.talkgroup.TalkgroupID;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -18,41 +18,48 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.action;
|
package io.github.dsheirer.alias.action;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||||
import io.github.dsheirer.alias.Alias;
|
import io.github.dsheirer.alias.Alias;
|
||||||
|
import io.github.dsheirer.alias.action.beep.BeepAction;
|
||||||
import io.github.dsheirer.alias.action.clip.ClipAction;
|
import io.github.dsheirer.alias.action.clip.ClipAction;
|
||||||
import io.github.dsheirer.alias.action.script.ScriptAction;
|
import io.github.dsheirer.alias.action.script.ScriptAction;
|
||||||
import io.github.dsheirer.message.Message;
|
import io.github.dsheirer.message.Message;
|
||||||
import io.github.dsheirer.alias.action.beep.BeepAction;
|
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
|
||||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
|
||||||
import javax.xml.bind.annotation.XmlTransient;
|
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Alias action defines an action to execute when an alias is detected active.
|
* Alias action defines an action to execute when an alias is detected active.
|
||||||
*/
|
*/
|
||||||
@XmlSeeAlso( { BeepAction.class, ClipAction.class, ScriptAction.class } )
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
|
||||||
@XmlRootElement( name = "action" )
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = BeepAction.class, name="beepAction"),
|
||||||
|
@JsonSubTypes.Type(value = ClipAction.class, name = "clipAction"),
|
||||||
|
@JsonSubTypes.Type(value = RecurringAction.class, name = "recurringAction"),
|
||||||
|
@JsonSubTypes.Type(value = ScriptAction.class, name = "scriptAction")
|
||||||
|
})
|
||||||
|
@JacksonXmlRootElement(localName = "action")
|
||||||
public abstract class AliasAction
|
public abstract class AliasAction
|
||||||
{
|
{
|
||||||
public AliasAction()
|
public AliasAction()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
public abstract AliasActionType getType();
|
public abstract AliasActionType getType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Task to execute when an alias action is defined. The message argument is
|
* Task to execute when an alias action is defined. The message argument is
|
||||||
* the original message containing one or more aliases that have an alias
|
* the original message containing one or more aliases that have an alias
|
||||||
* action attached. The alias argument is the parent alias containing the
|
* action attached. The alias argument is the parent alias containing the
|
||||||
* alias action.
|
* alias action.
|
||||||
*/
|
*/
|
||||||
public abstract void execute(ScheduledExecutorService scheduledExecutorService, Alias alias, Message message );
|
public abstract void execute(ScheduledExecutorService scheduledExecutorService, Alias alias, Message message);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dismiss a persistent alias action
|
* Dismiss a persistent alias action
|
||||||
*/
|
*/
|
||||||
public abstract void dismiss( boolean reset );
|
public abstract void dismiss(boolean reset);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,13 +18,13 @@
|
|||||||
package io.github.dsheirer.alias.action;
|
package io.github.dsheirer.alias.action;
|
||||||
|
|
||||||
import io.github.dsheirer.alias.Alias;
|
import io.github.dsheirer.alias.Alias;
|
||||||
import io.github.dsheirer.gui.editor.Editor;
|
|
||||||
import io.github.dsheirer.gui.editor.EmptyEditor;
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
|
||||||
import io.github.dsheirer.alias.AliasEvent;
|
import io.github.dsheirer.alias.AliasEvent;
|
||||||
import io.github.dsheirer.alias.AliasEvent.Event;
|
import io.github.dsheirer.alias.AliasEvent.Event;
|
||||||
import io.github.dsheirer.alias.AliasFactory;
|
import io.github.dsheirer.alias.AliasFactory;
|
||||||
import io.github.dsheirer.alias.AliasModel;
|
import io.github.dsheirer.alias.AliasModel;
|
||||||
|
import io.github.dsheirer.gui.editor.Editor;
|
||||||
|
import io.github.dsheirer.gui.editor.EmptyEditor;
|
||||||
|
import net.miginfocom.swing.MigLayout;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.event.ListSelectionEvent;
|
import javax.swing.event.ListSelectionEvent;
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package io.github.dsheirer.alias.action;
|
package io.github.dsheirer.alias.action;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.Alias;
|
import io.github.dsheirer.alias.Alias;
|
||||||
import io.github.dsheirer.message.Message;
|
import io.github.dsheirer.message.Message;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
import javax.xml.bind.annotation.XmlTransient;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
@@ -14,11 +14,11 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||||||
|
|
||||||
public abstract class RecurringAction extends AliasAction
|
public abstract class RecurringAction extends AliasAction
|
||||||
{
|
{
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
protected AtomicBoolean mRunning = new AtomicBoolean(false);
|
protected AtomicBoolean mRunning = new AtomicBoolean(false);
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
private ScheduledFuture<?> mPerpetualAction;
|
private ScheduledFuture<?> mPerpetualAction;
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
protected ScheduledExecutorService mScheduledExecutorService;
|
protected ScheduledExecutorService mScheduledExecutorService;
|
||||||
|
|
||||||
protected Interval mInterval = Interval.ONCE;
|
protected Interval mInterval = Interval.ONCE;
|
||||||
@@ -107,7 +107,7 @@ public abstract class RecurringAction extends AliasAction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute
|
@JacksonXmlProperty(isAttribute = true, localName = "period")
|
||||||
public int getPeriod()
|
public int getPeriod()
|
||||||
{
|
{
|
||||||
return mPeriod;
|
return mPeriod;
|
||||||
@@ -118,7 +118,7 @@ public abstract class RecurringAction extends AliasAction
|
|||||||
mPeriod = period;
|
mPeriod = period;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute
|
@JacksonXmlProperty(isAttribute = true, localName = "interval")
|
||||||
public Interval getInterval()
|
public Interval getInterval()
|
||||||
{
|
{
|
||||||
return mInterval;
|
return mInterval;
|
||||||
@@ -164,8 +164,8 @@ public abstract class RecurringAction extends AliasAction
|
|||||||
@Override
|
@Override
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
/* Don't use the performThreadedAction() method, since this is
|
/* Don't use the performThreadedAction() method, since this is
|
||||||
* already running in a separate thread */
|
* already running in a separate thread */
|
||||||
performAction(mAlias, mMessage);
|
performAction(mAlias, mMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package io.github.dsheirer.alias.action.beep;
|
package io.github.dsheirer.alias.action.beep;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.Alias;
|
import io.github.dsheirer.alias.Alias;
|
||||||
import io.github.dsheirer.alias.action.AliasActionType;
|
import io.github.dsheirer.alias.action.AliasActionType;
|
||||||
import io.github.dsheirer.alias.action.RecurringAction;
|
import io.github.dsheirer.alias.action.RecurringAction;
|
||||||
@@ -8,6 +9,7 @@ import io.github.dsheirer.message.Message;
|
|||||||
public class BeepAction extends RecurringAction
|
public class BeepAction extends RecurringAction
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
@Override
|
@Override
|
||||||
public AliasActionType getType()
|
public AliasActionType getType()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,107 +1,109 @@
|
|||||||
package io.github.dsheirer.alias.action.clip;
|
package io.github.dsheirer.alias.action.clip;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.Alias;
|
import io.github.dsheirer.alias.Alias;
|
||||||
import io.github.dsheirer.alias.action.AliasActionType;
|
import io.github.dsheirer.alias.action.AliasActionType;
|
||||||
|
import io.github.dsheirer.alias.action.RecurringAction;
|
||||||
import io.github.dsheirer.message.Message;
|
import io.github.dsheirer.message.Message;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.action.RecurringAction;
|
|
||||||
|
|
||||||
import javax.sound.sampled.AudioInputStream;
|
import javax.sound.sampled.AudioInputStream;
|
||||||
import javax.sound.sampled.AudioSystem;
|
import javax.sound.sampled.AudioSystem;
|
||||||
import javax.sound.sampled.Clip;
|
import javax.sound.sampled.Clip;
|
||||||
import javax.xml.bind.annotation.XmlTransient;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
public class ClipAction extends RecurringAction
|
public class ClipAction extends RecurringAction
|
||||||
{
|
{
|
||||||
private final static Logger mLog = LoggerFactory.getLogger( ClipAction.class );
|
private final static Logger mLog = LoggerFactory.getLogger(ClipAction.class);
|
||||||
|
|
||||||
private String mFilePath;
|
private String mFilePath;
|
||||||
|
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
private Clip mClip;
|
private Clip mClip;
|
||||||
|
|
||||||
public ClipAction()
|
public ClipAction()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
public AliasActionType getType()
|
@Override
|
||||||
{
|
public AliasActionType getType()
|
||||||
return AliasActionType.CLIP;
|
{
|
||||||
}
|
return AliasActionType.CLIP;
|
||||||
|
}
|
||||||
|
|
||||||
public String getPath()
|
public String getPath()
|
||||||
{
|
{
|
||||||
return mFilePath;
|
return mFilePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPath( String path )
|
public void setPath(String path)
|
||||||
{
|
{
|
||||||
mFilePath = path;
|
mFilePath = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void performAction(Alias alias, Message message )
|
public void performAction(Alias alias, Message message)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
play();
|
play();
|
||||||
}
|
}
|
||||||
catch( Exception e )
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
mLog.error( "Couldn't play audio clip", e );
|
mLog.error("Couldn't play audio clip", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void play() throws Exception
|
public void play() throws Exception
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if( mFilePath != null )
|
if(mFilePath != null)
|
||||||
{
|
{
|
||||||
if( mClip == null )
|
if(mClip == null)
|
||||||
{
|
{
|
||||||
mClip = AudioSystem.getClip();
|
mClip = AudioSystem.getClip();
|
||||||
|
|
||||||
AudioInputStream ais =
|
AudioInputStream ais =
|
||||||
AudioSystem.getAudioInputStream( new File( mFilePath ) );
|
AudioSystem.getAudioInputStream(new File(mFilePath));
|
||||||
|
|
||||||
mClip.open( ais );
|
mClip.open(ais);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( mClip.isRunning() )
|
if(mClip.isRunning())
|
||||||
{
|
{
|
||||||
mClip.stop();
|
mClip.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
mClip.setFramePosition( 0 );
|
mClip.setFramePosition(0);
|
||||||
|
|
||||||
mClip.start();
|
mClip.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( Exception e )
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
mClip = null;
|
mClip = null;
|
||||||
|
|
||||||
mLog.error( "Error playing sound clip [" + mFilePath + "] - " + e.getMessage() );
|
mLog.error("Error playing sound clip [" + mFilePath + "] - " + e.getMessage());
|
||||||
|
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
if( mFilePath == null )
|
if(mFilePath == null)
|
||||||
{
|
{
|
||||||
return "Play Clip";
|
return "Play Clip";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return "Play Clip: " + mFilePath;
|
return "Play Clip: " + mFilePath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,96 +1,98 @@
|
|||||||
package io.github.dsheirer.alias.action.script;
|
package io.github.dsheirer.alias.action.script;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.Alias;
|
import io.github.dsheirer.alias.Alias;
|
||||||
import io.github.dsheirer.alias.action.AliasActionType;
|
import io.github.dsheirer.alias.action.AliasActionType;
|
||||||
|
import io.github.dsheirer.alias.action.RecurringAction;
|
||||||
import io.github.dsheirer.message.Message;
|
import io.github.dsheirer.message.Message;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.action.RecurringAction;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
|
||||||
public class ScriptAction extends RecurringAction
|
public class ScriptAction extends RecurringAction
|
||||||
{
|
{
|
||||||
private final static Logger mLog = LoggerFactory.getLogger( ScriptAction.class );
|
private final static Logger mLog = LoggerFactory.getLogger(ScriptAction.class);
|
||||||
|
|
||||||
private String mScript;
|
private String mScript;
|
||||||
|
|
||||||
public ScriptAction()
|
public ScriptAction()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
public AliasActionType getType()
|
@Override
|
||||||
{
|
public AliasActionType getType()
|
||||||
return AliasActionType.SCRIPT;
|
{
|
||||||
}
|
return AliasActionType.SCRIPT;
|
||||||
|
}
|
||||||
|
|
||||||
public String getScript()
|
public String getScript()
|
||||||
{
|
{
|
||||||
return mScript;
|
return mScript;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setScript( String script )
|
public void setScript(String script)
|
||||||
{
|
{
|
||||||
mScript = script;
|
mScript = script;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void performAction(Alias alias, Message message )
|
public void performAction(Alias alias, Message message)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
play();
|
play();
|
||||||
}
|
}
|
||||||
catch( Exception e )
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
mLog.error( "Couldn't execute script [" + mScript + "]", e );
|
mLog.error("Couldn't execute script [" + mScript + "]", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void play() throws Exception
|
public void play() throws Exception
|
||||||
{
|
{
|
||||||
if( mScript != null )
|
if(mScript != null)
|
||||||
{
|
{
|
||||||
ProcessBuilder pb = new ProcessBuilder( mScript );
|
ProcessBuilder pb = new ProcessBuilder(mScript);
|
||||||
|
|
||||||
pb.redirectErrorStream( true );
|
pb.redirectErrorStream(true);
|
||||||
|
|
||||||
Process p = pb.start();
|
Process p = pb.start();
|
||||||
|
|
||||||
int exitCode = p.waitFor();
|
int exitCode = p.waitFor();
|
||||||
|
|
||||||
BufferedReader reader = new BufferedReader(
|
BufferedReader reader = new BufferedReader(
|
||||||
new InputStreamReader( p.getInputStream() ) );
|
new InputStreamReader(p.getInputStream()));
|
||||||
|
|
||||||
String line = "";
|
String line = "";
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
while( ( line = reader.readLine() ) != null )
|
while((line = reader.readLine()) != null)
|
||||||
{
|
{
|
||||||
sb.append(line + "\n");
|
sb.append(line + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if( exitCode != 0 )
|
if(exitCode != 0)
|
||||||
{
|
{
|
||||||
throw new RuntimeException( "Exit Code: " + exitCode +
|
throw new RuntimeException("Exit Code: " + exitCode +
|
||||||
" Console:" + sb.toString() );
|
" Console:" + sb.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
if( mScript == null )
|
if(mScript == null)
|
||||||
{
|
{
|
||||||
return "Run Script";
|
return "Run Script";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return "Run Script: " + mScript;
|
return "Run Script: " + mScript;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,10 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id;
|
package io.github.dsheirer.alias.id;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||||
import io.github.dsheirer.alias.id.broadcast.BroadcastChannel;
|
import io.github.dsheirer.alias.id.broadcast.BroadcastChannel;
|
||||||
import io.github.dsheirer.alias.id.esn.Esn;
|
import io.github.dsheirer.alias.id.esn.Esn;
|
||||||
import io.github.dsheirer.alias.id.fleetsync.FleetsyncID;
|
import io.github.dsheirer.alias.id.fleetsync.FleetsyncID;
|
||||||
@@ -30,28 +34,35 @@ import io.github.dsheirer.alias.id.siteID.SiteID;
|
|||||||
import io.github.dsheirer.alias.id.status.StatusID;
|
import io.github.dsheirer.alias.id.status.StatusID;
|
||||||
import io.github.dsheirer.alias.id.talkgroup.TalkgroupID;
|
import io.github.dsheirer.alias.id.talkgroup.TalkgroupID;
|
||||||
import io.github.dsheirer.alias.id.uniqueID.UniqueID;
|
import io.github.dsheirer.alias.id.uniqueID.UniqueID;
|
||||||
import io.github.dsheirer.playlist.version1.Group;
|
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include= JsonTypeInfo.As.PROPERTY, property="type")
|
||||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
@JsonSubTypes({
|
||||||
import javax.xml.bind.annotation.XmlTransient;
|
@JsonSubTypes.Type(value=BroadcastChannel.class, name="broadcastChannel"),
|
||||||
|
@JsonSubTypes.Type(value=Esn.class, name="esn"),
|
||||||
@SuppressWarnings( "deprecation" )
|
@JsonSubTypes.Type(value=FleetsyncID.class, name="fleetsyncID"),
|
||||||
@XmlSeeAlso( {BroadcastChannel.class, Esn.class, FleetsyncID.class, Group.class, LoJackFunctionAndID.class,
|
@JsonSubTypes.Type(value = LoJackFunctionAndID.class, name = "loJackFunctionAndID"),
|
||||||
MDC1200ID.class, Min.class, MPT1327ID.class, NonRecordable.class,
|
@JsonSubTypes.Type(value = MDC1200ID.class, name = "mdc1200ID"),
|
||||||
Priority.class, SiteID.class, StatusID.class, TalkgroupID.class,
|
@JsonSubTypes.Type(value = Min.class, name = "min"),
|
||||||
UniqueID.class } )
|
@JsonSubTypes.Type(value = MPT1327ID.class, name = "mpt1327ID"),
|
||||||
@XmlRootElement( name = "id" )
|
@JsonSubTypes.Type(value = NonRecordable.class, name = "nonRecordable"),
|
||||||
|
@JsonSubTypes.Type(value = Priority.class, name = "priority"),
|
||||||
|
@JsonSubTypes.Type(value = SiteID.class, name = "siteID"),
|
||||||
|
@JsonSubTypes.Type(value = StatusID.class, name = "statusID"),
|
||||||
|
@JsonSubTypes.Type(value = TalkgroupID.class, name = "talkgroupID"),
|
||||||
|
@JsonSubTypes.Type(value = UniqueID.class, name = "uniqueID")
|
||||||
|
})
|
||||||
|
@JacksonXmlRootElement( localName = "id" )
|
||||||
public abstract class AliasID
|
public abstract class AliasID
|
||||||
{
|
{
|
||||||
public AliasID()
|
public AliasID()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
public abstract AliasIDType getType();
|
public abstract AliasIDType getType();
|
||||||
|
|
||||||
public abstract boolean matches( AliasID id );
|
public abstract boolean matches( AliasID id );
|
||||||
|
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
public abstract boolean isValid();
|
public abstract boolean isValid();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,11 +18,10 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.broadcast;
|
package io.github.dsheirer.alias.id.broadcast;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
|
|
||||||
public class BroadcastChannel extends AliasID implements Comparable<BroadcastChannel>
|
public class BroadcastChannel extends AliasID implements Comparable<BroadcastChannel>
|
||||||
{
|
{
|
||||||
private String mChannelName;
|
private String mChannelName;
|
||||||
@@ -83,7 +82,7 @@ public class BroadcastChannel extends AliasID implements Comparable<BroadcastCha
|
|||||||
/**
|
/**
|
||||||
* Name of the broadcastAudio channel configuration
|
* Name of the broadcastAudio channel configuration
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "channel")
|
@JacksonXmlProperty(isAttribute = true, localName = "channel")
|
||||||
public String getChannelName()
|
public String getChannelName()
|
||||||
{
|
{
|
||||||
return mChannelName;
|
return mChannelName;
|
||||||
@@ -97,6 +96,7 @@ public class BroadcastChannel extends AliasID implements Comparable<BroadcastCha
|
|||||||
mChannelName = channel;
|
mChannelName = channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
@Override
|
@Override
|
||||||
public AliasIDType getType()
|
public AliasIDType getType()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,11 +18,11 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.broadcast;
|
package io.github.dsheirer.alias.id.broadcast;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastModel;
|
import io.github.dsheirer.audio.broadcast.BroadcastModel;
|
||||||
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.esn;
|
package io.github.dsheirer.alias.id.esn;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|||||||
@@ -17,11 +17,10 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.esn;
|
package io.github.dsheirer.alias.id.esn;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
|
|
||||||
public class Esn extends AliasID
|
public class Esn extends AliasID
|
||||||
{
|
{
|
||||||
private String mEsn;
|
private String mEsn;
|
||||||
@@ -30,7 +29,7 @@ public class Esn extends AliasID
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute
|
@JacksonXmlProperty(isAttribute = true, localName = "esn")
|
||||||
public String getEsn()
|
public String getEsn()
|
||||||
{
|
{
|
||||||
return mEsn;
|
return mEsn;
|
||||||
@@ -70,6 +69,7 @@ public class Esn extends AliasID
|
|||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
@Override
|
@Override
|
||||||
public AliasIDType getType()
|
public AliasIDType getType()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,12 +17,10 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.fleetsync;
|
package io.github.dsheirer.alias.id.fleetsync;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
|
|
||||||
|
|
||||||
public class FleetsyncID extends AliasID
|
public class FleetsyncID extends AliasID
|
||||||
{
|
{
|
||||||
private String mID;
|
private String mID;
|
||||||
@@ -31,7 +29,7 @@ public class FleetsyncID extends AliasID
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute
|
@JacksonXmlProperty(isAttribute = true, localName = "ident")
|
||||||
public String getIdent()
|
public String getIdent()
|
||||||
{
|
{
|
||||||
return mID;
|
return mID;
|
||||||
@@ -71,6 +69,7 @@ public class FleetsyncID extends AliasID
|
|||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
@Override
|
@Override
|
||||||
public AliasIDType getType()
|
public AliasIDType getType()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,11 +17,11 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.fleetsync;
|
package io.github.dsheirer.alias.id.fleetsync;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.text.MaskFormatter;
|
import javax.swing.text.MaskFormatter;
|
||||||
|
|||||||
@@ -18,121 +18,134 @@
|
|||||||
package io.github.dsheirer.alias.id.lojack;
|
package io.github.dsheirer.alias.id.lojack;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
import io.github.dsheirer.module.decode.lj1200.LJ1200Message;
|
import io.github.dsheirer.module.decode.lj1200.LJ1200Message;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
|
|
||||||
public class LoJackFunctionAndID extends AliasID
|
public class LoJackFunctionAndID extends AliasID
|
||||||
{
|
{
|
||||||
private LJ1200Message.Function mFunction = LJ1200Message.Function.F0_UNKNOWN;
|
private LJ1200Message.Function mFunction = LJ1200Message.Function.F0_UNKNOWN;
|
||||||
private String mID = "*****";
|
private String mID = "*****";
|
||||||
|
|
||||||
public LoJackFunctionAndID()
|
public LoJackFunctionAndID()
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlAttribute( name="id" )
|
|
||||||
public String getID()
|
|
||||||
{
|
|
||||||
return mID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setID( String id )
|
|
||||||
{
|
|
||||||
mID = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlAttribute( name="function" )
|
|
||||||
public LJ1200Message.Function getFunction()
|
|
||||||
{
|
|
||||||
return mFunction;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFunction( LJ1200Message.Function function )
|
|
||||||
{
|
|
||||||
mFunction = function;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isValid()
|
|
||||||
{
|
|
||||||
return mFunction != null && mID != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString()
|
|
||||||
{
|
|
||||||
return "LoJack FUNC: " + mFunction.getLabel() + " ID:" + ( mID == null ? "" : mID );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Indicates if the function and id combination match this alias id
|
|
||||||
*/
|
|
||||||
public boolean matches(LJ1200Message.Function function, String id )
|
|
||||||
{
|
|
||||||
return mFunction == function &&
|
|
||||||
mID != null &&
|
|
||||||
id != null &&
|
|
||||||
id.matches( mID.replace( "*", ".?" ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches( AliasID id )
|
|
||||||
{
|
{
|
||||||
boolean retVal = false;
|
|
||||||
|
|
||||||
if( mID != null && id instanceof LoJackFunctionAndID )
|
|
||||||
{
|
|
||||||
LoJackFunctionAndID otherLojack = (LoJackFunctionAndID)id;
|
|
||||||
|
|
||||||
if( otherLojack.getFunction() == mFunction )
|
|
||||||
{
|
|
||||||
//Create a pattern - replace * wildcards with regex single-char wildcard
|
|
||||||
String pattern = mID.replace( "*", ".?" );
|
|
||||||
|
|
||||||
retVal = otherLojack.getID().matches( pattern );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return retVal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@JacksonXmlProperty(isAttribute = true, localName = "id")
|
||||||
|
public String getID()
|
||||||
|
{
|
||||||
|
return mID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setID(String id)
|
||||||
|
{
|
||||||
|
mID = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "function")
|
||||||
|
public LJ1200Message.Function getFunction()
|
||||||
|
{
|
||||||
|
return mFunction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFunction(LJ1200Message.Function function)
|
||||||
|
{
|
||||||
|
mFunction = function;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid()
|
||||||
|
{
|
||||||
|
return mFunction != null && mID != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "LoJack FUNC: " + mFunction.getLabel() + " ID:" + (mID == null ? "" : mID);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates if the function and id combination match this alias id
|
||||||
|
*/
|
||||||
|
public boolean matches(LJ1200Message.Function function, String id)
|
||||||
|
{
|
||||||
|
return mFunction == function &&
|
||||||
|
mID != null &&
|
||||||
|
id != null &&
|
||||||
|
id.matches(mID.replace("*", ".?"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean matches(AliasID id)
|
||||||
|
{
|
||||||
|
boolean retVal = false;
|
||||||
|
|
||||||
|
if(mID != null && id instanceof LoJackFunctionAndID)
|
||||||
|
{
|
||||||
|
LoJackFunctionAndID otherLojack = (LoJackFunctionAndID)id;
|
||||||
|
|
||||||
|
if(otherLojack.getFunction() == mFunction)
|
||||||
|
{
|
||||||
|
//Create a pattern - replace * wildcards with regex single-char wildcard
|
||||||
|
String pattern = mID.replace("*", ".?");
|
||||||
|
|
||||||
|
retVal = otherLojack.getID().matches(pattern);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
|
@Override
|
||||||
public AliasIDType getType()
|
public AliasIDType getType()
|
||||||
{
|
{
|
||||||
return AliasIDType.LOJACK;
|
return AliasIDType.LOJACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode()
|
public int hashCode()
|
||||||
{
|
{
|
||||||
final int prime = 31;
|
final int prime = 31;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
result = prime * result
|
result = prime * result
|
||||||
+ ( ( mFunction == null ) ? 0 : mFunction.hashCode() );
|
+ ((mFunction == null) ? 0 : mFunction.hashCode());
|
||||||
result = prime * result + ( ( mID == null ) ? 0 : mID.hashCode() );
|
result = prime * result + ((mID == null) ? 0 : mID.hashCode());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals( Object obj )
|
public boolean equals(Object obj)
|
||||||
{
|
{
|
||||||
if ( this == obj )
|
if(this == obj)
|
||||||
return true;
|
{
|
||||||
if ( obj == null )
|
return true;
|
||||||
return false;
|
}
|
||||||
if ( getClass() != obj.getClass() )
|
if(obj == null)
|
||||||
return false;
|
{
|
||||||
LoJackFunctionAndID other = (LoJackFunctionAndID) obj;
|
return false;
|
||||||
if ( mFunction != other.mFunction )
|
}
|
||||||
return false;
|
if(getClass() != obj.getClass())
|
||||||
if ( mID == null )
|
{
|
||||||
{
|
return false;
|
||||||
if ( other.mID != null )
|
}
|
||||||
return false;
|
LoJackFunctionAndID other = (LoJackFunctionAndID)obj;
|
||||||
} else if ( !mID.equals( other.mID ) )
|
if(mFunction != other.mFunction)
|
||||||
return false;
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
if(mID == null)
|
||||||
|
{
|
||||||
|
if(other.mID != null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(!mID.equals(other.mID))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,11 +17,11 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.lojack;
|
package io.github.dsheirer.alias.id.lojack;
|
||||||
|
|
||||||
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
|
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
||||||
import io.github.dsheirer.module.decode.lj1200.LJ1200Message;
|
import io.github.dsheirer.module.decode.lj1200.LJ1200Message;
|
||||||
import io.github.dsheirer.module.decode.lj1200.LJ1200Message.Function;
|
import io.github.dsheirer.module.decode.lj1200.LJ1200Message.Function;
|
||||||
|
import net.miginfocom.swing.MigLayout;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.text.MaskFormatter;
|
import javax.swing.text.MaskFormatter;
|
||||||
|
|||||||
@@ -18,63 +18,62 @@
|
|||||||
package io.github.dsheirer.alias.id.mdc;
|
package io.github.dsheirer.alias.id.mdc;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
|
|
||||||
|
|
||||||
public class MDC1200ID extends AliasID
|
public class MDC1200ID extends AliasID
|
||||||
{
|
{
|
||||||
private String mID;
|
private String mID;
|
||||||
|
|
||||||
public MDC1200ID()
|
public MDC1200ID()
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
public String getIdent()
|
|
||||||
{
|
|
||||||
return mID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIdent( String ident )
|
|
||||||
{
|
|
||||||
mID = ident;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isValid()
|
|
||||||
{
|
|
||||||
return mID != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString()
|
|
||||||
{
|
|
||||||
return "MDC-1200: " + mID;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches( AliasID id )
|
|
||||||
{
|
{
|
||||||
boolean retVal = false;
|
|
||||||
|
|
||||||
if( mID != null && id instanceof MDC1200ID )
|
|
||||||
{
|
|
||||||
MDC1200ID tgid = (MDC1200ID)id;
|
|
||||||
|
|
||||||
//Create a pattern - replace * wildcards with regex single-char wildcard
|
|
||||||
String pattern = mID.replace( "*", ".?" );
|
|
||||||
|
|
||||||
retVal = tgid.getIdent().matches( pattern );
|
|
||||||
}
|
|
||||||
|
|
||||||
return retVal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@JacksonXmlProperty(isAttribute = true, localName = "ident")
|
||||||
|
public String getIdent()
|
||||||
|
{
|
||||||
|
return mID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdent(String ident)
|
||||||
|
{
|
||||||
|
mID = ident;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid()
|
||||||
|
{
|
||||||
|
return mID != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "MDC-1200: " + mID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean matches(AliasID id)
|
||||||
|
{
|
||||||
|
boolean retVal = false;
|
||||||
|
|
||||||
|
if(mID != null && id instanceof MDC1200ID)
|
||||||
|
{
|
||||||
|
MDC1200ID tgid = (MDC1200ID)id;
|
||||||
|
|
||||||
|
//Create a pattern - replace * wildcards with regex single-char wildcard
|
||||||
|
String pattern = mID.replace("*", ".?");
|
||||||
|
|
||||||
|
retVal = tgid.getIdent().matches(pattern);
|
||||||
|
}
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
|
@Override
|
||||||
public AliasIDType getType()
|
public AliasIDType getType()
|
||||||
{
|
{
|
||||||
return AliasIDType.MDC1200;
|
return AliasIDType.MDC1200;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.mdc;
|
package io.github.dsheirer.alias.id.mdc;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.text.MaskFormatter;
|
import javax.swing.text.MaskFormatter;
|
||||||
|
|||||||
@@ -18,65 +18,65 @@
|
|||||||
package io.github.dsheirer.alias.id.mobileID;
|
package io.github.dsheirer.alias.id.mobileID;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mobile ID Number
|
* Mobile ID Number
|
||||||
*/
|
*/
|
||||||
public class Min extends AliasID
|
public class Min extends AliasID
|
||||||
{
|
{
|
||||||
private String mMin;
|
private String mMin;
|
||||||
|
|
||||||
public Min()
|
public Min()
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
public String getMin()
|
|
||||||
{
|
|
||||||
return mMin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMin( String min )
|
|
||||||
{
|
|
||||||
mMin = min;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isValid()
|
|
||||||
{
|
|
||||||
return mMin != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString()
|
|
||||||
{
|
|
||||||
return "MIN: " + mMin;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches( AliasID id )
|
|
||||||
{
|
{
|
||||||
boolean retVal = false;
|
|
||||||
|
|
||||||
if( mMin != null && id instanceof Min )
|
|
||||||
{
|
|
||||||
Min min = (Min)id;
|
|
||||||
|
|
||||||
//Create a pattern - replace * wildcards with regex single-char wildcard
|
|
||||||
String pattern = mMin.replace( "*", ".?" );
|
|
||||||
|
|
||||||
retVal = min.getMin().matches( pattern );
|
|
||||||
}
|
|
||||||
|
|
||||||
return retVal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@JacksonXmlProperty(isAttribute = true, localName = "min")
|
||||||
|
public String getMin()
|
||||||
|
{
|
||||||
|
return mMin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMin(String min)
|
||||||
|
{
|
||||||
|
mMin = min;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid()
|
||||||
|
{
|
||||||
|
return mMin != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "MIN: " + mMin;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean matches(AliasID id)
|
||||||
|
{
|
||||||
|
boolean retVal = false;
|
||||||
|
|
||||||
|
if(mMin != null && id instanceof Min)
|
||||||
|
{
|
||||||
|
Min min = (Min)id;
|
||||||
|
|
||||||
|
//Create a pattern - replace * wildcards with regex single-char wildcard
|
||||||
|
String pattern = mMin.replace("*", ".?");
|
||||||
|
|
||||||
|
retVal = min.getMin().matches(pattern);
|
||||||
|
}
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
|
@Override
|
||||||
public AliasIDType getType()
|
public AliasIDType getType()
|
||||||
{
|
{
|
||||||
return AliasIDType.MIN;
|
return AliasIDType.MIN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,62 +18,62 @@
|
|||||||
package io.github.dsheirer.alias.id.mpt1327;
|
package io.github.dsheirer.alias.id.mpt1327;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
|
|
||||||
public class MPT1327ID extends AliasID
|
public class MPT1327ID extends AliasID
|
||||||
{
|
{
|
||||||
private String mID;
|
private String mID;
|
||||||
|
|
||||||
public MPT1327ID()
|
public MPT1327ID()
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
public String getIdent()
|
|
||||||
{
|
|
||||||
return mID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIdent( String ident )
|
|
||||||
{
|
|
||||||
mID = ident;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isValid()
|
|
||||||
{
|
|
||||||
return mID != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString()
|
|
||||||
{
|
|
||||||
return "MPT-1327: " + mID;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches( AliasID id )
|
|
||||||
{
|
{
|
||||||
boolean retVal = false;
|
|
||||||
|
|
||||||
if( mID != null && id instanceof MPT1327ID )
|
|
||||||
{
|
|
||||||
MPT1327ID tgid = (MPT1327ID)id;
|
|
||||||
|
|
||||||
//Create a pattern - replace * wildcards with regex single-char wildcard
|
|
||||||
String pattern = mID.replace( "*", ".?" );
|
|
||||||
|
|
||||||
retVal = tgid.getIdent().matches( pattern );
|
|
||||||
}
|
|
||||||
|
|
||||||
return retVal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@JacksonXmlProperty(isAttribute = true, localName = "ident")
|
||||||
|
public String getIdent()
|
||||||
|
{
|
||||||
|
return mID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdent(String ident)
|
||||||
|
{
|
||||||
|
mID = ident;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid()
|
||||||
|
{
|
||||||
|
return mID != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "MPT-1327: " + mID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean matches(AliasID id)
|
||||||
|
{
|
||||||
|
boolean retVal = false;
|
||||||
|
|
||||||
|
if(mID != null && id instanceof MPT1327ID)
|
||||||
|
{
|
||||||
|
MPT1327ID tgid = (MPT1327ID)id;
|
||||||
|
|
||||||
|
//Create a pattern - replace * wildcards with regex single-char wildcard
|
||||||
|
String pattern = mID.replace("*", ".?");
|
||||||
|
|
||||||
|
retVal = tgid.getIdent().matches(pattern);
|
||||||
|
}
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
|
@Override
|
||||||
public AliasIDType getType()
|
public AliasIDType getType()
|
||||||
{
|
{
|
||||||
return AliasIDType.MPT1327;
|
return AliasIDType.MPT1327;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.mpt1327;
|
package io.github.dsheirer.alias.id.mpt1327;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.text.MaskFormatter;
|
import javax.swing.text.MaskFormatter;
|
||||||
|
|||||||
@@ -1,31 +1,33 @@
|
|||||||
package io.github.dsheirer.alias.id.nonrecordable;
|
package io.github.dsheirer.alias.id.nonrecordable;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
|
|
||||||
public class NonRecordable extends AliasID
|
public class NonRecordable extends AliasID
|
||||||
{
|
{
|
||||||
@Override
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
public AliasIDType getType()
|
@Override
|
||||||
{
|
public AliasIDType getType()
|
||||||
return AliasIDType.NON_RECORDABLE;
|
{
|
||||||
}
|
return AliasIDType.NON_RECORDABLE;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isValid()
|
public boolean isValid()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matches( AliasID id )
|
public boolean matches(AliasID id)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return "Audio Non-Recordable";
|
return "Audio Non-Recordable";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.nonrecordable;
|
package io.github.dsheirer.alias.id.nonrecordable;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|||||||
@@ -17,67 +17,69 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.priority;
|
package io.github.dsheirer.alias.id.priority;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies an (audio) priority level for this alias.
|
* Specifies an (audio) priority level for this alias.
|
||||||
*/
|
*/
|
||||||
public class Priority extends AliasID
|
public class Priority extends AliasID
|
||||||
{
|
{
|
||||||
public static final int DO_NOT_MONITOR = -1;
|
public static final int DO_NOT_MONITOR = -1;
|
||||||
public static final int SELECTED_PRIORITY = 0;
|
public static final int SELECTED_PRIORITY = 0;
|
||||||
public static final int MIN_PRIORITY = 1;
|
public static final int MIN_PRIORITY = 1;
|
||||||
public static final int MAX_PRIORITY = 100;
|
public static final int MAX_PRIORITY = 100;
|
||||||
public static final int DEFAULT_PRIORITY = 100;
|
public static final int DEFAULT_PRIORITY = 100;
|
||||||
|
|
||||||
private int mPriority = DEFAULT_PRIORITY;
|
private int mPriority = DEFAULT_PRIORITY;
|
||||||
|
|
||||||
public Priority()
|
public Priority()
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isValid()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Indicates the associated alias should not be monitored or tracked.
|
|
||||||
*/
|
|
||||||
public boolean isDoNotMonitor()
|
|
||||||
{
|
|
||||||
return mPriority == DO_NOT_MONITOR;
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
public int getPriority()
|
|
||||||
{
|
|
||||||
return mPriority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPriority( int priority )
|
|
||||||
{
|
|
||||||
mPriority = priority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString()
|
|
||||||
{
|
|
||||||
return "Audio Priority: " + ( isDoNotMonitor() ? "Do Not Monitor" : mPriority );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches( AliasID id )
|
|
||||||
{
|
{
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
public boolean isValid()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates the associated alias should not be monitored or tracked.
|
||||||
|
*/
|
||||||
|
@JsonIgnore
|
||||||
|
public boolean isDoNotMonitor()
|
||||||
|
{
|
||||||
|
return mPriority == DO_NOT_MONITOR;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "priority")
|
||||||
|
public int getPriority()
|
||||||
|
{
|
||||||
|
return mPriority;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPriority(int priority)
|
||||||
|
{
|
||||||
|
mPriority = priority;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "Audio Priority: " + (isDoNotMonitor() ? "Do Not Monitor" : mPriority);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean matches(AliasID id)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
|
@Override
|
||||||
public AliasIDType getType()
|
public AliasIDType getType()
|
||||||
{
|
{
|
||||||
return AliasIDType.PRIORITY;
|
return AliasIDType.PRIORITY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,54 +17,52 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.siteID;
|
package io.github.dsheirer.alias.id.siteID;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
|
|
||||||
public class SiteID extends AliasID
|
public class SiteID extends AliasID
|
||||||
{
|
{
|
||||||
private String mSite;
|
private String mSite;
|
||||||
|
|
||||||
public SiteID()
|
public SiteID()
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
public String getSite()
|
|
||||||
{
|
|
||||||
return mSite;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSite( String site )
|
|
||||||
{
|
|
||||||
mSite = site;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isValid()
|
|
||||||
{
|
|
||||||
return mSite != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString()
|
|
||||||
{
|
|
||||||
return "Site: " + mSite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches( AliasID otherID )
|
|
||||||
{
|
{
|
||||||
return otherID != null &&
|
|
||||||
otherID instanceof SiteID &&
|
|
||||||
getSite().contentEquals( ( (SiteID)otherID).getSite() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@JacksonXmlProperty(isAttribute = true, localName = "site")
|
||||||
|
public String getSite()
|
||||||
|
{
|
||||||
|
return mSite;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSite(String site)
|
||||||
|
{
|
||||||
|
mSite = site;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid()
|
||||||
|
{
|
||||||
|
return mSite != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "Site: " + mSite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean matches(AliasID otherID)
|
||||||
|
{
|
||||||
|
return otherID != null &&
|
||||||
|
otherID instanceof SiteID &&
|
||||||
|
getSite().contentEquals(((SiteID)otherID).getSite());
|
||||||
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
|
@Override
|
||||||
public AliasIDType getType()
|
public AliasIDType getType()
|
||||||
{
|
{
|
||||||
return AliasIDType.SITE;
|
return AliasIDType.SITE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.siteID;
|
package io.github.dsheirer.alias.id.siteID;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|||||||
@@ -17,59 +17,59 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.status;
|
package io.github.dsheirer.alias.id.status;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
|
|
||||||
public class StatusID extends AliasID
|
public class StatusID extends AliasID
|
||||||
{
|
{
|
||||||
private int mStatus;
|
private int mStatus;
|
||||||
|
|
||||||
public StatusID()
|
public StatusID()
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
public int getStatus()
|
|
||||||
{
|
|
||||||
return mStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus( int status )
|
|
||||||
{
|
|
||||||
this.mStatus = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isValid()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString()
|
|
||||||
{
|
|
||||||
return "Status: " + String.format( "%03d", mStatus );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches( AliasID id )
|
|
||||||
{
|
{
|
||||||
boolean retVal = false;
|
|
||||||
|
|
||||||
if( id instanceof StatusID )
|
|
||||||
{
|
|
||||||
StatusID statusId = (StatusID)id;
|
|
||||||
|
|
||||||
retVal = ( mStatus == statusId.getStatus() );
|
|
||||||
}
|
|
||||||
|
|
||||||
return retVal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@JacksonXmlProperty(isAttribute = true, localName = "status")
|
||||||
|
public int getStatus()
|
||||||
|
{
|
||||||
|
return mStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status)
|
||||||
|
{
|
||||||
|
this.mStatus = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "Status: " + String.format("%03d", mStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean matches(AliasID id)
|
||||||
|
{
|
||||||
|
boolean retVal = false;
|
||||||
|
|
||||||
|
if(id instanceof StatusID)
|
||||||
|
{
|
||||||
|
StatusID statusId = (StatusID)id;
|
||||||
|
|
||||||
|
retVal = (mStatus == statusId.getStatus());
|
||||||
|
}
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
|
@Override
|
||||||
public AliasIDType getType()
|
public AliasIDType getType()
|
||||||
{
|
{
|
||||||
return AliasIDType.STATUS;
|
return AliasIDType.STATUS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,12 +18,10 @@
|
|||||||
package io.github.dsheirer.alias.id.talkgroup;
|
package io.github.dsheirer.alias.id.talkgroup;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
|
|
||||||
|
|
||||||
public class TalkgroupID extends AliasID
|
public class TalkgroupID extends AliasID
|
||||||
{
|
{
|
||||||
private String mTalkgroup;
|
private String mTalkgroup;
|
||||||
@@ -38,7 +36,7 @@ public class TalkgroupID extends AliasID
|
|||||||
mTalkgroup = talkgroup;
|
mTalkgroup = talkgroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute
|
@JacksonXmlProperty(isAttribute = true, localName = "talkgroup")
|
||||||
public String getTalkgroup()
|
public String getTalkgroup()
|
||||||
{
|
{
|
||||||
return mTalkgroup;
|
return mTalkgroup;
|
||||||
@@ -71,7 +69,7 @@ public class TalkgroupID extends AliasID
|
|||||||
|
|
||||||
if(id instanceof TalkgroupID)
|
if(id instanceof TalkgroupID)
|
||||||
{
|
{
|
||||||
TalkgroupID tgid = (TalkgroupID) id;
|
TalkgroupID tgid = (TalkgroupID)id;
|
||||||
|
|
||||||
//Create a pattern - replace * wildcards with regex single-char wildcard
|
//Create a pattern - replace * wildcards with regex single-char wildcard
|
||||||
String pattern = mTalkgroup.replace("*", ".?");
|
String pattern = mTalkgroup.replace("*", ".?");
|
||||||
@@ -82,6 +80,7 @@ public class TalkgroupID extends AliasID
|
|||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
@Override
|
@Override
|
||||||
public AliasIDType getType()
|
public AliasIDType getType()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.talkgroup;
|
package io.github.dsheirer.alias.id.talkgroup;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|||||||
@@ -17,59 +17,59 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.uniqueID;
|
package io.github.dsheirer.alias.id.uniqueID;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.alias.id.AliasIDType;
|
import io.github.dsheirer.alias.id.AliasIDType;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
|
|
||||||
public class UniqueID extends AliasID
|
public class UniqueID extends AliasID
|
||||||
{
|
{
|
||||||
private int mUid;
|
private int mUid;
|
||||||
|
|
||||||
public UniqueID()
|
public UniqueID()
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
public int getUid()
|
|
||||||
{
|
|
||||||
return mUid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUid( int uid )
|
|
||||||
{
|
|
||||||
this.mUid = uid;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isValid()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString()
|
|
||||||
{
|
|
||||||
return "UniqueID: " + mUid;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches( AliasID id )
|
|
||||||
{
|
{
|
||||||
boolean retVal = false;
|
|
||||||
|
|
||||||
if( id instanceof UniqueID )
|
|
||||||
{
|
|
||||||
UniqueID uid = (UniqueID)id;
|
|
||||||
|
|
||||||
retVal = mUid == uid.getUid();
|
|
||||||
}
|
|
||||||
|
|
||||||
return retVal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@JacksonXmlProperty(isAttribute = true, localName = "uid")
|
||||||
|
public int getUid()
|
||||||
|
{
|
||||||
|
return mUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUid(int uid)
|
||||||
|
{
|
||||||
|
this.mUid = uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "UniqueID: " + mUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean matches(AliasID id)
|
||||||
|
{
|
||||||
|
boolean retVal = false;
|
||||||
|
|
||||||
|
if(id instanceof UniqueID)
|
||||||
|
{
|
||||||
|
UniqueID uid = (UniqueID)id;
|
||||||
|
|
||||||
|
retVal = mUid == uid.getUid();
|
||||||
|
}
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
|
@Override
|
||||||
public AliasIDType getType()
|
public AliasIDType getType()
|
||||||
{
|
{
|
||||||
return AliasIDType.LTR_NET_UID;
|
return AliasIDType.LTR_NET_UID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.alias.id.uniqueID;
|
package io.github.dsheirer.alias.id.uniqueID;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.id.AliasID;
|
||||||
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import io.github.dsheirer.alias.id.AliasID;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.audio;
|
package io.github.dsheirer.audio;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.Alias;
|
||||||
import io.github.dsheirer.audio.output.AudioOutput;
|
import io.github.dsheirer.audio.output.AudioOutput;
|
||||||
import io.github.dsheirer.channel.metadata.Metadata;
|
import io.github.dsheirer.channel.metadata.Metadata;
|
||||||
import io.github.dsheirer.icon.IconManager;
|
import io.github.dsheirer.icon.IconManager;
|
||||||
@@ -30,7 +31,6 @@ import io.github.dsheirer.settings.SettingsManager;
|
|||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.Alias;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|||||||
@@ -18,25 +18,25 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.audio.broadcast;
|
package io.github.dsheirer.audio.broadcast;
|
||||||
|
|
||||||
import io.github.dsheirer.audio.broadcast.broadcastify.BroadcastifyConfiguration;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import io.github.dsheirer.audio.broadcast.icecast.IcecastHTTPConfiguration;
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
import io.github.dsheirer.audio.broadcast.icecast.IcecastTCPConfiguration;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||||
|
import io.github.dsheirer.audio.broadcast.icecast.IcecastConfiguration;
|
||||||
import io.github.dsheirer.audio.broadcast.shoutcast.v1.ShoutcastV1Configuration;
|
import io.github.dsheirer.audio.broadcast.shoutcast.v1.ShoutcastV1Configuration;
|
||||||
import io.github.dsheirer.audio.broadcast.shoutcast.v2.ShoutcastV2Configuration;
|
import io.github.dsheirer.audio.broadcast.shoutcast.v2.ShoutcastV2Configuration;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
|
||||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
|
||||||
import javax.xml.bind.annotation.XmlTransient;
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.net.SocketAddress;
|
import java.net.SocketAddress;
|
||||||
|
|
||||||
@XmlSeeAlso({BroadcastifyConfiguration.class,
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
|
||||||
IcecastTCPConfiguration.class,
|
@JsonSubTypes({
|
||||||
IcecastHTTPConfiguration.class,
|
@JsonSubTypes.Type(value = IcecastConfiguration.class, name="icecastConfiguration"),
|
||||||
ShoutcastV1Configuration.class,
|
@JsonSubTypes.Type(value = ShoutcastV1Configuration.class, name="shoutcastV1Configuration"),
|
||||||
ShoutcastV2Configuration.class})
|
@JsonSubTypes.Type(value = ShoutcastV2Configuration.class, name="shoutcastV2Configuration"),
|
||||||
@XmlRootElement(name = "stream")
|
})
|
||||||
|
@JacksonXmlRootElement(localName = "stream")
|
||||||
public abstract class BroadcastConfiguration
|
public abstract class BroadcastConfiguration
|
||||||
{
|
{
|
||||||
private BroadcastFormat mBroadcastFormat = BroadcastFormat.MP3;
|
private BroadcastFormat mBroadcastFormat = BroadcastFormat.MP3;
|
||||||
@@ -69,13 +69,18 @@ public abstract class BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Broadcast server type
|
* Broadcast server type
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "type")
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
public abstract BroadcastServerType getBroadcastServerType();
|
public abstract BroadcastServerType getBroadcastServerType();
|
||||||
|
|
||||||
|
private void setBroadcastServerType(BroadcastServerType type)
|
||||||
|
{
|
||||||
|
//Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name identifying this broadcastAudio configuration.
|
* Name identifying this broadcastAudio configuration.
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "name")
|
@JacksonXmlProperty(isAttribute = true, localName = "name")
|
||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
return mName;
|
return mName;
|
||||||
@@ -102,7 +107,7 @@ public abstract class BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* BROADCAST server host name.
|
* BROADCAST server host name.
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "host")
|
@JacksonXmlProperty(isAttribute = true, localName = "host")
|
||||||
public String getHost()
|
public String getHost()
|
||||||
{
|
{
|
||||||
return mHost;
|
return mHost;
|
||||||
@@ -129,7 +134,7 @@ public abstract class BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* BROADCAST server port number;
|
* BROADCAST server port number;
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "port")
|
@JacksonXmlProperty(isAttribute = true, localName = "port")
|
||||||
public int getPort()
|
public int getPort()
|
||||||
{
|
{
|
||||||
return mPort;
|
return mPort;
|
||||||
@@ -153,6 +158,7 @@ public abstract class BroadcastConfiguration
|
|||||||
return mPort > 0;
|
return mPort > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
public SocketAddress getAddress()
|
public SocketAddress getAddress()
|
||||||
{
|
{
|
||||||
return new InetSocketAddress(getHost(), getPort());
|
return new InetSocketAddress(getHost(), getPort());
|
||||||
@@ -161,7 +167,7 @@ public abstract class BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Password to authenticate with the streaming server.
|
* Password to authenticate with the streaming server.
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "password")
|
@JacksonXmlProperty(isAttribute = true, localName = "password")
|
||||||
public String getPassword()
|
public String getPassword()
|
||||||
{
|
{
|
||||||
return mPassword;
|
return mPassword;
|
||||||
@@ -188,7 +194,7 @@ public abstract class BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Audio broadcastAudio content type (e.g. mp3)
|
* Audio broadcastAudio content type (e.g. mp3)
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "format")
|
@JacksonXmlProperty(isAttribute = false, localName = "format")
|
||||||
public BroadcastFormat getBroadcastFormat()
|
public BroadcastFormat getBroadcastFormat()
|
||||||
{
|
{
|
||||||
return mBroadcastFormat;
|
return mBroadcastFormat;
|
||||||
@@ -202,7 +208,7 @@ public abstract class BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Audio broadcastAudio delay from recording start until the audio file is broadcastAudio to the server.
|
* Audio broadcastAudio delay from recording start until the audio file is broadcastAudio to the server.
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "delay")
|
@JacksonXmlProperty(isAttribute = true, localName = "delay")
|
||||||
public long getDelay()
|
public long getDelay()
|
||||||
{
|
{
|
||||||
return mDelay;
|
return mDelay;
|
||||||
@@ -222,7 +228,7 @@ public abstract class BroadcastConfiguration
|
|||||||
* queue awaiting streaming before it is purged from the queue. This value is in addition to the delay setting.
|
* queue awaiting streaming before it is purged from the queue. This value is in addition to the delay setting.
|
||||||
* @return age in milliseconds
|
* @return age in milliseconds
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "maximum_recording_age")
|
@JacksonXmlProperty(isAttribute = true, localName = "maximum_recording_age")
|
||||||
public long getMaximumRecordingAge()
|
public long getMaximumRecordingAge()
|
||||||
{
|
{
|
||||||
return mMaximumRecordingAge;
|
return mMaximumRecordingAge;
|
||||||
@@ -241,7 +247,7 @@ public abstract class BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Indicates if this broadcaster is enable, meaning that it will automatically connect on startup.
|
* Indicates if this broadcaster is enable, meaning that it will automatically connect on startup.
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "enabled")
|
@JacksonXmlProperty(isAttribute = true, localName = "enabled")
|
||||||
public boolean isEnabled()
|
public boolean isEnabled()
|
||||||
{
|
{
|
||||||
return mEnabled;
|
return mEnabled;
|
||||||
@@ -293,7 +299,7 @@ public abstract class BroadcastConfiguration
|
|||||||
* Indicates if this configuration is valid. A minimal check will ensure that it contains at least a hostname and
|
* Indicates if this configuration is valid. A minimal check will ensure that it contains at least a hostname and
|
||||||
* port number.
|
* port number.
|
||||||
*/
|
*/
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
public boolean isValid()
|
public boolean isValid()
|
||||||
{
|
{
|
||||||
return mHost != null && mPort > 0;
|
return mHost != null && mPort > 0;
|
||||||
|
|||||||
@@ -18,9 +18,9 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.audio.broadcast;
|
package io.github.dsheirer.audio.broadcast;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.AliasModel;
|
||||||
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
import io.github.dsheirer.gui.editor.DocumentListenerEditor;
|
||||||
import io.github.dsheirer.icon.IconManager;
|
import io.github.dsheirer.icon.IconManager;
|
||||||
import io.github.dsheirer.alias.AliasModel;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.audio.broadcast;
|
package io.github.dsheirer.audio.broadcast;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.AliasModel;
|
||||||
import io.github.dsheirer.audio.broadcast.broadcastify.BroadcastifyConfiguration;
|
import io.github.dsheirer.audio.broadcast.broadcastify.BroadcastifyConfiguration;
|
||||||
import io.github.dsheirer.audio.broadcast.broadcastify.BroadcastifyConfigurationEditor;
|
import io.github.dsheirer.audio.broadcast.broadcastify.BroadcastifyConfigurationEditor;
|
||||||
import io.github.dsheirer.audio.broadcast.icecast.IcecastHTTPAudioBroadcaster;
|
import io.github.dsheirer.audio.broadcast.icecast.IcecastHTTPAudioBroadcaster;
|
||||||
@@ -43,7 +44,6 @@ import io.github.dsheirer.record.AudioRecorder;
|
|||||||
import io.github.dsheirer.record.mp3.MP3Recorder;
|
import io.github.dsheirer.record.mp3.MP3Recorder;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.AliasModel;
|
|
||||||
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.audio.broadcast;
|
package io.github.dsheirer.audio.broadcast;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.id.broadcast.BroadcastChannel;
|
||||||
import io.github.dsheirer.audio.AudioPacket;
|
import io.github.dsheirer.audio.AudioPacket;
|
||||||
import io.github.dsheirer.channel.metadata.Metadata;
|
import io.github.dsheirer.channel.metadata.Metadata;
|
||||||
import io.github.dsheirer.icon.IconManager;
|
import io.github.dsheirer.icon.IconManager;
|
||||||
@@ -27,7 +28,6 @@ import io.github.dsheirer.sample.Listener;
|
|||||||
import io.github.dsheirer.util.ThreadPool;
|
import io.github.dsheirer.util.ThreadPool;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.id.broadcast.BroadcastChannel;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.table.AbstractTableModel;
|
import javax.swing.table.AbstractTableModel;
|
||||||
|
|||||||
@@ -19,13 +19,13 @@
|
|||||||
package io.github.dsheirer.audio.broadcast;
|
package io.github.dsheirer.audio.broadcast;
|
||||||
|
|
||||||
import com.jidesoft.swing.JideSplitPane;
|
import com.jidesoft.swing.JideSplitPane;
|
||||||
|
import io.github.dsheirer.alias.AliasModel;
|
||||||
import io.github.dsheirer.gui.editor.Editor;
|
import io.github.dsheirer.gui.editor.Editor;
|
||||||
import io.github.dsheirer.gui.editor.EmptyEditor;
|
import io.github.dsheirer.gui.editor.EmptyEditor;
|
||||||
import io.github.dsheirer.icon.IconManager;
|
import io.github.dsheirer.icon.IconManager;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.AliasModel;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.event.ListSelectionEvent;
|
import javax.swing.event.ListSelectionEvent;
|
||||||
|
|||||||
@@ -18,13 +18,12 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.audio.broadcast.broadcastify;
|
package io.github.dsheirer.audio.broadcast.broadcastify;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastServerType;
|
import io.github.dsheirer.audio.broadcast.BroadcastServerType;
|
||||||
import io.github.dsheirer.audio.broadcast.icecast.IcecastTCPConfiguration;
|
import io.github.dsheirer.audio.broadcast.icecast.IcecastTCPConfiguration;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
|
|
||||||
public class BroadcastifyConfiguration extends IcecastTCPConfiguration
|
public class BroadcastifyConfiguration extends IcecastTCPConfiguration
|
||||||
{
|
{
|
||||||
private int mFeedID;
|
private int mFeedID;
|
||||||
@@ -77,13 +76,14 @@ public class BroadcastifyConfiguration extends IcecastTCPConfiguration
|
|||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
@Override
|
@Override
|
||||||
public BroadcastServerType getBroadcastServerType()
|
public BroadcastServerType getBroadcastServerType()
|
||||||
{
|
{
|
||||||
return BroadcastServerType.BROADCASTIFY;
|
return BroadcastServerType.BROADCASTIFY;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute(name="feed_id")
|
@JacksonXmlProperty(isAttribute = true, localName = "feed_id")
|
||||||
public int getFeedID()
|
public int getFeedID()
|
||||||
{
|
{
|
||||||
return mFeedID;
|
return mFeedID;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
package io.github.dsheirer.audio.broadcast.broadcastify;
|
package io.github.dsheirer.audio.broadcast.broadcastify;
|
||||||
|
|
||||||
import com.radioreference.api.soap2.UserFeedBroadcast;
|
import com.radioreference.api.soap2.UserFeedBroadcast;
|
||||||
|
import io.github.dsheirer.alias.AliasModel;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfigurationEditor;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfigurationEditor;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastEvent;
|
import io.github.dsheirer.audio.broadcast.BroadcastEvent;
|
||||||
@@ -29,7 +30,6 @@ import io.github.dsheirer.sample.Listener;
|
|||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.AliasModel;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.event.ChangeEvent;
|
import javax.swing.event.ChangeEvent;
|
||||||
|
|||||||
@@ -18,13 +18,20 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.audio.broadcast.icecast;
|
package io.github.dsheirer.audio.broadcast.icecast;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
import javax.xml.bind.annotation.XmlTransient;
|
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = IcecastHTTPConfiguration.class, name="icecastHTTPConfiguration"),
|
||||||
|
@JsonSubTypes.Type(value = IcecastTCPConfiguration.class, name="icecastTCPConfiguration"),
|
||||||
|
})
|
||||||
public abstract class IcecastConfiguration extends BroadcastConfiguration
|
public abstract class IcecastConfiguration extends BroadcastConfiguration
|
||||||
{
|
{
|
||||||
protected String mUserName = "source";
|
protected String mUserName = "source";
|
||||||
@@ -49,7 +56,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Base64 encoded version of the username and password with prepended 'Basic ' tag.
|
* Base64 encoded version of the username and password with prepended 'Basic ' tag.
|
||||||
*/
|
*/
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
public String getBase64EncodedCredentials()
|
public String getBase64EncodedCredentials()
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
@@ -68,7 +75,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
|||||||
return "Basic " + base64;
|
return "Basic " + base64;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute( name="user_name" )
|
@JacksonXmlProperty(isAttribute = true, localName = "user_name")
|
||||||
public String getUserName()
|
public String getUserName()
|
||||||
{
|
{
|
||||||
return mUserName;
|
return mUserName;
|
||||||
@@ -86,9 +93,10 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Mount point or path to the stream
|
* Mount point or path to the stream
|
||||||
|
*
|
||||||
* @return mount point
|
* @return mount point
|
||||||
*/
|
*/
|
||||||
@XmlAttribute( name="mount_point" )
|
@JacksonXmlProperty(isAttribute = true, localName = "mount_point")
|
||||||
public String getMountPoint()
|
public String getMountPoint()
|
||||||
{
|
{
|
||||||
return mMountPoint;
|
return mMountPoint;
|
||||||
@@ -96,6 +104,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the mount point (path) for the stream
|
* Sets the mount point (path) for the stream
|
||||||
|
*
|
||||||
* @param mountPoint
|
* @param mountPoint
|
||||||
*/
|
*/
|
||||||
public void setMountPoint(String mountPoint)
|
public void setMountPoint(String mountPoint)
|
||||||
@@ -118,7 +127,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
|||||||
return mMountPoint != null;
|
return mMountPoint != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute( name="description" )
|
@JacksonXmlProperty(isAttribute = true, localName = "description")
|
||||||
public String getDescription()
|
public String getDescription()
|
||||||
{
|
{
|
||||||
return mDescription;
|
return mDescription;
|
||||||
@@ -137,7 +146,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Stream genre
|
* Stream genre
|
||||||
*/
|
*/
|
||||||
@XmlAttribute( name="genre" )
|
@JacksonXmlProperty(isAttribute = true, localName = "genre")
|
||||||
public String getGenre()
|
public String getGenre()
|
||||||
{
|
{
|
||||||
return mGenre;
|
return mGenre;
|
||||||
@@ -145,6 +154,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Stream genre
|
* Stream genre
|
||||||
|
*
|
||||||
* @param genre
|
* @param genre
|
||||||
*/
|
*/
|
||||||
public void setGenre(String genre)
|
public void setGenre(String genre)
|
||||||
@@ -160,7 +170,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Public visibility of the broadcastAudio
|
* Public visibility of the broadcastAudio
|
||||||
*/
|
*/
|
||||||
@XmlAttribute( name="public" )
|
@JacksonXmlProperty(isAttribute = true, localName = "public")
|
||||||
public boolean isPublic()
|
public boolean isPublic()
|
||||||
{
|
{
|
||||||
return mPublic;
|
return mPublic;
|
||||||
@@ -168,6 +178,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets public visibility of the broadcastAudio
|
* Sets public visibility of the broadcastAudio
|
||||||
|
*
|
||||||
* @param isPublic indicates if the broadcastAudio should be visible to the public
|
* @param isPublic indicates if the broadcastAudio should be visible to the public
|
||||||
*/
|
*/
|
||||||
public void setPublic(boolean isPublic)
|
public void setPublic(boolean isPublic)
|
||||||
@@ -178,7 +189,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Number of audio channels in the broadcastAudio
|
* Number of audio channels in the broadcastAudio
|
||||||
*/
|
*/
|
||||||
@XmlAttribute( name="channels" )
|
@JacksonXmlProperty(isAttribute = true, localName = "channels")
|
||||||
public int getChannels()
|
public int getChannels()
|
||||||
{
|
{
|
||||||
return mChannels;
|
return mChannels;
|
||||||
@@ -200,7 +211,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Bit rate in bits per second
|
* Bit rate in bits per second
|
||||||
*/
|
*/
|
||||||
@XmlAttribute( name="bitrate" )
|
@JacksonXmlProperty(isAttribute = true, localName = "bitrate")
|
||||||
public int getBitRate()
|
public int getBitRate()
|
||||||
{
|
{
|
||||||
return mBitRate;
|
return mBitRate;
|
||||||
@@ -208,6 +219,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Bit rate
|
* Bit rate
|
||||||
|
*
|
||||||
* @param bitRate in samples per second
|
* @param bitRate in samples per second
|
||||||
*/
|
*/
|
||||||
public void setBitRate(int bitRate)
|
public void setBitRate(int bitRate)
|
||||||
@@ -220,7 +232,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
|||||||
return mBitRate > 0;
|
return mBitRate > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute( name="sample_rate" )
|
@JacksonXmlProperty(isAttribute = true, localName = "sample_rate")
|
||||||
public int getSampleRate()
|
public int getSampleRate()
|
||||||
{
|
{
|
||||||
return mSampleRate;
|
return mSampleRate;
|
||||||
@@ -239,7 +251,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* URL associated with the broadcastAudio where users can find additional details.
|
* URL associated with the broadcastAudio where users can find additional details.
|
||||||
*/
|
*/
|
||||||
@XmlAttribute( name="url" )
|
@JacksonXmlProperty(isAttribute = true, localName = "url")
|
||||||
public String getURL()
|
public String getURL()
|
||||||
{
|
{
|
||||||
return mURL;
|
return mURL;
|
||||||
@@ -247,6 +259,7 @@ public abstract class IcecastConfiguration extends BroadcastConfiguration
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* URL associated with the broadcastAudio where users can find additional details.
|
* URL associated with the broadcastAudio where users can find additional details.
|
||||||
|
*
|
||||||
* @param url
|
* @param url
|
||||||
*/
|
*/
|
||||||
public void setURL(String url)
|
public void setURL(String url)
|
||||||
|
|||||||
@@ -18,10 +18,13 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.audio.broadcast.icecast;
|
package io.github.dsheirer.audio.broadcast.icecast;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastServerType;
|
import io.github.dsheirer.audio.broadcast.BroadcastServerType;
|
||||||
|
|
||||||
|
@JsonSubTypes.Type(value=IcecastHTTPConfiguration.class, name="icecastHTTPConfiguration")
|
||||||
public class IcecastHTTPConfiguration extends IcecastConfiguration
|
public class IcecastHTTPConfiguration extends IcecastConfiguration
|
||||||
{
|
{
|
||||||
public IcecastHTTPConfiguration()
|
public IcecastHTTPConfiguration()
|
||||||
@@ -66,11 +69,10 @@ public class IcecastHTTPConfiguration extends IcecastConfiguration
|
|||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
@Override
|
@Override
|
||||||
public BroadcastServerType getBroadcastServerType()
|
public BroadcastServerType getBroadcastServerType()
|
||||||
{
|
{
|
||||||
return BroadcastServerType.ICECAST_HTTP;
|
return BroadcastServerType.ICECAST_HTTP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.audio.broadcast.icecast;
|
package io.github.dsheirer.audio.broadcast.icecast;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.AliasModel;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfigurationEditor;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfigurationEditor;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastEvent;
|
import io.github.dsheirer.audio.broadcast.BroadcastEvent;
|
||||||
@@ -27,7 +28,6 @@ import io.github.dsheirer.icon.IconManager;
|
|||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.AliasModel;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.event.ChangeEvent;
|
import javax.swing.event.ChangeEvent;
|
||||||
|
|||||||
@@ -18,6 +18,9 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.audio.broadcast.icecast;
|
package io.github.dsheirer.audio.broadcast.icecast;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastServerType;
|
import io.github.dsheirer.audio.broadcast.BroadcastServerType;
|
||||||
@@ -25,9 +28,10 @@ import io.github.dsheirer.audio.broadcast.broadcastify.BroadcastifyConfiguration
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
|
||||||
|
@JsonSubTypes({
|
||||||
@XmlSeeAlso( {BroadcastifyConfiguration.class } )
|
@JsonSubTypes.Type(value = BroadcastifyConfiguration.class, name="broadcastifyConfiguration"),
|
||||||
|
})
|
||||||
public class IcecastTCPConfiguration extends IcecastConfiguration
|
public class IcecastTCPConfiguration extends IcecastConfiguration
|
||||||
{
|
{
|
||||||
private final static Logger mLog = LoggerFactory.getLogger( IcecastTCPConfiguration.class );
|
private final static Logger mLog = LoggerFactory.getLogger( IcecastTCPConfiguration.class );
|
||||||
@@ -70,6 +74,7 @@ public class IcecastTCPConfiguration extends IcecastConfiguration
|
|||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
@Override
|
@Override
|
||||||
public BroadcastServerType getBroadcastServerType()
|
public BroadcastServerType getBroadcastServerType()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.audio.broadcast.icecast;
|
package io.github.dsheirer.audio.broadcast.icecast;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.AliasModel;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfigurationEditor;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfigurationEditor;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastEvent;
|
import io.github.dsheirer.audio.broadcast.BroadcastEvent;
|
||||||
@@ -27,7 +28,6 @@ import io.github.dsheirer.icon.IconManager;
|
|||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.AliasModel;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.event.ChangeEvent;
|
import javax.swing.event.ChangeEvent;
|
||||||
|
|||||||
@@ -18,12 +18,11 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.audio.broadcast.shoutcast.v1;
|
package io.github.dsheirer.audio.broadcast.shoutcast.v1;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastServerType;
|
import io.github.dsheirer.audio.broadcast.BroadcastServerType;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
|
|
||||||
public class ShoutcastV1Configuration extends BroadcastConfiguration
|
public class ShoutcastV1Configuration extends BroadcastConfiguration
|
||||||
{
|
{
|
||||||
private String mGenre;
|
private String mGenre;
|
||||||
@@ -73,7 +72,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Stream genre
|
* Stream genre
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name="genre")
|
@JacksonXmlProperty(isAttribute = true, localName = "genre")
|
||||||
public String getGenre()
|
public String getGenre()
|
||||||
{
|
{
|
||||||
return mGenre;
|
return mGenre;
|
||||||
@@ -81,6 +80,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Stream genre
|
* Stream genre
|
||||||
|
*
|
||||||
* @param genre
|
* @param genre
|
||||||
*/
|
*/
|
||||||
public void setGenre(String genre)
|
public void setGenre(String genre)
|
||||||
@@ -91,7 +91,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Stream description
|
* Stream description
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name="description")
|
@JacksonXmlProperty(isAttribute = true, localName = "description")
|
||||||
public String getDescription()
|
public String getDescription()
|
||||||
{
|
{
|
||||||
return mDescription;
|
return mDescription;
|
||||||
@@ -99,6 +99,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Stream description
|
* Stream description
|
||||||
|
*
|
||||||
* @param description
|
* @param description
|
||||||
*/
|
*/
|
||||||
public void setDescription(String description)
|
public void setDescription(String description)
|
||||||
@@ -109,7 +110,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Public visibility of the broadcastAudio
|
* Public visibility of the broadcastAudio
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name="public")
|
@JacksonXmlProperty(isAttribute = true, localName = "public")
|
||||||
public boolean isPublic()
|
public boolean isPublic()
|
||||||
{
|
{
|
||||||
return mPublic;
|
return mPublic;
|
||||||
@@ -117,6 +118,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets public visibility of the broadcastAudio
|
* Sets public visibility of the broadcastAudio
|
||||||
|
*
|
||||||
* @param isPublic indicates if the broadcastAudio should be visible to the public
|
* @param isPublic indicates if the broadcastAudio should be visible to the public
|
||||||
*/
|
*/
|
||||||
public void setPublic(boolean isPublic)
|
public void setPublic(boolean isPublic)
|
||||||
@@ -127,7 +129,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Number of audio channels in the broadcastAudio
|
* Number of audio channels in the broadcastAudio
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name="channels")
|
@JacksonXmlProperty(isAttribute = true, localName = "channels")
|
||||||
public int getChannels()
|
public int getChannels()
|
||||||
{
|
{
|
||||||
return mChannels;
|
return mChannels;
|
||||||
@@ -144,7 +146,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Bit rate in bits per second
|
* Bit rate in bits per second
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name="bitrate")
|
@JacksonXmlProperty(isAttribute = true, localName = "bitrate")
|
||||||
public int getBitRate()
|
public int getBitRate()
|
||||||
{
|
{
|
||||||
return mBitRate;
|
return mBitRate;
|
||||||
@@ -152,6 +154,7 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Bit rate
|
* Bit rate
|
||||||
|
*
|
||||||
* @param bitRate in samples per second
|
* @param bitRate in samples per second
|
||||||
*/
|
*/
|
||||||
public void setBitRate(int bitRate)
|
public void setBitRate(int bitRate)
|
||||||
@@ -163,8 +166,8 @@ public class ShoutcastV1Configuration extends BroadcastConfiguration
|
|||||||
public boolean isValid()
|
public boolean isValid()
|
||||||
{
|
{
|
||||||
return getName() != null && !getName().isEmpty() &&
|
return getName() != null && !getName().isEmpty() &&
|
||||||
getHost() != null && !getHost().isEmpty() &&
|
getHost() != null && !getHost().isEmpty() &&
|
||||||
getPort() > 0 && getPort() < 65535 &&
|
getPort() > 0 && getPort() < 65535 &&
|
||||||
getPassword() != null && !getPassword().isEmpty();
|
getPassword() != null && !getPassword().isEmpty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.audio.broadcast.shoutcast.v1;
|
package io.github.dsheirer.audio.broadcast.shoutcast.v1;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.AliasModel;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfigurationEditor;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfigurationEditor;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastEvent;
|
import io.github.dsheirer.audio.broadcast.BroadcastEvent;
|
||||||
@@ -27,7 +28,6 @@ import io.github.dsheirer.icon.IconManager;
|
|||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.AliasModel;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.event.ChangeEvent;
|
import javax.swing.event.ChangeEvent;
|
||||||
|
|||||||
@@ -18,13 +18,12 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.audio.broadcast.shoutcast.v2;
|
package io.github.dsheirer.audio.broadcast.shoutcast.v2;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
import io.github.dsheirer.audio.broadcast.BroadcastFormat;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastServerType;
|
import io.github.dsheirer.audio.broadcast.BroadcastServerType;
|
||||||
import org.apache.commons.lang3.Validate;
|
import org.apache.commons.lang3.Validate;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
|
|
||||||
public class ShoutcastV2Configuration extends BroadcastConfiguration
|
public class ShoutcastV2Configuration extends BroadcastConfiguration
|
||||||
{
|
{
|
||||||
private int mStreamID;
|
private int mStreamID;
|
||||||
@@ -78,7 +77,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Stream ID
|
* Stream ID
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "stream_id")
|
@JacksonXmlProperty(isAttribute = true, localName = "stream_id")
|
||||||
public int getStreamID()
|
public int getStreamID()
|
||||||
{
|
{
|
||||||
return mStreamID;
|
return mStreamID;
|
||||||
@@ -98,7 +97,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* User ID
|
* User ID
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "user_id")
|
@JacksonXmlProperty(isAttribute = true, localName = "user_id")
|
||||||
public String getUserID()
|
public String getUserID()
|
||||||
{
|
{
|
||||||
return mUserID;
|
return mUserID;
|
||||||
@@ -106,6 +105,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the user ID
|
* Sets the user ID
|
||||||
|
*
|
||||||
* @param userID
|
* @param userID
|
||||||
*/
|
*/
|
||||||
public void setUserID(String userID)
|
public void setUserID(String userID)
|
||||||
@@ -116,7 +116,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Bit rate in kilobits per second
|
* Bit rate in kilobits per second
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "bitrate")
|
@JacksonXmlProperty(isAttribute = true, localName = "bitrate")
|
||||||
public int getBitRate()
|
public int getBitRate()
|
||||||
{
|
{
|
||||||
return mBitRate;
|
return mBitRate;
|
||||||
@@ -124,6 +124,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Bit rate
|
* Bit rate
|
||||||
|
*
|
||||||
* @param bitRate in kilobits per second
|
* @param bitRate in kilobits per second
|
||||||
*/
|
*/
|
||||||
public void setBitRate(int bitRate)
|
public void setBitRate(int bitRate)
|
||||||
@@ -134,7 +135,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Stream genre
|
* Stream genre
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "genre")
|
@JacksonXmlProperty(isAttribute = true, localName = "genre")
|
||||||
public String getGenre()
|
public String getGenre()
|
||||||
{
|
{
|
||||||
return mGenre;
|
return mGenre;
|
||||||
@@ -157,7 +158,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* Public visibility of the broadcastAudio
|
* Public visibility of the broadcastAudio
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "public")
|
@JacksonXmlProperty(isAttribute = true, localName = "public")
|
||||||
public boolean isPublic()
|
public boolean isPublic()
|
||||||
{
|
{
|
||||||
return mPublic;
|
return mPublic;
|
||||||
@@ -165,6 +166,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets public visibility of the broadcastAudio
|
* Sets public visibility of the broadcastAudio
|
||||||
|
*
|
||||||
* @param isPublic indicates if the broadcastAudio should be visible to the public
|
* @param isPublic indicates if the broadcastAudio should be visible to the public
|
||||||
*/
|
*/
|
||||||
public void setPublic(boolean isPublic)
|
public void setPublic(boolean isPublic)
|
||||||
@@ -175,7 +177,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
|||||||
/**
|
/**
|
||||||
* URL associated with the broadcastAudio where users can find additional details.
|
* URL associated with the broadcastAudio where users can find additional details.
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "url")
|
@JacksonXmlProperty(isAttribute = true, localName = "url")
|
||||||
public String getURL()
|
public String getURL()
|
||||||
{
|
{
|
||||||
return mURL;
|
return mURL;
|
||||||
@@ -183,6 +185,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* URL associated with the broadcastAudio where users can find additional details.
|
* URL associated with the broadcastAudio where users can find additional details.
|
||||||
|
*
|
||||||
* @param url
|
* @param url
|
||||||
*/
|
*/
|
||||||
public void setURL(String url)
|
public void setURL(String url)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.audio.broadcast.shoutcast.v2;
|
package io.github.dsheirer.audio.broadcast.shoutcast.v2;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.AliasModel;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfiguration;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastConfigurationEditor;
|
import io.github.dsheirer.audio.broadcast.BroadcastConfigurationEditor;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastEvent;
|
import io.github.dsheirer.audio.broadcast.BroadcastEvent;
|
||||||
@@ -27,7 +28,6 @@ import io.github.dsheirer.icon.IconManager;
|
|||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.AliasModel;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.event.ChangeEvent;
|
import javax.swing.event.ChangeEvent;
|
||||||
|
|||||||
@@ -18,10 +18,10 @@
|
|||||||
package io.github.dsheirer.audio.invert;
|
package io.github.dsheirer.audio.invert;
|
||||||
|
|
||||||
import io.github.dsheirer.audio.InversionFrequency;
|
import io.github.dsheirer.audio.InversionFrequency;
|
||||||
import io.github.dsheirer.sample.real.RealSampleListener;
|
|
||||||
import io.github.dsheirer.dsp.filter.Filters;
|
import io.github.dsheirer.dsp.filter.Filters;
|
||||||
import io.github.dsheirer.dsp.filter.FloatFIRFilter;
|
import io.github.dsheirer.dsp.filter.FloatFIRFilter;
|
||||||
import io.github.dsheirer.dsp.mixer.Oscillator;
|
import io.github.dsheirer.dsp.mixer.Oscillator;
|
||||||
|
import io.github.dsheirer.sample.real.RealSampleListener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Applies audio inversion (or un-inversion) to a broadcast of float audio samples
|
* Applies audio inversion (or un-inversion) to a broadcast of float audio samples
|
||||||
|
|||||||
@@ -17,10 +17,10 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.bits;
|
package io.github.dsheirer.bits;
|
||||||
|
|
||||||
import io.github.dsheirer.sample.Broadcaster;
|
|
||||||
import io.github.dsheirer.sample.Listener;
|
|
||||||
import io.github.dsheirer.dsp.symbol.SyncDetectListener;
|
import io.github.dsheirer.dsp.symbol.SyncDetectListener;
|
||||||
import io.github.dsheirer.dsp.symbol.SyncDetectProvider;
|
import io.github.dsheirer.dsp.symbol.SyncDetectProvider;
|
||||||
|
import io.github.dsheirer.sample.Broadcaster;
|
||||||
|
import io.github.dsheirer.sample.Listener;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ package io.github.dsheirer.channel.details;
|
|||||||
import io.github.dsheirer.channel.state.DecoderState;
|
import io.github.dsheirer.channel.state.DecoderState;
|
||||||
import io.github.dsheirer.controller.channel.Channel;
|
import io.github.dsheirer.controller.channel.Channel;
|
||||||
import io.github.dsheirer.controller.channel.ChannelProcessingManager;
|
import io.github.dsheirer.controller.channel.ChannelProcessingManager;
|
||||||
|
import io.github.dsheirer.module.ProcessingChain;
|
||||||
import io.github.dsheirer.sample.Listener;
|
import io.github.dsheirer.sample.Listener;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import io.github.dsheirer.module.ProcessingChain;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.text.DefaultCaret;
|
import javax.swing.text.DefaultCaret;
|
||||||
|
|||||||
@@ -18,11 +18,13 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.channel.metadata;
|
package io.github.dsheirer.channel.metadata;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.Alias;
|
||||||
import io.github.dsheirer.channel.state.State;
|
import io.github.dsheirer.channel.state.State;
|
||||||
import io.github.dsheirer.controller.channel.Channel;
|
import io.github.dsheirer.controller.channel.Channel;
|
||||||
import io.github.dsheirer.controller.channel.ChannelProcessingManager;
|
import io.github.dsheirer.controller.channel.ChannelProcessingManager;
|
||||||
import io.github.dsheirer.controller.channel.ChannelUtils;
|
import io.github.dsheirer.controller.channel.ChannelUtils;
|
||||||
import io.github.dsheirer.icon.IconManager;
|
import io.github.dsheirer.icon.IconManager;
|
||||||
|
import io.github.dsheirer.module.ProcessingChain;
|
||||||
import io.github.dsheirer.properties.SystemProperties;
|
import io.github.dsheirer.properties.SystemProperties;
|
||||||
import io.github.dsheirer.sample.Broadcaster;
|
import io.github.dsheirer.sample.Broadcaster;
|
||||||
import io.github.dsheirer.sample.Listener;
|
import io.github.dsheirer.sample.Listener;
|
||||||
@@ -30,8 +32,6 @@ import net.miginfocom.swing.MigLayout;
|
|||||||
import org.apache.commons.lang3.Validate;
|
import org.apache.commons.lang3.Validate;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.Alias;
|
|
||||||
import io.github.dsheirer.module.ProcessingChain;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.event.ListSelectionEvent;
|
import javax.swing.event.ListSelectionEvent;
|
||||||
|
|||||||
@@ -23,11 +23,11 @@ import com.jidesoft.swing.JideTabbedPane;
|
|||||||
import io.github.dsheirer.channel.details.ChannelDetailPanel;
|
import io.github.dsheirer.channel.details.ChannelDetailPanel;
|
||||||
import io.github.dsheirer.controller.channel.ChannelProcessingManager;
|
import io.github.dsheirer.controller.channel.ChannelProcessingManager;
|
||||||
import io.github.dsheirer.icon.IconManager;
|
import io.github.dsheirer.icon.IconManager;
|
||||||
|
import io.github.dsheirer.module.decode.event.CallEventPanel;
|
||||||
|
import io.github.dsheirer.module.decode.event.MessageActivityPanel;
|
||||||
import io.github.dsheirer.settings.SettingsManager;
|
import io.github.dsheirer.settings.SettingsManager;
|
||||||
import io.github.dsheirer.spectrum.ChannelSpectrumPanel;
|
import io.github.dsheirer.spectrum.ChannelSpectrumPanel;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import io.github.dsheirer.module.decode.event.CallEventPanel;
|
|
||||||
import io.github.dsheirer.module.decode.event.MessageActivityPanel;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|||||||
@@ -18,13 +18,13 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.channel.metadata;
|
package io.github.dsheirer.channel.metadata;
|
||||||
|
|
||||||
import io.github.dsheirer.channel.state.State;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import io.github.dsheirer.alias.Alias;
|
import io.github.dsheirer.alias.Alias;
|
||||||
import io.github.dsheirer.alias.id.broadcast.BroadcastChannel;
|
import io.github.dsheirer.alias.id.broadcast.BroadcastChannel;
|
||||||
import io.github.dsheirer.alias.id.priority.Priority;
|
import io.github.dsheirer.alias.id.priority.Priority;
|
||||||
|
import io.github.dsheirer.channel.state.State;
|
||||||
import io.github.dsheirer.module.decode.DecoderType;
|
import io.github.dsheirer.module.decode.DecoderType;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|||||||
@@ -19,11 +19,11 @@
|
|||||||
package io.github.dsheirer.channel.metadata;
|
package io.github.dsheirer.channel.metadata;
|
||||||
|
|
||||||
import io.github.dsheirer.channel.state.State;
|
import io.github.dsheirer.channel.state.State;
|
||||||
|
import io.github.dsheirer.module.decode.DecoderType;
|
||||||
import io.github.dsheirer.sample.Broadcaster;
|
import io.github.dsheirer.sample.Broadcaster;
|
||||||
import io.github.dsheirer.sample.Listener;
|
import io.github.dsheirer.sample.Listener;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.module.decode.DecoderType;
|
|
||||||
|
|
||||||
public class MutableMetadata extends Metadata implements Listener<AttributeChangeRequest>
|
public class MutableMetadata extends Metadata implements Listener<AttributeChangeRequest>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
package io.github.dsheirer.controller;
|
package io.github.dsheirer.controller;
|
||||||
|
|
||||||
import com.jidesoft.swing.JideTabbedPane;
|
import com.jidesoft.swing.JideTabbedPane;
|
||||||
|
import io.github.dsheirer.alias.AliasController;
|
||||||
|
import io.github.dsheirer.alias.AliasModel;
|
||||||
import io.github.dsheirer.audio.AudioManager;
|
import io.github.dsheirer.audio.AudioManager;
|
||||||
import io.github.dsheirer.audio.AudioPanel;
|
import io.github.dsheirer.audio.AudioPanel;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastModel;
|
import io.github.dsheirer.audio.broadcast.BroadcastModel;
|
||||||
@@ -36,8 +38,6 @@ import io.github.dsheirer.source.SourceManager;
|
|||||||
import io.github.dsheirer.source.tuner.TunerModel;
|
import io.github.dsheirer.source.tuner.TunerModel;
|
||||||
import io.github.dsheirer.source.tuner.TunerViewPanel;
|
import io.github.dsheirer.source.tuner.TunerViewPanel;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import io.github.dsheirer.alias.AliasController;
|
|
||||||
import io.github.dsheirer.alias.AliasModel;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|||||||
@@ -18,6 +18,9 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.controller.channel;
|
package io.github.dsheirer.controller.channel;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||||
import io.github.dsheirer.controller.config.Configuration;
|
import io.github.dsheirer.controller.config.Configuration;
|
||||||
import io.github.dsheirer.module.decode.DecoderFactory;
|
import io.github.dsheirer.module.decode.DecoderFactory;
|
||||||
import io.github.dsheirer.module.decode.DecoderType;
|
import io.github.dsheirer.module.decode.DecoderType;
|
||||||
@@ -38,24 +41,11 @@ import io.github.dsheirer.source.tuner.TunerChannel.Type;
|
|||||||
import io.github.dsheirer.source.tuner.frequency.FrequencyChangeEvent;
|
import io.github.dsheirer.source.tuner.frequency.FrequencyChangeEvent;
|
||||||
import io.github.dsheirer.source.tuner.frequency.FrequencyChangeEvent.Event;
|
import io.github.dsheirer.source.tuner.frequency.FrequencyChangeEvent.Event;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
@JacksonXmlRootElement(localName = "channel")
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
|
||||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
|
||||||
import javax.xml.bind.annotation.XmlTransient;
|
|
||||||
|
|
||||||
@XmlSeeAlso({Configuration.class})
|
|
||||||
@XmlRootElement(name = "channel")
|
|
||||||
public class Channel extends Configuration implements Listener<FrequencyChangeEvent>
|
public class Channel extends Configuration implements Listener<FrequencyChangeEvent>
|
||||||
{
|
{
|
||||||
// Standard channels are persisted and traffic channels are temporary
|
// Standard channels are persisted and traffic channels are temporary
|
||||||
public enum ChannelType
|
public enum ChannelType {STANDARD, TRAFFIC}
|
||||||
{
|
|
||||||
STANDARD, TRAFFIC
|
|
||||||
}
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
// Static unique channel identifier tracking
|
// Static unique channel identifier tracking
|
||||||
private static int UNIQUE_ID = 0;
|
private static int UNIQUE_ID = 0;
|
||||||
@@ -161,7 +151,7 @@ public class Channel extends Configuration implements Listener<FrequencyChangeEv
|
|||||||
/**
|
/**
|
||||||
* Unique identifier for this channel. Value is transient (not persisted).
|
* Unique identifier for this channel. Value is transient (not persisted).
|
||||||
*/
|
*/
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
public int getChannelID()
|
public int getChannelID()
|
||||||
{
|
{
|
||||||
return mChannelID;
|
return mChannelID;
|
||||||
@@ -171,7 +161,7 @@ public class Channel extends Configuration implements Listener<FrequencyChangeEv
|
|||||||
* Indicates if this channel has been selected for prioritized audio output
|
* Indicates if this channel has been selected for prioritized audio output
|
||||||
* and display of processing chain products
|
* and display of processing chain products
|
||||||
*/
|
*/
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
public boolean isSelected()
|
public boolean isSelected()
|
||||||
{
|
{
|
||||||
return mSelected;
|
return mSelected;
|
||||||
@@ -191,7 +181,7 @@ public class Channel extends Configuration implements Listener<FrequencyChangeEv
|
|||||||
mSelected = selected;
|
mSelected = selected;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
public ChannelType getChannelType()
|
public ChannelType getChannelType()
|
||||||
{
|
{
|
||||||
return mChannelType;
|
return mChannelType;
|
||||||
@@ -200,7 +190,7 @@ public class Channel extends Configuration implements Listener<FrequencyChangeEv
|
|||||||
/**
|
/**
|
||||||
* Returns the owning system for this channel.
|
* Returns the owning system for this channel.
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "system")
|
@JacksonXmlProperty(isAttribute = true, localName = "system")
|
||||||
public String getSystem()
|
public String getSystem()
|
||||||
{
|
{
|
||||||
return mSystem;
|
return mSystem;
|
||||||
@@ -219,7 +209,7 @@ public class Channel extends Configuration implements Listener<FrequencyChangeEv
|
|||||||
/**
|
/**
|
||||||
* Returns the owning site for this channel.
|
* Returns the owning site for this channel.
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "site")
|
@JacksonXmlProperty(isAttribute = true, localName = "site")
|
||||||
public String getSite()
|
public String getSite()
|
||||||
{
|
{
|
||||||
return mSite;
|
return mSite;
|
||||||
@@ -238,7 +228,7 @@ public class Channel extends Configuration implements Listener<FrequencyChangeEv
|
|||||||
/**
|
/**
|
||||||
* Returns the name of this channel.
|
* Returns the name of this channel.
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "name")
|
@JacksonXmlProperty(isAttribute = true, localName = "name")
|
||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
return mName;
|
return mName;
|
||||||
@@ -270,7 +260,7 @@ public class Channel extends Configuration implements Listener<FrequencyChangeEv
|
|||||||
/**
|
/**
|
||||||
* Indicates if this channel is enabled for processing.
|
* Indicates if this channel is enabled for processing.
|
||||||
*/
|
*/
|
||||||
@XmlAttribute(name = "enabled")
|
@JacksonXmlProperty(isAttribute = true, localName = "enabled")
|
||||||
public boolean getEnabled()
|
public boolean getEnabled()
|
||||||
{
|
{
|
||||||
return mEnabled;
|
return mEnabled;
|
||||||
@@ -295,7 +285,7 @@ public class Channel extends Configuration implements Listener<FrequencyChangeEv
|
|||||||
* Returns the alias list that is used by this channel for looking up alias
|
* Returns the alias list that is used by this channel for looking up alias
|
||||||
* values for the various identifiers produced by the decoder(s).
|
* values for the various identifiers produced by the decoder(s).
|
||||||
*/
|
*/
|
||||||
@XmlElement(name = "alias_list_name")
|
@JacksonXmlProperty(isAttribute = false, localName = "alias_list_name")
|
||||||
public String getAliasListName()
|
public String getAliasListName()
|
||||||
{
|
{
|
||||||
return mAliasListName;
|
return mAliasListName;
|
||||||
@@ -313,7 +303,7 @@ public class Channel extends Configuration implements Listener<FrequencyChangeEv
|
|||||||
/**
|
/**
|
||||||
* Gets the primary decoder configuration used by this channel
|
* Gets the primary decoder configuration used by this channel
|
||||||
*/
|
*/
|
||||||
@XmlElement(name = "decode_configuration")
|
@JacksonXmlProperty(isAttribute = false, localName = "decode_configuration")
|
||||||
public DecodeConfiguration getDecodeConfiguration()
|
public DecodeConfiguration getDecodeConfiguration()
|
||||||
{
|
{
|
||||||
return mDecodeConfiguration;
|
return mDecodeConfiguration;
|
||||||
@@ -331,7 +321,7 @@ public class Channel extends Configuration implements Listener<FrequencyChangeEv
|
|||||||
* Gets the aux decoder configuration used by this channel. Aux decoders
|
* Gets the aux decoder configuration used by this channel. Aux decoders
|
||||||
* operate on demodulated audio
|
* operate on demodulated audio
|
||||||
*/
|
*/
|
||||||
@XmlElement(name = "aux_decode_configuration")
|
@JacksonXmlProperty(isAttribute = false, localName = "aux_decode_configuration")
|
||||||
public AuxDecodeConfiguration getAuxDecodeConfiguration()
|
public AuxDecodeConfiguration getAuxDecodeConfiguration()
|
||||||
{
|
{
|
||||||
return mAuxDecodeConfiguration;
|
return mAuxDecodeConfiguration;
|
||||||
@@ -349,7 +339,7 @@ public class Channel extends Configuration implements Listener<FrequencyChangeEv
|
|||||||
* Returns the source configuration for this channel. A channel source
|
* Returns the source configuration for this channel. A channel source
|
||||||
* identifies where the processing chain will get source sample data from.
|
* identifies where the processing chain will get source sample data from.
|
||||||
*/
|
*/
|
||||||
@XmlElement(name = "source_configuration")
|
@JacksonXmlProperty(isAttribute = false, localName = "source_configuration")
|
||||||
public SourceConfiguration getSourceConfiguration()
|
public SourceConfiguration getSourceConfiguration()
|
||||||
{
|
{
|
||||||
return mSourceConfiguration;
|
return mSourceConfiguration;
|
||||||
@@ -370,7 +360,7 @@ public class Channel extends Configuration implements Listener<FrequencyChangeEv
|
|||||||
/**
|
/**
|
||||||
* Returns the event logger configuration for this channel.
|
* Returns the event logger configuration for this channel.
|
||||||
*/
|
*/
|
||||||
@XmlElement(name = "event_log_configuration")
|
@JacksonXmlProperty(isAttribute = false, localName = "event_log_configuration")
|
||||||
public EventLogConfiguration getEventLogConfiguration()
|
public EventLogConfiguration getEventLogConfiguration()
|
||||||
{
|
{
|
||||||
return mEventLogConfiguration;
|
return mEventLogConfiguration;
|
||||||
@@ -387,7 +377,7 @@ public class Channel extends Configuration implements Listener<FrequencyChangeEv
|
|||||||
/**
|
/**
|
||||||
* Returns the recorder configuration for this channel.
|
* Returns the recorder configuration for this channel.
|
||||||
*/
|
*/
|
||||||
@XmlElement(name = "record_configuration")
|
@JacksonXmlProperty(isAttribute = false, localName = "record_configuration")
|
||||||
public RecordConfiguration getRecordConfiguration()
|
public RecordConfiguration getRecordConfiguration()
|
||||||
{
|
{
|
||||||
return mRecordConfiguration;
|
return mRecordConfiguration;
|
||||||
@@ -409,7 +399,7 @@ public class Channel extends Configuration implements Listener<FrequencyChangeEv
|
|||||||
* If the source configuration is not a tuner or recording, this method
|
* If the source configuration is not a tuner or recording, this method
|
||||||
* returns null.
|
* returns null.
|
||||||
*/
|
*/
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
public TunerChannel getTunerChannel()
|
public TunerChannel getTunerChannel()
|
||||||
{
|
{
|
||||||
if(mTunerChannel == null)
|
if(mTunerChannel == null)
|
||||||
@@ -462,9 +452,10 @@ public class Channel extends Configuration implements Listener<FrequencyChangeEv
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Current channel frequency correction value (when this channel is processing)
|
* Current channel frequency correction value (when this channel is processing)
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
public int getChannelFrequencyCorrection()
|
public int getChannelFrequencyCorrection()
|
||||||
{
|
{
|
||||||
return mChannelFrequencyCorrection;
|
return mChannelFrequencyCorrection;
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package io.github.dsheirer.controller.channel;
|
package io.github.dsheirer.controller.channel;
|
||||||
|
|
||||||
import com.jidesoft.swing.JideSplitPane;
|
import com.jidesoft.swing.JideSplitPane;
|
||||||
|
import io.github.dsheirer.alias.AliasModel;
|
||||||
import io.github.dsheirer.controller.channel.map.ChannelMapModel;
|
import io.github.dsheirer.controller.channel.map.ChannelMapModel;
|
||||||
import io.github.dsheirer.source.SourceManager;
|
import io.github.dsheirer.source.SourceManager;
|
||||||
import net.coderazzi.filters.gui.AutoChoices;
|
import net.coderazzi.filters.gui.AutoChoices;
|
||||||
import net.coderazzi.filters.gui.TableFilterHeader;
|
import net.coderazzi.filters.gui.TableFilterHeader;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import io.github.dsheirer.alias.AliasModel;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.event.ListSelectionEvent;
|
import javax.swing.event.ListSelectionEvent;
|
||||||
|
|||||||
@@ -18,17 +18,17 @@
|
|||||||
package io.github.dsheirer.controller.channel;
|
package io.github.dsheirer.controller.channel;
|
||||||
|
|
||||||
import com.jidesoft.swing.JideTabbedPane;
|
import com.jidesoft.swing.JideTabbedPane;
|
||||||
|
import io.github.dsheirer.alias.AliasModel;
|
||||||
import io.github.dsheirer.controller.channel.map.ChannelMapModel;
|
import io.github.dsheirer.controller.channel.map.ChannelMapModel;
|
||||||
import io.github.dsheirer.gui.editor.Editor;
|
import io.github.dsheirer.gui.editor.Editor;
|
||||||
import io.github.dsheirer.gui.editor.EditorValidationException;
|
import io.github.dsheirer.gui.editor.EditorValidationException;
|
||||||
|
import io.github.dsheirer.module.decode.AuxDecodeConfigurationEditor;
|
||||||
|
import io.github.dsheirer.module.decode.DecodeConfigurationEditor;
|
||||||
|
import io.github.dsheirer.module.log.EventLogConfigurationEditor;
|
||||||
import io.github.dsheirer.record.RecordConfigurationEditor;
|
import io.github.dsheirer.record.RecordConfigurationEditor;
|
||||||
import io.github.dsheirer.source.SourceConfigurationEditor;
|
import io.github.dsheirer.source.SourceConfigurationEditor;
|
||||||
import io.github.dsheirer.source.SourceManager;
|
import io.github.dsheirer.source.SourceManager;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import io.github.dsheirer.alias.AliasModel;
|
|
||||||
import io.github.dsheirer.module.decode.AuxDecodeConfigurationEditor;
|
|
||||||
import io.github.dsheirer.module.decode.DecodeConfigurationEditor;
|
|
||||||
import io.github.dsheirer.module.log.EventLogConfigurationEditor;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.controller.channel;
|
package io.github.dsheirer.controller.channel;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.AliasModel;
|
||||||
import io.github.dsheirer.audio.AudioPacket;
|
import io.github.dsheirer.audio.AudioPacket;
|
||||||
import io.github.dsheirer.channel.metadata.Attribute;
|
import io.github.dsheirer.channel.metadata.Attribute;
|
||||||
import io.github.dsheirer.channel.metadata.AttributeChangeRequest;
|
import io.github.dsheirer.channel.metadata.AttributeChangeRequest;
|
||||||
@@ -25,6 +26,12 @@ import io.github.dsheirer.channel.metadata.ChannelMetadataModel;
|
|||||||
import io.github.dsheirer.controller.channel.map.ChannelMapModel;
|
import io.github.dsheirer.controller.channel.map.ChannelMapModel;
|
||||||
import io.github.dsheirer.filter.FilterSet;
|
import io.github.dsheirer.filter.FilterSet;
|
||||||
import io.github.dsheirer.message.Message;
|
import io.github.dsheirer.message.Message;
|
||||||
|
import io.github.dsheirer.module.Module;
|
||||||
|
import io.github.dsheirer.module.ProcessingChain;
|
||||||
|
import io.github.dsheirer.module.decode.DecoderFactory;
|
||||||
|
import io.github.dsheirer.module.decode.DecoderType;
|
||||||
|
import io.github.dsheirer.module.decode.event.MessageActivityModel;
|
||||||
|
import io.github.dsheirer.module.log.EventLogManager;
|
||||||
import io.github.dsheirer.record.RecorderManager;
|
import io.github.dsheirer.record.RecorderManager;
|
||||||
import io.github.dsheirer.record.RecorderType;
|
import io.github.dsheirer.record.RecorderType;
|
||||||
import io.github.dsheirer.sample.Listener;
|
import io.github.dsheirer.sample.Listener;
|
||||||
@@ -35,13 +42,6 @@ import io.github.dsheirer.source.SourceType;
|
|||||||
import io.github.dsheirer.source.config.SourceConfigTuner;
|
import io.github.dsheirer.source.config.SourceConfigTuner;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.AliasModel;
|
|
||||||
import io.github.dsheirer.module.Module;
|
|
||||||
import io.github.dsheirer.module.ProcessingChain;
|
|
||||||
import io.github.dsheirer.module.decode.DecoderFactory;
|
|
||||||
import io.github.dsheirer.module.decode.DecoderType;
|
|
||||||
import io.github.dsheirer.module.decode.event.MessageActivityModel;
|
|
||||||
import io.github.dsheirer.module.log.EventLogManager;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -17,11 +17,11 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.controller.channel;
|
package io.github.dsheirer.controller.channel;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.AliasModel;
|
||||||
import io.github.dsheirer.gui.editor.Editor;
|
import io.github.dsheirer.gui.editor.Editor;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.AliasModel;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.event.DocumentEvent;
|
import javax.swing.event.DocumentEvent;
|
||||||
|
|||||||
@@ -17,128 +17,126 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.controller.channel.map;
|
package io.github.dsheirer.controller.channel.map;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
|
||||||
import javax.xml.bind.annotation.XmlTransient;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@XmlSeeAlso( { ChannelRange.class } )
|
|
||||||
public class ChannelMap
|
public class ChannelMap
|
||||||
{
|
{
|
||||||
private String mName;
|
private String mName;
|
||||||
private boolean mInvalid = false;
|
private boolean mInvalid = false;
|
||||||
|
|
||||||
private List<ChannelRange> mRanges = new ArrayList<ChannelRange>();
|
private List<ChannelRange> mRanges = new ArrayList<ChannelRange>();
|
||||||
|
|
||||||
public ChannelMap()
|
public ChannelMap()
|
||||||
{
|
{
|
||||||
this( "New Channel Map" );
|
this("New Channel Map");
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChannelMap( String name )
|
public ChannelMap(String name)
|
||||||
{
|
{
|
||||||
mName = name;
|
mName = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChannelMap copyOf()
|
public ChannelMap copyOf()
|
||||||
{
|
{
|
||||||
ChannelMap map = new ChannelMap( new String( mName ) );
|
ChannelMap map = new ChannelMap(new String(mName));
|
||||||
|
|
||||||
for( ChannelRange range: mRanges )
|
for(ChannelRange range : mRanges)
|
||||||
{
|
{
|
||||||
map.addRange( range.copyOf() );
|
map.addRange(range.copyOf());
|
||||||
}
|
}
|
||||||
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
public boolean isInvalid()
|
public boolean isInvalid()
|
||||||
{
|
{
|
||||||
return mInvalid;
|
return mInvalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return mName + ( mInvalid ? " - Error" : "" );
|
return mName + (mInvalid ? " - Error" : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlElement( name = "range" )
|
@JacksonXmlProperty(isAttribute = false, localName = "range")
|
||||||
public List<ChannelRange> getRanges()
|
public List<ChannelRange> getRanges()
|
||||||
{
|
{
|
||||||
return mRanges;
|
return mRanges;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRanges( List<ChannelRange> ranges )
|
public void setRanges(List<ChannelRange> ranges)
|
||||||
{
|
{
|
||||||
mRanges = ranges;
|
mRanges = ranges;
|
||||||
|
|
||||||
validate();
|
validate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute
|
@JacksonXmlProperty(isAttribute = true, localName = "name")
|
||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
return mName;
|
return mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setName( String name )
|
public void setName(String name)
|
||||||
{
|
{
|
||||||
mName = name;
|
mName = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getFrequency( int channelNumber )
|
public long getFrequency(int channelNumber)
|
||||||
{
|
{
|
||||||
for( ChannelRange range: mRanges )
|
for(ChannelRange range : mRanges)
|
||||||
{
|
{
|
||||||
if( range.hasChannel( channelNumber ) )
|
if(range.hasChannel(channelNumber))
|
||||||
{
|
{
|
||||||
return range.getFrequency( channelNumber );
|
return range.getFrequency(channelNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validates each of the channel ranges for overlap
|
* Validates each of the channel ranges for overlap
|
||||||
*/
|
*/
|
||||||
private void validate()
|
private void validate()
|
||||||
{
|
{
|
||||||
mInvalid = false;
|
mInvalid = false;
|
||||||
|
|
||||||
for( int x = 0; x < mRanges.size(); x++ )
|
for(int x = 0; x < mRanges.size(); x++)
|
||||||
{
|
{
|
||||||
if( !mRanges.get( x ).isValid() )
|
if(!mRanges.get(x).isValid())
|
||||||
{
|
{
|
||||||
mInvalid = true;
|
mInvalid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for( int y = x + 1; y < mRanges.size(); y++ )
|
for(int y = x + 1; y < mRanges.size(); y++)
|
||||||
{
|
{
|
||||||
if( mRanges.get( x ).overlaps( mRanges.get( y ) ) )
|
if(mRanges.get(x).overlaps(mRanges.get(y)))
|
||||||
{
|
{
|
||||||
mInvalid = true;
|
mInvalid = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void addRange( ChannelRange range )
|
public void addRange(ChannelRange range)
|
||||||
{
|
{
|
||||||
mRanges.add( range );
|
mRanges.add(range);
|
||||||
|
|
||||||
validate();
|
validate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeRange( ChannelRange range )
|
public void removeRange(ChannelRange range)
|
||||||
{
|
{
|
||||||
mRanges.remove( range );
|
mRanges.remove(range);
|
||||||
|
|
||||||
validate();
|
validate();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,169 +17,172 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.controller.channel.map;
|
package io.github.dsheirer.controller.channel.map;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import javax.xml.bind.annotation.XmlTransient;
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
|
|
||||||
@XmlRootElement
|
@JacksonXmlRootElement(localName = "range")
|
||||||
@XmlType( name = "range" )
|
|
||||||
public class ChannelRange
|
public class ChannelRange
|
||||||
{
|
{
|
||||||
private static final DecimalFormat FREQUENCY_FORMATTER = new DecimalFormat( "#.0000" );
|
private static final DecimalFormat FREQUENCY_FORMATTER = new DecimalFormat("#.0000");
|
||||||
|
|
||||||
private int mFirst = 1;
|
private int mFirst = 1;
|
||||||
private int mLast = 1023;
|
private int mLast = 1023;
|
||||||
private int mBase = 450000000;
|
private int mBase = 450000000;
|
||||||
private int mSize = 12500;
|
private int mSize = 12500;
|
||||||
|
|
||||||
private boolean mOverlapping = false;
|
private boolean mOverlapping = false;
|
||||||
|
|
||||||
public ChannelRange()
|
public ChannelRange()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChannelRange( int first, int last, int base, int size )
|
public ChannelRange(int first, int last, int base, int size)
|
||||||
{
|
{
|
||||||
mFirst = first;
|
mFirst = first;
|
||||||
mLast = last;
|
mLast = last;
|
||||||
mBase = base;
|
mBase = base;
|
||||||
mSize = size;
|
mSize = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChannelRange copyOf()
|
public ChannelRange copyOf()
|
||||||
{
|
{
|
||||||
return new ChannelRange( mFirst, mLast, mBase, mSize );
|
return new ChannelRange(mFirst, mLast, mBase, mSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDescription()
|
@JsonIgnore
|
||||||
{
|
public String getDescription()
|
||||||
StringBuilder sb = new StringBuilder();
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
if( isValid() )
|
if(isValid())
|
||||||
{
|
{
|
||||||
sb.append( "First: " );
|
sb.append("First: ");
|
||||||
sb.append( mFirst + "=" );
|
sb.append(mFirst + "=");
|
||||||
|
|
||||||
long frequency = getFrequency( mFirst );
|
long frequency = getFrequency(mFirst);
|
||||||
|
|
||||||
sb.append( FREQUENCY_FORMATTER.format( (double)frequency / 1E6D ) );
|
sb.append(FREQUENCY_FORMATTER.format((double)frequency / 1E6D));
|
||||||
sb.append( " Last: " );
|
sb.append(" Last: ");
|
||||||
sb.append( mLast + "=" );
|
sb.append(mLast + "=");
|
||||||
|
|
||||||
frequency = getFrequency( mLast );
|
frequency = getFrequency(mLast);
|
||||||
sb.append( FREQUENCY_FORMATTER.format( (double)frequency / 1E6D ) );
|
sb.append(FREQUENCY_FORMATTER.format((double)frequency / 1E6D));
|
||||||
sb.append( " MHz" );
|
sb.append(" MHz");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sb.append( "First channel must be smaller than last channel" );
|
sb.append("First channel must be smaller than last channel");
|
||||||
}
|
}
|
||||||
|
|
||||||
if( isOverlapping() )
|
if(isOverlapping())
|
||||||
{
|
{
|
||||||
if( sb.length() > 0 )
|
if(sb.length() > 0)
|
||||||
{
|
{
|
||||||
sb.append( ", " );
|
sb.append(", ");
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append( "Overlap!" );
|
sb.append("Overlap!");
|
||||||
}
|
}
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isValid()
|
@JsonIgnore
|
||||||
{
|
public boolean isValid()
|
||||||
return mFirst < mLast;
|
{
|
||||||
}
|
return mFirst < mLast;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean overlaps( ChannelRange other )
|
public boolean overlaps(ChannelRange other)
|
||||||
{
|
{
|
||||||
return ( mFirst <= other.mFirst && other.mFirst <= mLast ) ||
|
return (mFirst <= other.mFirst && other.mFirst <= mLast) ||
|
||||||
( mFirst <= other.mLast && other.mLast <= mLast ) ||
|
(mFirst <= other.mLast && other.mLast <= mLast) ||
|
||||||
( mFirst <= other.mFirst && other.mLast <= mLast ) ||
|
(mFirst <= other.mFirst && other.mLast <= mLast) ||
|
||||||
( other.mFirst <= mFirst && mLast <= other.mLast );
|
(other.mFirst <= mFirst && mLast <= other.mLast);
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
public boolean isOverlapping()
|
public boolean isOverlapping()
|
||||||
{
|
{
|
||||||
return mOverlapping;
|
return mOverlapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOverlapping( boolean overlapping )
|
public void setOverlapping(boolean overlapping)
|
||||||
{
|
{
|
||||||
mOverlapping = overlapping;
|
mOverlapping = overlapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasChannel( int channel )
|
public boolean hasChannel(int channel)
|
||||||
{
|
{
|
||||||
return mFirst <= channel && channel <= mLast;
|
return mFirst <= channel && channel <= mLast;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getFrequency( int channel )
|
public long getFrequency(int channel)
|
||||||
{
|
{
|
||||||
if( hasChannel( channel ) )
|
if(hasChannel(channel))
|
||||||
{
|
{
|
||||||
return mBase + ( ( channel - mFirst ) * mSize );
|
return mBase + ((channel - mFirst) * mSize);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute( name = "first" )
|
@JacksonXmlProperty(isAttribute = true, localName = "first")
|
||||||
public int getFirstChannelNumber()
|
public int getFirstChannelNumber()
|
||||||
{
|
{
|
||||||
return mFirst;
|
return mFirst;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFirstChannelNumber( int first )
|
public void setFirstChannelNumber(int first)
|
||||||
{
|
{
|
||||||
mFirst = first;
|
mFirst = first;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute( name = "last" )
|
@JacksonXmlProperty(isAttribute = true, localName = "last")
|
||||||
public void setLastChannelNumber( int last )
|
public void setLastChannelNumber(int last)
|
||||||
{
|
{
|
||||||
mLast = last;
|
mLast = last;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getLastChannelNumber()
|
public int getLastChannelNumber()
|
||||||
{
|
{
|
||||||
return mLast;
|
return mLast;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the base frequency
|
* Sets the base frequency
|
||||||
* @param base frequency in hertz
|
*
|
||||||
*/
|
* @param base frequency in hertz
|
||||||
@XmlAttribute( name = "base" )
|
*/
|
||||||
public void setBase( int base )
|
@JacksonXmlProperty(isAttribute = true, localName = "base")
|
||||||
{
|
public void setBase(int base)
|
||||||
mBase = base;
|
{
|
||||||
}
|
mBase = base;
|
||||||
|
}
|
||||||
|
|
||||||
public int getBase()
|
public int getBase()
|
||||||
{
|
{
|
||||||
return mBase;
|
return mBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the channel size
|
* Sets the channel size
|
||||||
* @param size in hertz
|
*
|
||||||
*/
|
* @param size in hertz
|
||||||
@XmlAttribute( name = "size" )
|
*/
|
||||||
public void setSize( int size )
|
@JacksonXmlProperty(isAttribute = true, localName = "size")
|
||||||
{
|
public void setSize(int size)
|
||||||
mSize = size;
|
{
|
||||||
}
|
mSize = size;
|
||||||
|
}
|
||||||
|
|
||||||
public int getSize()
|
public int getSize()
|
||||||
{
|
{
|
||||||
return mSize;
|
return mSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,24 +17,12 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.controller.config;
|
package io.github.dsheirer.controller.config;
|
||||||
|
|
||||||
import io.github.dsheirer.record.config.RecordConfiguration;
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||||
import io.github.dsheirer.source.config.SourceConfiguration;
|
|
||||||
import io.github.dsheirer.module.decode.config.AuxDecodeConfiguration;
|
|
||||||
import io.github.dsheirer.module.decode.config.DecodeConfiguration;
|
|
||||||
import io.github.dsheirer.module.log.config.EventLogConfiguration;
|
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
@JacksonXmlRootElement(localName = "configuration")
|
||||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
|
||||||
|
|
||||||
@XmlSeeAlso( { AuxDecodeConfiguration.class,
|
|
||||||
DecodeConfiguration.class,
|
|
||||||
EventLogConfiguration.class,
|
|
||||||
RecordConfiguration.class,
|
|
||||||
SourceConfiguration.class } )
|
|
||||||
@XmlRootElement( name = "configuration" )
|
|
||||||
public abstract class Configuration
|
public abstract class Configuration
|
||||||
{
|
{
|
||||||
public Configuration()
|
public Configuration()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ package io.github.dsheirer.dsp.filter.cic;
|
|||||||
|
|
||||||
import io.github.dsheirer.dsp.filter.FilterFactory;
|
import io.github.dsheirer.dsp.filter.FilterFactory;
|
||||||
import io.github.dsheirer.dsp.filter.Filters;
|
import io.github.dsheirer.dsp.filter.Filters;
|
||||||
|
import io.github.dsheirer.dsp.filter.Window.WindowType;
|
||||||
|
import io.github.dsheirer.dsp.filter.fir.real.RealFIRFilter_RB_RB;
|
||||||
import io.github.dsheirer.dsp.filter.halfband.real.HalfBandFilter_RB_RB;
|
import io.github.dsheirer.dsp.filter.halfband.real.HalfBandFilter_RB_RB;
|
||||||
import io.github.dsheirer.sample.Listener;
|
import io.github.dsheirer.sample.Listener;
|
||||||
import io.github.dsheirer.sample.decimator.RealDecimator;
|
import io.github.dsheirer.sample.decimator.RealDecimator;
|
||||||
@@ -28,8 +30,6 @@ import io.github.dsheirer.sample.real.RealToRealBufferAssembler;
|
|||||||
import org.apache.commons.lang3.Validate;
|
import org.apache.commons.lang3.Validate;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.dsp.filter.Window.WindowType;
|
|
||||||
import io.github.dsheirer.dsp.filter.fir.real.RealFIRFilter_RB_RB;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package io.github.dsheirer.dsp.filter.design;
|
package io.github.dsheirer.dsp.filter.design;
|
||||||
|
|
||||||
|
import io.github.dsheirer.dsp.filter.fir.FIRFilterSpecification;
|
||||||
|
import io.github.dsheirer.dsp.filter.fir.remez.RemezFIRFilterDesigner;
|
||||||
import javafx.application.Application;
|
import javafx.application.Application;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.dsp.filter.fir.FIRFilterSpecification;
|
|
||||||
import io.github.dsheirer.dsp.filter.fir.remez.RemezFIRFilterDesigner;
|
|
||||||
|
|
||||||
public class FilterViewer extends Application
|
public class FilterViewer extends Application
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package io.github.dsheirer.dsp.filter.halfband.complex;
|
package io.github.dsheirer.dsp.filter.halfband.complex;
|
||||||
|
|
||||||
|
import io.github.dsheirer.dsp.filter.halfband.real.HalfBandFilter;
|
||||||
import io.github.dsheirer.sample.Listener;
|
import io.github.dsheirer.sample.Listener;
|
||||||
import io.github.dsheirer.sample.complex.ComplexBuffer;
|
import io.github.dsheirer.sample.complex.ComplexBuffer;
|
||||||
import io.github.dsheirer.dsp.filter.halfband.real.HalfBandFilter;
|
|
||||||
|
|
||||||
public class HalfBandFilter_CB_CB implements Listener<ComplexBuffer>
|
public class HalfBandFilter_CB_CB implements Listener<ComplexBuffer>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,12 +21,12 @@ import io.github.dsheirer.dsp.filter.design.FilterDesignException;
|
|||||||
import io.github.dsheirer.dsp.filter.fir.FIRFilter;
|
import io.github.dsheirer.dsp.filter.fir.FIRFilter;
|
||||||
import io.github.dsheirer.dsp.filter.fir.FIRFilterSpecification;
|
import io.github.dsheirer.dsp.filter.fir.FIRFilterSpecification;
|
||||||
import io.github.dsheirer.dsp.filter.fir.remez.RemezFIRFilterDesigner;
|
import io.github.dsheirer.dsp.filter.fir.remez.RemezFIRFilterDesigner;
|
||||||
|
import io.github.dsheirer.dsp.mixer.Oscillator;
|
||||||
import io.github.dsheirer.sample.Listener;
|
import io.github.dsheirer.sample.Listener;
|
||||||
import io.github.dsheirer.sample.real.RealBuffer;
|
import io.github.dsheirer.sample.real.RealBuffer;
|
||||||
import io.github.dsheirer.sample.real.RealToRealBufferAssembler;
|
import io.github.dsheirer.sample.real.RealToRealBufferAssembler;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.dsp.mixer.Oscillator;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
package io.github.dsheirer.dsp.fsk;
|
package io.github.dsheirer.dsp.fsk;
|
||||||
|
|
||||||
import io.github.dsheirer.buffer.BooleanAveragingBuffer;
|
import io.github.dsheirer.buffer.BooleanAveragingBuffer;
|
||||||
|
import io.github.dsheirer.dsp.symbol.SymbolEvent;
|
||||||
|
import io.github.dsheirer.dsp.symbol.SymbolEvent.Shift;
|
||||||
import io.github.dsheirer.instrument.Instrumentable;
|
import io.github.dsheirer.instrument.Instrumentable;
|
||||||
import io.github.dsheirer.instrument.tap.Tap;
|
import io.github.dsheirer.instrument.tap.Tap;
|
||||||
import io.github.dsheirer.instrument.tap.TapGroup;
|
import io.github.dsheirer.instrument.tap.TapGroup;
|
||||||
@@ -26,8 +28,6 @@ import io.github.dsheirer.sample.Listener;
|
|||||||
import io.github.dsheirer.sample.real.RealBuffer;
|
import io.github.dsheirer.sample.real.RealBuffer;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.dsp.symbol.SymbolEvent;
|
|
||||||
import io.github.dsheirer.dsp.symbol.SymbolEvent.Shift;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.BitSet;
|
import java.util.BitSet;
|
||||||
|
|||||||
@@ -18,9 +18,15 @@
|
|||||||
package io.github.dsheirer.dsp.fsk;
|
package io.github.dsheirer.dsp.fsk;
|
||||||
|
|
||||||
import io.github.dsheirer.dsp.filter.Filters;
|
import io.github.dsheirer.dsp.filter.Filters;
|
||||||
|
import io.github.dsheirer.dsp.filter.FloatHalfBandFilter;
|
||||||
import io.github.dsheirer.dsp.filter.FloatHalfBandNoDecimateFilter;
|
import io.github.dsheirer.dsp.filter.FloatHalfBandNoDecimateFilter;
|
||||||
import io.github.dsheirer.dsp.filter.LTRPulseShapingFilter;
|
import io.github.dsheirer.dsp.filter.LTRPulseShapingFilter;
|
||||||
import io.github.dsheirer.dsp.filter.SquaringFilter;
|
import io.github.dsheirer.dsp.filter.SquaringFilter;
|
||||||
|
import io.github.dsheirer.dsp.filter.Window.WindowType;
|
||||||
|
import io.github.dsheirer.dsp.filter.cic.RealPrimeCICDecimate;
|
||||||
|
import io.github.dsheirer.dsp.filter.dc.IIRSinglePoleDCRemovalFilter;
|
||||||
|
import io.github.dsheirer.dsp.symbol.Slicer;
|
||||||
|
import io.github.dsheirer.dsp.symbol.Slicer.Output;
|
||||||
import io.github.dsheirer.instrument.Instrumentable;
|
import io.github.dsheirer.instrument.Instrumentable;
|
||||||
import io.github.dsheirer.instrument.tap.Tap;
|
import io.github.dsheirer.instrument.tap.Tap;
|
||||||
import io.github.dsheirer.instrument.tap.TapGroup;
|
import io.github.dsheirer.instrument.tap.TapGroup;
|
||||||
@@ -30,12 +36,6 @@ import io.github.dsheirer.instrument.tap.stream.FloatTap;
|
|||||||
import io.github.dsheirer.instrument.tap.stream.SymbolEventTap;
|
import io.github.dsheirer.instrument.tap.stream.SymbolEventTap;
|
||||||
import io.github.dsheirer.sample.Listener;
|
import io.github.dsheirer.sample.Listener;
|
||||||
import io.github.dsheirer.sample.real.RealBuffer;
|
import io.github.dsheirer.sample.real.RealBuffer;
|
||||||
import io.github.dsheirer.dsp.filter.FloatHalfBandFilter;
|
|
||||||
import io.github.dsheirer.dsp.filter.Window.WindowType;
|
|
||||||
import io.github.dsheirer.dsp.filter.cic.RealPrimeCICDecimate;
|
|
||||||
import io.github.dsheirer.dsp.filter.dc.IIRSinglePoleDCRemovalFilter;
|
|
||||||
import io.github.dsheirer.dsp.symbol.Slicer;
|
|
||||||
import io.github.dsheirer.dsp.symbol.Slicer.Output;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ package io.github.dsheirer.dsp.psk;
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
import io.github.dsheirer.buffer.FloatAveragingBuffer;
|
import io.github.dsheirer.buffer.FloatAveragingBuffer;
|
||||||
|
import io.github.dsheirer.dsp.filter.interpolator.RealInterpolator;
|
||||||
|
import io.github.dsheirer.dsp.symbol.Dibit;
|
||||||
import io.github.dsheirer.instrument.Instrumentable;
|
import io.github.dsheirer.instrument.Instrumentable;
|
||||||
import io.github.dsheirer.instrument.tap.Tap;
|
import io.github.dsheirer.instrument.tap.Tap;
|
||||||
import io.github.dsheirer.instrument.tap.TapGroup;
|
import io.github.dsheirer.instrument.tap.TapGroup;
|
||||||
@@ -40,8 +42,6 @@ import io.github.dsheirer.sample.Listener;
|
|||||||
import io.github.dsheirer.sample.complex.Complex;
|
import io.github.dsheirer.sample.complex.Complex;
|
||||||
import io.github.dsheirer.sample.complex.ComplexSampleListener;
|
import io.github.dsheirer.sample.complex.ComplexSampleListener;
|
||||||
import io.github.dsheirer.source.tuner.frequency.IFrequencyChangeListener;
|
import io.github.dsheirer.source.tuner.frequency.IFrequencyChangeListener;
|
||||||
import io.github.dsheirer.dsp.filter.interpolator.RealInterpolator;
|
|
||||||
import io.github.dsheirer.dsp.symbol.Dibit;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package io.github.dsheirer.dsp.psk;
|
package io.github.dsheirer.dsp.psk;
|
||||||
|
|
||||||
|
import io.github.dsheirer.dsp.symbol.Dibit;
|
||||||
import io.github.dsheirer.sample.Broadcaster;
|
import io.github.dsheirer.sample.Broadcaster;
|
||||||
import io.github.dsheirer.sample.Listener;
|
import io.github.dsheirer.sample.Listener;
|
||||||
import io.github.dsheirer.sample.complex.Complex;
|
import io.github.dsheirer.sample.complex.Complex;
|
||||||
import io.github.dsheirer.dsp.symbol.Dibit;
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* SDR Trunk
|
* SDR Trunk
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package io.github.dsheirer.dsp.psk;
|
package io.github.dsheirer.dsp.psk;
|
||||||
|
|
||||||
|
import io.github.dsheirer.dsp.symbol.Dibit;
|
||||||
import io.github.dsheirer.sample.Broadcaster;
|
import io.github.dsheirer.sample.Broadcaster;
|
||||||
import io.github.dsheirer.sample.Listener;
|
import io.github.dsheirer.sample.Listener;
|
||||||
import io.github.dsheirer.sample.complex.Complex;
|
import io.github.dsheirer.sample.complex.Complex;
|
||||||
import io.github.dsheirer.dsp.symbol.Dibit;
|
|
||||||
|
|
||||||
public class QPSKStarSlicer implements Listener<Complex>
|
public class QPSKStarSlicer implements Listener<Complex>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
package io.github.dsheirer.gui;
|
package io.github.dsheirer.gui;
|
||||||
|
|
||||||
import com.jidesoft.swing.JideSplitPane;
|
import com.jidesoft.swing.JideSplitPane;
|
||||||
|
import io.github.dsheirer.alias.AliasModel;
|
||||||
|
import io.github.dsheirer.alias.action.AliasActionManager;
|
||||||
import io.github.dsheirer.audio.AudioManager;
|
import io.github.dsheirer.audio.AudioManager;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastModel;
|
import io.github.dsheirer.audio.broadcast.BroadcastModel;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastStatusPanel;
|
import io.github.dsheirer.audio.broadcast.BroadcastStatusPanel;
|
||||||
@@ -29,6 +31,7 @@ import io.github.dsheirer.controller.channel.ChannelSelectionManager;
|
|||||||
import io.github.dsheirer.controller.channel.map.ChannelMapModel;
|
import io.github.dsheirer.controller.channel.map.ChannelMapModel;
|
||||||
import io.github.dsheirer.icon.IconManager;
|
import io.github.dsheirer.icon.IconManager;
|
||||||
import io.github.dsheirer.map.MapService;
|
import io.github.dsheirer.map.MapService;
|
||||||
|
import io.github.dsheirer.module.log.EventLogManager;
|
||||||
import io.github.dsheirer.playlist.PlaylistManager;
|
import io.github.dsheirer.playlist.PlaylistManager;
|
||||||
import io.github.dsheirer.properties.SystemProperties;
|
import io.github.dsheirer.properties.SystemProperties;
|
||||||
import io.github.dsheirer.record.RecorderManager;
|
import io.github.dsheirer.record.RecorderManager;
|
||||||
@@ -46,9 +49,6 @@ import net.miginfocom.swing.MigLayout;
|
|||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import io.github.dsheirer.alias.AliasModel;
|
|
||||||
import io.github.dsheirer.alias.action.AliasActionManager;
|
|
||||||
import io.github.dsheirer.module.log.EventLogManager;
|
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|||||||
@@ -18,15 +18,15 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.icon;
|
package io.github.dsheirer.icon;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
|
||||||
import javax.xml.bind.annotation.XmlTransient;
|
|
||||||
|
|
||||||
@XmlRootElement(name = "icon")
|
@JacksonXmlRootElement(localName = "icon")
|
||||||
public class Icon implements Comparable<Icon>
|
public class Icon implements Comparable<Icon>
|
||||||
{
|
{
|
||||||
private final static Logger mLog = LoggerFactory.getLogger(Icon.class);
|
private final static Logger mLog = LoggerFactory.getLogger(Icon.class);
|
||||||
@@ -46,7 +46,7 @@ public class Icon implements Comparable<Icon>
|
|||||||
mPath = path;
|
mPath = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute(name = "name")
|
@JacksonXmlProperty(isAttribute = true, localName = "name")
|
||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
return mName;
|
return mName;
|
||||||
@@ -62,7 +62,7 @@ public class Icon implements Comparable<Icon>
|
|||||||
return mName;
|
return mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute(name = "path")
|
@JacksonXmlProperty(isAttribute = true, localName = "path")
|
||||||
public String getPath()
|
public String getPath()
|
||||||
{
|
{
|
||||||
return mPath;
|
return mPath;
|
||||||
@@ -73,7 +73,7 @@ public class Icon implements Comparable<Icon>
|
|||||||
mPath = path;
|
mPath = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
public ImageIcon getIcon()
|
public ImageIcon getIcon()
|
||||||
{
|
{
|
||||||
if(mImageIcon == null && mPath != null)
|
if(mImageIcon == null && mPath != null)
|
||||||
|
|||||||
@@ -1,21 +1,19 @@
|
|||||||
/*******************************************************************************
|
/*
|
||||||
|
* *********************************************************************************************************************
|
||||||
* sdrtrunk
|
* sdrtrunk
|
||||||
* Copyright (C) 2014-2017 Dennis Sheirer
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
|
||||||
* it under the terms of the GNU General Public License as published by
|
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* later version.
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License along with this program.
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
* If not, see <http://www.gnu.org/licenses/>
|
||||||
*
|
* *********************************************************************************************************************
|
||||||
******************************************************************************/
|
*/
|
||||||
package io.github.dsheirer.icon;
|
package io.github.dsheirer.icon;
|
||||||
|
|
||||||
import io.github.dsheirer.properties.SystemProperties;
|
import io.github.dsheirer.properties.SystemProperties;
|
||||||
|
|||||||
@@ -18,13 +18,13 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.icon;
|
package io.github.dsheirer.icon;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@XmlRootElement(name="iconset")
|
@JacksonXmlRootElement(localName = "iconset")
|
||||||
public class IconSet
|
public class IconSet
|
||||||
{
|
{
|
||||||
private String mDefaultIcon;
|
private String mDefaultIcon;
|
||||||
@@ -45,7 +45,7 @@ public class IconSet
|
|||||||
mIcons.remove(icon);
|
mIcons.remove(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlElement(name = "icon")
|
@JacksonXmlProperty(isAttribute = false, localName = "icon")
|
||||||
public List<Icon> getIcons()
|
public List<Icon> getIcons()
|
||||||
{
|
{
|
||||||
if(mIcons == null)
|
if(mIcons == null)
|
||||||
@@ -61,7 +61,7 @@ public class IconSet
|
|||||||
mIcons = icons;
|
mIcons = icons;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlAttribute(name = "default")
|
@JacksonXmlProperty(isAttribute = true, localName = "default")
|
||||||
public String getDefaultIcon()
|
public String getDefaultIcon()
|
||||||
{
|
{
|
||||||
return mDefaultIcon;
|
return mDefaultIcon;
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ package io.github.dsheirer.instrument;
|
|||||||
import io.github.dsheirer.controller.channel.Channel.ChannelType;
|
import io.github.dsheirer.controller.channel.Channel.ChannelType;
|
||||||
import io.github.dsheirer.instrument.tap.Tap;
|
import io.github.dsheirer.instrument.tap.Tap;
|
||||||
import io.github.dsheirer.instrument.tap.TapGroup;
|
import io.github.dsheirer.instrument.tap.TapGroup;
|
||||||
import io.github.dsheirer.source.Source;
|
|
||||||
import io.github.dsheirer.module.Module;
|
import io.github.dsheirer.module.Module;
|
||||||
import io.github.dsheirer.module.ProcessingChain;
|
import io.github.dsheirer.module.ProcessingChain;
|
||||||
|
import io.github.dsheirer.source.Source;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package io.github.dsheirer.instrument.gui;
|
package io.github.dsheirer.instrument.gui;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.AliasModel;
|
||||||
import io.github.dsheirer.audio.broadcast.BroadcastModel;
|
import io.github.dsheirer.audio.broadcast.BroadcastModel;
|
||||||
import io.github.dsheirer.controller.channel.ChannelModel;
|
import io.github.dsheirer.controller.channel.ChannelModel;
|
||||||
import io.github.dsheirer.controller.channel.map.ChannelMapModel;
|
import io.github.dsheirer.controller.channel.map.ChannelMapModel;
|
||||||
|
import io.github.dsheirer.module.decode.DecodeConfigurationEditor;
|
||||||
import io.github.dsheirer.playlist.PlaylistManager;
|
import io.github.dsheirer.playlist.PlaylistManager;
|
||||||
import io.github.dsheirer.source.IControllableFileSource;
|
import io.github.dsheirer.source.IControllableFileSource;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import io.github.dsheirer.alias.AliasModel;
|
|
||||||
import io.github.dsheirer.module.decode.DecodeConfigurationEditor;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|||||||
@@ -17,11 +17,11 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.instrument.tap.event;
|
package io.github.dsheirer.instrument.tap.event;
|
||||||
|
|
||||||
|
import io.github.dsheirer.dsp.symbol.SyncDetectListener;
|
||||||
|
import io.github.dsheirer.dsp.symbol.SyncDetectProvider;
|
||||||
import io.github.dsheirer.instrument.tap.Tap;
|
import io.github.dsheirer.instrument.tap.Tap;
|
||||||
import io.github.dsheirer.instrument.tap.TapListener;
|
import io.github.dsheirer.instrument.tap.TapListener;
|
||||||
import io.github.dsheirer.instrument.tap.TapType;
|
import io.github.dsheirer.instrument.tap.TapType;
|
||||||
import io.github.dsheirer.dsp.symbol.SyncDetectListener;
|
|
||||||
import io.github.dsheirer.dsp.symbol.SyncDetectProvider;
|
|
||||||
|
|
||||||
public class SyncDetectTap extends Tap
|
public class SyncDetectTap extends Tap
|
||||||
implements SyncDetectListener,
|
implements SyncDetectListener,
|
||||||
|
|||||||
@@ -17,10 +17,10 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.instrument.tap.stream;
|
package io.github.dsheirer.instrument.tap.stream;
|
||||||
|
|
||||||
|
import io.github.dsheirer.dsp.symbol.Dibit;
|
||||||
import io.github.dsheirer.instrument.tap.TapListener;
|
import io.github.dsheirer.instrument.tap.TapListener;
|
||||||
import io.github.dsheirer.instrument.tap.TapType;
|
import io.github.dsheirer.instrument.tap.TapType;
|
||||||
import io.github.dsheirer.sample.Listener;
|
import io.github.dsheirer.sample.Listener;
|
||||||
import io.github.dsheirer.dsp.symbol.Dibit;
|
|
||||||
|
|
||||||
public class DibitTap extends StreamTap implements Listener<Dibit>
|
public class DibitTap extends StreamTap implements Listener<Dibit>
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,10 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.instrument.tap.stream;
|
package io.github.dsheirer.instrument.tap.stream;
|
||||||
|
|
||||||
|
import io.github.dsheirer.dsp.symbol.Dibit;
|
||||||
import io.github.dsheirer.instrument.gui.SampleModel;
|
import io.github.dsheirer.instrument.gui.SampleModel;
|
||||||
import io.github.dsheirer.instrument.tap.Tap;
|
import io.github.dsheirer.instrument.tap.Tap;
|
||||||
import io.github.dsheirer.instrument.tap.TapViewPanel;
|
import io.github.dsheirer.instrument.tap.TapViewPanel;
|
||||||
import io.github.dsheirer.dsp.symbol.Dibit;
|
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.geom.Path2D;
|
import java.awt.geom.Path2D;
|
||||||
|
|||||||
@@ -17,10 +17,10 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.instrument.tap.stream;
|
package io.github.dsheirer.instrument.tap.stream;
|
||||||
|
|
||||||
|
import io.github.dsheirer.dsp.symbol.SymbolEvent;
|
||||||
import io.github.dsheirer.instrument.tap.TapListener;
|
import io.github.dsheirer.instrument.tap.TapListener;
|
||||||
import io.github.dsheirer.instrument.tap.TapType;
|
import io.github.dsheirer.instrument.tap.TapType;
|
||||||
import io.github.dsheirer.sample.Listener;
|
import io.github.dsheirer.sample.Listener;
|
||||||
import io.github.dsheirer.dsp.symbol.SymbolEvent;
|
|
||||||
|
|
||||||
public class SymbolEventTap extends StreamTap implements Listener<SymbolEvent>
|
public class SymbolEventTap extends StreamTap implements Listener<SymbolEvent>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.instrument.tap.stream;
|
package io.github.dsheirer.instrument.tap.stream;
|
||||||
|
|
||||||
|
import io.github.dsheirer.dsp.symbol.SymbolEvent;
|
||||||
import io.github.dsheirer.instrument.gui.SampleModel;
|
import io.github.dsheirer.instrument.gui.SampleModel;
|
||||||
import io.github.dsheirer.instrument.tap.TapViewPanel;
|
import io.github.dsheirer.instrument.tap.TapViewPanel;
|
||||||
import io.github.dsheirer.dsp.symbol.SymbolEvent;
|
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.geom.Path2D;
|
import java.awt.geom.Path2D;
|
||||||
|
|||||||
@@ -17,8 +17,10 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.map;
|
package io.github.dsheirer.map;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
import io.github.dsheirer.settings.Setting;
|
import io.github.dsheirer.settings.Setting;
|
||||||
|
|
||||||
|
@JsonSubTypes.Type(value = DefaultIcon.class, name = "defaultIcon")
|
||||||
public class DefaultIcon extends Setting
|
public class DefaultIcon extends Setting
|
||||||
{
|
{
|
||||||
public DefaultIcon( String name )
|
public DefaultIcon( String name )
|
||||||
|
|||||||
@@ -17,171 +17,174 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.map;
|
package io.github.dsheirer.map;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.settings.Setting;
|
import io.github.dsheirer.settings.Setting;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
import javax.xml.bind.annotation.XmlTransient;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
||||||
|
@JsonSubTypes.Type(value = MapIcon.class, name = "mapIcon")
|
||||||
public class MapIcon extends Setting implements Comparable<MapIcon>
|
public class MapIcon extends Setting implements Comparable<MapIcon>
|
||||||
{
|
{
|
||||||
private static final int sMAX_IMAGE_DIMENSION = 48;
|
private static final int sMAX_IMAGE_DIMENSION = 48;
|
||||||
private String mPath;
|
private String mPath;
|
||||||
private ImageIcon mImageIcon;
|
private ImageIcon mImageIcon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Only map icons created at runtime can be marked as non-editable, and
|
* Only map icons created at runtime can be marked as non-editable, and
|
||||||
* therefore this property is transient.
|
* therefore this property is transient.
|
||||||
*/
|
*/
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
private boolean mEditable;
|
private boolean mEditable;
|
||||||
|
|
||||||
@XmlTransient
|
@JsonIgnore
|
||||||
private boolean mDefaultIcon;
|
private boolean mDefaultIcon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper class for a map icon.
|
* Wrapper class for a map icon.
|
||||||
* @param name - name of the icon - also used as key to lookup the icon
|
*
|
||||||
* @param path - file path to the icon
|
* @param name - name of the icon - also used as key to lookup the icon
|
||||||
* @param editable - defines if the map icon or details can be edited
|
* @param path - file path to the icon
|
||||||
*
|
* @param editable - defines if the map icon or details can be edited
|
||||||
* Note: the default icons are constructed with editable = false, so that
|
*
|
||||||
* they cannot be deleted from the Icon Manager editor window
|
* Note: the default icons are constructed with editable = false, so that
|
||||||
*/
|
* they cannot be deleted from the Icon Manager editor window
|
||||||
public MapIcon( String name, String path, boolean editable )
|
*/
|
||||||
{
|
public MapIcon(String name, String path, boolean editable)
|
||||||
super( name );
|
|
||||||
mPath = path;
|
|
||||||
mEditable = editable;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MapIcon( String name, String path )
|
|
||||||
{
|
|
||||||
this( name, path, true );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Don't use this constructor. This is used by JAXB to unmarshall saved
|
|
||||||
* map icons.
|
|
||||||
*/
|
|
||||||
public MapIcon()
|
|
||||||
{
|
|
||||||
mEditable = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@XmlAttribute( name="editable" )
|
|
||||||
public boolean isEditable()
|
|
||||||
{
|
|
||||||
return mEditable;
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlAttribute( name="default" )
|
|
||||||
public boolean isDefaultIcon()
|
|
||||||
{
|
|
||||||
return mDefaultIcon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDefaultIcon( boolean isDefault )
|
|
||||||
{
|
|
||||||
mDefaultIcon = isDefault;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ImageIcon getImageIcon()
|
|
||||||
{
|
|
||||||
if( mImageIcon == null )
|
|
||||||
{
|
|
||||||
mImageIcon = new ImageIcon( mPath );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If the image is too big, scale it down to max pixel size squared
|
|
||||||
*/
|
|
||||||
if( mImageIcon.getIconWidth() > sMAX_IMAGE_DIMENSION ||
|
|
||||||
mImageIcon.getIconHeight() > sMAX_IMAGE_DIMENSION )
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* getScaled instance will correct any negative value to the
|
|
||||||
* correct value, maintaining original aspect ratio. So, we
|
|
||||||
* only scale the larger value, and allow the image class to
|
|
||||||
* determine the correct value for the other measurement
|
|
||||||
*/
|
|
||||||
int height = -1;
|
|
||||||
int width = -1;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Use the larger width or height value to determine the
|
|
||||||
* scaling factor
|
|
||||||
*/
|
|
||||||
if( mImageIcon.getIconHeight() > mImageIcon.getIconWidth() )
|
|
||||||
{
|
|
||||||
height = sMAX_IMAGE_DIMENSION;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
width = sMAX_IMAGE_DIMENSION;
|
|
||||||
}
|
|
||||||
|
|
||||||
mImageIcon = new ImageIcon( mImageIcon.getImage()
|
|
||||||
.getScaledInstance( width, height, Image.SCALE_SMOOTH ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return mImageIcon;
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlAttribute( name="path" )
|
|
||||||
public String getPath()
|
|
||||||
{
|
|
||||||
return mPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPath( String path )
|
|
||||||
{
|
|
||||||
mPath = path;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString()
|
|
||||||
{
|
|
||||||
if( mDefaultIcon )
|
|
||||||
{
|
|
||||||
return getName() + " (default)";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return getName();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals( Object obj )
|
|
||||||
{
|
|
||||||
if( obj instanceof MapIcon )
|
|
||||||
{
|
|
||||||
MapIcon other = (MapIcon)obj;
|
|
||||||
|
|
||||||
return other.getName().contentEquals( getName() ) &&
|
|
||||||
other.getPath().contentEquals( getPath() );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode()
|
|
||||||
{
|
|
||||||
return getName().hashCode() + getPath().hashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sort order is determined by the icon name
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int compareTo( MapIcon other )
|
|
||||||
{
|
{
|
||||||
return getName().compareTo( other.getName() );
|
super(name);
|
||||||
|
mPath = path;
|
||||||
|
mEditable = editable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapIcon(String name, String path)
|
||||||
|
{
|
||||||
|
this(name, path, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Don't use this constructor. This is used by JAXB to unmarshall saved
|
||||||
|
* map icons.
|
||||||
|
*/
|
||||||
|
public MapIcon()
|
||||||
|
{
|
||||||
|
mEditable = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "editable")
|
||||||
|
public boolean isEditable()
|
||||||
|
{
|
||||||
|
return mEditable;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "default")
|
||||||
|
public boolean isDefaultIcon()
|
||||||
|
{
|
||||||
|
return mDefaultIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDefaultIcon(boolean isDefault)
|
||||||
|
{
|
||||||
|
mDefaultIcon = isDefault;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImageIcon getImageIcon()
|
||||||
|
{
|
||||||
|
if(mImageIcon == null)
|
||||||
|
{
|
||||||
|
mImageIcon = new ImageIcon(mPath);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the image is too big, scale it down to max pixel size squared
|
||||||
|
*/
|
||||||
|
if(mImageIcon.getIconWidth() > sMAX_IMAGE_DIMENSION ||
|
||||||
|
mImageIcon.getIconHeight() > sMAX_IMAGE_DIMENSION)
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* getScaled instance will correct any negative value to the
|
||||||
|
* correct value, maintaining original aspect ratio. So, we
|
||||||
|
* only scale the larger value, and allow the image class to
|
||||||
|
* determine the correct value for the other measurement
|
||||||
|
*/
|
||||||
|
int height = -1;
|
||||||
|
int width = -1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the larger width or height value to determine the
|
||||||
|
* scaling factor
|
||||||
|
*/
|
||||||
|
if(mImageIcon.getIconHeight() > mImageIcon.getIconWidth())
|
||||||
|
{
|
||||||
|
height = sMAX_IMAGE_DIMENSION;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
width = sMAX_IMAGE_DIMENSION;
|
||||||
|
}
|
||||||
|
|
||||||
|
mImageIcon = new ImageIcon(mImageIcon.getImage()
|
||||||
|
.getScaledInstance(width, height, Image.SCALE_SMOOTH));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return mImageIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "path")
|
||||||
|
public String getPath()
|
||||||
|
{
|
||||||
|
return mPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPath(String path)
|
||||||
|
{
|
||||||
|
mPath = path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
if(mDefaultIcon)
|
||||||
|
{
|
||||||
|
return getName() + " (default)";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object obj)
|
||||||
|
{
|
||||||
|
if(obj instanceof MapIcon)
|
||||||
|
{
|
||||||
|
MapIcon other = (MapIcon)obj;
|
||||||
|
|
||||||
|
return other.getName().contentEquals(getName()) &&
|
||||||
|
other.getPath().contentEquals(getPath());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return getName().hashCode() + getPath().hashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sort order is determined by the icon name
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int compareTo(MapIcon other)
|
||||||
|
{
|
||||||
|
return getName().compareTo(other.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,10 +18,10 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.map;
|
package io.github.dsheirer.map;
|
||||||
|
|
||||||
|
import io.github.dsheirer.alias.Alias;
|
||||||
import io.github.dsheirer.icon.IconManager;
|
import io.github.dsheirer.icon.IconManager;
|
||||||
import io.github.dsheirer.message.Message;
|
import io.github.dsheirer.message.Message;
|
||||||
import io.github.dsheirer.sample.Listener;
|
import io.github.dsheirer.sample.Listener;
|
||||||
import io.github.dsheirer.alias.Alias;
|
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.map;
|
package io.github.dsheirer.map;
|
||||||
|
|
||||||
import org.jdesktop.swingx.mapviewer.GeoPosition;
|
|
||||||
import io.github.dsheirer.alias.Alias;
|
import io.github.dsheirer.alias.Alias;
|
||||||
|
import org.jdesktop.swingx.mapviewer.GeoPosition;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.module.decode.am;
|
package io.github.dsheirer.module.decode.am;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.module.decode.DecoderType;
|
import io.github.dsheirer.module.decode.DecoderType;
|
||||||
import io.github.dsheirer.module.decode.config.DecodeConfiguration;
|
import io.github.dsheirer.module.decode.config.DecodeConfiguration;
|
||||||
|
|
||||||
@@ -24,11 +25,15 @@ public class DecodeConfigAM extends DecodeConfiguration
|
|||||||
{
|
{
|
||||||
public DecodeConfigAM()
|
public DecodeConfigAM()
|
||||||
{
|
{
|
||||||
super( DecoderType.AM );
|
|
||||||
|
|
||||||
setAFC( false );
|
setAFC( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||||
|
public DecoderType getDecoderType()
|
||||||
|
{
|
||||||
|
return DecoderType.AM;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean supportsAFC()
|
public boolean supportsAFC()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -17,12 +17,14 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.module.decode.config;
|
package io.github.dsheirer.module.decode.config;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import io.github.dsheirer.controller.config.Configuration;
|
import io.github.dsheirer.controller.config.Configuration;
|
||||||
import io.github.dsheirer.module.decode.DecoderType;
|
import io.github.dsheirer.module.decode.DecoderType;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@JsonSubTypes.Type(value = AuxDecodeConfiguration.class, name = "auxDecodeConfiguration")
|
||||||
public class AuxDecodeConfiguration extends Configuration
|
public class AuxDecodeConfiguration extends Configuration
|
||||||
{
|
{
|
||||||
ArrayList<DecoderType> mAuxDecoders = new ArrayList<DecoderType>();
|
ArrayList<DecoderType> mAuxDecoders = new ArrayList<DecoderType>();
|
||||||
@@ -31,7 +33,7 @@ public class AuxDecodeConfiguration extends Configuration
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlElement( name="aux_decoder" )
|
@JacksonXmlProperty(isAttribute = false, localName = "aux_decoder")
|
||||||
public ArrayList<DecoderType> getAuxDecoders()
|
public ArrayList<DecoderType> getAuxDecoders()
|
||||||
{
|
{
|
||||||
return mAuxDecoders;
|
return mAuxDecoders;
|
||||||
|
|||||||
@@ -17,6 +17,11 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package io.github.dsheirer.module.decode.config;
|
package io.github.dsheirer.module.decode.config;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||||
import io.github.dsheirer.controller.config.Configuration;
|
import io.github.dsheirer.controller.config.Configuration;
|
||||||
import io.github.dsheirer.module.decode.DecoderType;
|
import io.github.dsheirer.module.decode.DecoderType;
|
||||||
import io.github.dsheirer.module.decode.am.DecodeConfigAM;
|
import io.github.dsheirer.module.decode.am.DecodeConfigAM;
|
||||||
@@ -27,78 +32,69 @@ import io.github.dsheirer.module.decode.nbfm.DecodeConfigNBFM;
|
|||||||
import io.github.dsheirer.module.decode.p25.DecodeConfigP25Phase1;
|
import io.github.dsheirer.module.decode.p25.DecodeConfigP25Phase1;
|
||||||
import io.github.dsheirer.module.decode.passport.DecodeConfigPassport;
|
import io.github.dsheirer.module.decode.passport.DecodeConfigPassport;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
@JsonSubTypes({
|
||||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
@JsonSubTypes.Type(value = DecodeConfigAM.class, name = "decodeConfigAM"),
|
||||||
|
@JsonSubTypes.Type(value = DecodeConfigLTRNet.class, name = "decodeConfigLTRNet"),
|
||||||
@XmlSeeAlso( { DecodeConfigAM.class,
|
@JsonSubTypes.Type(value = DecodeConfigLTRStandard.class, name = "decodeConfigLTRStandard"),
|
||||||
DecodeConfigNBFM.class,
|
@JsonSubTypes.Type(value = DecodeConfigMPT1327.class, name = "decodeConfigMPT1327"),
|
||||||
DecodeConfigLTRNet.class,
|
@JsonSubTypes.Type(value = DecodeConfigNBFM.class, name = "decodeConfigNBFM"),
|
||||||
DecodeConfigLTRStandard.class,
|
@JsonSubTypes.Type(value = DecodeConfigP25Phase1.class, name = "decodeConfigP25Phase1"),
|
||||||
DecodeConfigMPT1327.class,
|
@JsonSubTypes.Type(value = DecodeConfigPassport.class, name = "decodeConfigPassport")
|
||||||
DecodeConfigPassport.class,
|
})
|
||||||
DecodeConfigP25Phase1.class } )
|
@JacksonXmlRootElement(localName = "decode_configuration")
|
||||||
@XmlRootElement( name = "decode_configuration" )
|
|
||||||
public abstract class DecodeConfiguration extends Configuration
|
public abstract class DecodeConfiguration extends Configuration
|
||||||
{
|
{
|
||||||
public static final int DEFAULT_CALL_TIMEOUT_SECONDS = 45;
|
public static final int DEFAULT_CALL_TIMEOUT_SECONDS = 45;
|
||||||
public static final int CALL_TIMEOUT_MINIMUM = 1;
|
public static final int CALL_TIMEOUT_MINIMUM = 1;
|
||||||
public static final int CALL_TIMEOUT_MAXIMUM = 300; //5 minutes
|
public static final int CALL_TIMEOUT_MAXIMUM = 300; //5 minutes
|
||||||
|
|
||||||
public static final int TRAFFIC_CHANNEL_LIMIT_DEFAULT = 3;
|
public static final int TRAFFIC_CHANNEL_LIMIT_DEFAULT = 3;
|
||||||
public static final int TRAFFIC_CHANNEL_LIMIT_MINIMUM = 0;
|
public static final int TRAFFIC_CHANNEL_LIMIT_MINIMUM = 0;
|
||||||
public static final int TRAFFIC_CHANNEL_LIMIT_MAXIMUM = 30;
|
public static final int TRAFFIC_CHANNEL_LIMIT_MAXIMUM = 30;
|
||||||
|
|
||||||
public static final int DEFAULT_AFC_MAX_CORRECTION = 1000;
|
public static final int DEFAULT_AFC_MAX_CORRECTION = 1000;
|
||||||
|
|
||||||
private DecoderType mDecoderType = DecoderType.NBFM;
|
private boolean mAFCEnabled = true;
|
||||||
private boolean mAFCEnabled = true;
|
private int mAFCMaxCorrection = DEFAULT_AFC_MAX_CORRECTION;
|
||||||
private int mAFCMaxCorrection = DEFAULT_AFC_MAX_CORRECTION;
|
|
||||||
|
|
||||||
public DecodeConfiguration()
|
public DecodeConfiguration()
|
||||||
{
|
{
|
||||||
this( DecoderType.NBFM );
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public DecodeConfiguration( DecoderType type )
|
@JsonIgnore
|
||||||
{
|
public abstract DecoderType getDecoderType();
|
||||||
mDecoderType = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DecoderType getDecoderType()
|
@JacksonXmlProperty(isAttribute = true, localName = "afc")
|
||||||
{
|
public boolean getAFC()
|
||||||
return mDecoderType;
|
{
|
||||||
}
|
return mAFCEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
@XmlAttribute( name = "afc" )
|
@JsonIgnore
|
||||||
public boolean getAFC()
|
public boolean isAFCEnabled()
|
||||||
{
|
{
|
||||||
return mAFCEnabled;
|
return mAFCEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAFCEnabled()
|
public void setAFC(boolean enabled)
|
||||||
{
|
{
|
||||||
return mAFCEnabled;
|
mAFCEnabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAFC( boolean enabled )
|
@JacksonXmlProperty(isAttribute = true, localName = "AFCMaximumCorrection")
|
||||||
{
|
public int getAFCMaximumCorrection()
|
||||||
mAFCEnabled = enabled;
|
{
|
||||||
}
|
return mAFCMaxCorrection;
|
||||||
|
}
|
||||||
|
|
||||||
@XmlAttribute( name = "AFCMaximumCorrection" )
|
public void setAFCMaximumCorrection(int max)
|
||||||
public int getAFCMaximumCorrection()
|
{
|
||||||
{
|
mAFCMaxCorrection = max;
|
||||||
return mAFCMaxCorrection;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void setAFCMaximumCorrection( int max )
|
public boolean supportsAFC()
|
||||||
{
|
{
|
||||||
mAFCMaxCorrection = max;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean supportsAFC()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user